NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
AN1129 ST72141 AN1129/0600 - Datasheet Archive
APPLICATION NOTE PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 by Microcontroller Division Applications INTRODUCTION
AN1129 AN1129 APPLICATION NOTE PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 by Microcontroller Division Applications INTRODUCTION Brushless DC motors are efficient, quiet and can provide a very high starting torque, this is partly due to the built-in permanent magnet. For these reasons they are used more and more in a large range of applications like hard disk drives, fans, pumps, compressors, etc. However brushless DC motors run properly only as synchronous motors: they need electronic circuitry to run, including rotor position sensors, switching devices and a control unit. In most cases the switching devices are MOSFET transistors or IGBTs and are organized in a three-phase bridge with free-wheeling diodes as shown in Figure 1. Traditionally Hall sensors are used by the control unit to detect rotor position before changing motor coil to which the power applied. STMicroelectronics has introduced the ST72141 ST72141 microcontroller which is based on an industry standard architecture and is especially designed for driving BLDC motors. One of the major advantages of the ST72141 ST72141 is that, without using sensors, it is capable of controlling motors precisely by reading the Back Electromotive Force (BEMF). Instead of using expensive Hall sensors, three resistors connecting the three windings directly to the ST72141 ST72141 input ports, provide the microcontroller with the rotor position information. The microcontroller replaces the standard control unit and the rotor position sensors. However, the ST72141 ST72141 can be used with sensors as well. Although using sensorless mode has big advantages in terms of cost and size, it makes the motor drive a little bit more complicated. The purpose of this application note is to explain in which cases the ST72141 ST72141 motor control unit can directly read the BEMF voltage and how to quickly set up its control registers in order to use all the advanced features of this product. AN1129/0600 AN1129/0600 1/15 1 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 Figure 1. ST72141 ST72141 Microcontroller with a three-phase bridge HV D0 T2 T0 D2 T4 D4 B C M A D3 T5 T3 D1 D5 T1 5V Low Side outputs Level shifter High Side outputs Rotor position inputs ST72141 ST72141 2/15 2 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 1 SIX-STEP, 120° DRIVE AND PWM POWER CONTROL In order to be able to read the BEMF information, the phase switching has to include a dead time during which no current flows in one of the motor windings. As shown in Figure 3, in six-step, 120° drives, power is removed from each winding every three steps. During this dead-time phase it is possible to detect the BEMF zerocrossing (see Figure 2 for an example). With this method, the BEMF voltage is referred to point M of the motor and not to ground. Because this point is at high voltage, the microcontroller cannot read its value directly. In order to control the speed, the torque or the power applied to the motor, a PWM signal is usually ANDed with the switch control signals. This control is implemented by modifying the duty cycle of the PWM. If the free-wheeling diodes are managed carefully, it is possible to change the M potential to a favorable value and allow the ST72141 ST72141 to sample the BEMF voltage during the dead-time as explained in the next paragraph. Figure 2. Reading the BEMF (Step 4) HV D0 T2 T0 D2 T4 D4 B Read BEMF on phase C M A T3 C BEM D3 T5 F D5 T1 D1 3/15 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 Figure 3. Six step, 120° drive: control signal on the transistor gate 1 Step 2 3 4 5 6 1 2 3 Switch ON T0 T1 T2 T3 OFF ON OFF ON OFF ON OFF ON T4 OFF ON T5 OFF Node HV A 0 HV B 0 BEMF Voltage HV C 0 Note: voltages are represented without any PWM or demagnetization effect. 4/15 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 2 MANAGING THE FREE-WHEELING DIODES AND READING THE BEMF The PWM is used to control the power applied to the motor. It can either control the voltage on the motor with a fixed PWM duty cycle or the current by means of an integrated current control circuitry. It can be applied in three ways: On the high side: the PWM is applied only on the high side switch, the low side is on during the complete step. On the low side: the PWM is applied only on the low side switch, the high side is on during the complete step. On both sides: the high side and the low side are switched off together during each PWM off period. Figure 4. Current during PWM ON time HV D0 T2 T0 D2 T4 D4 B M C A T3 HV 2 D3 T5 D5 T1 D1 The 2 switches T2 and T3 are ON 5/15 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 2.1 PWM ON THE HIGH SIDE When the related switches are ON the current passes through the two switches and two motor windings (these are switches T2 and T3 in the example in Figure 4). The potential on point M is HV/2 and the BEMF cannot be read by the ST72141 ST72141 because the voltage is too high to be read by the microcontroller. When the high side is switched OFF, the current inside the motor continues to flow in the same direction (Figure 5). While the switch is off the current can only use the diode (D5 in our example). In this case the potential in A is the Von of T3 switch, the potential in B is -Vf of D5 and the potential of in M is (Von-Vf)/2. It is close to zero because in most cases Von = Vf. In this case the microcontroller can read the complete BEMF voltage referred to the ground terminal on the phase C. This is the configuration that must be used with the ST72141 ST72141 to take advantage of the sensorless function. Figure 5. PWM on high side: Current during OFF time T0 D0 T2 D2 T4 D4 PWM B M C A T3 0V D3 T5 PWM on T2 6/15 D5 T1 D1 Free-wheeling diode: D5 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 2.2 PWM ON THE LOW SIDE When the related switches are ON (example of Figure 4) the current passes trough the two switches and two motor windings. When the low side is switched OFF, the current inside the motor continues to flow in the same direction (Figure 6). While the switch is off the current can only use the diode (D0 in our example). In this case the potential at A is (HV+Vf), the potential at B is (HV-Von) and the potential of in M is (2xHV+Von-Vf)/2. We can consider it is HV (because in most case Von = Vf). In this case the microcontroller cannot read the BEMF voltage neither in the PWM on time or the PWM off time. · Von is the turn ON voltage of the switch · Vf is the forward voltage of a diode Figure 6. PWM on low side: Current during OFF time HV D0 T2 T0 D2 T4 D4 B M C A T3 PWM HV D3 T5 D5 T1 D1 PWM on T3; Free-wheeling diode D0 7/15 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 2.3 PWM ON BOTH SIDES When the switches are ON (see example in Figure 4) the current goes through the two switches and two motor windings. Then both the high side and the low side are switched OFF, the current inside the motor continues to go in the same direction (Figure 5). While the switches are off, the current can only use the diodes (D5 & D0 in our example). In this case the potential in A is the (HV+Vf), the potential in B is -Vf and the potential in M is HV/2. The microcontroller cannot read the BEMF voltage either in the PWM ON time or in the PWM OFF time. Figure 7. PWM on both sides: Current during OFF time HV D0 T2 T0 D2 T4 D4 PWM B M C A T3 HV 2 D3 T5 D5 T1 D1 PWM PWM on T2 & T3 8/15 Free-wheeling diodes: D5 & D0 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 2.4 NOTES ON CONFIGURING THE ST72141 ST72141 If the ST72141 ST72141 microcontroller is referred to the ground terminal, the only way to detect the BEMF without sensors is: To generate a Pulse Width Modulation with enough OFF time to read the BEMF voltage. This requirement can be obtained by setting the PWM duty cycle of timer A in voltage mode or the OT1-0 bits (register MCRB) in current mode. Apply this PWM only on the high side switches. You have to configure the microcontroller with the correct PWM configuration. In order to configure all the registers, follow this sequence: Split the switches in two parts by means of the Even/Odd configuration: the low side and the high side. (MPAR register, EO0-5 bits) for example: T1, T3, T5 even for the low side T0, T2, T4 odd for the high side. Select the group you want to read the BEMF from by programming the REO bit (register MPAR): the high side has to be selected. In our example: read on odd (high side), REO=1. Select the PWM direction after D (OS1-0 bits, register MCRB): The PWM has to be applied only on the high side. In our example: OS1-0 = 01, PWM on odd channels. You can make use of the free-wheeling diodes in order to accelerate the demagnetization time as explained in the next paragraph. 9/15 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 3 WINDING DEMAGNETIZATION When the microcontroller switches from one step to the next, the non-excited winding needs a certain demagnetization time. During this time, the current in the winding continues in the same direction but decreases to zero. It is not possible to see the BEMF voltage as long as this current is still present, because during this time the voltage on the winding is tied to 0V or HV by the free-wheeling diode. Due to the winding self-induction, the demagnetization time decreases if the reverse voltage on the winding increases. Let's look at an example. Figure 8 shows step 4 with the normal current and the free-wheeling current (dotted line) used to read the BEMF during the PWM OFF time. Figure 8. Step 4 HV D0 T2 T0 D2 T4 D4 B Normal current free-wheeling current for BEMF reading C M A T3 10/15 D3 T5 D5 T1 D1 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 When switching from step 4 to step 5, a free-wheeling, decreasing demagnetization current is still present through the B terminal (dashed line) and an increasing magnetization current appears through the C terminal (dotted line). Figure 9 shows these two currents during the PWM ON time. Figure 9. Step 5 during the demagnetization PWM ON time HV T0 D0 T2 D2 T4 D4 B Normal mode magnetization current A M C F T3 D3 T5 PWM on T2 D5 T1 D1 free wheeling demagnetization current This means, during the PWM ON time: The potential of B is zero The potential of M is close to HV/2 As for the BEMF reading, during the PWM OFF time, we can choose which switch to direct the PWM to, in order to accelerate the demagnetization of the non-excited winding (B). 11/15 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 Figure 10. Acceleration of demagnetization during PWM OFF time HV D0 T2 T0 D2 T4 D4 B Normal current M C A T3 PWM D3 T5 D5 T1 D1 Demagnetization current In our example, during step 4, the VMB voltage on the MB winding was positive. At the beginning of step 5, the voltage on terminal B will be tied to 0V and the shortest demagnetization configuration is the one that provides the higher voltage at point M. It is easy to verify that the higher voltage (HV) is obtained when the PWM is applied only on the low side switch (configuration shown in Figure 10). Otherwise this voltage is either 0 (if the PWM applied on the high side) or HV/2 (if the PWM applied on the low side). The ST72141 ST72141 allows you to program different PWM configurations in current/sensorless mode In order to minimize the demagnetization time, the ST72141 ST72141 allows you to modify the PWM direction between the step commutation and the end of demagnetization. In current/sensorless mode the OS2 bit in register MCRB enables the PWM on the Odd or Even channels. In voltage mode this configuration does not exist: the best solution is to use the "alternate" feature. In this mode the PWM configuration changes at each period, and alternately uses the odd and the even channels. The best solution for speeding up demagnetization will be selected only once for every second PWM period. This mode is selected by setting the OS2 bit. 12/15 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 4 CONFIGURATION EXAMPLE This section gives a configuration example for a six step 120° motor drive for a PMDC motor in sensorless, current and autoswitched mode. The configuration registers can be divided in two parts: Table 1 General Configuration Registers lists the configuration bits that only need to be written once, Table 2 Step Configuration Registers gives the step-dependent configuration bits. The registers in Table 2 must be updated within each commutation interrupt routine in order to select the configuration for the next step. Table 1. General Configuration Registers Register MPAR MCRA MCRB MPHST Value 7 6 5 4 3 ZVD 0 MOE REO 1 RST OE5 0 SR 1 0 0 0 1 VR1 X IS1 S VR0 X IS0 S CPB S OO5 S HDM S OO4 S SDM S OO3 S 2 1 0 OE1 0 CFF OE0 1 DCB 1 X X OS2 S OO2 S OS1 0 OO1 S OE4 OE3 OE2 1 0 1 DAC V0C1 SWA Comments Read on ODD channels, The high side switches are ODD. The motor runs in autoswitched mode, current mode, sensorless mode. OS0 PWM after end of demagnetization: on ODD channels. 1 OO0 input selection and output data change at each step. S Notes: - Bits marked with X depend on the motor and / or the application: CFF depends on the noise present on the current feedback pin, DCB depends on the motor symmetry; VR1-0 depend on the noise level on the BEMF input pins. - Bits marked with S have to be modified after each commutation (step dependent configuration). These bits are summarized in Table 1 General Configuration Registers. Those bits are taken in account only at the next commutation event. 13/15 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 Table 2. Step Configuration Registers 1 2 3 4 5 6 Measure done on terminal: A to B T0 T5 100001 C A to C T0 T1 000011 B B to C T2 T1 000110 A B to A T2 T3 001100 C C to A T4 T3 011000 B C to B T4 T5 110000 A Connected to pin MCIC MCIB MCIA MCIC MCIB MCIA IS selection bits value 10 01 00 10 01 00 MPHST 10100001 01000011 00000110 10001100 01011000 00110000 Back EMF shape Falling Rising Falling Rising Falling Rising CPB value for BEMF detection (ZVD=0) 0 1 0 1 0 1 Voltage on measured point at the start of demagnetization 0V HV 0V HV 0V HV Transition at end of demagnetization 0V->BEMF (rising) HV->BEMF (falling) 0V->BEMF (rising) HV->BEMF (falling) 0V->BEMF (rising) HV->BEMF (falling) Hardware demagnetization always possible not always possible always possible not always possible always possible not always possible HDM-HDM bit value 10 11 10 11 10 11 Low Side (even) T5 High Side (odd) T0 Low Side (even) T1 High Side (odd) T2 Low Side (even) T3 High Side (odd) T4 Step Current direction High side Low side OO output bits (Hard - Soft Demagnetization Mask bits) PWM side selection for accelerating demagnetization Driver selection for accelerating demagnetization OS2 bit MCRB 14/15 0 1 0 1 0 1 xx010001 xx111101 xx010001 xx111101 xx010001 xx111101 PWM MANAGEMENT FOR BLDC MOTOR DRIVES USING THE ST72141 ST72141 "THE PRESENT NOTE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH A NOTE AND/OR THE USE MADE BY CUSTOMERS OF THE INFORMATION CONTAINED HEREIN IN CONNEXION WITH THEIR PRODUCTS." Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not authorized for use as critical components in life support devices or systems without the express written approval of STMicroelectronics. The ST logo is a registered trademark of STMicroelectronics ©2000 STMicroelectronics - All Rights Reserved. Purchase of I2C Components by STMicroelectronics conveys a license under the Philips I2C Patent. Rights to use these components in an I2C system is granted provided that the system conforms to the I2C Standard Specification as defined by Philips. STMicroelectronics Group of Companies Australia - Brazil - China - Finland - France - Germany - Hong Kong - India - Italy - Japan - Malaysia - Malta - Morocco - Singapore - Spain Sweden - Switzerland - United Kingdom - U.S.A. http://www.st.com 15/15