June, 2008

Hands-on Workshop: Motor Control Part 4 Brushless DC Motors Made Easy
AZ114

Eduardo Viramontes
Applications Engineer
TM

Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008.

Agenda

Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008.

TM

1

Motor Anatomy

Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008.

TM

2

Motor Anatomy
Brushed DC Rotor

Commutator

Stator

►The

first electric motor was the Brushed DC Motor

Basic idea is to repel rotor from stator

Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008.

TM

3

Motor Fundamentals

N

S

Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008.

TM

4

Motor Fundamentals

N
+ _

N

S
+ _

S

V

Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008.

TM

5

Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. 2008.Motor Fundamentals N + _ N S + _ S V Freescale Semiconductor Proprietary Information. Inc. © Freescale Semiconductor. All other product or service names are the property of their respective owners. TM 6 .

Motor Fundamentals S N S _ + N _ + V Freescale Semiconductor Proprietary Information. TM 7 . © Freescale Semiconductor. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. 2008. All other product or service names are the property of their respective owners. Inc.

© Freescale Semiconductor.Motor Fundamentals N N S + _ S + _ V Freescale Semiconductor Proprietary Information. 2008. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. All other product or service names are the property of their respective owners. Inc. TM 8 .

Electric Motor Type Classification Freescale Semiconductor Proprietary Information. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. TM 9 . Inc. 2008. All other product or service names are the property of their respective owners. © Freescale Semiconductor.

Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.Electric Motor Type Classification ELECTRIC MOTORS AC ASYNCHRONOUS 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. All other product or service names are the property of their respective owners. Inc. 2008. Dryers •Garage Openers •Blenders •Vacuum Cleaners •HVAC •Toys Freescale Semiconductor Proprietary Information. © Freescale Semiconductor. TM 10 .

Inc. 2008.Brushed DC Motors • Rotation due to electromagnetic force Continues rotation with multiple coils Undesirable effects due to friction and current reversing • • Freescale Semiconductor Proprietary Information. © Freescale Semiconductor. All other product or service names are the property of their respective owners. TM 11 . Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc.

2008. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. All other product or service names are the property of their respective owners. Inc. © Freescale Semiconductor. Inc. TM 12 .Electric Motor Type Classification ELECTRIC MOTORS AC ASYNCHRONOUS 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 Freescale Semiconductor Proprietary Information.

Inc.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. All other product or service names are the property of their respective owners. © Freescale Semiconductor. 2008. Brushed No mechanical commutator (higher speeds) Better torque/inertia ration (higher acceleration) Easier to cool (Higher specific outputs) Freescale Semiconductor Proprietary Information. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. TM 13 .

© Freescale Semiconductor. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc.Brushed and Brushless Motors Comparison Feature Commutation Maintenance Life Speed/Torque Speed range Building Cost Control Control Requirements Brushed DC motor Brushed commutation Periodic maintenance is required Shorter Moderately Flat. TM 14 . Lower – Mechanical limitations by the brushes Lower Simple A controller is required only when variable speed is desired BLDC Motor 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 A controller is always required Freescale Semiconductor Proprietary Information. Higher speeds produces higher friction and this reduces torque. 2008. All other product or service names are the property of their respective owners. Inc.

© Freescale Semiconductor. TM 15 .Electric Motor Type Classification ELECTRIC MOTORS AC ASYNCHRONOUS 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 Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. All other product or service names are the property of their respective owners. Inc. Inc. 2008.

© Freescale Semiconductor. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. TM 16 .Switched Reluctance ►Both ►The the rotor and stator have salient poles stator winding is comprised of a set ►of coils. 2008. Inc. Inc. each wound to the stator Freescale Semiconductor Proprietary Information. All other product or service names are the property of their respective owners.

Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.Electric Motor Type Classification ELECTRIC MOTORS AC ASYNCHRONOUS 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 Freescale Semiconductor Proprietary Information. Inc. 2008. All other product or service names are the property of their respective owners. © Freescale Semiconductor. TM 17 . Inc.

All other product or service names are the property of their respective owners. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. © Freescale Semiconductor. TM 18 . Inc. Inc.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 ►It this example. field rotates 60°while rotor only moves 30° takes four complete cycles of the control system to rotate motor through one cycle. 2008. This is because the Rotor has 4 poles Freescale Semiconductor Proprietary Information.

Inc. 2008. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. TM 19 .Electric Motor Type Classification ELECTRIC MOTORS AC ASYNCHRONOUS SYNCHRONOUS DC VARIABLE RELUCTANCE Induction Sinusoidal Brushless Reluctance SR Stepper Permanent Magnet Surface PM Interior PM Wound Field •Get name from sinusoidial windings Freescale Semiconductor Proprietary Information. Inc. © Freescale Semiconductor. All other product or service names are the property of their respective owners.

Inc. 2008. R. The PMSM motor has distributed stator winding in order to have sinusoidal Back-EMF. Miller TJE: Design of brushless permanent-magnet motors Freescale Semiconductor Proprietary Information. The difference is in stator winding only.Brushless DC Motor Control ►BLDC • Motor versus PMSM Motor Both motors have identical construction. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. TM 20 . All other product or service names are the property of their respective owners. Jr. © Freescale Semiconductor. The BLDC has distributed stator winding in order to have trapezoidal Back-EMF. Phase B Phase B Phase C Phase C Phase A Phase A Trapezoidal Back-EMF voltage Sinusoidal winding distribution Source: Hendershot J.

Electric Motor Type Classification ELECTRIC MOTORS AC ASYNCHRONOUS 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 Freescale Semiconductor Proprietary Information. © Freescale Semiconductor. All other product or service names are the property of their respective owners. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. Inc. TM 21 . 2008.

© Freescale Semiconductor. 2008. Inc. •Stator is the primary •Rotor is the secondary Rotor current is “induced” from stator current Freescale Semiconductor Proprietary Information. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. All other product or service names are the property of their respective owners.Induction Machines 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 No permanent magnets Think of it as a rotating transformer. TM 22 .

© Freescale Semiconductor. TM 23 . Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. rotating Field ( ωs) Indu ced Torque curr ent ωr The motor torque is generated by an interaction between the stator magnetic field and induced rotor magnetic field NO BRUSHES. 2008. All other product or service names are the property of their respective owners. Inc. NO PERMANENT MAGNETS Freescale Semiconductor Proprietary Information.AC Induction Motor Slip ►Basic Principle: The stator is a classic three-phase stator with the winding displaced by 120° 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.

Inc. All other product or service names are the property of their respective owners. 2008. © Freescale Semiconductor. TM 24 . Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc.Electric Motor Type Classification ELECTRIC MOTORS AC ASYNCHRONOUS SYNCHRONOUS DC VARIABLE RELUCTANCE Induction Sinusoidal Brushless Reluctance SR Stepper Permanent Magnet Surface PM Interior PM Wound Field •Unpractical for large motors yet practical in small sizes Freescale Semiconductor Proprietary Information.

© Freescale Semiconductor. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. TM 25 . a synchronous reluctance motor results like an induction motor but runs with a small amount of synchronous torque ►If ►Starts Freescale Semiconductor Proprietary Information. corresponding to the stator slots. 2008. Inc.Reluctance ►If the rotating field of a motor is de-energized. All other product or service names are the property of their respective owners. it will still develop 10 or 15% of synchronous torque slots are cut into the conductor-less rotor of an induction motor.

Freescale Roadmap for Motor Control TM .

Inc.BLDC In Depth: BLDC Motor Configurations TM Freescale Semiconductor Proprietary Information. 2008. Inc. © Freescale Semiconductor. All other product or service names are the property of their respective owners. 27 . Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.

Inc. 2008.Windings Electrical Connection . Inc.Star A A C + A - B C B B C Star connection Freescale Semiconductor Proprietary Information. © Freescale Semiconductor. TM 28 . All other product or service names are the property of their respective owners. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.

Inc.Delta C A A C + - A B B B C Delta connection Freescale Semiconductor Proprietary Information. © Freescale Semiconductor. TM 29 . Inc.Windings Electrical Connection . All other product or service names are the property of their respective owners. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. 2008.

All other product or service names are the property of their respective owners. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.BLDC motor configuration 4 pole pairs S N N H3 B A H2 C B H1 N N C S A S H1 H2 H3 1 0 1 Freescale Semiconductor Proprietary Information. Inc. © Freescale Semiconductor. Inc. 30 S TM . 2008.

All other product or service names are the property of their respective owners. 2008.BLDC motor configuration 3 pole pairs H1 N 9 coils Freescale Semiconductor Proprietary Information. 31 N S H2 S N S TM H3 . Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. © Freescale Semiconductor.

Inc. 2008. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc.External Rotor – Different Motor Configurations 1 pole pairs 2 pole pairs N 4 pole pairs S N N H3 H1 B A H2 C A B H3 S C H3 B A H2 C B H1 N N A S H2 B C N C S A H1 S H1 H2 H3 1 0 1 H1 H2 H3 1 0 1 H1 H2 H3 1 0 1 Freescale Semiconductor Proprietary Information. 32 S S N TM . All other product or service names are the property of their respective owners. © Freescale Semiconductor.

Inc. © Freescale Semiconductor. 33 N S S N N C A C A N S C S S S A H1 TM . Inc. 2008.Internal Rotor – Different Motor Configurations 1 pole pair H3 A 2 pole pairs B H1 4 pole pairs B H3 S H2 N H2 H2 N C A H3 N C H1 H2 H3 1 0 1 B H1 H1 H2 H3 1 0 1 B H1 H2 H3 1 0 1 B Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. All other product or service names are the property of their respective owners.

2008. TM 34 . All other product or service names are the property of their respective owners. © Freescale Semiconductor. Inc.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 Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc.

TM 35 .Brushless DC Motor Control ►Commutation example • Stator field is maintained 60° 120°relative to rotor field . Inc. All other product or service names are the property of their respective owners. Before commutation After commutation Freescale Semiconductor Proprietary Information. 2008. © Freescale Semiconductor. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc.

© Freescale Semiconductor. 2008. Inc. TM 36 .Brushless DC Motor Control ►Six Step BLDC Motor Control cont’d 1 2 R S 3 4 T c 5 6 1 1 0 Controller b a Source: Eastern Air Devices. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Brushless DC Motor Brochure Freescale Semiconductor Proprietary Information. Inc. All other product or service names are the property of their respective owners.

Inc. All other product or service names are the property of their respective owners. Inc. TM 37 . Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.Brushless DC Motor Control ►Six Step BLDC Motor Control cont’d Hall a Hall b Hall c PWM 1 PWM 3 PWM 5 PWM 2 PWM 4 PWM 6 0 60 120 180 240 300 360 Rotor Electrical Position (Degrees) Freescale Semiconductor Proprietary Information. 2008. © Freescale Semiconductor.

TM 38 . Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. 2008.Brushless DC Motor Control ►Example of commutation table Freescale Semiconductor Proprietary Information. © Freescale Semiconductor. Inc. Inc. All other product or service names are the property of their respective owners.

Inc.Brushless DC Motor Control ►Sinusoidal BLDC motor control iSb All three phases are powered by sinewave shifted by 120° iS iSa iSc We are able to generate stator field to any position over 360° Freescale Semiconductor Proprietary Information. 2008. TM 39 . Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. All other product or service names are the property of their respective owners. Inc. © Freescale Semiconductor.

Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. TM 40 . Inc. All other product or service names are the property of their respective owners. 2008. Inc. © Freescale Semiconductor.Brushless DC Motor Control Summary ►Six step control versus sinusoidal control Six step control + Simple PWM generation Ripple in the torque (stator flux jumps by 60° ) 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 Freescale Semiconductor Proprietary Information.

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. © Freescale Semiconductor. positioning. Inc. Inc. hall sensors are used in On/Off mode Hall Sensor Everytime a magnetic field is sensed. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. 2008. TM 41 . a change in voltage can be detected Permanent Magnet Freescale Semiconductor Proprietary Information. speed detection and current sensing applications ►In this case. All other product or service names are the property of their respective owners.

Putting All Together Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. 2008. TM 42 . © Freescale Semiconductor. Inc. All other product or service names are the property of their respective owners. Inc.

TM 43 . Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. 2008. Inc. © Freescale Semiconductor. Inc.Lab1 Freescale Semiconductor Proprietary Information. All other product or service names are the property of their respective owners.

BDM 1 3. Power Supply (9V DC) J13 Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.How to Set Up the Boards AC16 board 6. BLDC Motor 1. © Freescale Semiconductor. Inc. All other product or service names are the property of their respective owners. 2008. 8 LED array 3 2 2. Jumper J13 APMOTOR board 7. Inc. TM 44 .

Select the MC9S08AC16 MCU 4. TM 45 . Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. © Freescale Semiconductor. Click next 3. 2008.Create a New CodeWarrior Project 1. Inc. All other product or service names are the property of their respective owners. Select P&E Multilink/Cyclone Pro Freescale Semiconductor Proprietary Information. Click on the Open Icon 2.

Inc. Set new name for your project 2. © Freescale Semiconductor. Select Project Path 3.Name Your CodeWarrior Project 1. Inc. All other product or service names are the property of their respective owners. TM 46 . Click next Freescale Semiconductor Proprietary Information. 2008. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.

© Freescale Semiconductor. 2008. Add To Project Files 3. Inc. All other product or service names are the property of their respective owners. TM 47 . Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Select AC16DaugherCard.h 2. Inc. Click next Freescale Semiconductor Proprietary Information.Add Additional Files 1.

All other product or service names are the property of their respective owners. Click next Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. 2008. TM 48 . Inc.Processor Expert 1. © Freescale Semiconductor. Inc.

2008. Inc. Inc. Click next Freescale Semiconductor Proprietary Information. TM 49 .C Options 1. All other product or service names are the property of their respective owners. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. © Freescale Semiconductor.

Inc.PC-Lint Options 1. All other product or service names are the property of their respective owners. TM 50 . 2008. Inc. © Freescale Semiconductor. Click Finish Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.

Inc. Inc. TM 51 . © Freescale Semiconductor. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. 2008.New Project Set Up 1. All other product or service names are the property of their respective owners. Click On Make Freescale Semiconductor Proprietary Information.

All other product or service names are the property of their respective owners. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. TM 52 . Inc. 2008.Commutation Table & Knowing Position with Hall Effect sensors Freescale Semiconductor Proprietary Information. Inc. © Freescale Semiconductor.

© Freescale Semiconductor. Inc.Necessity of Knowing the Position ►To • • • spin 3-phase BLDC motor: Detect position/commutation Read commutation table Mask and swap phases 1 0 1 0 1 0 Signal sequence diagram for the hall sensors 60° H1 H2 H3 120° 180° 240° 300° 360° It is important to know the rotor position in order to maintain the rotating magnetic field Supplied motor voltage + A-B _ + B-C _ + C-A _ Freescale Semiconductor Proprietary Information. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. TM 53 . 2008. All other product or service names are the property of their respective owners.

2008. © Freescale Semiconductor.3-Phase Inverter Vb Q1 Q2 Q3 A B C With the 3-phase inverter. TM 54 . Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. All other product or service names are the property of their respective owners. Inc. Inc. you can control which phases need to be fed in order to turn the motor Q4 Q5 Q6 0v Q1. Q5 and Q6 is where the current goes out of the motor Freescale Semiconductor Proprietary Information. Q2 and Q3 is where the current goes in the motor and Q4.

TM 55 .Control of 3-Phase Inverter Determined on the Hall Sensor Position A N S B’ C C’ B A B BLDC Motor C A’ Freescale Semiconductor Proprietary Information. Inc. 2008. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. © Freescale Semiconductor. Inc. All other product or service names are the property of their respective owners.

TM 56 . Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. 2008.Control of 3-Phase Inverter Determined on the Hall Sensor Position A N S B’ C C’ B A B BLDC Motor C A’ H1 1 1 1 0 0 0 H2 0 0 1 1 1 0 H3 1 0 0 0 1 1 Phase A +VDCB +VDCB NC -VDCB -VDCB NC Phase B -VDCB NC +VDCB +VDCB NC -VDCB Phase C NC -VDCB -VDCB NC +VDCB +VDCB Freescale Semiconductor Proprietary Information.

© Freescale Semiconductor. TM 57 . All other product or service names are the property of their respective owners.Control of 3-Phase Inverter Determined on the Hall Sensor Position A S B’ C C’ B A B BLDC Motor C N A’ H1 1 1 1 0 0 0 H2 0 0 1 1 1 0 H3 1 0 0 0 1 1 Phase A +VDCB +VDCB NC -VDCB -VDCB NC Phase B -VDCB NC +VDCB +VDCB NC -VDCB Phase C NC -VDCB -VDCB NC +VDCB +VDCB Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. 2008. Inc.

Inc. 2008. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. TM 58 . All other product or service names are the property of their respective owners.Control of 3-Phase Inverter Determined on the Hall Sensor Position A B’ C N S C’ A’ B A B BLDC Motor C H1 1 1 1 0 0 0 H2 0 0 1 1 1 0 H3 1 0 0 0 1 1 Phase A +VDCB +VDCB NC -VDCB -VDCB NC Phase B -VDCB NC +VDCB +VDCB NC -VDCB Phase C NC -VDCB -VDCB NC +VDCB +VDCB Freescale Semiconductor Proprietary Information. © Freescale Semiconductor.

Inc. © Freescale Semiconductor. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. All other product or service names are the property of their respective owners.Control of 3-Phase Inverter Determined on the Hall Sensor Position A B’ C N S C’ B A B BLDC Motor C A’ H1 1 1 1 0 0 0 H2 0 0 1 1 1 0 H3 1 0 0 0 1 1 Phase A +VDCB +VDCB NC -VDCB -VDCB NC Phase B -VDCB NC +VDCB +VDCB NC -VDCB Phase C NC -VDCB -VDCB NC +VDCB +VDCB Freescale Semiconductor Proprietary Information. 2008. Inc. TM 59 .

Inc. © Freescale Semiconductor. All other product or service names are the property of their respective owners. Inc.Control of 3-Phase Inverter Determined on the Hall Sensor Position A B’ S N C’ B A B BLDC Motor C C A’ H1 1 1 1 0 0 0 H2 0 0 1 1 1 0 H3 1 0 0 0 1 1 Phase A +VDCB +VDCB NC -VDCB -VDCB NC Phase B -VDCB NC +VDCB +VDCB NC -VDCB Phase C NC -VDCB -VDCB NC +VDCB +VDCB Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. 2008. TM 60 .

All other product or service names are the property of their respective owners. 2008.Control of 3-Phase Inverter Determined on the Hall Sensor Position A B’ C C’ B N S BLDC Motor A B C A’ H1 1 1 1 0 0 0 H2 0 0 1 1 1 0 H3 1 0 0 0 1 1 Phase A +VDCB +VDCB NC -VDCB -VDCB NC Phase B -VDCB NC +VDCB +VDCB NC -VDCB Phase C NC -VDCB -VDCB NC +VDCB +VDCB Freescale Semiconductor Proprietary Information. Inc. TM 61 . Inc. © Freescale Semiconductor. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.

we will advance one step in the commutation table •Commutation table will tell us which transistors to turn on •When Switch1 is not pressed. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.Lab 1 ►Make a program that • On/Off transistors TO DO: •Enable moves the motor in the clockwise direction Switch1 to enable commutations •Enable 3-Phase Inverter •LEDs will still reflect HALL Effect sensors •Each time Switch1 is pressed. turn OFF transistors Freescale Semiconductor Proprietary Information. All other product or service names are the property of their respective owners. Inc. TM 62 . Inc. © Freescale Semiconductor. 2008.

Enable Inverter extern unsigned char table_rotate[8]. for(. Inc. ENABLELED(2). TM 63 .Import Table Add Variables. Enable Switch1. unsigned char value. © Freescale Semiconductor. All other product or service names are the property of their respective owners.. void main(void) { EnableInterrupts. /* enable interrupts */ /* include your code here */ ENABLESWITCH(1).) { Freescale Semiconductor Proprietary Information. unsigned char commutation. ENABLELED(3). Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. ENABLELED(1). ENABLE3PHASEINVERTER(). Inc. 2008.

. 2008. © Freescale Semiconductor. LED3_PIN = HALL_3. Inc. if(!SW1_PIN) { } Freescale Semiconductor Proprietary Information. TM 64 .) { __RESET_WATCHDOG(). Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. LED2_PIN = HALL_2.Wait for Switch1 to be Pressed for(. All other product or service names are the property of their respective owners. /* feeds the dog */ LED1_PIN = HALL_1.

if(commutation & Q6_MASK) Q6 = 1. Inc. Advance Counter.Once Pressed. All other product or service names are the property of their respective owners. LED3_PIN = HALL_3. LED2_PIN = HALL_2. if(commutation & Q3_MASK) Q3 = 1. if(commutation & Q4_MASK) Q4 = 1. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. } Freescale Semiconductor Proprietary Information.) { __RESET_WATCHDOG(). if(value>=7) value = 1. if(commutation & Q1_MASK) Q1 = 1. commutation = table_rotate[value]. if(commutation & Q5_MASK) Q5 = 1. if(commutation & Q2_MASK) Q2 = 1. TM 65 . © Freescale Semiconductor.. if(!SW1_PIN) { value++. 2008. /* feeds the dog */ LED1_PIN = HALL_1. Commutate for(. Inc.

All other product or service names are the property of their respective owners. LED3_PIN = HALL_3. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. LED1_PIN = HALL_1. 2008.Wait for Switch to be Released if(commutation & Q3_MASK) Q3 = 1. © Freescale Semiconductor. } } IT IS IMPORTANT TO TURN OFF TRANSISTORS! TURNOFFTRANSISTORS(). Freescale Semiconductor Proprietary Information. Inc. if(commutation & Q6_MASK) Q6 = 1. while(!SW1_PIN) { __RESET_WATCHDOG(). TM 66 . LED2_PIN = HALL_2. Inc.

Inc. © Freescale Semiconductor. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Click On Run 4. All other product or service names are the property of their respective owners.Download and Run Code 1. Click On Connect on the Debugger 3. Click On Yes To Reprogram the MCU Freescale Semiconductor Proprietary Information. Click On Run 2. 2008. TM 67 . Inc.

Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. TM 68 .Lab2 Freescale Semiconductor Proprietary Information. © Freescale Semiconductor. 2008. Inc. All other product or service names are the property of their respective owners.

Inc. transistors will commutate • Freescale Semiconductor Proprietary Information. © Freescale Semiconductor.Lab 2 ►Make a program that • On/Off transistors move the motor in clockwise direction 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. TM 69 . Inc. 2008. All other product or service names are the property of their respective owners. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.

© Freescale Semiconductor. 2008. Inc.) { Freescale Semiconductor Proprietary Information.. ENABLELED(1). void main(void) { EnableInterrupts. Enable Switch5 unsigned char pasthallsensors. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. ENABLESWITCH(1). All other product or service names are the property of their respective owners. for(. TM 70 .Add Variables. ENABLELED(3). ENABLE3PHASEINVERTER(). ENABLELED(2). unsigned char hallsensors. /* enable interrupts */ /* include your code here */ ENABLESWITCH(5).

) { __RESET_WATCHDOG(). Inc. All other product or service names are the property of their respective owners.. while(SW5_PIN) { } TURNOFFTRANSISTORS(). 2008.Wait for Switch5 to be On for(. /* feeds the dog */ LED1_PIN = HALL_1. Freescale Semiconductor Proprietary Information. LED2_PIN = HALL_2. Inc. © Freescale Semiconductor. LED3_PIN = HALL_3. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. TM 71 .

if(HALL_2) hallsensors |= 0x02. Inc. if(HALL_3) hallsensors |= 0x01. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. LED2_PIN = HALL_2. if(pasthallsensors != hallsensors) { /* Do something */ } } Freescale Semiconductor Proprietary Information. All other product or service names are the property of their respective owners.Once On. 2008. Display and Check Hall Effect Sensors while(SW5_PIN) { __RESET_WATCHDOG(). LED3_PIN = HALL_3. if(HALL_1) hallsensors |= 0x04. Inc. © Freescale Semiconductor. hallsensors = 0. /* feeds the dog */ LED1_PIN = HALL_1. TM 72 .

All other product or service names are the property of their respective owners. TM 73 .Once On. value++. TRANSISTORS! if(commutation if(commutation if(commutation if(commutation if(commutation } & & & & & Q4_MASK) Q2_MASK) Q5_MASK) Q3_MASK) Q6_MASK) Q4 Q2 Q5 Q3 Q6 = = = = = 1. © Freescale Semiconductor. Display and Check Hall Effect Sensors if(pasthallhensors != hallsensors) { pasthallsensors = hallsensors. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. TURN OFF if(commutation & Q1_MASK) Q1 = 1. 1. Freescale Semiconductor Proprietary Information. 1. 2008. IT IS IMPORTANT TO TURNOFFTRANSISTORS(). Inc. if(value>=7) value = 1. 1. commutation = table_rotate[value]. Inc. 1.

Inc. Click On Connect on the Debugger 3. Click On Run 4. TM 74 . Click On Yes To Reprogram the MCU Freescale Semiconductor Proprietary Information. Inc. © Freescale Semiconductor. 2008. All other product or service names are the property of their respective owners. Click On Run 2. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.Download and Run Code 1.

TM 75 .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. Inc. mainly on their inductance characteristics: ►Based on BEMF • Speed range from 5-10% up to 100% of nominal speed The BEMF must be high enough ►Based • on Motor Inductance Saliency Speed range from standstill to about 20% of nominal speed Freescale Semiconductor Proprietary Information. All other product or service names are the property of their respective owners. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. 2008. © Freescale Semiconductor. Inc.

All other product or service names are the property of their respective owners. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. 2008. Inc. TM 76 . the motor is in a specific position By measuring the zero crosses against time.BEMF - - 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. © Freescale Semiconductor. the speed of the motor can be determined Freescale Semiconductor Proprietary Information. Inc.

© Freescale Semiconductor. All other product or service names are the property of their respective owners. Inc. 2008. Inc. TM 77 .BLDC Motor Back-EMF Shape Phase A-B Voltage Phase B-C Voltage Phase C-A Voltage Phase A Phase B Phase C A CH4 0V C B Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.

© Freescale Semiconductor. Inc.Sensorless BLDC Motor Control with BEMF Zero-Crossing Detection Appropriate Phase Comparator Output selected Zero Crossing event detected Freescale Semiconductor Proprietary Information. 2008. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. All other product or service names are the property of their respective owners. TM 78 .

Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. All other product or service names are the property of their respective owners.Sensorless Commutation and BEMF 0 60 120 180 240 300 360 Rotor Electrical Position (Degrees) Phase R Phase S Phase T Zero crossings PWM 1 PWM 3 PWM 5 PWM 2 PWM 4 PWM 6 Freescale Semiconductor Proprietary Information. © Freescale Semiconductor. TM 79 . Inc. 2008.

All other product or service names are the property of their respective owners. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. 2008.BLDC Central Point is Not Accessible ►3-phase inverter and DC bus current measurement Inverter Stage Udcbus Rshunt HB1 A Idcbus V0 B HB2 BLDC Motor HB3 C Freescale Semiconductor Proprietary Information. © Freescale Semiconductor. TM 80 .

Zero Crossing Sensing Reference
HB1
V0

B

A

+ + C

V0

B

HB2

+ HB3 + C

+ HB3 + -

HB3

• •

½ UDCB reference

GND reference

Virtual CP reference
Udcbus

►BLDC

Motor central point is not accessible

Rshunt Idcbus
B
V0

HB2

HB1

A

C

HB3

B

BLDC Motor

V0

HB2

A

+ -

HB1 + -

Udcb + -

HB1

HB2

A

Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008.

TM

81

Zero Crossing Sensing using ADC
►The

principle is the same as the HW topology, but more flexible
GND reference
HB1 ADC1 ADC2 HB3
C B
V0

Virtual CP reference
HB1 ADC1 ADC2 ADC3 ADC4
C

½ UDCB reference
HB1
A B
V0

V0

ADC2 ADC3 ADC4

B

HB2

HB2

HB2

ADC3

HB3

HB3

A

ADC1

Udcb

A

Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008.

TM

82

Application Details
►ADC

Measurement – Back-EMF evaluation

Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008.

TM

83

“visible” Back-EMF detectable zero crossing Freescale Semiconductor Proprietary Information. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc.Back-EMF Detection Window 0 30 60 90 120 150 180 210 240 270 300 330 360 390 uVA uSa . All other product or service names are the property of their respective owners. TM 84 . © Freescale Semiconductor. 2008.

© Freescale Semiconductor. 2008. TM 85 . Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.Lab3 Freescale Semiconductor Proprietary Information. All other product or service names are the property of their respective owners. Inc. Inc.

C 3-phase inverter DC current sensing 3 Diagram BLDC motor APMOTOR board 3 outputs Fault LED Direction LED Run/Stop status PB_A PB_B SW 9 Vdc 3 inputs BDM Freemaster on PC Read/set variables Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. All other product or service names are the property of their respective owners.Sensorless BLDC Motor Control using MC9S08AC AC microcontroller 6 6 PWM 4 ADC inputs 3 Zero-cross detection circuit 3. Inc.3V Power supply 3 ►Application PH A.B. TM 86 . 2008. © Freescale Semiconductor.

Inc.Sensorless BLDC Motor Control using MC9S08AC ►MC9S08AC • • Peripheral Utilization Timer 1 6 channels: PWM modulation for BLDC motor (complementary bipolar) Timer 2 Time base for commutation period measurement Channel 0: commutation Channel 1: timing of application • A/D Converter DC bus current. All other product or service names are the property of their respective owners. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. phase voltages (zero-cross detection) Freescale Semiconductor Proprietary Information. 2008. © Freescale Semiconductor. TM 87 .

Inc. TM 88 . Inc. All other product or service names are the property of their respective owners. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. © Freescale Semiconductor. 2008.PI Control ►Proportional • • Control Error multiplied by constant Deals with present behavior Freescale Semiconductor Proprietary Information.

2008. but provides better precision Deals with past behavior Freescale Semiconductor Proprietary Information. © Freescale Semiconductor. TM 89 . Inc. All other product or service names are the property of their respective owners. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.PI Control ►Integral • • • Control Ads long-term precision Takes longer to settle.

All other product or service names are the property of their respective owners. 2008. © Freescale Semiconductor. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor.PI controller on AC MCU These variables are used To tune the system This is the control Algorithm inplemented In AC16 MCU for Motor control Freescale Semiconductor Proprietary Information. TM 90 . Inc.

TMP1CxSC:ELSnA =1) PWM4: OFF PWM5: OFF Freescale Semiconductor Proprietary Information. All other product or service names are the property of their respective owners.100%) . 2008.TMP1CxSC:ELSnA =0) PWM2: switching (duty cycle (50 . Inc.TMP1CxSC:ELSnA =1) PWM1: switching (duty cycle (50 . Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. negative polarity (TMP1CxSC:ELSnB =x. Inc.100%) + dead time). positive polarity (TMP1CxSC:ELSnB =1. negative polarity (TMP1CxSC:ELSnB =x.PWM and manual dead time insertion ►PWM Generation ► TIMER set to center aligned mode (TPM1SC:CPWMS=1) Example: • ► • • • • • PWM0: switching (duty cycle (50 . TM 91 .TMP1CxSC:ELSnA =0) PWM3: switching (duty cycle (50 . positive polarity (TMP1CxSC:ELSnB =1. © Freescale Semiconductor.100%) .100%) + dead time).dead time).dead time).

Dead Time Q1 Q1 Q4 Q4 a) Center aligned PWM. All other product or service names are the property of their respective owners. Inc. Freescale Semiconductor Proprietary Information. TM 92 . Q1 and Q4 change in the same instant. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. 2008. Q1 and Q4 triggered with different PWM duty cycle avoiding that both transistors turn on at the same time. Inc. © Freescale Semiconductor. it can short circuit between Vb and GND b) Center aligned PWM.

Inc. © Freescale Semiconductor. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Back-EMF voltage Single result register only 3.5 us conversion time ADC measurement has to be synchronized with PWM Freescale Semiconductor Proprietary Information. TM 93 . 2008. Inc. All other product or service names are the property of their respective owners.Application Details ►ADC • • • • Measurement DC bus current.

Inc.Application Details ►ADC Measurement – PWM -> ADC Synchronization Overflow interrupt is used for PWM->ADC synchronization Freescale Semiconductor Proprietary Information. All other product or service names are the property of their respective owners. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. TM 94 . © Freescale Semiconductor. Inc. 2008.

All other product or service names are the property of their respective owners. 2008. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. © Freescale Semiconductor. TM 95 .Application Details ►ADC Measurement – Back-EMF evaluation Freescale Semiconductor Proprietary Information. Inc.

2008. All other product or service names are the property of their respective owners. Inc.FlexTimer in the MCF51AC This part pending because dev board was delivered on April 29 Freescale Semiconductor Proprietary Information. Inc. TM 96 . Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. © Freescale Semiconductor.

Dead time insertion supported by software. All other product or service names are the property of their respective owners. Fault input supported by hardware (automatically turns of PWM pin outputs).FlexTimer advantages ► Supports up to 8 channels which can be synchronized in pairs for complementary signal generation. Inc. ► ► ► ► ► ► Freescale Semiconductor Proprietary Information. TM 97 . Polarity for PWM output can be configured. Synchronized reloading of PWM duty cycle from several sources (ADC. © Freescale Semiconductor. Inc. Edge and center alligned PWM generation. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. analog comparator. software). 2008. FTM can trigger ADC conversions automatically.

2008. To configure simply enable dead time insertion bit and configure the number of timer counts of dead time. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. Inc. • • No CPU load generated to make dead time insertion. the rest is done by timer module.Dead time insertion ► Used to avoid to power devices to be turned on at the same time. TM 98 . Inc. © Freescale Semiconductor. Freescale Semiconductor Proprietary Information. All other product or service names are the property of their respective owners.

Inc. 2008. © Freescale Semiconductor. If measurements are always taken at the same times. Inc.ADC Synchronization ► Reduces CPU load by saving time needed to start conversions (to detect zero-crossings or instantaneous current. All other product or service names are the property of their respective owners. ► Timer Channel ISR t1 1 ADC conversion ADC Channel ISR t3 1 Process ADC data Manual start of ADC conversion t2 Timer Channel ISR Automatic start of ADC conversion t1 ADC conversion ADC Channel ISR t3 Process ADC data ► Without hardware ► T = t1 + t2 + t3 trigger With hardware trigger T = t1 + t3 Freescale Semiconductor Proprietary Information. When doing back-EMF sensing measurements need to be made in certain timing windows. control algorithm is more precise. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. TM 99 .

All other product or service names are the property of their respective owners. © Freescale Semiconductor. 2008. Inc. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor. TM 100 .Related Session Resources Sessions (Please limit to 3) Session ID AZ131 AZ121 AZ120 Title Motor Control Part 1 – 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) Pedestal ID 312 214 706 Meet the FSL Experts (Please limit to 3) Title Time Location Demo Title Large Appliance Demo 3-Phase PMSM Vector Control demo with Encoder Air Hockey Demonstration featuring the Flexis AC Products Freescale Semiconductor Proprietary Information. Inc.

TM .

Sign up to vote on this title
UsefulNot useful