Journal Jpe 7-2 867439380
Journal Jpe 7-2 867439380
Journal Jpe 7-2 867439380
2, April 2007
JPE 7-2-6
†*
School of Electronics and Information Engineering, Cheongju University, Korea
**
Dept. of Automatic Electrical Engineering, Yeungnam College of Science and Technology, Korea
ABSTRACT
Electrical motors are an integral part of industrial plants with no less than 5 billion motors built world wide every year.
The demand for low-cost brushless DC (BLDC) motors has increased in industrial applications. This paper presents a
BLDC motor control algorithm for low-cost motor drive applications using general purpose microcontrollers which have
only one on-chip timer. This paper describes how to realize pulse width modulation (PWM) signals with general
input/output (I/O) ports to control a three-phase permanent magnet brushless DC motor using the timer interrupt on
MSP430F1232.
comparative cost analysis, and reviewing application notes current sensor is required. Therefore, the system
for specific motor control end equipment will provide performance depends on the accuracy of the motor
design engineers with information leading to benefits such parameters.
as reduced design efforts and time spent learning about The sensorless techniques that utilize the back-EMF
microcontroller-based systems. voltage of the open-phase include the following methods,
Brushless DC (BLDC) motors have been used in 1) Terminal voltage sensing,
various industrial applications and have increased demand 2) Third harmonic back-EMF voltage sensing,
in diverse fields because of its high efficiency, simple 3) Freewheeling diode conduction current sensing.
control compared with AC motors, low EMI, and high When a phase is open, the back-EMF voltage which
reliability due to the absence of brushes. Most three-phase includes the information of the rotor position can be
motors, including BLDC motors need at least six PWM measured at the motor terminals. Since the terminal
channels for inverter power devices such as IGBTs and voltage sensing is simple from a hardware point of view,
MOSFETs. In order to meet these requirements, generally this approach is widely used in industry for sensorless
a single chip controller,[16,17] a special-purpose processor, a control of BLDC motors.
programmable logic device (PLD) or drive device to The purpose of these sensorless methods is elimination
generate control signal is necessary. Using a single chip of the position sensor, which is generally composed of
controller provides some good points, such as its small three hall sensors mounted across from the rotor.
size and cost effective drive. However, if more functions Sensorless techniques need extra computation time and
are required this type of drive system will need more external circuitry to estimate the back-EMF compared
devices which will make this drive system more expensive. with sensor-based systems. Therefore, sensorless
Adapting a special purpose processor or device for a techniques demand high performance processors, large
BLDC motor drive presents several advantages, such as program codes and large memory. Finally, instead of a
small drive size and less development time. However, position sensor, other components are required, so it is
these processors are more expensive than general purpose very difficult to decrease the total motor drive cost.
processors which eventually will increase the cost of the In order to achieve a low-cost BLDC motor drive, a
BLDC motor drive system. general-purpose processor with hall sensors is used,
Since the main flux of a BLDC motor is produced by instead of eliminating the position sensor, and a special
permanent magnets, this motor has high power density and purpose processor. In this paper, a general-purpose
is capable of operating at high efficiencies while having a processor, such as MSP430F1232 which is an ultra
similar torque control performance as a DC motor [1-2]. low-power 16-bit RISC mixed-signal processor from
Trapezoidal type BLDC motors are generally used for Texas Instruments (TI) is used for battery powered
low-cost industrial applications. Therefore, low-cost applications. The developed control algorithm is presented
applications of BLDC motors are being considered for use and a general purpose digital I/O port is used to generate
in many products, especially in sensorless operations [3]. the PWM signals. To verify the proposed algorithm the
Sensorless techniques for BLDC motor control with operation of a three-phase BLDC motor with three hall
trapezoidal back-EMFs can be classified into two sensors under an open-loop speed operation is described in
categories: algebraic equation-based techniques [4-6] and this paper.
back-EMF voltage sensing techniques [7-10]. The main idea
behind using algebraic equations is to calculate the flux 2. BLDC Motor
linkage from the motor parameters and voltage/current Permanent magnet (PM) motors are synchronous
measurements. Based on the estimated flux linkage, the motors that have permanent magnets mounted on the rotor
rotor position can be detected. This method can be with armature windings located on the stator. PM motors
operated over a wide speed range, but the motor are categorized into two types. The first type is referred to
parameters need to be known precisely and at least one as a PM synchronous motor (PMSM) which has sinusoidal
134 Journal of Power Electronics, Vol. 7, No. 2, April 2007
back-EMF as shown in Fig. (1-a). The other type has a respectively. According to Fig. 3 from the first interval,
trapezoidal back-EMF and is referred to as the brushless phase A will conduct positive DC link current while phase
DC (BLDC) motor shown in Fig. (1-b) [1]. B will conduct negative DC link current. Phase C will be
left open. As a result, only phase A and B are conducting
50
and phase C is left silent, which means that only two
switches (A_H and B_L) are active, while the rest (A_L,
] B_H, C_H, and C_L) are inactive.
V[
F
M 0
E-
kc A
a
B
-50
0 30 60 90 120 150 180 210 240 270 300 330 360
Rotor Position[deg] Hall 3 Hall 1
N
]
V[
F C
B
M 0
E- Hall 2
k
c
a
B
Hall 1
-50
0 30 60 90 120 150 180 210 240 270 300 330 360 0 90 180 270 330
360
Rotor position[deg]
considered for BLDC motors. Because whenever the always is already off and vice versa.
upper switch is turned on, the lower switch of the same leg
3. Proposed Algorithm
In order to keep the frequency constant, the CCR0
Fig. 4 shows the interrupt block diagram for generating register has a fixed value, which is 200h, and the CCR1
the PWM signal using the I/O port which is called an register has a proper value to generate the desired duty
asymmetric PWM strategy. To generate these PWM ratio. The software checks the value of the CCR1 register
signals, P3.0-P3.5 ports are used because the to ensure that it does not exceed the minimum or
MSP430F123 micro-controller does not have enough maximum value and prevents it from rolling over.
PWM channels to be directly used with three-phase motor The software flow chart for the three-phase BLDC
drives and only has two PWM channels. Timer_A has 4 motor with three hall sensors is described in Fig. 5. The
modes, up, stop, up/down, and continuous mode. In this initialization procedure includes the initialization of the
paper, it is configured in up-mode with MCLK as the watchdog timer, digital I/O, Timer_A, ADC10 and
timer clock source, also Timer_A overflow interrupt and variables. The main program consists of the initialization,
TACCR1 capture/compare interrupt are used to realize an start of conversion of the DC link current, hall sensor
exact PWM signal. check for rotor position detection, switch signals (SW1,
SW2) check for increasing the current reference or
0FFFh
T im e r _ A M o d e : U p M o d e decreasing the current reference and the check for motor
O v e rflo w In te r ru p t
CCR0
(2 0 0 h - F ix e d v a lu e )
rotation direction (SW3).
M ax
(1 D 0 h )
To generate constant PWM signal, P3.0-P3.5 port is
TACCR1
CCR1 C C IF G used as the PWM output port, and Timer_A underflow
interrupt (TAIFG) is served, which is called every
M in .
(1 E h )
0h
100msec. Also Timer_A underflow interrupts the specific
F ix e d P e r io d switching pattern for the BLDC motor operation based on
P 3 .0 -P 3 .5
V a ria b le d u ty r a tio
the position sensors signals. To control the motor current,
the DC bus voltage level applied to the motor using a
proper PWM duty ratio is adjusted accordingly and
C u rr e n t
S a m p lin g
End of
C o n v e r s io n
C u r re n t
C o n tro l
C u rr e n t
S a m p lin g
End of
C o n v e r s io n Timer_A CCR1 interrupt is utilized for regulating the DC
Fig. 4 Timer_A interrupt block diagram for the PWM signal bus voltage that is supplied in the motor phase. All
using the digital I/O algorithms are developed in assembly language using 422
136 Journal of Power Electronics, Vol. 7, No. 2, April 2007
bytes of flash memory. The flash memory address is from 0xE000. The developed code resides in the main code
0xE000 to 0xFFFF, the interrupt vector from 0xFFFF to memory. Therefore, there is no need to connect extra
0xFFE0, and the main code memory from0xFFFF to memory and peripheral devices.
Start
* Initialization :
Stack-pointer
ADC10
Watchdog Timer
DCO
Digital I/O
Variables
* Timer Setup
* Mainloop :
ADC conversion start
Read Hall sensor
Rotor position detection
Check motor rotation direction
CW or CCW
Check motor speed reference
Increase or decrease Iref
Iref Limit
No No
Yes
If, Timer_A overflow Interrupt If, ADC10 EOC Interrupt
* CCR1_ISR : Yes
Yes
P3 out(For softswitching)
Reti
* TAIFG_ISR :
CCR1 load * ADC10_ISR :
P3 out(For PWM signal) Read ADC
Current Control(Current Limit ) Reti
Reti
MSP-FET430P120 platform
BLDC
I/O Port
Switching
Iref + Pattern Inverter Moter
P controller
Generation
- I act
Hall
Sensor
Current
ADC
Scaling Idc
I/O Port
Rotor Position
Detection
I/O Port
Fig. 6 shows a block diagram of the BLDC motor Fig. 8 shows the current waveforms, where Channel 1
control system used in this paper. The MSP430F123 illustrates the measured DC link current, Channel 2
processor receives feedback signal from the DC link represents the DC link current waveform using the current
current sensor which is used to provide current feedback probe and Channel 4 indicates the phase current waveform
for the closed loop current control. The rotor position using the current probe.
information supplied by the hall sensors of the BLDC Fig. 9 shows the PWM signal, where Channel 1 is the
motor is estimated with the 3 external I/O ports. Actual A_upper signal, Channel 2 is the B_lower signal and
motor current and the direction of rotation can be changed Channel 3 is the C_lower signal using the I/O port and
by the push and toggle switches. Fig. 6 represents the A_phase current waveform using a current probe. As
schematic of the BLDC motor drive system. To control shown in Fig.9, the upper leg and the lower leg switches
motor current, a proportional controller is used to supply a are not on simultaneously. Therefore, there is no need
proper switching pattern for the inverter where the three for dead-time to be included in this example.
hall sensors are used. It is shown in this figure to control
the BLDC drive system. Only the MSP430F123
processor is used while external timer devices for PWM
generation and memory for program download are never
considered. Fig. 7 shows the micro-processor used in this
paper.
Fig. 7 The MSP430F123 microcontroller board Fig. 8 DC link current and phase current
138 Journal of Power Electronics, Vol. 7, No. 2, April 2007