Quadcopters have recently become a very popular technology product in both professional and non-professional fields. This article focuses on the drive control of a sensorless brushless DC motor for a quadcopter, designing and developing a three-phase, six-arm, full-bridge drive circuit and control program. The design uses an ATMEGA16 microcontroller as the control core, utilizing back-EMF zero-crossing detection to alternately turn on the six MOSFETs of the drive circuit for commutation. The brushless DC motor control program completes MOSFET power-on self-test, motor start-up software control, PWM motor speed control, and circuit protection functions. This design features a simple circuit structure, low cost, stable and reliable motor operation, and enables continuous motor operation.
In recent years, the research and application of quadcopters have gradually expanded. They use four brushless DC motors as their power source. The brushless DC motors have an external rotor structure and directly drive the propeller to rotate at high speed.
The drive control methods for mainstream brushless motors are mainly divided into two types: those with position sensors and those without. Due to the requirements for small size, light weight, high efficiency, and reliability of brushless DC motor controllers in quadcopters, sensorless brushless DC motors are used. This article uses the Langyu X2212kv980 brushless DC motor.
The brushless DC motor drive control system consists of two parts: the drive circuit and the system program control. A three-phase full-bridge drive circuit is constructed using the switching characteristics of power transistors, and then a DSP is used as the main control chip. Leveraging its powerful computing capabilities, the motor is started and controlled. However, this method has a complex circuit structure, high cost, and lacks economic efficiency.
Commutation of a brushless DC motor employs a back-EMF zero-crossing detection method. Once the back-EMF zero-crossing point of the third phase is detected, commutation preparation begins. The back-EMF zero-crossing detection uses a virtual neutral point method, determining the rotor position by detecting the back-EMF zero-crossing points of each phase. Furthermore, the motor current commutation theory, based on the voltage variation patterns of the three-phase winding terminals, can significantly improve the system's control accuracy.
The drive circuit for the brushless DC motor in this paper adopts a three-phase, six-arm full-bridge circuit. The management control chip of the control circuit is implemented using the ATmega16 microcontroller to fully utilize its high performance and abundant resources, thus simplifying the external circuit structure. The brushless DC motor uses software start-up and PWM speed control to achieve motor start-up and stable operation, greatly improving the speed regulation and control performance of the brushless DC motor in the quadcopter.
1. Three-phase six-arm full-bridge drive circuit
The brushless DC motor drive control circuit is shown in Figure 1. This circuit uses a three-phase, six-arm full-bridge drive method, which reduces current fluctuations and torque ripple, resulting in a larger output torque. Six power MOSFETs control the output voltage in the motor drive section. The power supply voltage for the brushless DC motor drive circuit in the quadcopter is 12V. In the drive circuit, Q1~Q3 use IRFR5305 (P-channel) from IR Semiconductor, and Q4~Q6 use IRFR1205 (N-channel). These MOSFETs have built-in freewheeling diodes to provide a current path when the MOSFETs are turned off, preventing reverse breakdown. Typical characteristic parameters are shown in Table 1. T1~T3 use PDTC143ET to provide the drive signal for the MOSFETs.
As shown in Figure 1, A1~A3 provide the gate drive signals for the upper arm of the three-phase full-bridge circuit and are connected to the hardware PWM drive signals of the ATMEGA16 microcontroller. The motor speed is controlled by changing the duty cycle of the PWM signal. B1~B3 provide the gate drive signals for the lower arm, which are directly provided by the I/O ports of the microcontroller and have two states: on and off.
Table 1 MOSFET parameters
Figure 1. Three-phase six-arm full-bridge drive circuit for brushless DC motor
The brushless DC motor drive control employs a three-phase, six-state control strategy. The power transistors have six trigger states, with only two transistors conducting at a time. Commutation occurs every 60° electrical angle. If phases AB are conducting at a given moment, phase C is cut off, resulting in no current output. The microcontroller, based on the detected rotor position, utilizes the switching characteristics of the MOSFETs to control the motor's power supply. For example, when Q1 and Q5 are on, phases AB are conducting, and the current flow is: positive terminal → Q1 → winding A → winding B → Q5 → negative terminal. Similarly, when the MOSFETs are turned on in the sequence Q1Q5, Q1Q6, Q2Q6, Q2Q4, Q3Q4, and Q3Q5, continuous operation of the brushless DC motor can be achieved by accurately commutating at the appropriate time.
2. Back potential zero-crossing detection
For a brushless DC motor to operate continuously and normally, its rotor position must be detected to achieve accurate commutation. There are three main methods for detecting the rotor position: photoelectric encoders, Hall effect sensors, and sensorless measurement. Because quadcopter brushless DC motors require a simple system structure and light weight, a sensorless method is used, utilizing the zero-crossing moment of the induced electromotive force generated by the third phase with a 30° delay for commutation. Although this method is relatively cumbersome and has poor controllability during motor startup, its simple circuitry and low cost make it suitable for quadcopter motors that do not require frequent starts during normal flight.
Because of the two-phase conduction mode of the brushless DC motor, the magnitude of the back EMF can be detected using the non-conducting third phase. As shown in Figure 2, the back EMF detection circuit connects the neutral point N to the microcontroller's AIN0 pin, and Ain, Bin, and Cin are connected to the microcontroller's ADC0, ADC1, and ADC2 pins, respectively. The voltage at the neutral point N is continuously compared with the voltages at the three terminals of phases A, B, and C to detect the zero-crossing point of the induced electromotive force in each phase. The positive input of the ATMEGA16 microcontroller's analog comparator is AIN0, and the negative input is selected from ADC0, ADC1, and ADC2 according to the ADMUX register configuration, thus utilizing the multiplexing function of the microcontroller's built-in analog comparator. When phases A and B are energized, the back EMF of phase C is compared with the neutral point N; similarly, the zero-crossing events of each phase can be successfully detected.
Figure 2 Back EMF Detection Circuit
Once the back EMF of the motor is detected, the zero-crossing point of the back EMF can be found. After the back EMF crosses zero, the commutation operation is performed with a 30° electrical angle delay.
3 Control Program Design
3.1 Power-on self-test of drive control circuit
The brushless DC motor drive control section consists of three parts: MOSFET self-test, motor start control, and voltage and current monitoring functions. The power-on self-test process of the drive control circuit is shown in Figure 3, which includes MOSFET short-circuit and conduction characteristic tests to prevent overcurrent damage to the circuit.
3.2 Software Startup Control
Back EMF detection can only be performed after the motor is running normally. When the motor is not rotating or the speed is very low, its back EMF cannot be detected, so a software start-up method is used. For the control of a sensorless brushless DC motor, this paper adopts a three-step start-up method. First, phases A and B are energized for a period of time to fix the motor rotor position; the six states alternately reverse, and the energizing time gradually decreases; the back EMF of the third phase is detected. If it is normal, the start-up is successful; otherwise, it restarts. The specific start-up process is shown in Figure 4.
Figure 3 Power-on self-test flowchart of the drive control circuit
Figure 4. Start-up process of brushless sensorless DC motor
3.3 System Protection Function Design
The quadcopter's system protection functions include voltage and current monitoring. The battery voltage monitoring circuit uses a simple voltage divider to reduce the battery voltage to within the microcontroller's A/D converter's input range (0~5V), preventing motor shutdown due to insufficient voltage. The current detection circuit samples the current through a 0.01Ω resistor, converts it to voltage, and sends it to the microcontroller's A/D converter to prevent high current damage to the circuit in case of a fault. During current monitoring, a simple numerical averaging filter is used to reduce the impact of instantaneous peak current on the measurement results.
4 Conclusion
This paper presents the design of a drive circuit and system control software for a brushless DC motor in a quadcopter. The drive circuit employs a three-phase, six-arm full-bridge circuit, using MOSFETs as switching elements and an ATmega16 microcontroller as the control chip. It utilizes back-EMF zero-crossing detection and software-based startup control, with a 30° commutation delay. After normal startup, the microcontroller outputs PWM to regulate the brushless DC motor speed. Voltage and current monitoring circuits are also designed to ensure system safety. Therefore, this system can normally drive a sensorless brushless DC motor and can be applied to a quadcopter.