June, 28 Hands-on Workshop: Motor Control Part 4 - Brushless DC Motors Made Easy AZ4 Eduardo Viramontes Applications Engineer of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28.
Agenda of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28.
Motor Anatomy of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 2
Brushed DC Rotor Motor Anatomy Commutator Stator The first electric motor was the Brushed DC Motor Basic idea is to repel rotor from stator of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 3
Motor Fundamentals N S of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 4
Motor Fundamentals N N S + _ + _ S V of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 5
Motor Fundamentals N N S + _ + _ S V of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 6
Motor Fundamentals S N N S _ + _ + V of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 7
Motor Fundamentals N S N S + _ + _ V of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 8
Electric Motor Type Classification of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 9
Electric Motor Type Classification ELECTRIC MOTORS ASYNCHRONOUS AC SYNCHRONOUS DC VARIABLE RELUCTANCE Induction Sinusoidal Brushless SR Stepper Permanent Magnet Surface PM Interior PM Wound Field Known as Universal DC motors or Brushed DC Motors AC power Tools Washers, Dryers Garage Openers Blenders Vacuum Cleaners HVAC Toys of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28.
Brushed DC Motors Rotation due to electromagnetic force Continues rotation with multiple coils Undesirable effects due to friction and current reversing of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28.
Electric Motor Type Classification ELECTRIC MOTORS ASYNCHRONOUS AC SYNCHRONOUS DC VARIABLE RELUCTANCE Induction Sinusoidal Brushless Reluctance SR Stepper Permanent Magnet Surface PM Interior PM Wound Field Robots Traction Control Servo Systems Hard Drives Fans Sewing Machines Treadmills Industrial Machines of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 2
Brushless DC (BLDC) Motors The confusion arises because a BLDC Motor does NOT directly operate off a DC voltage source Reverse design of brushed motors: Magnet is on the rotor Inductors are on the stator Benefits vs. Brushed No mechanical commutator (higher speeds) Better torque/inertia ration (higher acceleration) Easier to cool (Higher specific outputs) of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 3
Brushed and Brushless Motors Comparison Feature Commutation Maintenance Life Speed/Torque Speed range Building Cost Control Control Requirements Shorter Lower Simple Brushed DC motor Brushed commutation Periodic maintenance is required Moderately Flat. Higher speeds produces higher friction and this reduces torque. Lower Mechanical limitations by the brushes A controller is required only when variable speed is desired Electronic commutation based on Hall position sensors Less required due to absence of brushless Longer Flat Higher No mechanical limitation Higher Permanent magnets Complex and expensive BLDC Motor A controller is always required of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 4
Electric Motor Type Classification ELECTRIC MOTORS ASYNCHRONOUS AC SYNCHRONOUS DC VARIABLE RELUCTANCE Induction Sinusoidal Brushless Reluctance SR Stepper Permanent Magnet Surface PM Interior PM Wound Field Washing Machines Vacuum Cleaners Machine tools Food Processors Fans Small Appliances of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 5
Switched Reluctance Both the rotor and stator have salient poles The stator winding is comprised of a set of coils, each wound to the stator of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 6
Electric Motor Type Classification ELECTRIC MOTORS ASYNCHRONOUS AC SYNCHRONOUS DC VARIABLE RELUCTANCE Induction Sinusoidal Brushless Reluctance SR Stepper Permanent Magnet Surface PM Interior PM Wound Field Cruise Control Air Vents Medical Scanners Gauges Office Equipment Printers Instrumentation of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 7
Stepper Motor These motors turn as different voltages are applied to the different windings Field rotates in one direction while rotor moves in opposite direction of field In this example, field rotates 6 while rotor only moves 3 It takes four complete cycles of the control system to rotate motor through one cycle. This is because the Rotor has 4 poles of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 8
Electric Motor Type Classification ELECTRIC MOTORS ASYNCHRONOUS AC SYNCHRONOUS DC VARIABLE RELUCTANCE Induction Sinusoidal Brushless Reluctance SR Stepper Permanent Magnet Surface PM Get name from sinusoidial windings Interior PM Wound Field of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 9
Brushless DC Motor Control BLDC Motor versus PMSM Motor Both motors have identical construction. The difference is in stator winding only. The BLDC has distributed stator winding in order to have trapezoidal Back-EMF. The PMSM motor has distributed stator winding in order to have sinusoidal Back-EMF. Phase A Phase A Phase B Phase B Phase C Phase C Trapezoidal Back-EMF voltage Sinusoidal winding distribution Source: Hendershot J. R. Jr, Miller TJE: Design of brushless permanent-magnet motors of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 2
Electric Motor Type Classification ELECTRIC MOTORS ASYNCHRONOUS AC SYNCHRONOUS DC VARIABLE RELUCTANCE Induction Sinusoidal Brushless Reluctance SR Stepper Permanent Magnet Surface PM Interior PM Wound Field Large Appliances HVAC Blowers Fan Pumps Industrial Controls Lifts Inverters of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 2
Invented over a century ago by Nikola Tesla Stator same as BLDC Difference in rotor construction If properly controlled Provides constant torque Low torque ripple Induction Machines No permanent magnets Think of it as a rotating transformer. Stator is the primary Rotor is the secondary Rotor current is induced from stator current of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 22
AC Induction Motor Slip Basic Principle: The stator is a classic three-phase stator with the winding displaced by 2 The rotor is a squirrel cage rotor in which bars are shorted together at both ends of the rotor by cast aluminum end rings The rotor currents are induced by stator magnetic field. Torque rotating Field (ωs) Induced current ωr The motor torque is generated by an interaction between the stator magnetic field and induced rotor magnetic field NO BRUSHES, NO PERMANENT MAGNETS of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 23
Electric Motor Type Classification ELECTRIC MOTORS ASYNCHRONOUS AC SYNCHRONOUS DC VARIABLE RELUCTANCE Induction Sinusoidal Brushless Reluctance SR Stepper Permanent Magnet Surface PM Unpractical for large motors yet practical in small sizes Interior PM Wound Field of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 24
Reluctance If the rotating field of a motor is de-energized, it will still develop or 5% of synchronous torque If slots are cut into the conductor-less rotor of an induction motor, corresponding to the stator slots, a synchronous reluctance motor results Starts like an induction motor but runs with a small amount of synchronous torque of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 25
Freescale Roadmap for Motor Control
BLDC In Depth: BLDC Motor Configurations of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 27
Windings Electrical Connection - Star A + A A C - B C B B C Star connection of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 28
Windings Electrical Connection - Delta C A A C + - A B B B C Delta connection of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 29
BLDC motor configuration 4 pole pairs N N S H3 B C H2 S S A A C B N N H S H H2 H3 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 3
BLDC motor configuration N S S S N H2 H N 3 pole pairs H3 9 coils of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 3
External Rotor Different Motor Configurations pole pairs 2 pole pairs N 4 pole pairs S S H2 A H3 C B H N S H2 A C B B H C A H3 S S N H2 A C B B H3 C A H N S N N H H2 H3 H H2 H3 N H H2 H3 S of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 32
Internal Rotor Different Motor Configurations pole pair H3 2 pole pairs B H 4 pole pairs B H3 A C A N C A S N C N H2 S N H2 S S H2 S S N C N A C N S A H H2 H3 B H H H2 H3 B H3 H H2 H3 B H of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 33
Six Step BLDC Motor Control Voltage applied on two phases only It creates 6 flux vectors Phases are power based on rotor position The process is called commutation Phases voltage Power Stage of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 34
Commutation example Stator field is maintained 6, 2 relative to rotor field Brushless DC Motor Control Before commutation After commutation of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 35
Six Step BLDC Motor Control cont d Brushless DC Motor Control Controller 2 3 4 S T R c b a 5 6 Source: Eastern Air Devices, Inc. Brushless DC Motor Brochure of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 36
Brushless DC Motor Control Six Step BLDC Motor Control cont d Hall a Hall b Hall c PWM PWM 3 PWM 5 PWM 2 PWM 4 PWM 6 6 2 8 24 3 36 Rotor Electrical Position (Degrees) of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 37
Brushless DC Motor Control Example of commutation table of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 38
Brushless DC Motor Control Sinusoidal BLDC motor control i S i Sb All three phases are powered by sinewave shifted by 2 i Sa i Sc We are able to generate stator field to any position over 36 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 39
Six step control versus sinusoidal control Brushless DC Motor Control Summary Six step control + Simple PWM generation Ripple in the torque (stator flux jumps by 6 ) A little noise operation (due to ripple in the torque) + Simple sensor Sinusoidal control More complex PWM generation (sinewave has to be generated) + Smooth torque (stator flux rotates fluently) + Very quiet Requires sensor with high resolution of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 4
Sensor Example: Hall Effect Sensor Hall effect sensor is a transducer that varies its output voltage in response to changes in magnetic field Hall sensors are used for proximity switching, positioning, speed detection and current sensing applications In this case, hall sensors are used in On/Off mode Hall Sensor Everytime a magnetic field is sensed, a change in voltage can be detected Permanent Magnet of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 4
Putting All Together of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 42
Lab of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 43
How to Set Up the Boards 6. Jumper J3 AC6 board APMOTOR board 7. 8 LED array 3 2 2. BDM 3. BLDC Motor. Power Supply (9V DC) J3 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 44
. Click on the Open Icon Create a New CodeWarrior Project 2. Select the MC9S8AC6 MCU 3. Select P&E Multilink/Cyclone Pro 4. Click next of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 45
Name Your CodeWarrior Project. Set new name for your project 2. Select Project Path 3. Click next of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 46
Add Additional Files. Select AC6DaugherCard.h 2. Add To Project Files 3. Click next of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 47
Processor Expert. Click next of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 48
C Options. Click next of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 49
PC-Lint Options. Click Finish of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 5
New Project Set Up. Click On Make of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 5
Commutation Table & Knowing Position with Hall Effect sensors of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 52
To spin 3-phase BLDC motor: Detect position/commutation Read commutation table Mask and swap phases It is important to know the rotor position in order to maintain the rotating magnetic field Necessity of Knowing the Position H H2 H3 A-B B-C C-A + _ + _ + _ Signal sequence diagram for the hall sensors 6 2 8 24 3 36 Supplied motor voltage of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 53
3-Phase Inverter Vb Q Q2 Q3 A B With the 3-phase inverter, you can control which phases need to be fed in order to turn the motor C v Q4 Q5 Q6 Q, Q2 and Q3 is where the current goes in the motor and Q4, Q5 and Q6 is where the current goes out of the motor of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 54
Control of 3-Phase Inverter Determined on the Hall Sensor Position B C A N S A B C A B C BLDC Motor of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 55
Control of 3-Phase Inverter Determined on the Hall Sensor Position B A C A B C BLDC Motor N S C A B H H2 H3 Phase A Phase B Phase C +V DCB -V DCB NC +V DCB NC -V DCB NC +V DCB -V DCB -V DCB +V DCB NC -V DCB NC +V DCB NC -V DCB +V DCB of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 56
Control of 3-Phase Inverter Determined on the Hall Sensor Position B C N S A A B C A B C BLDC Motor H H2 H3 Phase A Phase B Phase C +V DCB -V DCB NC +V DCB NC -V DCB NC +V DCB -V DCB -V DCB +V DCB NC -V DCB NC +V DCB NC -V DCB +V DCB of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 57
Control of 3-Phase Inverter Determined on the Hall Sensor Position B A N S C A B C BLDC Motor C A B H H2 H3 Phase A Phase B Phase C +V DCB -V DCB NC +V DCB NC -V DCB NC +V DCB -V DCB -V DCB +V DCB NC -V DCB NC +V DCB NC -V DCB +V DCB of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 58
Control of 3-Phase Inverter Determined on the Hall Sensor Position B A C A B C BLDC Motor N S C A B H H2 H3 Phase A Phase B Phase C +V DCB -V DCB NC +V DCB NC -V DCB NC +V DCB -V DCB -V DCB +V DCB NC -V DCB NC +V DCB NC -V DCB +V DCB of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 59
Control of 3-Phase Inverter Determined on the Hall Sensor Position B C N S A A B C A B C BLDC Motor H H2 H3 Phase A Phase B Phase C +V DCB -V DCB NC +V DCB NC -V DCB NC +V DCB -V DCB -V DCB +V DCB NC -V DCB NC +V DCB NC -V DCB +V DCB of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 6
Control of 3-Phase Inverter Determined on the Hall Sensor Position B A N S C A B C BLDC Motor C A B H H2 H3 Phase A Phase B Phase C +V DCB -V DCB NC +V DCB NC -V DCB NC +V DCB -V DCB -V DCB +V DCB NC -V DCB NC +V DCB NC -V DCB +V DCB of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 6
Make a program that moves the motor in the clockwise direction On/Off transistors Lab TO DO: Enable Switch to enable commutations Enable 3-Phase Inverter LEDs will still reflect HALL Effect sensors Each time Switch is pressed, we will advance one step in the commutation table Commutation table will tell us which transistors to turn on When Switch is not pressed, turn OFF transistors of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 62
Import Table Add Variables, Enable Switch, Enable Inverter extern unsigned char table_rotate[8]; unsigned char value; unsigned char commutation; void main(void) { EnableInterrupts; /* enable interrupts */ /* include your code here */ ENABLESWITCH(); ENABLELED(); ENABLELED(2); ENABLELED(3); ENABLE3PHASEINVERTER(); for(;;) { of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 63
Wait for Switch to be Pressed for(;;) { RESET_WATCHDOG(); /* feeds the dog */ LED_PIN = HALL_; LED2_PIN = HALL_2; LED3_PIN = HALL_3; if(!sw_pin) { } of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 64
Once Pressed, Advance Counter, Commutate } for(;;) { RESET_WATCHDOG(); /* feeds the dog */ LED_PIN = HALL_; LED2_PIN = HALL_2; LED3_PIN = HALL_3; if(!sw_pin) { value++; if(value>=7) value = ; commutation = table_rotate[value]; if(commutation & Q_MASK) Q = ; if(commutation & Q4_MASK) Q4 = ; if(commutation & Q2_MASK) Q2 = ; if(commutation & Q5_MASK) Q5 = ; if(commutation & Q3_MASK) Q3 = ; if(commutation & Q6_MASK) Q6 = ; of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 65
Wait for Switch to be Released } if(commutation & Q3_MASK) Q3 = ; if(commutation & Q6_MASK) Q6 = ; while(!sw_pin) { RESET_WATCHDOG(); LED_PIN = HALL_; LED2_PIN = HALL_2; LED3_PIN = HALL_3; } TURNOFFTRANSISTORS(); IT IS IMPORTANT TO TURN OFF TRANSISTORS! of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 66
Download and Run Code. Click On Run 4. Click On Run 2. Click On Connect on the Debugger 3. Click On Yes To Reprogram the MCU of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 67
Lab2 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 68
Lab 2 Make a program that move the motor in clockwise direction On/Off transistors TO DO: Enable Switch5 to enable commutations Check Hall Effect sensors to evaluate which commutation state motor is in When Hall Effect sensors changes state, transistors will commutate of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 69
Add Variables, Enable Switch5 unsigned char pasthallsensors; unsigned char hallsensors; void main(void) { EnableInterrupts; /* enable interrupts */ /* include your code here */ ENABLESWITCH(); ENABLESWITCH(5); ENABLELED(); ENABLELED(2); ENABLELED(3); ENABLE3PHASEINVERTER(); for(;;) { of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 7
Wait for Switch5 to be On for(;;) { RESET_WATCHDOG(); /* feeds the dog */ LED_PIN = HALL_; LED2_PIN = HALL_2; LED3_PIN = HALL_3; while(sw5_pin) { } TURNOFFTRANSISTORS(); of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 7
Once On, Display and Check Hall Effect Sensors while(sw5_pin) { RESET_WATCHDOG(); /* feeds the dog */ LED_PIN = HALL_; LED2_PIN = HALL_2; LED3_PIN = HALL_3; hallsensors = ; if(hall_) hallsensors = x4; if(hall_2) hallsensors = x2; if(hall_3) hallsensors = x; if(pasthallsensors!= hallsensors) { /* Do something */ } } of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 72
Once On, Display and Check Hall Effect Sensors if(pasthallhensors!= hallsensors) { pasthallsensors = hallsensors; value++; if(value>=7) value = ; commutation = table_rotate[value]; TURNOFFTRANSISTORS(); if(commutation & Q_MASK) Q = ; if(commutation & Q4_MASK) Q4 = ; if(commutation & Q2_MASK) Q2 = ; if(commutation & Q5_MASK) Q5 = ; if(commutation & Q3_MASK) Q3 = ; if(commutation & Q6_MASK) Q6 = ; IT IS IMPORTANT TO TURN OFF TRANSISTORS! } of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 73
Download and Run Code. Click On Run 4. Click On Run 2. Click On Connect on the Debugger 3. Click On Yes To Reprogram the MCU of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 74
Sensorless Sensing Sensors are expensive and take up space Several techniques can be used to determine the motor position/speed without an external device These techniques are based on the electrical characteristics of motors, mainly on their inductance characteristics: Based on BEMF Speed range from 5-% up to % of nominal speed The BEMF must be high enough Based on Motor Inductance Saliency Speed range from standstill to about 2% of nominal speed of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 75
- BEMF is just an acronym for Back Electromagnetic Force - Back electromagnetic force is a fancy term for the generator characteristics of a motor - As has been shown not all phases of the motor are on at the same time - BEMF voltage can be measured on the inactive phases of the motor - The characteristics of the voltage curve generated by BEMF can tell the position/speed of the motor - The method that will be exposed is the zero crossing method. When BEMF voltage equals zero, the motor is in a specific position - By measuring the zero crosses against time, the speed of the motor can be determined BEMF of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 76
BLDC Motor Back-EMF Shape Phase A-B Voltage Phase B-C Voltage Phase C-A Voltage Phase A Phase B Phase C C A V CH4 B of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 77
Sensorless BLDC Motor Control with BEMF Zero-Crossing Detection Appropriate Phase Comparator Output selected Zero Crossing event detected of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 78
Phase R Sensorless Commutation and BEMF 6 2 8 24 3 36 Rotor Electrical Position (Degrees) Phase S Phase T Zero crossings PWM PWM 3 PWM 5 PWM 2 PWM 4 PWM 6 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 79
BLDC Central Point is Not Accessible 3-phase inverter and DC bus current measurement Inverter Stage U dcbus R shunt HB I dcbus B A HB2 V BLDC Motor HB3 C of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 8
+ - + - + - B HB2 V C A HB3 HB + - + - + - Zero Crossing Sensing Reference B HB2 HB3 HB V A C Udcb + - + - + - B HB2 HB3 HB V A ½ U DCB reference GND reference Virtual CP reference U dcbus BLDC Motor central point is not accessible R shunt I dcbus HB2 A B V C HB HB3 BLDC Motor of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 8
Zero Crossing Sensing using ADC The principle is the same as the HW topology, but more flexible Virtual CP reference ½ U DCB reference GND reference ADC ADC2 B HB2 V A HB ADC ADC2 B HB2 HB V A Udcb ADC ADC2 B HB2 HB V A ADC3 C ADC3 HB3 C ADC3 HB3 ADC4 HB3 ADC4 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 82
Application Details ADC Measurement Back-EMF evaluation of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 83
Back-EMF Detection Window 3 6 9 2 5 8 2 24 27 3 33 36 39 - visible Back-EMF uva usa detectable zero crossing of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 84
Lab3 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 85
Sensorless BLDC Motor Control using MC9S8AC AC microcontroller 6 PWM 6 3-phase inverter DC current sensing Application Diagram PH A,B,C 3 4 ADC inputs 3 Zero-cross detection circuit 3 BLDC motor 3.3V Power supply APMOTOR board 3 outputs Fault LED Direction LED Run/Stop status 9 Vdc 3 inputs BDM PB_A PB_B SW Freemaster on PC Read/set variables of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 86
Sensorless BLDC Motor Control using MC9S8AC MC9S8AC Peripheral Utilization Timer 6 channels: PWM modulation for BLDC motor (complementary bipolar) Timer 2 Time base for commutation period measurement Channel : commutation Channel : timing of application A/D Converter DC bus current, phase voltages (zero-cross detection) of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 87
PI Control Proportional Control Error multiplied by constant Deals with present behavior of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 88
PI Control Integral Control Ads long-term precision Takes longer to settle, but provides better precision Deals with past behavior of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 89
PI controller on AC MCU These variables are used To tune the system This is the control Algorithm inplemented In AC6 MCU for Motor control of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 9
PWM and manual dead time insertion PWM Generation TIMER set to center aligned mode (TPMSC:CPWMS=) Example: PWM: switching (duty cycle (5 - %) + dead time), negative polarity (PCxSC:ELSnB =x,pcxsc:elsna =) PWM: switching (duty cycle (5 - %) - dead time), positive polarity (PCxSC:ELSnB =,PCxSC:ELSnA =) PWM2: switching (duty cycle (5 - %) - dead time), positive polarity (PCxSC:ELSnB =,PCxSC:ELSnA =) PWM3: switching (duty cycle (5 - %) + dead time), negative polarity (PCxSC:ELSnB =x,pcxsc:elsna =) PWM4: OFF PWM5: OFF of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 9
Dead Time Q Q Q4 Q4 a) Center aligned PWM, Q and Q4 change in the same instant, it can short circuit between Vb and GND b) Center aligned PWM, Q and Q4 triggered with different PWM duty cycle avoiding that both transistors turn on at the same time. of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 92
ADC Measurement DC bus current, Back-EMF voltage Single result register only 3.5 us conversion time ADC measurement has to be synchronized with PWM Application Details of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 93
ADC Measurement PWM -> ADC Synchronization Application Details Overflow interrupt is used for PWM->ADC synchronization of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 94
Application Details ADC Measurement Back-EMF evaluation of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 95
FlexTimer in the MCF5AC This part pending because dev board was delivered on April 29 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 96
FlexTimer advantages Supports up to 8 channels which can be synchronized in pairs for complementary signal generation. Dead time insertion supported by software. F can trigger ADC conversions automatically. Fault input supported by hardware (automatically turns of PWM pin outputs). Synchronized reloading of PWM duty cycle from several sources (ADC, analog comparator, software). Polarity for PWM output can be configured. Edge and center alligned PWM generation. of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 97
Dead time insertion Used to avoid to power devices to be turned on at the same time. No CPU load generated to make dead time insertion. To configure simply enable dead time insertion bit and configure the number of timer counts of dead time, the rest is done by timer module. of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 98
ADC Synchronization Reduces CPU load by saving time needed to start conversions (to detect zero-crossings or instantaneous current. When doing back-emf sensing measurements need to be made in certain timing windows. If measurements are always taken at the same times, control algorithm is more precise. Timer Channel ISR ADC conversion t Manual start of ADC conversion t2 Timer Channel ISR ADC conversion Automatic start of ADC conversion t ADC Channel ISR ADC Channel ISR t3 Process ADC data t3 Process ADC data Without hardware trigger With hardware trigger T = t + t2 + t3 T = t + t3 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28. 99
Sessions (Please limit to 3) Session ID Title Related Session Resources AZ3 AZ2 AZ2 Motor Control Part Fundamentals and Freescale Solutions Motor Control Part 2 Solutions for Large Appliances and HVAC Motor Control Part 3 Solutions for Small Appliances and Health Care Applications Demos (Please limit to 3) Meet the FSL Experts (Please limit to 3) Pedestal ID Demo Title Title Time Location 32 24 76 Large Appliance Demo 3-Phase PMSM Vector Control demo with Encoder Air Hockey Demonstration featuring the Flexis AC Products of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 28.