Home

3-Phase BLDC Drive Control with Hall Sensors Reference Design

image

Contents

1. Bi bspconfig Bring Up To Date Ctrl U B interrupts c B sys c Stop Build Gtrl Break QC Sources ASM Sources Remove Object Code Ctrl Figure 5 4 Target Build Selection DRM022 Rev 1 Designer Reference Manual MOTOROLA Application Setup 53 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Application Setup 5 5 Executing the Application To execute the 3ph BLDC motor control application with Hall sensors select ProjectiDebug in the CodeWarrior IDE followed by the Run command For more help with these commands refer to the CodeWarrior tutorial documentation in the following file located in the CodeWarrior installation directory lt gt info CodeWarrior IDE_User_Guide pdf If the MMDS target is selected CodeWarrior will automatically download the program to MMDS05 08 emulator 5 5 1 Application Operating Modes This 3 phase BLDC motor control application with Hall sensors can operate in two modes 1 2 Manual operating mode PC master software remote operating mode 5 5 1 1 Manual Operating Mode Designer Reference Manual Refer to MC68HC908MR32 control board shown in Figure 5 5 and Figure 5 6 for this description START STOP switch SW3 start stop of the motor SPEED potentiometer P1 set motor speed FORWARD REVERSE switch SW4 motor direction control Fault POT Overvoltage set level of overvoltage fault Fault POT Overcurrent set
2. FAULT FLAG Figure 4 2 Application State Machine Diagram 4 7 Application Initialization During initialization phase following actions are done Chip peripherals are initialized PLL module PWM module Timer modules ADC module SCI module GPIO ports etc For peripheral initialization see appconfig h file e State of the control board switches is read used LEDs are initialized e DC bus voltage check for undervoltage e Hardware identification is done e Interrupts are enabled After initialization the infinite background loop is entered Application enters INIT state Designer Reference Manual DRMO022 Rev 1 44 Software Design MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Software Design PC Master Software Remote Operating Mode In INIT state following actions are done The application is designed to run with a different motors Parameters of the application corresponding to the detected hardware are set e Request for operation mode is checked Hall sensor Identification is performed if it is allowed e Application waits for start 4 7 1 Hall Sensor Identification Hall sensor identification can be executed during initialization of the motor It is enabled if the switch SW2 2 is in ON position The sensor identification is done each time before motor is started The sensor identification algorithm will make a table with rotor positi
3. order 4 MEMC3PBLDCPSUM D 8 Motorola Embedded Motion Optoisolation Board User s Manual Motorola Inc 2000 order MEMCOBUM D DRMO022 Rev 1 Designer Reference Manual MOTOROLA References 61 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc References Designer Reference Manual DRM022 Rev 1 62 References MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Designer Reference Manual 3 ph BLDC Drive Control with Hall Sensors DRM022 Rev 1 Appendix B Glossary AC Alternating current analogue to digital converter ADC The ADC module is an 10 channel multiplexed input successive approximation analog to digital converter brush A component transfering elektrical power from non rotational terminals mounted on the stator to the rotor BLDC Brushless dc motor byte A set of eight bits central processor unit CPU The primary functioning unit of any computer system The CPU controls the execution of instructions clear To change a bit from logic 1 to logic 0 the opposite of set commutation A process providing the creation of a rotation field by switching of power transistor electronic replacement of brush and commutator commutator A mechanical device alternating DC current in DC commutator motor and providing rotation of DC commutator motor
4. Motorola Embedded Motion Optoisolation Board User s Manual MEMCOBUM D Detailed descriptions of individual boards can be found in comprehensive User s Manuals belonging to each board The manuals are available on the Motorola web The User s Manual incorporates the schematic of the board description of individual function blocks and a bill of materials An individual board can be ordered from Motorola as a standard product Designer Reference Manual DRMO022 Rev 1 36 Hardware Design MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Designer Reference Manual 3 ph BLDC Drive Control with Hall Sensors Section 4 Software Design 4 1 Contents 4 2 Software DSN uuci sa a REP RR n hU RR SOR e dads 37 4 3 Software Data Flow c cicnseuepedncce arse Rd CR Rae 37 4 4 Software Processes 00 39 OAM 0 0o Tert 43 ABD Man Fg UG ou RE ESPERE Ea RO RU EE aD ee Ro ed 43 4 7 Application Initialization iuaeso rdg dor o RR CR RC n 44 4 8 PC Master Software Remote Operating Mode 45 4 2 Software Design This section describes the design process of control algorithm and of the software blocks implemented in the drive 4 3 Software Data Flow The control algorithm of closed loop drive for the 3 Phase BLDC Motor with Hall sensors is described in Figure 4 1 The inputs are desired omega from speed pot Manual Control or from external control SCI a
5. comparator A device that compares the magnitude of two inputs A digital comparator defines the equality or relative differences between two binary numbers computer operating properly module COP A counter module that resets the MCU if allowed to overflow COP Computer Operating Properly timer DC Direct Current Designer Reference Manual MOTOROLA Glossary 63 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc DT see Dead Time DT Dead Time DT short time that must be inserted between the turning off of one transistor in the inverter half bridge and turning on of the complementary transistor due to the limited switching speed of the transistors duty cycle A ratio of the amount of time the signal is on versus the time it is off Duty cycle is usually represented by a percentage GPIO General Purpose Input Output Hall Sensors A position sensor giving six defined events each 60 electrical degrees per electrical revolution for 3 phase motor interrupt A temporary break in the sequential execution of a program to respond to signals from peripheral devices by executing a subroutine interrupt request A signal from a peripheral to the CPU intended to cause the CPU to execute a subroutine input output I O Input output interfaces between a computer system and the external world A CPU reads an input to sense the level
6. 3 3 V Bus current sense voltage Isense 563 mV A Bus voltage sense voltage VBus 8 09 mV V Peak output current lpk 2 8 A a dissipation Pai _ 50 W gue dissipation Pakek m 100 Total power dissipation Pdiss 85 3 8 Hardware Documentation All the system parts are supplied and documented according to the following references e U1 MC68HC908MR32 Control Board supplied as ECCTR908MR32 described in Motorola Embedded Motion Control MC68HC908MR32 Control Board User s Manual MEMCMR32CBUM D e U2 3 ph AC BLDC Low Voltage Power Stage DRM022 Rev 1 Designer Reference Manual MOTOROLA Hardware Design 35 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Hardware Design described in Motorola Embedded Motion Control 3 Phase BLDC Low Voltage Power Stage User s Manual MEMC3PBLDCLVUM D e or Evaluation Motor Board described in Motorola Embedded Motion Control Evaluation Motor Board User s Manual e or 3phAC BLDC High Voltage Power Stage supplied in kit with Optoisolation Board as ECOPTHIVACBLDC described in Motorola Embedded Motion Control 3 Phase AC BLDC High Voltage Power Stage User s Manual MEMC3PBLDCPSUM D e UA Optoisolation Board supplied with 3 ph AC BLDC High Voltage Power Stage as ECOPTHIVACBLDC orsupplied alone as ECOPT optoisolation board described in
7. 49 5 4 Software OI none hee R se eee ERE Y Y3R ee ESOS 52 55 Executing the Application so soos rA ss 54 This application operates in an environment that includes dangerous voltages and rotating machinery Be aware that the application power stage and optoisolation board are not electrically isolated from the mains voltage they are live with risk of electric shock when touched An isolation transformer should be used when operating off an ac power line If an isolation transformer is not used power stage grounds and oscilloscope grounds are at different potentials unless the oscilloscope is floating Note that probe grounds and therefore the case of a floated oscilloscope are subjected to dangerous voltages The user should be aware that Before moving scope probes making connections etc it is generally advisable to power down the high voltage supply To avoid inadvertently touching live parts use plastic covers When high voltage is applied using only one hand for operating the test setup minimizes the possibility of electrical shock Designer Reference Manual MOTOROLA Application Setup 47 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Application Setup Operation in lab setups that have grounded tables and or chairs should be avoided Wearing safety glasses avoiding ties and jewelry using shields and operation by personnel trained in high voltage lab
8. Optoisolation Board U3 3 Ph High Voltage AC BLDC Power Stage U4 68HC908MR32 Daughter Board M1 3 phase BLDC Motor Figure 3 2 H W System configuration for high voltage motor 3 3 MC68HC908MR32 Control Board Motorola s embedded motion control series MR32 motor control board is designed to provide control signals for 3 phase ac induction 3 phase brushless dc BLDC and 3 phase switched reluctance SR motors In combination with one of the embedded motion control series power stages and an optoisolation board it provides a software development platform that allows algorithms to be written and tested without the need to design and build hardware With software supplied on the CD ROM the control board supports a wide variety of algorithms for ac induction SR and BLDC motors User control inputs are accepted from START STOP FWD REV switches and a SPEED potentiometer located on the control board Alternately motor commands can be entered via a PC and transmitted over a serial cable to DB 9 connector Output connections and power stage feedback signals are grouped together on 40 pin ribbon cable connector Motor feedback signals can be connected to Hall sensor encoder connector Power is supplied DRM022 Rev 1 Designer Reference Manual MOTOROLA Hardware Design 25 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Hardware Design through the 40 pin ribbon cable from th
9. a PWM waveform read To copy the contents of a memory location to the accumulator register A circuit that stores a group of bits reset To force a device to a known condition RPM Revolutions per minute SCI See serial communication interface module SCI serial communications interface module SCI A module that supports asynchronous communication serial peripheral interface module SPI A module that supports synchronous communication set To change a bit from logic O to logic 1 opposite of clear software Instructions and data that control the operation of a microcontroller software interrupt SWI An instruction that causes an interrupt and its associated vector fetch Designer Reference Manual MOTOROLA Glossary 65 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc SPI See serial peripheral interface module SPI stack A portion of RAM reserved for storage of CPU register contents and subroutine return addresses subroutine A sequence of instructions to be used more than once in the course of a program The last instruction in a subroutine is a return from subroutine RTS instruction At each place in the main program where the subroutine instructions are needed a jump or branch to subroutine JSR or BSR instruction is used to call the subroutine The CPU leaves the flow of the main program to execute t
10. according to required direction and speed Then appropriate commutation function is called The PWM switching schema is in the commutation table see Table 2 2 For details on commutation algorith see section 4 4 8 Commutation Algorithm DRMO022 Rev 1 Designer Reference Manual MOTOROLA System Description 21 For More Information On This Product Go to www freescale com Designer Reference Manual Freescale Semiconductor Inc System Description Table 2 2 Commutation table Voltage Vector required Phase A Phase B Phase C 30 VDCB NC VDCB 90 NC VDCB VDCB 150 VDCB VDCB NC 210 VDCB NC VDCB 270 NC VDCB VDCB 330 VDCB VDCB NC DRMO22 Rev 1 22 System Description For More Information On This Product Go to www freescale com MOTOROLA Freescale Semiconductor Inc Designer Reference Manual 3 ph BLDC Drive Control with Hall Sensors 3 1 Contents Section 3 Hardware Design 3 2 Hardware Configuration lt cccicadeeicivvsivaacier cca 23 3 3 MC68HC908MR32 Control Board 2 cesso 25 3 4 3 Ph BLDC Low Voltage Power Stage 27 ec EVM Motor Board aaa ea ee ARR CR ed Red i od aO E Ri do 29 3 6 Optoisolation Board iuosesacetekikosoceteeXx eR Rh 31 3 7 3 Phase AC BLDC High Voltage Power Stage 33 3 8 Hardware Documentation n a ci erecta 35 3 2 Hardware Configuration DRM022 Rev 1 The motor control
11. are registered trademarks of Metrowerks Inc a wholly owned subsidiary of Motorola Inc 2 CodeWarrior is a registered trademark of Metrowerks Inc a wholly owned subsidiary of Motorola Inc Designer Reference Manual DRMO022 Rev 1 52 Application Setup MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Application Setup Software Setup e pcmaster 3ph_bldc_hs pmp PC master software file Besides the application specific files listed above the application is distributed with peripheral drivers and algorithms placed in following folders e config peripheral start up code drivers and drivers highlevel peripheral and high level drivers algorithms general motor control algorithms 5 4 3 Building the Application To build this application open the 3ph bldc hs sa mcp project file and execute the Make command see Figure 5 4 This will build and link BLDC motor control application with Hall sensors along with all needed Metrowerks libraries iMetrowerks CodeWarrior File Edit View Search Project Debug Window Help B e oo im Kk fidd Window Add Files 3ph_AC_ Hz mcp Create Group Greate Target 49 MMDS Greate Segment Overlay Fies Link Order Tat check Syntax Ctr Prepracess hd File j 5 i 7 ecarnmpltie EEA Dependencies Mu Benn HE SDK Configur Compile Gtrl F7 E appconfig Disassemble Ctrl ShiFEHF7 EA config c
12. channel 2 input capture provides a rotor position detection commutation period calculation and commutation process Timer A channel 0 output on compare provides a commutation delay in case of de excitation Timer B overflow provides a time base speed calculation speed ramp speed controller motor voltage calculation switch debounce service LED control and starts the AD conversion PWM reload updates PWM value registers with actual values ADC conversion complete reads DC Bus voltage and check the voltage limits PWM fault 1 handles an over voltage disables PWM module and sets the fault flag PWM fault 2 handles an over current disables PWM module and sets the fault flag SCI PC master software communication The main program routine is entered after reset It provides an initialization of the microcontroller After initialization the application enters an infinite background loop where the application state machine is executed Designer Reference Manual MOTOROLA Software Design 43 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Software Design The application can be in one of four states The application states are shown in Figure 4 2 The diagram shows the states and transition conditions HW_DETECTED 1 START 0 PC_CHANGE MODE 0 FAULT _FLAG 1 PC CHANGE MODR 1 FAULT FLAG 1 Stop State START 1 A
13. controller side circuitry are met with a single external 12 Vdc power supply Power for power stage side circuitry is supplied from the power stage through the 40 pin output connector The electrical characteristics in Table 3 5 apply to operation at 25 C and a 12 Vdc power supply voltage Table 3 5 Electrical Characteristics Characteristic Symbol Min Typ Max Units Notes Power Supply Voltage Vdc 10 12 30 V Quiescent Current lcc 70 1 20002 500 mA dc dc converter Min Logic 1 Input Voltage Vin 2 0 V HCT logic Max Logic 0 Input Voltage ViL 0 8 V HCT logic Analog Input Range Vin 0 3 3 V Input Resistance Rin 10 kQ Analog Output Range Vout 0 3 3 V Digital Delay Time toby 0 25 us Analog Delay Time tADLY 2 us 1 Power supply powers optoisolation board only 2 Current consumption of optoisolation board plus DSP EMV board powered from this power supply 3 Maximum current handled by dc dc converters Designer Reference Manual DRMO22 Rev 1 32 Hardware Design MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Hardware Design 3 Phase AC BLDC High Voltage Power Stage 3 7 3 Phase AC BLDC High Voltage Power Stage Motorola s embedded motion control series high voltage HV ac power stage is a 180 watt one fourth horsepower 3 phase power stage that will oper
14. level of overcurrent fault Combined switch SW2 functions 1 open closed loop operation ON closed loop on 2 Hall sensor identification ON identification on USER LED indicates status of the drive for detaliled description see Table 5 2 DRMO22 Rev 1 54 Application Setup MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Application Setup Executing the Application Speed Fault POT Forward Reverse Potentiometer Over Voltage fase Switch SW4 Fault POT Over Current Start Stop Switch SW3 E i 5 r eo E l E RESET Buttars Figure 5 6 USER LEDs PWM LEDs and RESET DRM022 Rev 1 Designer Reference Manual MOTOROLA Application Setup 55 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Application Setup Table 5 2 Motor Application States Application Motor Green Yellow Red State State LED State LED State LED State Blinking at a stopped Stopped frequency of 2 Hz v 7 Running Spinning On Running De excitation On On Fault T under voltage Stopped Bling ace frequency of 8 Hz sensor fault Critical Fault Blinking at a over voltage Stopped 9 On frequency of 8 Hz over current 5 5 1 2 PC Master Remote Operating Mode The drive is controlled remotely from a PC via an RS 232 physical interface Even
15. of an external signal and writes to an output to change the level on an external signal LED Lignt Emiting Diode logic 1 A voltage level approximately equal to the input power voltage Voo logic 0 A voltage level approximately equal to the ground voltage MCU Microcontroller unit See microcontroller memory map A pictorial representation of all memory locations in a computer system microcontroller Microcontroller unit MCU A complete computer system including a CPU memory a clock oscillator and input output I O on a single integrated circuit Designer Reference Manual DRM022 Rev 1 64 Glossary MOTOROLA For More Information On This Product Go to www freescale com DRM022 Rev 1 Freescale Semiconductor Inc Glossary modulo counter A counter that can be programmed to count to any number from zero to its maximum possible modulus PI controller Proportional Integral controller peripheral A circuit not under direct CPU control phase locked loop PLL A clock generator circuit in which a voltage controlled oscillator produces an oscillation which is synchronized to a reference signal port A set of wires for communicating with off chip devices program A set of computer instructions that cause a computer to perform a desired operation or operations PWM Pulse Width Modulation PWM period The time required for one complete cycle of
16. techniques are also advisable Power transistors the PFC coil and the motor can reach temperatures hot enough to cause burns When powering down due to storage in the bus capacitors dangerous voltages are present until the power on LED is off Designer Reference Manual DRM022 Rev 1 48 Application Setup MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Application Setup Hardware Setup 5 3 Hardware Setup The motor control system is designed to drive the 3 phase BLDC motor in a speed closed loop using a 68HC908MR32 microcontroller The system configuration for low voltage motors consists of e Motorola MC68HC908MR32 control board e 3 phase BLDC low voltage power stage or EVM motor board e 3 phase BLDC motor with Hall sensors e 12V DC Power supply e Serial cables to PC The system configuration is shown in the Figure 5 1 Hall sensor cable U1 68HC908MR32 MC Board U2 3 Ph Low Voltage BLDC Power Stage or Evaluation Motor Board U3 68HC908MR32 Daughter Board M1 3 phase BLDC Motor Figure 5 1 H W System Configuration for low voltage motor DRM022 Rev 1 Designer Reference Manual MOTOROLA Application Setup 49 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Application Setup The system configuration for high voltage motors consists of e Motorola MC68HC908MR32 control boa
17. 08MR32 Jumper Reference NOTE The JP2 jumper must be connected Table 5 1 MCHC908MR32 Board Jumper Settings Jumper Group Comment Connections JP1 Tacho No connection JP2 Encoder Hall Sensor 1 2 JP3 BEMF_z_c No connection DRM022 Rev 1 Designer Reference Manual MOTOROLA Application Setup 51 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Application Setup Table 5 1 MCHC908MR32 Board Jumper Settings Jumper Group Comment Connections JP4 PFC_z_c No connection JP5 PFC_PWM No connection JP7 GND_Connection 1 2 5 4 Software Setup 5 4 1 Required Software Tools The application requires then following software development tools e Metrowerks CodeWarrior 2 for MC68HCO8 microcontrollers version 1 2 or later e PC master software version 1 2 0 11 or later 5 4 2 Application Files The application files are distributed in compressed zip file 3ph_bldc_hs_sa zip Unconpress the files to the folder on your hard drive The 3 phase BLDC motor control application with Hall sensors is composed of the following files e 3ph_bldc_hs_sa mep application project file e sources 3ph_bldc_hs c main program e sources 3ph_bldc_hs h main program header file e sources appconfig h application configuration file for static periphery configuration e prms hc908mr32 prm linker parameters file 1 Metrowerks and the Metrowerks logo
18. 1 List of Figures Figure Title Page 2 1 System LIE 64 koko deere deb d 3r devo po SD pda 16 2 2 BLDC Motor Cross Section sorores 17 2 3 BLDC Motor Back EMF and Magnetic Flux Hall Sensor Outputs aar x aee d po FOR OCCORRE ead 19 2 4 Three phase voltage system applied to a BLDC motor 20 3 1 H W System configuration for low voltage motor 24 3 2 H W System configuration for high voltage motor 25 3 3 MC68HC908MR32 Control Board 00055 26 c4 BOCK DIGGIN duszeen eds age EX Te Kr d EO RC OR ROS 28 3 5 3 Phase AC High Voltage Power Stage 34 PT Main Data IO ni cated dE ib E sae Een kiibi 38 4 2 Application State Machine Diagram 44 5 1 H W System Configuration for low voltage motor 49 5 2 H W System Configuration for high voltage motor 50 5 3 MC68HC908MR32 Jumper Reference 51 5 4 Target Build Selection scee eoo Rem 53 5 5 MC68HC908MR32 Board Control Elements 55 5 5 USER LEDs PWM LEDs and RESET iis sc en 55 5 7 PC Master Control Window 000 cece eeee 57 Designer Reference Manual MOTOROLA 11 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc List of Figures Designer Reference Manual DRMO022 Rev 1 12 MOTOROLA For More Information On This Product Go to www freescale com Freescale Semicondu
19. 2 Executing the Application 2 0204 e 6 ada we suse RR 54 Appendix A References Appendix B Glossary DRMO22 Rev 1 8 MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Designer Reference Manual 3 ph BLDC Drive Control with Hall Sensors DRM022 Rev 1 Table 2 1 2 2 3 5 3 6 5 2 List of Tables Title Page Vector to sensor code assignment 21 Commu taton table asias cd dees iebaddacddivecsdaceanwa 22 Electrical Characteristics of the Control Board 27 Electrical Characteristics of the 3 Ph BLDC Low Voltage Power Stage 29 Electrical Characteristics of the EVM Motor Board 30 Characteristics of the BLDC motor 31 Electrical Characteristics 2 sci cia0eientiacaewean Ra 32 Electrical Characteristics of Power Stage 35 MCHC908MR32 Board Jumper Settings 51 Motor Application States ic lt scscesa icaciaaene avec Ee 56 Designer Reference Manual MOTOROLA 9 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc List of Tables Designer Reference Manual DRMO022 Rev 1 10 MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Designer Reference Manual 3 ph BLDC Drive Control with Hall Sensors DRM022 Rev
20. 22 Rev 1 Motorola s embedded motion control series optoisolation board links signals from a controller to a high voltage power stage The board isolates the controller and peripherals that may be attached to the controller from dangerous voltages that are present on the power stage The optoisolation board s galvanic isolation barrier also isolates control signals from high noise in the power stage and provides a noise robust systems architecture Signal translation is virtually one for one Gate drive signals are passed from controller to power stage via high speed high dv dt digital optocouplers Analog feedback signals are passed back through HCNR201 high linearity analog optocouplers Delay times are typically Designer Reference Manual MOTOROLA Hardware Design 31 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Hardware Design 250 ns for digital signals and 2 us for analog signals Grounds are separated by the optocouplers galvanic isolation barrier Both input and output connections are made via 40 pin ribbon cable connectors The pin assignments for both connectors are the same For example signal PWM_AT appears on pin 1 of the input connector and also on pin 1 of the output connector In addition to the usual motor control signals an MC68HC705JJ7CDW serves as a Serial link which allows controller software to identify the power board Power requirements for
21. File Edi View Explorer Item Project Help Freescale Semiconductor Inc Done DRMO022 Rev 1 zer Hala ola e aol E BLDC with Hall ser mals amoy M MOTOROLA 1 Republic 3 ph BLDC with Hall Sensor on 68HCOSMRx O rpm 3 000 rpm 0 rpm a INIT Start Stop 12 V Motor Motor x C VAC Orpm No fault 3 000 rpm intelligence rywhere intel ict ever ere HER ig Q digitaldna algorithm block description Name appState APP_INIT ENUM 500 appFaultStatus 0 DEC 500 omega_regRMP_mech 0 unit 250 u dc bus 12 4 v 250 omega actual mech 0 unit 200 brd stat 0 DEC 1000 jean pn n zl p Figure 5 7 PC Master Control Window Designer Reference Manual MOTOROLA Application Setup 57 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Application Setup 5 5 2 Starting the Motor in Manual Mode NOTE Switch the START STOP switch to the START position and set the required speed by the SPEED potentiometers If successful the BLDC motor will be spinning If the START STOP switch is set to the START position when the application starts toggle the START STOP switch between the STOP and START positions to enable motor spinning This is a protection feature preventing the motor from starting when the application is executed from CodeWarrior You should also see a lighted green LED indicating the application is running If the a
22. Freescale Semiconductor Inc ets oye mE digital dna intelligence everywhere 3 Phase BLDC Drive Control with Hall Sensors Reference Design Designer Reference Manual M68HC08 Microcontrollers DRM022 D Rev 1 03 2003 MOTOROLA COM SEMICONDUCTORS For More Information On This Product Go to www freescale com Freescale Semiconductor Inc For More Information On This Product Go to www freescale com Freescale Semiconductor Inc 3 Phase BLDC Drive Control with Hall Sensors Reference Design Designer Reference Manual Rev 1 by Jiri Ryba Petr Stekl Motorola Czech Systems Laboratories Roznov pod Radhostem The Czech Republic DRMO022 Rev 1 Designer Reference Manual MOTOROLA 3 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Revision history To provide the most up to date information the revision of our documents on the World Wide Web will be the most current Your printed copy may be an earlier revision To verify you have the latest information available refer to http www motorola com semiconductors The following revision history table summarizes changes contained in this document For your convenience the page number designators have been linked to the appropriate location Revision history Revision mee Page Date Level Description Number s January E 2003 1 Initial revision N A Designe
23. OARD ID BLOCK ZERO CROSS BACK EMF SENSE Figure 3 4 Block Diagram The electrical characteristics in Table 3 2 apply to operation at 25 C with a 12 Vdc supply voltage Designer Reference Manual DRMO022 Rev 1 28 Hardware Design MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Hardware Design EVM Motor Board Table 3 2 Electrical Characteristics of the 3 Ph BLDC Low Voltage Power Stage Characteristic 2e Min Typ Max Units Motor Supply Voltage Vac 10 12 16 V Quiescent current loc 175 mA Min logic 1 input voltage Vin 2 0 V Max logic 0 input voltage ViL 0 8 V Analog output range Vout 0 ux 3 3 V Bus current sense voltage Isense 33 mV A Bus voltage sense voltage VBus 60 mV V Peak output current 300 ms PK ae Continuous output current IMs 30 A Brake resistor dissipation Pek E 50 W continuous Brake resistor dissipation PBK Pk _ P 100 w 15 sec pk Total power dissipation Puiss 85 3 5 EVM Motor Board Motorola s embedded motion control series EVM motor board is a 12 volt 4 amp surface mount power stage that is shipped with an MCG IB23810 H1 brushless dc motor In combination with one of the embedded motion control series control boards it provides a software development platform tha
24. TOP switch on the EVM When the RUN STOP switch on the EVM is in the STOP position manual mode can be set again by unchecking PC master mode on the PC master control page DRMO022 Rev 1 Designer Reference Manual MOTOROLA Application Setup 59 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Application Setup Designer Reference Manual DRM022 Rev 1 60 Application Setup MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Designer Reference Manual 3 ph BLDC Drive Control with Hall Sensors Appendix A References 1 Brushless DC Motor Control using the MC68HC708MC4 John Deatherage and Jeff Hunsinger AN1702 D Motorola 2 Design of Brushless Permanent magnet Motors J R Hendershot and T J E Miller Magna Physics Publishing and Clarendon Press 1994 3 68HC908MR32 User s Manual Motorola Inc 2001 order MC68HC908MR32 D 4 Motorola Embedded Motion Control MC68HC908MR32 Control Board User s Manual Inc 2000 order MEMCEVMBUM D 5 Motorola Embedded Motion Control 3 Phase BLDC Low Voltage Power Stage User s Manual Inc 2000 order MEMC3PBLDCLVUM D 6 Motorola Embedded Motion Control Evaluation Motor Board User s Manual Motorola Inc 2000 order MEMCEVMBUM D 7 Motorola Embedded Motion Control 3 Phase AC BLDC High Voltage Power Stage User s Manual Motorola Inc 2000
25. TOROLA Introduction 13 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Introduction This BLDC motor control application with Hall sensors can operate in two modes Manual operating mode PC master software remote operating mode 1 4 68HC908MR32 Features Designer Reference Manual The Motorola MR32 family members are well suited for digital motor control These MCUs offer many dedicated peripherals such as a Pulse Width Modulation PWM module Analog to Digital Converter ADC Timers Serial communication interface SCI on board Flash and RAM A typical member of the family the 68HC908MR32 provides the following peripheral blocks 12 bit 6 channel center aligned or edge aligned Pulse Width Modulator module with optional Independent and Complementary mode 32Kbytes of on chip electrically erasable in circuit programmable Read Only Memory FLASH EPROM 768 bytes of on chip Random Access Memory RAM Ten channels 10 bit Analog to Digital Converters ADC with multiplexed inputs Two 16 bits 2 channel timer modules Serial communications interface module SCI Clock generator module CGM Computer Operating Properly COP watchdog timer Low voltage inhibit LVI module with software selectable trip points Software programmable Phase Lock Loop based frequency synthesizer for the core clock DRMO22 Rev 1 14 Introduction MOTOROLA For More Informatio
26. ate off of dc input voltages from 140 to 230 volts and ac line voltages from 100 to 240 volts In combination with one of the embedded motion control series control boards and an optoisolation board it provides a software development platform that allows algorithms to be written and tested without the need to design and build a power stage It supports a wide variety of algorithms for both ac induction and brushless dc BLDC motors Input connections are made via 40 pin ribbon cable connector J14 Power connections to the motor are made on output connector J13 Phase A phase B and phase C are labeled PH_A Ph_B and Ph_C on the board Power requirements are met with a single external 140 to 230 volt dc power supply or an ac line voltage Either input is supplied through connector J11 Current measuring circuitry is set up for 2 93 amps full scale Both bus and phase leg currents are measured A cycle by cycle over current trip point is set at 2 69 amps The high voltage ac power stage has both a printed circuit board and a power substrate The printed circuit board contains IGBT gate drive circuits analog signal conditioning low voltage power supplies power factor control circuitry and some of the large passive power components All of the power electronics which need to dissipate heat are mounted on the power substrate This substrate includes the power IGBTs brake resistors current sensing resistors a power factor correction MOSFET a
27. ated angle appropriate voltage vector is generated see Table 2 2 Note that the voltage vectors in the table are shifted 30 from Hall sensor position As a result we generate voltage vector shifted 120 from the rotor position Then during the whole period the angle of voltage vector remains unchanged That means the real angle varies from 60 to 120 A field weakening of the motor may be required to extend the full speed range The BLDC motor can be field weakened by increasing the angle between motor voltage and rotor flux If the motor is de excited Designer Reference Manual MOTOROLA Software Design 41 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Software Design advancing of the voltage vector is required In de excitation speed of the motor is controlled by adjusting the voltage vector angle The level of d c voltage applied to the motor remains constant In this case the voltage vector is advanced 150 from the rotor position and applied with appropriate delay The delay is made by preset counter on channel 0 of timer A This control technique is called an angle control 4 4 9 Commutation Delay Calculation This algorithm calculates the Commutat ionDelay required for de excitation The delay is calculated from the required motor speed 4 4 10 Motor Voltage Calculation This algorithm calculates the d c voltage level applied to the motor It is calculated fr
28. ch is used to determine actual rotor position The actual rotor position is compared with the position in the last call and the direction of rotation is determined 4 4 5 Speed Calculation The measured speed omega_actual_mech is calculated every 10ms in the overflow interrupt of timer B EQ 4 1 _ speedScale z omega actual mech amaa Pad EQ 4 1 where e speedScale is a constant representing the speed scale and the number of pole pairs CommutationPeriod is the Hall sensors period The measured speed can be updated only when the edge on the Hall sensor signal is detected The long distance between the Hall sensor signal edges in the motor speeds could cause speed fluctuations of the motor 4 4 6 Speed Controller The scaled PI controller is used for the speed closed loop The controller is called every 10ms Actual and required speed are inputs to the controller Output of the controller sets the level of voltage applied to the motor The controller constants were tuned experimentally Because the speed update depends on actual motor speed the speed controller constants have to be changed according to the maximum measured speed to achieve the best result Designer Reference Manual DRMO022 Rev 1 40 Software Design MOTOROLA For More Information On This Product Go to www freescale com 4 4 7 Speed Ramp Freescale Semiconductor Inc Software Design Software Processes The Speed Ramp decreases the rate of re
29. ctor Inc Designer Reference Manual 3 ph BLDC Drive Control with Hall Sensors 1 1 Contents 1 2 Overview Section 1 Introduction 1 2 CRP tiie bb beh ee ee OR Robo yo RE ee Ue e 13 1 3 Brief Description zr dris abad Rd dod ACGRE ee eee ee on 13 14 68HC908MR32 Features 0 5550 0c hn 14 This reference design describes a 3 phase 4 quadrant sensor BLDC motor drive which can run in both a speed open loop and a speed closed loop The application is designed for MC68HC908MRxx family dedicated to motor control applications This reference design includes a description of the Motorola 68HC908MR322 features basic motor theory system design concept hardware implementation and software design including the PC Master visualization tool 1 3 Brief Description DRM022 Rev 1 The position of the motor is sensed by the Hall sensors The BLDC algorithm sets the proper voltage vector on the BLDC motor with respect to the sensed position The amplitude of voltage is set according to required speed and actual load When the amplitude reaches the maximum the BLDC motor is de excited by advancing the voltage vector to further increase the speed The concept of the application allows both closed and open loop speed control It serves as an example of a sensor BLDC motor control system using Motorola s M68HC08 Family It also illustrates the usage of dedicated motor control on chip peripherals Designer Reference Manual MO
30. e eo rd san caves wade es Rad 15 Brushless DC Motor Theory 20000 eee eeee 17 Digital Control of BLDC Motor socsosuuauske RE EE RR Rn 19 Section 3 Hardware Design COMEM TTE TIT 23 Hardware Configuration a aci ipe aC CER cR ERG RR RO 23 MC68HC908MR32 Control Board 0 25 3 Ph BLDC Low Voltage Power Stage 27 EVM Motor BAGG a suia da we ROCRCODOC HE RO FORE AO RR 29 ptoisolaton Board Laco deir dede CERE REESE EO RR CR oe 31 3 Phase AC BLDC High Voltage Power Stage 33 Hardware Documentation o n aana 35 Section 4 Software Design Designer Reference Manual MOTOROLA 7 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc LES 6 ME OTT EE 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 5 1 5 2 5 3 5 4 5 5 Designer Reference Manual CONTENDS aii aat ebk ana 3a ee e ak a akida dido E eke 37 Sowara DEIN ca casna anre d baaa oh ween E ee ees 37 Software Data Flow 42602c0ciscucberiveddecbeerens 37 Software Processes Lassus ERE asas ge RARE ROS B Edad 39 Liu c CI 43 Man PRAM iced eee ee Cede eee AQ ee ror 43 Application Initialization lesen 44 PC Master Software Remote Operating Mode 45 Section 5 Application Setup Ce eee ds cede eae Ede dd es T EE dread 47 ELISOOOMEEEESTTITIT T sessed E TETT TEE 47 Hardware Setup ois bk se ded dead sind RRAARRdE RR DRE an 49 idi cu Roog MET 5
31. e optoisolation board or low voltage power stage The control board is designed to run in two configurations It can be connected to an M68EMO8MR232 emulator via an M68CBLO8A impedance matched ribbon cable or it can operate using the daughter board The M68EMO8MR32 emulator board may be used in either an MMDS05 08 or MMEVS05 08 emulation system Figure 3 3 shows a block diagram of the board s circuitry TERMINAL VF dc POWER 12 Vdc FORWARD REVERSE SPEED mK OPTOISOLATED SWITCH TACHOMETER RS 232 I F START STOP INPUT SWITCH HALL EFFECT INPUTS 3 RESET EMULATOR e e dedi PROCESSOR E a CONNECTOR 8 2 2 OPTION SWITCHES REGULATED GEDUGS POWER SUPPLY PWM LEDs 6 OPTO POWER DRIVER I O CONNECTOR E a B 40 PIN RIBBON OVERCURRENT CUBBENTTEUE BACK EMF CONNECTOR OVERVOLTAGE SENSE INPUT INPUTS INPUTS PWM 6 MISC POWER AND OUTPUTS CONTROL I O Figure 3 3 MC68HC908MR32 Control Board The electrical characteristics in Table 3 1 apply to operation at 25 C Designer Reference Manual DRMO22 Rev 1 26 Hardware Design MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Hardware Design 3 Ph BLDC Low Voltage Power Stage Table 3 1 Electrical Characteristics of the Control Board Character
32. e protection of the DC Bus is sensed during the control process and is performed by software The application also contains PC master software which supports communication between the target microcontroller and PC via an RS232 serial interface This tool allows access to any memory location of the target processor in real time The programmer can debug an application as well as remotely control the application using a user friendly graphical environment running on a PC 2 3 Brushless DC Motor Theory A brushless DC BLDC motor is a rotating electric machine where the stator is a classic three phase stator like that of an induction motor and the rotor has surface mounted permanent magnets see Figure 2 2 Stator Stator winding in slots Shaft Rotor Air gap Permanent magnets Figure 2 2 BLDC Motor Cross Section DRM022 Rev 1 Designer Reference Manual MOTOROLA System Description 17 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc System Description In this respect the BLDC motor is equivalent to a reversed DC commutator motor in which the magnet rotates while the conductors remain stationary In the DC commutator motor the current polarity is altered by the commutator and brushes On the contrary in the brushless DC motor the polarity reversal is performed by power transistors switching in synchronization with the rotor position Therefore BLDC motors of
33. ed copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document Motorola reserves the right to make changes without further notice to any products herein Motorola makes no warranty representation or guarantee regarding the suitability of its products for any particular purpose nor does Motorola assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability including without limitation consequential or incidental damages Typical parameters which may be provided in Motorola data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each customer application by customer s technical experts Motorola does not convey any license under its patent rights nor the rights of others Motorola products are not designed intended or authorized for use as components in systems intended for surgical implant into the body or other applications intended to support or sustain life or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur Should Buyer purchase or use Motorola products for any such unintended or unauthorized application Buyer shall indemnify and hold Motorola and its office
34. ee Figure 2 1 68HC908MRxx COMMUTATION HANDLER CONTROL STRATEGY SPEED POT POSITION P CONTROLLER SENSORS START STOP FW REV CLOSE LOOP SENSOR DET SPEED ICALCULATION Figure 2 1 System Concept The control process is as follows The state of the switches is scanned periodically The Hall Sensor signals are scanned in the interrupt which is called on each coming edge of any Hall Sensor signal Also new voltage vector is applied to the BLDC motor This process is called commutation If the motor is de excited advancing of the voltage vector is required In this case the voltage vector for following sensor state is applied with appropriate delay made by preset counter The speed PI controller is calculated independently in the timer interrupt every 10ms Output of the controller is required motor voltage If running in open loop control the controller is not used the Speed pot position is Designer Reference Manual DRMO022 Rev 1 16 System Description MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc System Description Brushless DC Motor Theory used to set required motor voltage The measured speed of the motor is calculated from sensor edge period Since the three phase motor is used the three last periods are add to eliminate angle error between the sensors Then using of edges from same sensor is secured for speed calculation Undervoltag
35. h a 12 volt power supply that has a 10 to 16 volt tolerance Designer Reference Manual MOTOROLA Hardware Design 27 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Hardware Design Fast on connectors J19 and J20 are used for the power supply J19 is labeled 12V and is located on the back edge of the board J20 is labeled OV and is located along the front edge Current measuring circuitry is set up for 50 amps full scale Both bus and phase leg currents are measured A cycle by cycle overcurrent trip point is set at 46 amps The LV BLDC power stage has both a printed circuit board and a power substrate The printed circuit board contains MOSFET gate drive circuits analog signal conditioning low voltage power supplies and some of the large passive power components This board also has a 68HC705JJ7 microcontroller used for board configuration and identification All of the power electronics that need to dissipate heat are mounted on the power substrate This substrate includes the power MOSFETs brake resistors current sensing resistors bus capacitors and temperature sensing diodes Figure 3 4 shows a block diagram POWER INPUT BIAS gt POWER BRAKE MOSFET MODULE eu POWER MODU TO FROM GATE CONTROL L DRIVERS MOTOR BOARD ee RA PHASE CURRENT PHASE VOLTAGE Pa N BUS CURRENT BUS VOLTAGE MONITOR B
36. he instructions in the subroutine When the RTS instruction is executed the CPU returns to the main program where it left off timer A module used to relate events in a system to a point in time variable A value that changes during the course of program execution waveform A graphical representation in which the amplitude of a wave is plotted against time Word A set of two bytes 16 bits write The transfer of a byte of data from the CPU to a memory location Designer Reference Manual DRMO022 Rev 1 66 Glossary MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc For More Information On This Product Go to www freescale com Freescale Semiconductor Inc HOW TO REACH US USA EUROPE LOCATIONS NOT LISTED Motorola Literature Distribution P O Box 5405 Denver Colorado 80217 1 303 675 2140 or 1 800 441 2447 JAPAN Motorola Japan Ltd SPS Technical Information Center 3 20 1 Minami Azabu Minato ku Tokyo 106 8573 Japan 81 3 3440 3569 ASIA PACIFIC Motorola Semiconductors H K Ltd Silicon Harbour Centre 2 Dai King Street Tai Po Industrial Estate Tai Po N T Hong Kong 852 26668334 TECHNICAL INFORMATION CENTER 1 800 521 6274 HOME PAGE http motorola com semiconductors Information in this document is provided solely to enable system and software implementers to use Motorola products There are no express or impli
37. if in remote operating mode the drive can be stopped with RUN STOP switch on cotroller board This feature enables to stop the application safely at any time The actions controlled in PC master operating mode are e Start Stop control e Motor speed setpoint e Motor rotation direction control CW CCW e Close Loop Open Loop operation The PC master software displays the following information e Applied voltage e Required voltage e Actual speed e Direction of motor rotation e RUN STOP switch status e Close Loop Open Loop operation status Designer Reference Manual DRM022 Rev 1 56 Application Setup MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Application Setup Executing the Application e Application mode manual remote control Project files for PC master software are located in PC master software file pcmaster 3ph_bldc_hs pmp To start the PC master software s window application 3ph bldc hs pmp NOTE If the PC master project pmp file is unable to control the application it is possible the wrong load map map file has been selected The PC master software uses the load map to determine addresses for global variables being monitored Once the PC master project has been launched this option may be selected in the PC master window under Project Select other Map File Reload The PC master software control window is shown in Figure 5 7
38. istic zi Min Type Max Units dc power supply voltage Vdc 10 8 12 16 5 V Quiescent current lcc 80 mA Min logic 1 input voltage V E D MR32 LE ii Max logic 0 input voltage V o u MR32 IL 0 8 V Propagation delay t TP Hall sensor encoder input dy 309 ns Analog input range Vin 0 5 0 V RS 232 connection speed 9600 Baud PWM sink current IpK 20 mA 1 When operated and powered separately from other Embedded Motion Control tool set products 3 4 3 Ph BLDC Low Voltage Power Stage DRM022 Rev 1 Motorola s embedded motion control series low voltage LV brushless DC BLDC power stage is designed to run 3 ph BLDC and PM Synchronous motors It operates from a nominal 12 volt motor supply and delivers up to 30 amps of rms motor current from a dc bus that can deliver peak currents up to 46 amps In combination with one of Motorola s embedded motion control series control boards it provides a software development platform that allows algorithms to be written and tested without the need to design and build a power stage It supports a wide variety of algorithms for controlling BLDC motors and PM Synchronous motors Input connections are made via 40 pin ribbon cable connector J13 Power connections to the motor are made with fast on connectors J16 J17 and J18 They are located along the back edge of the board and are labeled Phase A Phase B and Phase C Power requirements are met wit
39. itions DRMO022 Rev 1 Designer Reference Manual MOTOROLA System Description 19 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc System Description The three phase voltage system see Figure 2 4 with a rectangular shape is used to create a rotational torque Voltage Phase A Phase B Phase C electrical 30 90 150 210 270 330 angle Figure 2 4 Three phase voltage system applied to a BLDC motor This easily created shape of applied voltage ensures the simplicity of control of a drive The rotor position must be known in order to align energized phases with the rotor s permanent magnetic field The alignment is very important because it results in proper commutation in the PWM inverter where the voltage level is reduced by chopping In this condition the motor behaves as a DC motor and runs at the best working point The simplicity of control and good performance makes this motor a natural choice for low cost and high efficiency applications There are many methods how to provide alignment between rotor position and commutation events The presented application use Hall sensors to sense the commutation events 2 4 4 Commutation Algorithm Designer Reference Manual The commutation algorithm provides the generation of a rotational field according to rotor position This algorithm uses the Hall sensors to obtain the rotor position The Hall sensor co
40. n On This Product Go to www freescale com Freescale Semiconductor Inc Designer Reference Manual 3 ph BLDC Drive Control with Hall Sensors Section 2 System Description 2 1 Contents 22 Application FOSIUIBS LL isse RA RA RE seers bids 15 223 Brushless DC Motor THBOCV osse cies dcderevetguaewereca 17 2 4 Digital Control of BLDC Motor 2 4 0c0ceeeeeeeedas 19 2 2 Application Features The control strategy is designed to optimally utilize features of controller 68HC908MR32 The application provides following properties voltage control of BLDC motor position sensing using 3 Hall sensors closed or open speed loop operation e both directions of rotation Hall sensors identification algorithm e field weakening to achieve higher speed e manual speed pot start stop switch PC master control RS 232 e over and under voltage protection Over current protection e PC master software memory requirements RAM 187 Bytes Flash 6198 Bytes DRMO022 Rev 1 Designer Reference Manual MOTOROLA System Description 15 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc System Description The system is designed to drive a 3 phase BLDC motor The MCU runs the main control algorithm According to the user interface input and feedback signals it generates 3 phase PWM output signals for the motor inverter A standard system concept is chosen for the drive s
41. nd Hall sensor signals Hall Sensors The output is a three phase PWM signal PWM Generation DRMO022 Rev 1 Designer Reference Manual MOTOROLA Software Design 37 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Software Design Manual Control PC master process Period Calculation Hall Sensor Sensor Edge Detection Rotor Position Detection SensorPhasePeriod rotorPosition Speed Ramp Speed Calculation omega_desired omega reqRMP mech omega actual mech Speed Controller speedControllerOutput Motor Voltage Calculation Commutation Delay Calculation CommutationDelay u_phase vectorActual Voltage Vector Generation PWM Generation Figure 4 1 Main Data Flow Designer Reference Manual DRM022 Rev 1 38 Software Design MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Software Design Software Processes 4 4 Software Processes 4 4 1 PC Master Process A small program is resident in the MR32 that communicates with the PC master software running on the PC It controls data exchange between the application and the Serial Communication Interface SCI The module enables read and write to the CPU RAM and reading the whole CPU memory It provides a remote control interface to the application For control actions provided see section 4 8 PC Maste
42. nd temperature sensing diodes Figure 3 4 shows a block diagram DRMO022 Rev 1 Designer Reference Manual MOTOROLA Hardware Design 33 For More Information On This Product Go to www freescale com Hardware Design Designer Reference Manual Freescale Semiconductor Inc HV POWER INPUT SIGNALS TO FROM CONTROL BOARD N BOARD ID BLOCK Me ee SWITCH MODE PFC CONTROL l POWER SUPPLY de BUS BRAKE 3 PHASE IGBT POWER MODULE GATE DRIVERS PHASE CURRENT PHASE VOLTAGE BUS CURRENT BUS VOLTAGE MONITOR N e ZERO CROSS BACK EMF SENSE 3 PHASE AC TO MOTOR Figure 3 5 3 Phase AC High Voltage Power Stage The electrical characteristics in Table 3 6 apply to operation at 25 C with a 160 Vdc power supply voltage DRMO22 Rev 1 34 Hardware Design For More Information On This Product Go to www freescale com MOTOROLA Freescale Semiconductor Inc Hardware Design Hardware Documentation Table 3 6 Electrical Characteristics of Power Stage Characteristic Symbol Min Typ Max Units dc input voltage Vdc 140 160 230 V ac input voltage Vac 100 208 240 V Quiescent current loc 70 mA Min logic 1 input voltage Vin 2 0 V Max logic 0 input voltage ViL 0 8 V Input resistance Rin 10 kQ Analog output range Vout 0
43. nsists of three sensors Sensor A Sensor B Sensor C The HC908MR32 control board contains EOR logic which reflect change of any sensor to the one output This output is connected to the channel 2 DRMO22 Rev 1 System Description MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc System Description Digital Control of BLDC Motor of timer A The timer channel is set to catch edges of the input signal and call interrupt routine which provides commutation algorithm In the interrupt the current state of all sensors is read These sensors comprise six states 001 010 011 100 101 110 Each state corresponds to actual rotor position which determines required direction of voltage vector The value of sensors state is used as a pointer to the vector table see Table 2 1 which is used to call appropriate commutation function Table 2 1 Vector to sensor code assignment Hall Sensor A Hall Sensor B Hall Sensor C Rotor Position 0 0 0 None 0 0 1 120 0 1 0 0 0 1 1 60 1 0 0 240 1 0 1 180 1 1 0 300 1 1 1 None The angle of rotor position represents magnetic flux vector in the middle between edge for clockwise and counter clockwise rotation while the phase A is placed to real axis It means that zero degree is obtained when the flux of phase A is in the positive maximum From the rotor position the voltage vector is calculated
44. om the required motor speed The calculated value is stored to the variable u phase The PWM module is set to run in complementary center aligned mode The PWM frequency is 16 kHz 4 4 11 Voltage Vector Generation The algorithm writes the required voltage vector to the PWM value registers The inputs to the algorithm are required voltage vector angle and motor voltage level Based on the inputs appropriate duty cycle values are written to the PWM value registers 4 4 12 Under and Over Voltage Protection The DC bus voltage is scanned using ADC The sensed value is compared with minimum and maximum voltage limits If the limits are exceeded the fault flag is set In case of over voltage an external hardware connected to the FAULT1 pin of the microcontroller provides a rising edge It causes an FAULT1 interrupt The interrupt routine disables PWM output and sets a fault flag Designer Reference Manual DRMO022 Rev 1 42 Software Design MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Software Design Interrupts 4 4 13 Over Current Protection 4 5 Interrupts 4 6 Main Program DRM022 Rev 1 In case of over current an external hardware connected to the FAULT2 pin of the microcontroller provides a rising edge It causes an FAULT2 interrupt The interrupt routine disables PWM output and sets a fault flag The interrupt handlers have the following functions Timer A
45. ons assigned for each Hall sensor code If the Hall sensor identification is disabled the table for a default arrangement is used 4 8 PC Master Software Remote Operating Mode DRM022 Rev 1 The drive is controlled remotely from a PC via an RS 232 physical interface The manual control is ignored and all required values are controlled from PC The actions controlled in PC master operating mode are e Start Stop control e Motor speed setpoint e Close Loop Open Loop operation e Motor rotation direction control CW CCW Designer Reference Manual MOTOROLA Software Design 45 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Software Design PC master software displays the following information on a control page e Applied voltage Required voltage e Speed Direction e RUN STOP switch status e Close Loop Open Loop operation status e Application mode manual remote control The other variables can be viewed in the variables section Designer Reference Manual DRMO022 Rev 1 46 Software Design MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Designer Reference Manual 3 ph BLDC Drive Control with Hall Sensors 5 1 Contents 5 2 Warning DRM022 Rev 1 Section 5 Application Setup EB WA oot dl e EUER edhe comb Rer 47 5 3 Hardware SEU oc cock debe ecb hide ROC CR whores
46. pplication is stopped the green LED will blink at a frequency of 2 Hz If a fault occurs the green LED will blink at a frequency of 8 Hz 5 5 2 1 Switch SW2 Function In manual control mode the SW2 1 switch on the CPU board see Figure 5 6 determines close open loop close loop is at position On Switch SW2 2 selects Hall sensor identification identification is enabled in position On When Hall sensor identification is enabled the sensor identification algorithm is run before each start of the motor The table with rotor positions assigned for each Hall sensor code is defined If the identification is disabled the table for a standard arrangement is used 5 5 3 Starting the Motor in Remote Control Mode using PC Master Designer Reference Manual To set the PC master control perform the following steps 1 The RUN STOP switch on controller board must be in the STOP position 2 Check the PC master mode on the PC master control page 3 Enabled the application by setting the RUN STOP switch on the controller board to the RUN position 4 Start the motor by pressing the Start PC Master Push Button and DRMO22 Rev 1 58 Application Setup MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Application Setup Executing the Application stop the motor by releasing the button 5 Set the speed with the bar graph 6 The motor can be stopped any time with the RUN S
47. quired speed variation It is called every 10 ms The maximum rate of change is determined by a variable called speedIncrement 4 4 8 Commutation Algorithm DRM022 Rev 1 This algorithm performs BLDC motor commutation Based on the scanned actual rotor position it calculates new voltage vector angle With six step control we get a total of six possible stator flux vectors The stator flux vector must be changed at a certain rotor position The Hall sensors generate three signals that also comprise six states Each of Hall sensors states corresponds to certain stator flux vector The algorithm differs for commutation when the motor is fully excited i e motor speed is below nominal value and when the de excitation is performed i e field weakening region When the motor is fully excited it is necessary to keep the angle between stator and rotor flux close to 90 for proper operation To control speed of the motor we are adjusting d c voltage level applied to the motor This control technique is called a voltage control The commutation is repeated per each 60 electrical degrees That means there is no possibility of keeping the angle between the rotor flux and the stator flux precisely at 90 From the rotor position the new voltage vector angle is calculated according to required direction For positive direction of rotation 90 is added to the rotor position For negative direction 90 is subtracted According to the calcul
48. r Reference Manual DRMO22 Rev 1 4 MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Designer Reference Manual 3 ph BLDC Drive Control with Hall Sensors DRM022 Rev 1 List of Sections Section 1 Introduction 13 Section 2 System Description 15 Section 3 Hardware Design 23 Section 4 Software Design 37 Section 5 Application Setup 47 Appendix A References 61 Appendix B Glossary ees 63 Designer Reference Manual MOTOROLA 5 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc List of Sections Designer Reference Manual DRMO022 Rev 1 6 MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Designer Reference Manual 3 ph BLDC Drive Control with Hall Sensors DRM022 Rev 1 LE 1 3 1 4 2 1 2 2 2 3 2 4 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 Table of Contents Section 1 Introduction de 0p TT 13 Sea he Edo wi aes need E Fea dpud d Ud 13 Baer SSPE L1 dcacdoe d ERO eO 577938 LS A on 13 68HC908MR32 Features 2c ccucees hdd haRum Rr nga 14 Section 2 System Description doli D MMEMETC r c 15 Application Features Laau di e
49. r Software Remote Operating Mode 4 4 2 Sensor Edge Detection Each incoming edge on the signal from Hall sensors causes an interrupt on channel 2 of timer A The interrupt routine provides a calculation of a commutation period detection of a rotor position and it handles commutation 4 4 3 Period Calculation Period calculation is executed in the interrupt routine called by input capture interrupt on channel 2 of Timer A The captured value from the timer A channel register is read The commutation period is calculated as a difference between actual and last captured values Since the three phase motor is used the three last periods are add to eliminate angle error between the sensors Then using of edges from same sensor is secured for speed calculation The actual captured valued is stored for period calculation in next interrupt call 4 4 4 Rotor Position Detection DRM022 Rev 1 Rotor position detection is executed in the interrupt routine called by input capture interrupt on the channel 2 of Timer A It reads the current state of the Hall sensors These sensors comprise six states 001 010 011 100 101 110 Each state corresponds to actual rotor position Designer Reference Manual MOTOROLA Software Design 39 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Software Design The value of sensors state is used as a pointer to the vector table see Table 2 1 whi
50. rd e Optoisolation board e 3 phase AC BLDC high voltage power stage e 3 phase BLDC motor with Hall sensors 12V DC Power supply e 230 115V AC Power Supply e Serial cables to PC The system configuration is shown in the Figure 5 2 40w flat fe 40w flat 230 115 V AC Hall sensor cable U1 68HC908MR32 MC Board U2 Optoisolation Board U3 3 Ph High Voltage AC BLDC Power Stage U4 68HC908MR32 Daughter Board M1 3 phase BLDC Motor Figure 5 2 H W System Configuration for high voltage motor Designer Reference Manual DRMO022 Rev 1 50 Application Setup MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Application Setup Hardware Setup 5 3 1 Controller Board Jumper Settings To execute the 3 phase BLDC motor control application with Hall sensors the MC68HC908MR32 control board requires the jumper settings shown in Figure 5 3 and Table 5 1 e o e Pao o Pife o ee 7 2 n DO 10 38 amp AO a be amp g N s amp rc3 g HBHHEHBBHHEREHORHERH E 40 2 E JAE E pO E E 2t iss e HSA a Boa D EBBBECHOHOERRHHHEEOH E 40 2 WD REV SPEED OO Let Vref STOP FI START Figure 5 3 MC68HC9
51. rs employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part MOTOROLA Motorola and the Stylized M Logo are registered in the U S Patent and Trademark Office digital dna is a trademark of Motorola Inc All other product or service names are the property of their respective owners Motorola Inc is an Equal Opportunity Affirmative Action Employer Motorola Inc 2003 DRMO22 D For More Information On This Product Go to www freescale com
52. system is designed to drive the 3 phase BLDC motor in a speed closed loop using a 68HC908MR32 microcontroller The system can be configured to run with different motors System configuration for low voltage motors consists of e Motorola MC68HC908MR32 control board e 3 phase BLDC low voltage power stage or EVM motor board e 3 phase BLDC motor with Hall sensors The system configuration is shown in the Figure 3 1 Designer Reference Manual MOTOROLA Hardware Design 23 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Hardware Design 40w flat ribbon cable Hall sensor cable U1 68HC908MR32 MC Board U2 3 Ph Low Voltage BLDC Power Stage or Evaluation Motor Board U3 68HC908MR32 Daughter Board M1 3 phase BLDC Motor Figure 3 1 H W System configuration for low voltage motor The system configuration for high voltage motors consists of e Motorola MC68HC908MR32 control board e Optoisolation board e 3 phase AC BLDC high voltage power stage e 3 phase BLDC motor with Hall sensors The system configuration is shown in the Figure 3 2 Designer Reference Manual DRMO022 Rev 1 24 Hardware Design MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Hardware Design MC68HC908MR32 Control Board 40w flat chants 40w flat 230 115 V AC Hall sensor cable U1 68HC908MR32 MC Board U2
53. t allows algorithms to be written and tested without the need to design and build a power stage It supports algorithms that use Hall sensors encoder feedback and back EMF electromotive force signals for sensorless control DRMO022 Rev 1 Designer Reference Manual MOTOROLA Hardware Design 29 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Hardware Design The EVM motor board does not have overcurrent protection that is independent of the control board so some care in its setup and use is required if a lower impedance motor is used With the motor that is supplied in the kit the power output stage will withstand a full stall condition without the need for overcurrent protection Current measuring circuitry is set up for 4 amps full scale In a 25 C ambient operation at up to 6 amps continuous RMS output current is within the board s thermal limits Input connections are made via 40 pin ribbon cable connector J1 Power connections to the motor are made on output connector J2 Phase A phase B and phase C are labeled on the board Power requirements are met with a single external 12 Vdc 4 amp power supply Two connectors labeled J3 and J4 are provided for the 12 volt power supply J3 and J4 are located on the front edge of the board Power is supplied to one or the other but not both The electrical characteristics in Table 3 3 apply to operation at 25 C and a 12 Vdc power suppl
54. ten incorporate either internal or external position sensors to sense the actual rotor position or the position can be detected without sensors The presented application uses three Hall Sensors to sense actual position The Hall Sensors signals together give the six output values These outputs are read by MCU and the corresponding output voltage is generated by PWM outputs see Figure 2 3 Designer Reference Manual DRM022 Rev 1 18 System Description MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc System Description Digital Control of BLDC Motor pagan eae e e ere c D D o Seta enero al MEE TE PE MD E in Ee m EN Ur quer PRIEST TN EUN EE E Eb m n Ig E Psi A Psi B L A 4e A 4ve fA JZ4N L c c c d c cgN Psi 4 Ui A ui B uic es Pos_A Pepe ff tee 4 Pos B 4 Pos C Figure 2 3 BLDC Motor Back EMF and Magnetic Flux Hall Sensor Outputs 2 4 Digital Control of BLDC Motor The brushless DC motor BLDC motor is also known as an electronically commuted motor There are no brushes on the rotor and the commutation is performed electronically at certain rotor pos
55. y voltage Table 3 3 Electrical Characteristics of the EVM Motor Board Characteristic e Min Typ Max Units Power Supply Voltage Vdc 10 12 16 V Quiescent Current lcc 50 mA Min Logic 1 Input Voltage Vin 2 4 V Max Logic 0 Input Voltage Vu 0 8 V Input Resistance Rin 10 kQ Analog Output Range Vout 0 3 3 V Bus Current Sense Voltage ISense 412 mV A Bus Voltage Sense Voltage VBus 206 mV V pc wol s 4 wo RMS Output Current IM 6 A Total Power Dissipation Puiss 5 W Designer Reference Manual DRM022 Rev 1 30 Hardware Design MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Hardware Design Optoisolation Board The EVM Motor Board is shipped with an MCG IB23810 H1 brushless dc motor The motor characteristics in Table 3 4 apply to operation at 25 C Table 3 4 Characteristics of the BLDC motor Characteristic xe Min Typ Max Units Terminal Voltage Vi 60 V Speed V 5000 RPM Torque Constant Ky 0 08 Nm A Voltage Constant Ke 8 4 PT Winding Resistance Ri 2 8 Q Winding Inductance L 8 6 mH Continuous Current lcs 2 A Peak Current los 5 9 A Inertia ds 0 075 kgcm Thermal Resistance 3 6 C W 3 6 Optoisolation Board DRM0

Download Pdf Manuals

image

Related Search

Related Contents

Contre les dégradations: la mobilisation générale  

Copyright © All rights reserved.
Failed to retrieve file