Controlling a 3-Phase Brushless DC Motor Using GreenPAK Chips and Hall Sensors
A brushless DC motor (BLDC), also known as an electronically commutated motor (ECM, EC motor) or a synchronous DC motor, is a synchronous motor powered by direct current through an inverter or switching power supply, which generates an alternating current through a closed-loop controller to Drive each phase of the motor. The controller provides current pulses to the motor windings that control the speed and torque of the motor.
Compared to brushed motors, the advantages of brushless motors are high power-to-weight ratio, high speed, and electronic control. Brushless motors have applications in computer peripherals, hand-held power tools, and vehicles.
In the following sections we will describe how to program the creation of a DC motor control. However, if you just want to try out the results, download the GreenPAK Designer software, plug the GreenPAK development kit into your computer, and click on the program to design the device.
all Sensors Construction and operation principle
The structure and operation of brushless motors are very similar to AC motors and brushed DC motors. Like all other motors, a BLDC motor consists of a rotor and a stator (Figure 1).
BLDC motor stators are made of laminated steel to carry the windings. The windings in the stator can be arranged in two patterns – star (Y) or delta (Δ). The main difference between the two modes is that the Y mode provides high torque at low RPM, while the delta mode provides low torque at low RPM. This is because in the delta configuration, half of the voltage is applied to the undriven windings, increasing losses, which in turn increases efficiency and torque. BLDC motors are controlled using an electrical loop. An electrical cycle has 6 states. The motor commutation sequence based on Hall sensor is shown in Figure 2.
The basic principle of operation of a BLDC motor is the same as that of a brushed DC motor. For brushed DC motors, feedback is achieved using mechanical commutators and brushes. In a BLDC motor, feedback is implemented using multiple feedback sensors. The most commonly used sensors are Hall sensors and optical encoders.
In a three-phase BLDC, the number of poles is a multiple of 3 and the number of magnets is a multiple of 2. Each motor has a different number of steps per revolution depending on the number of magnets and teeth. To calculate the number of steps (N), we need to know how many poles and how many magnets are used in the motor. The motor used in this article has 12 teeth (poles) and 16 magnets.
So, to make 1 turn, we need to generate 48 steps.
Design
The main block diagram and typical application circuit are shown in Figure 3 and Figure 4, respectively.
The design uses 2 inputs to control motor speed and direction. PIN#8 controls the direction; a high level on Pin#8 means the motor rotates clockwise, and a low level means counterclockwise rotation. PIN#2 is used to control the speed by entering the frequency. No frequency signal on this pin will turn off the driver and the motor will stop. Applying a frequency to this pin within the first 500 ms will start the motor. Using the input frequency allows us to control the motor speed very precisely. To calculate RPM, we need to know how many electric steps the motor contains:
The motor in this article has 48 steps, so at 5kHz the motor will be running at 6250 RPM.
The design can be divided into 4 parts (Figure 5): the processing block for the Hall sensor, the gate driver block, the PWM control or speed control block, and the protection block.
The processing modules of the Hall sensor include ACMP (ACMP0, ACMP3, ACMP4), deglitch filters (DLY1, DLY5, DLY6) and DFF (DFF6, DFF7, DFF8). The hall sensor used in this project has 4 pins; VDD, GND and 2 differential outputs connected to the IN+ and IN- inputs of the ACMP. The internal Vref component is set to 1.2 V, which is used as VDD for the Hall sensors. The filtered signal from the ACMP goes to the D input of the DFF. The input frequency clocks these DFFs and sets the rotational speed. The signals from these DFFs go to the gate drivers and the 3-bit LUT14 that configures the XNOR. The result is that every time any Hall sensor changes its polarity, the output level alternates. Both edge detectors generate the actual speed frequency (Hall frequency), which is compared to the input frequency to generate a PWM signal to control the rotational speed.
The gate driver module includes 12 3-bit LUTs that commutate external transistors based on feedback from the Hall sensors. Among them, 6 LUTs (3-bit LUT8 – 3-bit LUT13) are used for the CW direction, and the other 6 (3-bit LUT1 – 3-bit LUT6) are used to switch the CCW direction. The module also includes 3 2-bit LUTs (2-bit LUT4, 2-bit LUT5 and 2-bit LUT6) to mix the signal of each phase PMOS transistor with PWM to ensure that the speed is independent of the load.
PWM control includes PWM2 component, counter CNT8, finite state machine FSM1, 3-bit LUT15, 2 DFFs (DFF0 and DFF1), rising edge detector PDLY0 and inverter INV0. DFF0 and DFF1 work together as a frequency comparator; when the input frequency is higher than the Hall frequency, the DFF0 nQ output goes low; when the input frequency is lower than the Hall frequency, the DFF1 nQ output goes low. When the “+” input is low, the PWM2 OUT+ output will generate a PWM signal with a duty cycle range of 256/256 to 1/256. When the “-” input is low, PWM2 OUT+ will generate a PWM with a duty cycle varying from 1/256 to 256/256. The PWM frequency is about 100 kHz, and the IC’s duty cycle is set to 0% at startup. The motor stops until the input frequency applied to PIN2. After applying the frequency to PIN2, the DFF0 nQ output will go low and the PWM will increase the duty cycle from 0 to 99.6%. The motor will continue to rotate until the hall sensor exceeds the input frequency. At this point, the DFF0 nQ output will go high and the DFF1 nQ output will go low. This inversion causes the PWM duty cycle to drop to an acceptable value at the instant VDD and load seen on the motor. The system will constantly work to balance the PWM duty cycle. The functions of FSM1, CNT8, 3-bit LUT15 and PWM2 are described in more detail in application note AN-1052 .
The protection block consists of 2 relays (DLY2 and DLY9), a counter CNT0 and a 2-bit LUT0 configured as an XOR gate. This part is designed to protect the motor and external FET from burning out. If the motor is stuck or won’t start, the Hall sensors will not provide the feedback needed to shut down the motor. If no feedback is received after 100 ms, the DLY2 output will go low and the 2-bit LUT0 will shut down the motor. If this happens, CNT0 and DLY9 will try to start the motor every 500ms for 8ms. This time is enough to start the motor, but not enough to cause damage to the motor.
Summarize
This article describes how to control a three-phase brushless DC motor using the SLG46620 GreenPAK IC and Hall-effect sensors. The SLG46620 also contains other functions that can be used for this project. For example, instead of using the input frequency, the ADC in GreenPAK can interpret the input DC voltage and generate PWM pulses based on that value.
Dialog GreenPAK reverses this design process by putting configurability back in the hands of the designer. By using this GreenPAK application as a universally applicable three-phase BLDC motor control scheme, designers can choose pin assignments and external FETs that meet their project’s unique electrical specifications. Furthermore, the cost of the Dialog GreenPAK solution is low and small enough, even taking into account the external FETs, so that the system design and BOM cost are very competitive compared to dedicated ICs.