The ST7MC microcontroller family is the second generation of the 8-bit microcontroller family
dedicated to the driving of 3-phase brushless motors. Permanent Magnet Brushless DC mo
tors are replacing DC brush motors more and more in many applications due to advantages
such as higher efficiency, quieter operation and better reliability. These motors require the
control of an inverter stage. 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. There are two methods of controlling the motor and reading information back from
the rotor. These are called the sensor and the sensorless methods. The sensor method uses
Hall sensors whereas the sensorless method reads the Back Electromotive Force (BEMF)
signal back to determine the position of the rotor and so is less expensive.
The ST7MC microcontroller features a dedicated peripheral to drive this type of motor with the
best efficiency in order to maintain the advantages of these types of motor. Besides the high
flexibility of this dedicated peripheral, its high hardware integration allows cost savings for the
application by reducing external components. It is suitable for both sensor and sensorless
methods of PM BLDC motor control.
-
Although using the sensorless mode has big advantages in terms of cost and size, it makes
the motor drive a little more complicated. The purpose of this application note is to explain in
which cases the ST7MC 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. We
will detail and explain the PWM management inside the ST7MC in order to help the developer
use all the advantages of this flexibility to optimize the design and the efficiency of the appli
cation.
PWM MANAGEMENT FOR 3-PHASE BLDC MOTOR DRIVES USING THE ST7MC
Figure 1. ST7FMC Microcontroller with a three-phase bridge
HV
T0
T3
D0D2D4
T2
M
A
D3
T5
Level
shifter
B
D5
Low
Side
outputs
High
Side
outputs
T4
T1
C
5V
Rotor
position
inputs
D1
Feedback
ST7FMC
1 MOTOR CONTROL MACROCELL INTRODUCTION
Figure 2 below gives a detailed view of the motor control macrocell included in the ST7MC mi-
crocontroller. In bold are the parts of the macrocell that are going to be described in this application note and that have a role in the PWM management. The purpose of this document is to
ease the understanding of the PWM management with the ST7MC to control a brushless 3phase DC motor and to make this explanation easier, the schematic on the figure below can
be taken as a reference of a global view of the mechanism. Besides the drawings of the func
tionalities, the names of the registers involved and often even the bits are written in this schematic. Anyhow, each time a register is discussed in this document, either a reference or an
exact description will be made for that register.
3/39
-
PWM MANAGEMENT FOR 3-PHASE BLDC MOTOR DRIVES USING THE ST7MC
Figure 2. Detailed view of the MTC for PM BLDC motor control
DD
Board + Motor
MCPWMU/V/W
HV
C
B
A
drivers
MCIC
MCIA
MCIB
MCVREF
MPWME Reg
MCPWMU
MCPWMV
MCPWMW
MCO0
MCO2
MCO4
MCO1
MCO3
MCO5
NMCES
MOE bit
1
6
MPOL Reg
x6x6
V
A
OAN
OAP
OCV bit
CLI bit
CLIM bit
-
+
OAON
1ext
2ext
R
R
(I)
(V)
ext
C
MCCFI0
MCCREF
OAZ(MCCFI1)
CFAV bit
bit
IS
Reg
MREF
bits
n
n
12-bit PWM generator
OS
3
Time
Dead
Ch0
Ch2
Ch1
Time
Dead
Ch3Ch4
MPHSTn Reg
High Frequency Chopper
Time
Dead
Ch5
6
2
8
6
PCN bit =0
MDTG register
MPAR Reg
-
+
CFW[2:0] bit
CFF[2:0] bit
VR2-0
REF
V
S,H
-
+
S,H
D
C
V
2
I
1
D/Z Window filter
DQ
CP
S,H
C
S,H
D
2
SPLG
1
1 /20
1 / 4
F
PRESCALER
mtc
1 / 2
+
R
MTIM
= FFh?
+1
periph
F
Z event generation
D event generation
H
Z
XT16:XT8 bit
H
D
Microcontroller
Compare U
1/128
➘
1
Ratio
1 / 2
4
ST3-0 bits
SR bit
MZREG
Z
SWA bit
SA3-0 &
OT1-0 bits
-
< 55h?
-1
S,H
D
SQ
V
R
CLI
I
]
n
H
C
1
0
H
MDREG Reg [D
D
bit
n
SDM
Compare
S
D
Filter / C
DWF[3:0]
CL
MIMR Reg
MISR Reg
S,H
-/+
R
S,H
S,H
C
D
Z
E
clr
n
bit
SZ
8
Compare
ck
nn-1
MTIM [8-bit Up Counter]
R
]
n
MZREG Reg [Z
H
Z
]
n-1
MZPRV Reg [Z
S,H
Z
DCB bit
Filter / D
ZWF[3:0]
S
Z
S,H
C
8
]
n+1
8
MWGHT Reg [a
8
A x B / 256
SWA bit
Compare
]
n+1
MCOMP Reg [C
4/39
PWM MANAGEMENT FOR 3-PHASE BLDC MOTOR DRIVES USING THE ST7MC
2 SIX-STEP, 120° DRIVE AND PWM POWER CONTROL
To control a BLDC motor with the best efficiency, we have to know the rotor position at all
times. To achieve this there are two modes. One is called the sensor mode, where the infor
mation read back from the motor is the one coming from Hall Effect sensors (1 per phase).
The other one is the sensorless mode, where the Back Electromotive Force (BEMF) signal in
formation is the one read back from the motor. The strength of the ST7FMC is that it is compatible with all the modes to control a BLDC motor, whether it is sensorless or not and it is
even suitable with different variations within the sensorless or sensor modes which will be de
tailed later on in this application note.
In sensorless mode, 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 4, in six-step, 120° drive, power is removed from each winding every three
steps. During this dead-time phase, it is possible to detect the BEMF zero-crossing event on
this non powered winding (see
In order to control the speed, the torque or the power applied to the motor, a PWM signal is
usually logically ANDed with the switch control signals. This control is implemented by modi
fying the duty cycle of this logically ANDed PWM signal.
Figure 3 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.
Note: In sensor mode the six-step drive or the sinusoidal drive can be implemented as the
feedback signal comes independently from the Hall Effect sensor in the dedicated input of the
microcontroller. However, in six-step drive, the method will be exactly the same as the one de
tailed for the sensorless mode. For the sensor sinusoidal mode, the PWM management is the
same as for the AC induction motor drive.
-
5/39
PWM MANAGEMENT FOR 3-PHASE BLDC MOTOR DRIVES USING THE ST7MC
Figure 3. Reading the BEMF (Step Σ4)
HV
T0
D0D2D4
T2
T4
B
Read BEMF
on phase C
T3
M
B
E
A
D3
T5
M
F
D5
T1
C
D1
Figure 4. Six-step, 120° drive: control signal on the transistor gate
Σ
Step
Switch
T0
T1
1Σ2Σ3Σ4Σ5Σ6Σ1Σ2Σ3
ON
OFF
ON
OFF
ON
T2
OFF
ON
T3
OFF
ON
T4
OFF
ON
T5
OFF
Node
HV
A
0
HV
B
0
HV
C
0
BEMF Voltage
Note: voltages are represented without any PWM or demagnetization effect.
6/39
PWM MANAGEMENT FOR 3-PHASE BLDC MOTOR DRIVES USING THE ST7MC
3 SENSORLESS CONTROL METHODS
In order to make the BEMF signal readable by the microcontroller and to detect the zerocrossing voltage of this signal, there are two main methods which we will call the classic method for the first one and the ST method for the second. The ST7FMC microcontroller is
suitable for both methods. Each method is declinable in sub-method and the ST7MC allows
complete flexibility on which sub-method to use. Please refer to the Application Note AN1946
for a complete view and details on all the methods as this document briefly covers only the 2
main methods.
3.1 CLASSIC METHOD
The classic method involves dividing and filtering the signal coming from the non-powered
phase to make it readable by the 5V microcontroller as shown in
built and is used as the voltage reference to detect the zero-crossing event of the BEMF
signal. With this method, the PWM signal which is logically ANDed with the switch control
signal can be applied either on the high or on the low side switches as explained in the next
section. The ST7MC is able to detect the BEMF zero-crossing signal during either the PWM
signal ON time or OFF time.
Figure 5. A virtual ground is
7/39
PWM MANAGEMENT FOR 3-PHASE BLDC MOTOR DRIVES USING THE ST7MC
Figure 5. Classic sensorless control method
HV
T0
T3
D0D2D4
T2
M
A
D3
T5
Level
shifter
B
D5
Low
Side
outputs
High
Side
outputs
ST7FMC
T4
T1
C
5V
Rotor
position
inputs
internal
Vref
D1
External
Vref
Virtual
ground
Note: The digital filter of ST7MC allows use of the classical method wiring without an analog
filter. In that case we can remove the virtual neutral network and replace this by just a voltage
divider on the High VOLTAGE BUS. In this situation, sampling at PWM "OFF" is possible only
for PWM applied on the high side switch. Please refer to Application Note AN1946 for more
details on this method.
8/39
PWM MANAGEMENT FOR 3-PHASE BLDC MOTOR DRIVES USING THE ST7MC
3.2 ST METHOD
With the ST Method, by using the free-wheeling diodes during the OFF time of the PWM
signal, the M potential is put to ground and the ST7MC microcontroller samples the BEMF
signal voltage during the OFF time of the PWM signal. This involves the fact that the PWM has
to be applied on the high side and that an OFF time is needed as explained in the next section
of this application note. However, fewer external components are required as it is no longer
necessary to divide and filter the signal coming from the non-powered winding. As shown in
Figure 6, only 3 external resistors are needed to limit the current input in the microcontroller
pins.
Figure 6. ST sensorless control Method
HV
T0
T3
D0D2D4
T2
M
A
D3
T5
Level
Shifter
B
D5
Low
Side
outputs
High
Side
outputs
ST7FMC
T4
T1
C
5V
Rotor
position
inputs
internal
Vref
D1
External
Vref
9/39
PWM MANAGEMENT FOR 3-PHASE BLDC MOTOR DRIVES USING THE ST7MC
4 PWM MANAGER IN VOLTAGE MODE AND CURRENT MODE
The PWM signal logically ANDed with the switch control signal 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.
When the PWM signal controls the voltage, the motor is driven in voltage mode. When it is
controlling the current, the motor is driven in current mode.
Voltage mode allows you to control the speed easily by changing the motor reference voltage.
It does not give you fine control of the current but you can limit the current and consequently
the torque to a maximum value. The voltage control is done by the PWM duty cycle.
Current mode allows you to permanently control the torque by changing the motor reference
current, because torque is proportional to current. The current in the windings is regulated in
real time and there is a true DC current flowing through the DC Bus. Current mode also allows
the current for each of the 6 steps to be finely controlled as the current control is done during
the PWM cycle.
Depending on whether the motor is driven in current or voltage mode, the PWM signal does
not have the same origin as shown in
Figure 7.
10/39
PWM MANAGEMENT FOR 3-PHASE BLDC MOTOR DRIVES USING THE ST7MC
Figure 7. The PWM manager
MEASUREMENT
WINDOW
GENERATOR
PWM MANAGER
12-bit counter
(I)
(V)
Phase U
(I)
CURRENT
VOLTAGE
(V)
MODE
1
(V)
PCN bit
PHASE
U, V, W
Phases
CFAV bit
OAON bit
+
-
ADC
CHANNEL
MANAGER
12-bit THREE-PHASE
PWM GENERATOR
MCO5
MCO4
MCO3
MCO2
MCO1
MCO0
NMCES
OAP
OAN
OAZ(MCCFI1)
MCCFI0
MCCREF
C
(V)
(I)
V
DD
R
1
R
2
R
3
Phase U
Phase V
Phase W
MCPWMU
MCPWMV
MCPWMW
The PWM manager manages two different integral parts of the way the ST7MC drives the
motor:
– Current regulation or limitation
– Generation of the PWM signal applied on the switches
The PWM manager has two distinct motor driving modes: voltage mode and current mode. In
both cases, the motor control 12-bit timer peripheral has an essential role.
In Figure 7, the PWM manager uses the paths indicated by the (I) symbol for current mode
and by the (V) symbol for voltage mode.
11/39
PWM MANAGEMENT FOR 3-PHASE BLDC MOTOR DRIVES USING THE ST7MC
4.1 PWM MANAGER IN VOLTAGE MODE
4.1.1 Description
Figure 8. Current limitation in voltage mode control
ST7MC
PWM U output
Max current
ST7MC
Microcontroller
TIMER
set
R
HV
T1
reference
I
t
A
Motor
Voltage
step time step time
T1-T4
T1-T6
VR02139M
t
Vdd
Rext
Rext
Max current
reference
-
+
T4
In voltage mode, the PWM of the 12-bit timer (through the compare U register) gives the
voltage which is supplied to the motor, it is the voltage control of the motor. This PWM signal
is the one logically ANDed with the control switches signal in order to be able to detect the
zero-crossing and demagnetization events.
In voltage control mode, we can set a limitation to the current. The current limitation can be set
by the user with an external resistor divider as shown in
Figure 7 (R1 and R2) and Figure 8
(Rext). Usually this current limitation is the one given by the motor manufacturer. When the
current feedback reaches the maximum reference current at the comparator input, the tran
sistor to which the PWM is applied is put in off state until the current feedback becomes less
than the maximum current limit. So, one of the inputs of the internal comparator is the max
imum current limitation, the other input is the current feedback from the motor (MCCFI0 pin or
the output of the internal operational amplifier if used as shown in
Figure 7).
-
-
This current limitation is for protection and should normally never be reached when running
the motor correctly.
Figure 9 is a capture made with an oscilloscope of the different signals in Voltage mode:
We can see that the current feedback from the motor never reaches the current limitation and
the increase and decrease of the current in the motor corresponds to the PWM signal on the
waveform 2.
12/39
Loading...
+ 27 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.