Brushless DC Motor Control System Based on 16-bit Microcontroller
2026-04-06 08:00:38··#1
Introduction DC motors, due to their good regulation characteristics and high stall torque, are widely used in drive devices and servo systems. However, brushed DC motors have a complex structure, requiring commutation via brushes, which generates sparks and causes electromagnetic interference, thus limiting their application range as their speed and safety levels cannot meet the needs of many industrial production applications. Advances in electronic device manufacturing processes have made it possible to manufacture high-power electronic commutators, leading to rapid development of brushless DC motor (BLDCM) technology. BLDCMs combine the advantages of traditional DC motors with the advantages of electronic commutators, overcoming the problems associated with mechanical commutation. This has made BLDCMs a hot topic in motor control and they are now widely used in production and daily life. Currently, a large proportion of electric bicycles use BLDCMs as their drive element. Sensorless brushless DC motor control systems have complex algorithms and are not suitable for low-speed and start-up applications. Currently, most BLDCM control systems still use position sensors. Among the many types of position sensors, Hall effect sensors are widely used due to their low cost and ease of use. This paper proposes a BLDCM control system solution based on the NEC 16-bit microcontroller UPD78F1201 and using Hall effect sensors as position sensors. The control principle of a brushless DC motor is as follows: Position sensors are typically photoelectric encoders, Hall effect sensors, or sine/cosine rotary transformers. Photoelectric encoders and sine/cosine rotary transformers offer high accuracy but are expensive and require complex algorithms, primarily used in simulation turntables or precision CNC machine tools. Hall effect sensors are simple in structure and inexpensive, widely used in BLDCM control systems, and are commonly found in electric bicycles. Placing three Hall effect sensors at 120° electrical angle intervals on the motor stator satisfies the commutation control requirements of the BLDCM. Furthermore, the motor speed can be detected by measuring the frequency or pulse width of the Hall effect sensor output signals, achieving speed closed-loop control. The drive circuit mostly uses a full-bridge circuit, adjusting the switching sequence of power devices to achieve commutation control of the BLDCM and enabling forward and reverse rotation control of the motor. PWM signals are modulated in both the upper and lower bridge arms to balance the working pressure of the power devices, extending their service life. The controller typically uses a microcontroller or DSP. The controller detects the rotor position of the BLDCM by reading position sensor signals, thereby determining the commutation strategy and outputting control signals to the drive circuit to control the switching sequence of power devices, enabling the motor to rotate continuously. Typically, the BLDCM control system also has speed closed-loop and overcurrent protection functions. Figure 2 is a schematic diagram of the commutation timing of a 120° Hall effect brushless DC motor. This design uses this commutation timing, determining the commutation strategy based on the detected Hall signals. As shown in the figure, PWM control is only used in the upper bridge arm, while the lower bridge arm control signal is not modulated with a PWM signal. The advantage of this method is its ease of implementation, but it results in higher operating pressure on the upper bridge arm power devices, leading to a shorter lifespan compared to the lower bridge arm devices. The output signals from the three Hall sensors can form six position information values, which are used to control commutation. For example, when the code H1H2H3 is 101 (high level is 1, low level is 0), current flows into the motor from phase U and out from phase V; when H1H2H3 becomes 100, current flows into phase U and out from phase W. Under this control method, the motor achieves continuous rotation. The system design utilizes the UPD78F1201, a 16-bit microcontroller from NEC designed for frequency converter control applications. It boasts abundant hardware resources, including hardware multipliers, dividers, frequency converter counters, and real-time output functions, all of which facilitate BLDCM control. The UPD78F1201 CPU has a maximum clock frequency of 20MHz and a timer clock of 40MHz, employing a 16-bit 78KOR processing core. This results in faster instruction execution and higher efficiency. Furthermore, the microcontroller integrates numerous powerful peripherals, such as a watchdog timer, DMA controller, power-on reset circuit, and low-voltage detection circuit, reducing system cost and improving system reliability. The UPD78F1201 incorporates a 16-bit multiplication hardware multiplier and a 32-bit division hardware divider, enabling multiplication within one clock cycle and division within 16 clock cycles, significantly enhancing the microcontroller's computational performance. This microcontroller is designed for motor frequency conversion control, so it has internal frequency conversion control and real-time output functions. Through the Timer Matrix Unit (TAUS), the period, duty cycle, dead time, etc., of six PWM waves can be set. Combined with the real-time output function, this simplifies the BLDCM control algorithm and improves system performance from another perspective. The motor used in this system is a BLY171S, a three-phase brushless DC motor with a 120° Hall sensor, a maximum speed of 8000 r/min, and a rated voltage of 15V. The speed control signal is input through a variable resistor. The microcontroller outputs six control signals to control the three-phase full-bridge drive circuit, adjusting the PWM duty cycle and thus the motor speed based on the variable resistor input voltage value. The microcontroller uses an external interrupt to check the Hall sensor output signal and determines the commutation strategy based on the motor's rotation direction. The PWM duty cycle and dead time are set in TAUS, and the PWM wave is modulated to the corresponding power device through the real-time output function. Conclusion The voltage waveforms of the three-phase windings of the motor, from top to bottom, are U, V, and W phases. Figure 4(b) shows the control signals for phases V and W, from top to bottom: VB, VT, WB, and WT. The brushless DC motor control system designed using NEC's UPD78F1201 microcontroller is simple in structure and easy to implement. This article only briefly introduces the implementation method of the brushless DC motor control system. Currently, NEC Electronics can provide customers with complete brushless DC motor control solutions and is striving to expand the variety and production capacity of MCU products for motor control, with more products being applied in fields such as air conditioning, refrigerators, and electric vehicles.