Accionamiento de motores de corriente contínua sin

Transcription

Accionamiento de motores de corriente contínua sin
Accionamiento de motores de corriente contínua
sin escobillas (BLDC) para principiantes
diseñadores de circuitos
Brushless DC (BLDC) Motor Drive for
Novice Circuit Developer
Athula Kulatunga, Fred Chou
Resumen
Keywords
Motores DC sin escobillas (BLDC) han sido exitosamente
BLDC controller, energy savings, microcontroller
usados para reemplazar motores de inducción monofásicos en electrodomésticos, aire acondicionados, bombas ,
Introduction
etc. Aun cuando un BLDC cuenta con muchas caracteristicas atractivas , este requiere un controlador más sofis-
Brushless DC motors (BLDC), also known as Permanent
ticado . Un controlador simple puede ser desarrollado
Magnet Synchronous Motor (PMSM), Permanent Magnet
usando microntroladores y módulos de potencia IGBTs
AC Motor, Interior Permanent Magnet Motor (IPM), and
integrados. Este artículo describe los pasos a seguir para
Surface Permanent Magnet Motor (IPM), have been used
el desarrollo de un sencillo controlador para BLDC.
to replace traditional, single-phase induction motors and
the gear boxes accompanied with them in many applian-
Abstract
ces. It is not surprise to find BLDCs in fans, blowers, washing machines, pumps, and hub-motors in electric vehi-
Brushless DC motors (BLDC) have been successfully used
cles. BLDCs are popular because of low manufacturing
to replace traditional single-phase inductions motors in
cost, ability to control speed and rotation via electronic
appliances, air-conditioners, pumps, etc. Even though a
controllers, and low maintenance requirements.
73
BLDC comes with many attractive characteristics, it requires a more sophisticated motor driver. A simple driver
If you lack the background knowledge related BLDC, the
can be developed by using microcontrollers and integra-
Reference [1] & [2] are good resources to learn the basics
ted, IGBT based power modules. This paper describes de-
of BLDC motor construction, operation, and control. You
veloping steps of a simple BLDC controller.
will soon find the low cost motor also requires sophisti-
Palabras claves
cate electronic controllers. The purpose of this paper is
to show you how to build a simple BLDC controller using
available technologies.
Controlador BLDC, Ahorro de energía, Microcontrolador.
Figure 1. Block diagram of a BLDC controller. (Photo courtesy: International Rectifier Company).
Invest Apl Innov 2(2), 2008
CompendioT2_nov 2008_p12_p17.indd 73
12/1/08 10:43:33 PM
Kulatunga A., Chou F. – Brushless DC (BLDC) Motor Drive for Novice Circuit Developer
Figure 2. Sequence of current flow. (Photo courtesy: Bodine Electric Company).
FUNDAMENTALS
Figure 1 illustrates the major circuits of a simple BLDC mo-
bus voltage after going through a rectifier and a capaci-
tor controller. The motor consists of a 3-phase winding
tor. If a voltage doubler is used as shown in figure 1, the
and three Hall Effect sensors, which senses the rotor po-
bus voltage may reach to 300V. So, how can you protect
sition. The controller receives the power from a 1-phase
yourself, equipment, and the circuit under development?
supply and converts to DC voltage (Bus Voltage). The DC
74
bus voltage is then chopped, according to a predetermine
During the development stage, always use an isolation
pattern, by a six Insulated Gate Bipolar Transistors (IGBTs).
transformer to eclectically isolate the circuits and the
IGBTs have specific drive requirements. Driver design may
power source. Choose a one-to-one isolation transformer
be too hassle for a novice developer. On the other hand
that matches your maximum load requirements.
Integrated Power Modules (IPM), a single chip that combined the driver circuits, IGBTs, and other protection circuits,
One of the most common mistakes done by beginners
is good choice if the chips specifications meet the appli-
is accidental grounding of floating voltages via oscillos-
cation requirements. The IPM requires TTL compatible sig-
copes’ ground connection. You need differential probes
nals, which can be provided by a microcontroller.
(600V rating) for your oscilloscope. Three differential probes and a DC current clamp for the oscilloscope make the
Since the motor is the final controlled element, the deve-
measurement taking easier and safer. A variable voltage
loper must understand the drive requirement of the mo-
transformer (variac) is also recommended. A variac will
tor. Typically, a motor datasheet provides the necessary
help you to increase the bus voltage gradually as you test
firing sequence or it can be obtained form the motor ma-
your IGBT modules.
nufacturers. Figure 2 depicts the direction of current flow
in order to move the magnetic field of the stator winding
Controller layout
along one direction. By firing the IGBTs according to specific sequence, the desired current flow can be obtained.
A commercial BLDC controller may not allow you to examine the operation of each block in detail. The following
Procedure
design is developed to give the novice developer a greater access to the controller signals.
Controller Development-Safety
First item is to determine the maximum current and voltage output of the controller. The IPM and the bridge rec-
If you are using utility supply as the input to the controller,
tifier should be able to handle the motor’s voltage and
appropriate safety measures must be taken during the
current requirements. An IPM is ideal for novice learner,
powered testing of your prototype. An 110Vrms has the
instead of using discrete IGBTs and the separate drivers,
peak voltage around 155V. This voltage becomes the DC
because it includes IGBT’s, drivers for IGBTs, current limi-
Invest Apl Innov 2(2), 2008
CompendioT2_nov 2008_p12_p17.indd 74
12/1/08 10:43:33 PM
Kulatunga A., Chou F. – Brushless DC (BLDC) Motor Drive for Novice Circuit Developer
ting feature, and thermal shut down circuits, all in
one package. All you have to do it to provide external power and TTL signals from a microcontroller. For
this design IPM made by International Rectifier (IR),
IRAMS10UP60A, is selected. IR’s IPM can handle more
than the motor selected for this project; BODINE, ¼
HP, 130V, 3500 rpm BLDC motor.
Next item is the microcontroller. Developers may
chose a microcontroller based on many factors, such
as programming language, I/O needs, dedicated PWM
features, etc. For this project ATMEL microcontroller
was chosen. A simple BLDs code is also provided by
ATMEL that makes the development easier. The program was altered to add start/stop and forward/reverse features. Figure 3 provides the additional lines that
were added to the code obtained from ATMEL [3].
/*
- File
: avr448.c
- Compiler
: CodeVision 1.25.0a Evaluation Version.
- Revision Date : 7/25/08
- Devices
: ATmega48 and IRAMS10UP60A
- Description
: Example of how to control a BLDC motor using pin change interrupts connected to hall sensor output to
control motor
commutation, and
PWM-controlled
power to the drive
stage.
- Based off of AVR448, Control of HV
3Phase BLDC Motor by Atmel
#include <mega48.h>
// Global variables.
unsigned char RunClockwise = 1;
//Start with clockwise rotation.
unsigned char IPM_B4_PWM = 0xFF;
//Control signals to IPM driver chip, off
(Active low)
void main(void)
{
unsigned char speed; //POT -> ADC -> Speed
(1-255)
// Initialize I/O-ports (Output to IPM)
PORTB= ~0x3F; // 6 bits of PORTB to be
high
DDRB = 0x3F; // set PORTB6 bits as output
//Initialize ADC to CPU/4 speed, channel
5, free running mode. (Speed Control)
ADCSRA |= 0b11100010; //ADC Enable, ADC
Start Converstion-free running, ADC Auto
Trigger, ADC/4.
ADMUX |= 0b00100101; //AREF as Vref, Left
adjust results, ADC Channel 5
//Initialize PWM output OC2B from Timer/
Counter2 at 20kHz base freq @ 8MHz CPU.
TCCR2A |= 0b00110001; //Set OC2B (Pin5)
on Compare Match, Phase Correct PWM & OCRA
as TOP
TCCR2B |= 0b00001001; //Phase corret PWM,
No prescaling on CLK
OCR2A = 200; // 200 decimal TOP, set for
20kHz
OCR2B = 100; // This starts PWM output at
50% duty cycle
DDRD.3 = 1; //enable PWM output at OC2B,
Pin5
// Set up and Enable Interrupts
PCMSK1 |= 0b00000111; //Pin Change Mask
PCINT10-8 enabled (PORTC 2-0)
PCICR |= 0x02; //Enable Pin Change interrupts from PORTC
// Start interrupts by forcing Hall Inputs
to 0, then switching pins to inputs.
DDRC = 0b00000111; // 3 Hall Inputs pulled
to 0 volts.
PORTC = 0x00;
PORTC = 0b00000111;
//Internal Pullups
for Hall sensors on
DDRC = 0x00; // Port C switched back to
all inputs.
SREG |= 0x80;// Enable Global Interrupts
DDRD.1 = 0; //Input from Motor Direction
Control
PORTD |= 0b00000010; // Motor Direction
control input pullups
while(1) // IPM_B4_PWM is updated via a
Pin Change Interrupt
{
if( PIND.1 == 1) // Direction control PD1
directional control, pull high or low
RunClockwise = 0;
else
RunClockwise = 1;
// Update speed setting from ADC reading.
speed = ~ADCH;
if( speed >= 200 ) speed = 200; //rev limit setting
//
OCR2B = speed;
if( speed <= 110 ) speed = 110;
OCR2B = speed;
// If OC2B is high, send inactive outputs
to IPM.
if( PIND & (1 << 3) ) {
PORTB = 0xFF; //active high inputs for
IPM.
} else {
PORTB = IPM_B4_PWM; //active high inputs
for IPM
}
}
}
//! Pin Change Interrupt for PORTC
(PCINT8..14).
interrupt [PCINT1] void Pin_Change_Int_
75
Invest Apl Innov 2(2), 2008
CompendioT2_nov 2008_p12_p17.indd 75
12/1/08 10:43:33 PM
Kulatunga A., Chou F. – Brushless DC (BLDC) Motor Drive for Novice Circuit Developer
76
Serv(void)
{
unsigned char Hall_In;
Hall_In = PINC & 0b00000111;
//Lower 3
bits of PINC are Hall sensor inputs
if( RunClockwise ) // Based on Hall inputs
select 1 of 6 patterns to send to IPM via
MAIN()
{
switch(Hall_In) {
case 4: IPM_B4_PWM = 0b110011; break;
case 0: IPM_B4_PWM = 0b110101; break;
case 1: IPM_B4_PWM = 0b011101; break;
case 3: IPM_B4_PWM = 0b011110; break;
case 7: IPM_B4_PWM = 0b101110; break;
case 6: IPM_B4_PWM = 0b101011; break;
// All outputs off if illegal Hall sensors.
default: IPM_B4_PWM = 0b111111;
}
} else {
// This is counter-clockwise Switch statement.
// Based on Hall inputs, select 1 of 6
patterns to
// send to IPM via main().
switch(Hall_In) {
case 6: IPM_B4_PWM = 0b011101; break;
case 7: IPM_B4_PWM = 0b110101; break;
case 3: IPM_B4_PWM = 0b110011; break;
case 1: IPM_B4_PWM = 0b101011; break;
case 0: IPM_B4_PWM = 0b101110; break;
case 4: IPM_B4_PWM = 0b011110; break;
// All outputs off if illegal Hall sensors.
default: IPM_B4_PWM = 0b111111;
}
}
}
Now, a circuit can be drawn to interconnect microcontroller, IPM, and power supplies as shown in Figure 4. The
PCB was developed using the free circuit layout software
provided by Advanced Circuits (www.4PCB.com). The footprints for several components had to be custom drawn.
The board is divided into four major areas: low voltage
DC, High voltage DC, microcontroller, and IGBT module
(or IPM). The low voltage DC section consists of a linear,
regulated, DC power supply that provides +5V for microcontroller operation and +15V for IPM operation. This
power supply can be easily replaced by a much smaller
switching power supply in later developments. The high
voltage DC section converts single-phase, 110VAC, line
voltage into DC bus voltage via a bridge rectifier and a
smoothing capacitor. The IPM receives the DC bus voltage
and switches according the control signals receive from
the microcontroller to create phase shifted 3-phase waveforms. Microcontroller senses the position signals created
by Hall Effect sensors located in the motor to determine
the next firing sequence for IPM.
The completed controller board is shown in Figure 5. IPM
and its heat sink are mounted on the top right corner.
Many test points are made available to measure low voltages, DC bus voltage, microcontroller outputs, Hall Effect
sensor output, and the IPM output. Fusses are essential to
limit any short circuit currents. The current limiting feature of the IPM is not in use but the line fuse is adequate
for the initial development. It is recommended to employ
the current limiting feature for late developments.
Figure 3. Modified ATMEL code
Figure 4. PCB layout
Invest Apl Innov 2(2), 2008
CompendioT2_nov 2008_p12_p17.indd 76
12/1/08 10:43:34 PM
Kulatunga A., Chou F. – Brushless DC (BLDC) Motor Drive for Novice Circuit Developer
Is the motor torque going to be smooth? Well, let’s take
a look at the true nature of the wave forms. Figure 7 illustrates an explored view of the same waveforms. Notice
the current has some fluctuations. Yet this may not be a
problem in some applications such as fans and pumps.
Lets see what would happens if we drive a pump using
the same motor.
Figure 5. Completed controller
Results of Testing - Signals
To test the controller, you need to connect the motor windings and the Hall sensors correctly. Since the IGBTs are
100% on or off, the input AC voltage must be adjusted to
meet the maximum voltage of the motor winding. Remember the peak value of the incoming sinusoidal voltage, not the RMS voltage, appears as the maximum bus
voltage. With a Variac in place, you may start at a lower
Figure 6. From the top, phase voltages of phase A, B, and
bus voltage and increase to the rated value once you are
C, and the current of phase A.
satisfied with the operation. Figure 6 shows the signals
at the motor terminals. From the top, phase voltages for
phase A, phase B, and phase C. The four one represents
the current of phase A. All waveforms are captured via a
LeCroy Wave-runner Oscilloscope, Fluke differential pro-
77
bes (in x20 setting), and a LeCroy 30A current probe.
In addition to the above signals, you may compare the
motor signals and microcontroller outputs to observe the
relationship. Flip the forward/reverse switch and observe
the direction and signals. Why not adding couple of codes to ramp up instead of hard turn on?
Figure 7. Explored view of the waveforms in Figure 6.
Table 2.
BLDC motor
performance
Invest Apl Innov 2(2), 2008
CompendioT2_nov 2008_p12_p17.indd 77
12/1/08 10:43:35 PM
Kulatunga A., Chou F. – Brushless DC (BLDC) Motor Drive for Novice Circuit Developer
References
[1] Kulatunga, A., Persson, E., Sundararajan, R., and Herrick, R.
(2007). Energy saving potential and characteristics of motors
for consumer appliances, Proceedings of the IEEE EIC/EME Conference, TN
[2] Yedamale, P. (2003), Brushless DC (BLDC) motor fundamentals, Document # AN885, Microchip Technologies, Inc., 2003,
Figure 8. Pumping
water with the BLDC
motor and the controller.
RESULTS
The new controller and its ¼ HP BLDC motor was connected to centrifugal water pump application as shown
in figure 7. Fluke 43B power analyzers recorded the data
in Table 2 for input and output (motor) side of the controllers. Compare the results to observe wattage, total harmonic distortion (THD) for V & I, power factor (PF). Our
simple BLDC controller doesn’t include and EMI filter, as
shown in figure 1.
According to the Table 2, total harmonic distortion (THD)
78
of voltage is less than accepted level of 5%. But the THD
[3] AVR448: Control of High Voltage 3-phase BLDC Motor
www.atmel.com/dyn/resources/prod_documents/doc2592.
pdf (accessed March 2008)
Acerca de los autores
Athula Kulatunga holds a BS degree from Pittsburg State University, MS from Eastern Illinois
University, and Ph.D. from Purdue University. He is the founder
and coordinator of the industry
sponsored International Rectifier
Power Electronics Development and Application Lab (IR_PEDAL)
at Purdue University, West Lafayette, IN, USA. His research focus is
in application of power electronics for energy efficiency improvements. He is a Certified Energy Manager (CEM) and conducts
energy assessments for industries as well. He was awarded Legends in Energy recognition by the Association of Energy Engineers (AEE) in 2007. He has published more than thirty papers
of current is way above the accepted level of 20%. So, our
next goal should be minimizing the THD level of current,
which will be discussed in a follow up paper.
Conclusions
The development of first motor drive for a BLDC motor
can be challenging to novice developer. Integrated Power
Modules (IPM) and microcontroller can ease the development process. By building a motor controller from the
Mr. Fred Chou is a senior in the Electrical and Computer Engineering
Technology at Purdue University,
West Lafayette, Indiana, USA. He
has been working in the industry
sponsored International Rectifier
Power Electronics Development
and Application Lab (IR_PEDAL) at Purdue University. His applied
research focuses on various motor drive development using
available technologies.
available resources, the developer may sharpen the skill
needed for more advanced controllers. These skills include working safely with high voltages, correct use of equipment, PCB development, and testing under real world
conditions.
Invest Apl Innov 2(2), 2008
CompendioT2_nov 2008_p12_p17.indd 78
12/1/08 10:43:35 PM