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

Similar documents
RL78 Motor Control. YRMCKITRL78G14 Starter Kit. Renesas Electronics Europe. David Parsons Application Engineering Industrial Business Group.

Electric Bike BLDC Hub Motor Control Using the Z8FMC1600 MCU

F²MC-8FX/16LX/16FX/FR FAMILY BLDC DRIVE WITH THE PPG

Using the HCS08 TPM Module In Motor Control Applications

RX23T inverter ref. kit

CHAPTER 2 STATE SPACE MODEL OF BLDC MOTOR

Motor Control Part 3 - Solutions for Small Appliances and Health Care Applications

3-in-1 Air Condition Solution

Motor Control using NXP s LPC2900

DRM100 Designer Reference Manual. Devices Supported: 56F801X

Analog Devices: High Efficiency, Low Cost, Sensorless Motor Control.

STM32 motor control firmware library. STM32 FOC PMSM SDK v3.0.

STM32 PMSM FOC SDK v3.2. 蒋建国 MCU Application Great China

Motor Control Solutions

SPEED CONTROL OF BRUSHLES DC MOTOR

L E C T U R E R, E L E C T R I C A L A N D M I C R O E L E C T R O N I C E N G I N E E R I N G

Sistemi per il controllo motori

User Guide IRMCS3041 System Overview/Guide. Aengus Murray. Table of Contents. Introduction

CHAPTER 4 FUZZY BASED DYNAMIC PWM CONTROL

Low Cost Motor Control Family

VORAGO Timer (TIM) subsystem application note

Electronic Speed Controls and RC Motors

UG Student, Department of Electrical Engineering, Gurunanak Institute of Engineering & Technology, Nagpur

A Practical Primer On Motor Drives (Part 13): Motor Drive Control Architectures And Algorithms

Introduction to BLDC Motor Control Using Freescale MCU. Tom Wang Segment Biz. Dev. Manager Avnet Electronics Marketing Asia

EE401,EC401,DEE19,DETE19

Simplify Motor Control Development with S12 MagniV

AP CANmotion. Evaluation Platform with BLDC Motor featuring XC886CM Flash Microcontroller Version 2007/10. Microcontrollers

Speed Control of Brushless DC Motors-Block Commutation With Hall Sensors. User s Guide

MICROCONTROLLERS Stepper motor control with Sequential Logic Circuits

BLDC Motor Drive with Power Factor Correction Using PWM Rectifier

Placement Paper For Electrical

Sensorless BLDC Motor Control Using FRDM-KE02Z Based on Tower Board

BLDC Motor Control on Z8FMC16 Series MCUs Using Sensored Sinusoidal PWM Modulation

Assembly Language. Topic 14 Motion Control. Stepper and Servo Motors

A COMPARISON STUDY OF THE COMMUTATION METHODS FOR THE THREE-PHASE PERMANENT MAGNET BRUSHLESS DC MOTOR

User Guide Introduction. IRMCS3043 System Overview/Guide. International Rectifier s imotion Team. Table of Contents

Sensorless PMSM Control on MKV46F256 Using Kinetis SDK

BLDC Sensorless Reference Design Using MC56F8006 Devices Supported: MC56F8006

Low Cost Power Converter with Improved Performance for Switched Reluctance Motor Drives

Hybrid Controller. 3-Phase SR Motor Control with Hall Sensors Reference Design. Designer Reference Manual. Freescale Semiconductor, I

Automated PMSM Parameter Identification

Zilog Motor Control Technologies

combine regular DC-motors with a gear-box and an encoder/potentiometer to form a position control loop can only assume a limited range of angular

Motor Control Part 1 - Fundamentals and Freescale Solutions

CHAPTER-III MODELING AND IMPLEMENTATION OF PMBLDC MOTOR DRIVE

AN Industrial Stepper Motor Driver. Application Note Abstract. Introduction. Stepper Motor Control Method

Courseware Sample F0

ADVANCED ROTOR POSITION DETECTION TECHNIQUE FOR SENSORLESS BLDC MOTOR CONTROL

Chuck Raskin P.E. Principle R&D Engineer. Blaine, MN USA

Brushless 5 click. PID: MIKROE 3032 Weight: 25 g

Control of Electric Machine Drive Systems

Implementation of Brushless DC motor speed control on STM32F407 Cortex M4

CHAPTER 4 CONTROL ALGORITHM FOR PROPOSED H-BRIDGE MULTILEVEL INVERTER

Volume 1, Number 1, 2015 Pages Jordan Journal of Electrical Engineering ISSN (Print): , ISSN (Online):

SPEED CONTROL OF SENSORLESS BLDC MOTOR WITH FIELD ORIENTED CONTROL

Inductance, capacitance and resistance

Speed Control of BLDC Motor Using FPGA

Application Note, V1.0, Oct 2006 AP08019 XC866. Sensorless Brushless DC Motor Control Using Infineon 8-bit XC866 Microcontroller.

CHAPTER-5 DESIGN OF DIRECT TORQUE CONTROLLED INDUCTION MOTOR DRIVE

CIS009-2, Mechatronics Signals & Motors

Hello, and welcome to this presentation of the FlexTimer or FTM module for Kinetis K series MCUs. In this session, you ll learn about the FTM, its

AVR42778: Core Independent Brushless DC Fan Control Using Configurable Custom Logic on ATtiny817. Features. Introduction. AVR 8-bit Microcontroller

Design of double loop-locked system for brush-less DC motor based on DSP

Optimizing Performance Using Slotless Motors. Mark Holcomb, Celera Motion

1. Introduction. Benefits and Applications Enabled by 56F8000 Digital Signal Controllers. Contents. Freescale Semiconductor White Paper. 1.

Three-Phase Induction Motors. By Sintayehu Challa ECEg332:-Electrical Machine I

Design of A Closed Loop Speed Control For BLDC Motor

ELECTRONIC CONTROL OF A.C. MOTORS

Sensorless Vector Control with RL78G14

Low Voltage Solutions for DC & BLDC Motors in Industrial Applications

EE152 Final Project Report

VALLIAMMAI ENGINEERING COLLEGE

Nicolò Antonante Kristian Bergaplass Mumba Collins

INSTITUTE OF AERONAUTICAL ENGINEERING (AUTONOMOUS) Dundigal, Hyderabad

InstaSPIN-BLDC Lab. DRV8312 Setup Jumpers and switches must be setup properly or the kit will not function correctly!

2014 Texas Instruments Motor Control Training Series. -V th. Dave Wilson

3-Phase Switched Reluctance Motor Control with Encoder Using DSP56F80x. 1. Introduction. Contents. Freescale Semiconductor, I

Low Cost PMSM Sensorless Field-Oriented Control Based on KE02

Jaguar Motor Controller (Stellaris Brushed DC Motor Control Module with CAN)

3. What is the difference between Switched Reluctance motor and variable reluctance stepper motor?(may12)

CHAPTER 6 THREE-LEVEL INVERTER WITH LC FILTER

TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO. LIST OF TABLES LIST OF FIGURES LIST OF SYMBOLS AND ABBREVIATIONS

Simulation and Dynamic Response of Closed Loop Speed Control of PMSM Drive Using Fuzzy Controller

Analog Servo Drive 25A20DD

Simulation and Dynamic Response of Closed Loop Speed Control of PMSM Drive Using Fuzzy Controller

FlexTimer and ADC Synchronization

SIMULATION AND IMPLEMENTATION OF CURRENT CONTROL OF BLDC MOTOR BASED ON A COMMON DC SIGNAL

Sensorless PMSM Field-Oriented Control on Kinetis KV and KE

Simulation Study of MOSFET Based Drive Circuit Design of Sensorless BLDC Motor for Space Vehicle

Page ENSC387 - Introduction to Electro-Mechanical Sensors and Actuators: Simon Fraser University Engineering Science

Application Note. 3-Phase Brushless DC Motor Control with Hall Sensors AN-CM-244

UNIT-III STATOR SIDE CONTROLLED INDUCTION MOTOR DRIVE

TMC603EVAL MANUAL Evaluation board for the TMC603 three phase motor driver with BLDC back EMF commutation hallfx

National Infotech. Electrical Drive Trainers. Developed By: : Authorized Dealer : Embedded System Solutions

Brushed DC Motor Control. Module with CAN (MDL-BDC24)

Sensors and Sensing Motors, Encoders and Motor Control

Introduction of ACIM and PMSM Motor Control

Detect stepper motor stall with back EMF technique (Part 1)

EEE, St Peter s University, India 2 EEE, Vel s University, India

Transcription:

November, 2008 Hands-on Workshop: Motor Control Part 4 - Brushless DC Motors Made Easy PZ104 Derek Liu of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008.

Agenda Motor Anatomy Electric motor type classification BLDC theory In depth Flexis AC Family Overview Lab 1: stepping a BLDC motor Commutation table and knowing position with hall effect sensors Lab 2: spinning the motor Sensorless BLDC basics Controlling the speed of the motor Lab 3 FlexTimer Advantages in the MCF51AC of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 1

Motor Anatomy of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 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. 2008. 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. 2008. 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. 2008. 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. 2008. 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. 2008. 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. 2008. 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. 2008. 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. 2008. 10

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. 2008. 11

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. 2008. 12

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. 2008. 13

Brushed and Brushless Motors Comparison Feature Brushed DC motor BLDC Motor Commutation Maintenance Life Speed/Torque Speed range Building Cost Control Control Requirements Brushed commutation Periodic maintenance is required Shorter Moderately Flat. Higher speeds produces higher friction and this reduces torque. Lower Mechanical limitations by the brushes Lower Simple 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 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. 2008. 14

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. 2008. 15

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. 2008. 16

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. 2008. 17

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 60 while rotor only moves 30 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. 2008. 18

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. 2008. 19

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. 2008. 20

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. 2008. 21

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. 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. 2008. 22

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. 2008. 23

Reluctance If the rotating field of a motor is de-energized, it will still develop 10 or 15% 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. 2008. 24

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. 2008. 25

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. 2008. 26

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. 2008. 27

BLDC motor configuration 4 pole pairs S N N S H2 A C B B H3 C A H1 S N N H1 H2 H3 1 0 1 S of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 28

BLDC motor configuration 3 pole pairs H1 N S H2 S N N S H3 9 coils of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 29

External Rotor Different Motor Configurations 1 pole pairs 2 pole pairs N 4 pole pairs S S H2 A H3 C B H1 N S H2 A C B B H1 C A H3 S S N H2 A C B B H3 C A H1 N S N N H1 H2 H3 1 0 1 H1 H2 H3 1 0 1 N H1 H2 H3 1 0 1 S of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 30

Internal Rotor Different Motor Configurations 1 pole pair H3 2 pole pairs B H1 4 pole pairs B H3 A C A N C A N S N C H2 S N H2 S S H2 S S N C N A C N S A H1 H2 H3 1 0 1 B H1 H1 H2 H3 1 0 1 B H3 H1 H2 H3 1 0 1 B H1 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 31

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. 2008. 32

Commutation example Stator field is maintained 60, 120 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. 2008. 33

Six Step BLDC Motor Control cont d Brushless DC Motor Control 1 Controller 2 3 4 S T R c b a 5 6 1 1 0 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. 2008. 34

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) of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 35

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. 2008. 36

Brushless DC Motor Control Sinusoidal BLDC motor control i S i Sb All three phases are powered by sinewave shifted by 120 i Sa i Sc We are able to generate stator field to any position over 360 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 37

Six step control versus sinusoidal control Brushless DC Motor Control Summary Six step control Sinusoidal control + Simple PWM generation More complex PWM generation (sinewave has to be generated) Ripple in the torque (stator flux jumps by 60 ) A little noise operation (due to ripple in the torque) + Smooth torque (stator flux rotates fluently) + Very quiet + Simple sensor 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. 2008. 38

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. 2008. 39

Putting All Together of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 40

Flexis AC family overview of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 41

Flexis AC Family ColdFire V1 Core: Up to 46 Dhrystone 2.1 MIPS @ 50 MHz Up to 32K bytes SRAM / Up to 256K bytes Flash Single Supply 5 Volt Operation High EMC (EMS) Performance Timer modules: 2 x 6ch 16-bit FlexTimer Module (F) 1 x 2ch 16-bit TPM 24ch 12-bit ADC (2.5 us conversion) ADC triggering from timer in addition to RTC mscan Interface for Industrial Control Real Time Counter (RTC) 2 x Serial Peripheral Interface (SPI), 2 x SCI I 2 C bus interface with broadcasting mode Low Voltage Detect (LVD), Low Voltage Warning (LVW) Multi-Clock Generator (MCG) Dual comparators (one linked to timer) IEC60730 class C safety features Cyclic Redundancy Check (CRC) Watchdog option to run on independent clock source (LPO) Up to 70 General-Purpose I/O Offered at -40 C to +105 C @ 50MHz Packages: 64LQFP, 64QFP, 80LQFP New or Enhanced Module 32K SRAM 256KBytes Flash 16K SRAM 128KBytes Flash Memory Options 2x ACMP KBI Real Time Counter 2x 6ch 16-bit F 2ch 16-bit TPM V1 ColdFire Fire Core MCG CRC System Integration Up to 70 GPI/O 2x SCI Part Number Flash RAM CAN Price Celis 256k 32k Yes $4.33 Celis 256k 32k No $4.23 Celis 256k 16k Yes $4.28 Celis 256k 16k No $4.13 Celis 128k 32k Yes $3.53 Celis 128k 16k No $3.33 IRQ CAN 24ch 12-bit ADC I 2 C LVD, LVW 2x SPI COP of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 42

Lab1: stepping the motor of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 43

Open CodeWarrior Project: BLDC_AC128_StepByStep Wait! Only connect the FLEXISAC board to the computer, not to the motor board! of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 44

Download and Run Code 1. 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. 2008. 45

How to Set Up the Boards FLEXISAC board APMOTOR board BLDC Motor of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 46

Prepare the board Disconnect USB cable Move PWR_SEL jumper from BDM to VR1 (on the right of the On/Off switch) Disconnect jumpers SW2, SW3, SW4 and POT from the USER jumpers (below the switches and LEDs) Connect the adaptor board so that pin 1 connects to pin 1 in both headers, the connector is very tight so only push it in about halfway Connect the motor board to the other side of the adapter board of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 47

Now power the Motor board with the power adaptor Press F5 or Debug again for program to start running. Run the program Press SW1, every time it is pressed, the H bridge is switched for the next commutation table position. The position is kept while SW1 is pressed. Release SW1 after no more than 10 seconds as constant current is being driven through the motor phase. of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 48

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. 2008. 49

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 H1 H2 H3 A-B B-C C-A 1 0 1 0 1 0 + _ + _ + _ Signal sequence diagram for the hall sensors 60 120 180 240 300 360 Supplied motor voltage of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 50

3-Phase Inverter Vb Q1 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 0v Q4 Q5 Q6 Q1, 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. 2008. 51

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. 2008. 52

Control of 3-Phase Inverter Determined on the Hall Sensor Position B N S A C A B C BLDC Motor C A B H1 H2 H3 Phase A Phase B Phase C 1 0 1 +V DCB -V DCB NC 1 0 0 +V DCB NC -V DCB 1 1 0 NC +V DCB -V DCB 0 1 0 -V DCB +V DCB NC 0 1 1 -V DCB NC +V DCB 0 0 1 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. 2008. 53

Control of 3-Phase Inverter Determined on the Hall Sensor Position B C N S A A B C A B C BLDC Motor H1 H2 H3 Phase A Phase B Phase C 1 0 1 +V DCB -V DCB NC 1 0 0 +V DCB NC -V DCB 1 1 0 NC +V DCB -V DCB 0 1 0 -V DCB +V DCB NC 0 1 1 -V DCB NC +V DCB 0 0 1 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. 2008. 54

Control of 3-Phase Inverter Determined on the Hall Sensor Position B A N S C A B C BLDC Motor C A B H1 H2 H3 Phase A Phase B Phase C 1 0 1 +V DCB -V DCB NC 1 0 0 +V DCB NC -V DCB 1 1 0 NC +V DCB -V DCB 0 1 0 -V DCB +V DCB NC 0 1 1 -V DCB NC +V DCB 0 0 1 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. 2008. 55

Control of 3-Phase Inverter Determined on the Hall Sensor Position B A N S C A B C BLDC Motor C A B H1 H2 H3 Phase A Phase B Phase C 1 0 1 +V DCB -V DCB NC 1 0 0 +V DCB NC -V DCB 1 1 0 NC +V DCB -V DCB 0 1 0 -V DCB +V DCB NC 0 1 1 -V DCB NC +V DCB 0 0 1 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. 2008. 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 H1 H2 H3 Phase A Phase B Phase C 1 0 1 +V DCB -V DCB NC 1 0 0 +V DCB NC -V DCB 1 1 0 NC +V DCB -V DCB 0 1 0 -V DCB +V DCB NC 0 1 1 -V DCB NC +V DCB 0 0 1 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. 2008. 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 H1 H2 H3 Phase A Phase B Phase C 1 0 1 +V DCB -V DCB NC 1 0 0 +V DCB NC -V DCB 1 1 0 NC +V DCB -V DCB 0 1 0 -V DCB +V DCB NC 0 1 1 -V DCB NC +V DCB 0 0 1 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. 2008. 58

Lab 2: spin the motor of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 59

The following program uses the sequence in the previous lab to rotate the BLDC motor at the fastest possible speed Lab 2 TO DO: Open BLDC_AC128_FullSpeed Reprogram board. Run program of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 60

Download and Run Code 1. 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. 2008. 61

Think about this The previous example simply takes the current position from the hall effect sensors and with the help of a table determines and outputs the following position. How would you change the speed? How would you change the torque? of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 62

Sensorless BLDC basics of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 63

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-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 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 64

- 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. 2008. 65

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 0V CH4 B of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 66

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. 2008. 67

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 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 68

BLDC Central Point is Not Accessible 3-phase inverter and DC bus current measurement Inverter Stage U dcbus R shunt HB1 I dcbus B A HB2 V 0 BLDC Motor HB3 C of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 69

+ - + - + - B HB2 V 0 C A HB3 HB1 + - + - + - Zero Crossing Sensing Reference B HB2 HB3 HB1 V 0 A C Udcb + - + - + - B HB2 HB3 HB1 V 0 A Virtual CP reference ½U DCB reference GND reference U dcbus BLDC Motor central point is not accessible R shunt I dcbus HB2 A B V0 C HB1 HB3 BLDC Motor of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 70

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 ADC1 ADC2 B HB2 V 0 A HB1 ADC1 ADC2 B HB2 HB1 V 0 A Udcb ADC1 ADC2 B HB2 HB1 V 0 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. 2008. 71

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. 2008. 72

Back-EMF Detection Window 0 30 60 90 120 150 180 210 240 270 300 330 360 390 - 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. 2008. 73

Control the speed of the motor of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 74

Speed control in BLDC Speed is controlled by the frequency of commutations. The previous example showed the fastest possible commutations by switching phases as fast as the processor runs. To control speed it is necessary to commute the motor according to a time base. A timer interrupt is the simplest way to control the frequency of commutations. Depending on physical characteristics, every motor has a limitation of maximum speed, if commutations become faster than the capability of the motor, the electrical frequency will beat the mechanical speed, causing slip and thus lost speed and probably stopping the motor. of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 75

Lab 3: changing speed of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 76

Open project BLDC_AC256_SpeedControl Controlling speed with MCF51AC The code you will find is exactly the same as the previous lab, but in the MCF51AC256. What is the easiest way to modify that code to control speed with a timer? Hint: I have already added the timer interrupt subroutine and the timer initialization. How would you change the speed? of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 77

Torque control in BLDC of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 78

Torque control in BLDC Torque is controlled in BLDC motors by the average voltage level in the motor. Voltage average is changed with PWM across the three phases. Torque is sensed by measuring current across the motor phases. Shunt resistors are used to measure current in phases. A single shunt resistor can be used (instead of three) to measure all phases current by measuring at specific times when only one phase is enabled. of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 79

FlexTimer in the MCF51AC of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 80

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. 2008. 81

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. 2008. 82

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 t1 1 Manual start of ADC conversion t2 Timer Channel ISR ADC conversion Automatic start of ADC conversion t1 ADC Channel ISR ADC Channel ISR t3 1 Process ADC data t3 Process ADC data Without hardware trigger With hardware trigger T = t1 + t2 + t3 T = t1 + t3 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 83

Conclusions BLDC motors can be controlled easily by any microcontroller with GPIO and timer. As the requirement for better control increases so do the requirements for specialized hardware. Specialized hardware capability allows for smoother control techniques: Hardware triggering for precise sampling and reloading of PWM duty cycle. Math modules for sine/cosine generation. Simplified PWM generation of complimentary signals for bipolar control and dead time insertion. of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 84

Session Location Online Literature Library Related Session Resources http://www.freescale.com/webapp/sps/site/homepage.jsp?nodeid=052577903644cb Sessions Session ID PZ109 PZ107 PZ106 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 Pedestal ID 704 Demo Title Flexis AC Face-Off - 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. 2008. 85

Extra lab: sensorless BLDC with S08AC of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 87

Sensorless BLDC Motor Control using MC9S08AC Application Diagram AC microcontroller 6 PWM 6 3-phase inverter DC current sensing 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. 2008. 88

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, 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. 2008. 89

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. 2008. 90

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. 2008. 91

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 of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 92

PWM and manual dead time insertion PWM Generation TIMER set to center aligned mode (TPM1SC:CPWMS=1) Example: PWM0: switching (duty cycle (50-100%) + dead time), negative polarity (P1CxSC:ELSnB =x,p1cxsc:elsna =1) PWM1: switching (duty cycle (50-100%) - dead time), positive polarity (P1CxSC:ELSnB =1,P1CxSC:ELSnA =0) PWM2: switching (duty cycle (50-100%) - dead time), positive polarity (P1CxSC:ELSnB =1,P1CxSC:ELSnA =0) PWM3: switching (duty cycle (50-100%) + dead time), negative polarity (P1CxSC:ELSnB =x,p1cxsc:elsna =1) PWM4: OFF PWM5: OFF of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2008. 93

Dead Time Q1 Q1 Q4 Q4 a) Center aligned PWM, Q1 and Q4 change in the same instant, it can short circuit between Vb and GND b) Center aligned PWM, Q1 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. 2008. 94

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. 2008. 95

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. 2008. 96

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. 2008. 97