Motorola M68HC08 Manual

Low power bldc drive for fans using the mc68hc908qy4 reference design.
Hide thumbs

Advertising

Advertising

Freescale Semiconductor, Inc.
Low Power BLDC
Drive for Fans using
the MC68HC908QY4
Reference Design
Designer Reference
Manual
M68HC08
Microcontrollers
DRM046
Rev. 0, 09/2003
MOTOROLA.COM/SEMICONDUCTORS
For More Information On This Product,
Go to: www.freescale.com

Advertising

   Also See for Motorola M68HC08

   Related Manuals for Motorola M68HC08

   Summary of Contents for Motorola M68HC08

  • Page 1

    Freescale Semiconductor, Inc. Low Power BLDC Drive for Fans using the MC68HC908QY4 Reference Design Designer Reference Manual M68HC08 Microcontrollers DRM046 Rev. 0, 09/2003 MOTOROLA.COM/SEMICONDUCTORS For More Information On This Product, Go to: www.freescale.com...

  • Page 2

    Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com...

  • Page 3

    BLDC Motor Theory by: Pavel Grasblum, MCSL, Roznov Metrowerks and the Metrowerks logo are registered trademarks of Metrowerks, Inc., a wholly owned subsidiary of Motorola, Inc. CodeWarrior is a registered trademark of Metrowerks, Inc., a wholly owned subsidiary of Motorola, Inc.

  • Page 4

    Freescale Semiconductor, Inc. Designer Reference Manual DRM046 — Rev 0 MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 5: Table Of Contents

    Section 9. Appendix B — System Set-up ... . 71 DRM046 — Rev 0 Designer Reference Manual MOTOROLA List of Sections For More Information On This Product, Go to: www.freescale.com...

  • Page 6

    Freescale Semiconductor, Inc. List of Sections Designer Reference Manual DRM046 — Rev 0 List of Sections MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 7: Table Of Contents

    Software Listing ........57 DRM046 — Rev 0 Designer Reference Manual MOTOROLA Table of Contents For More Information On This Product,...

  • Page 8: Table Of Contents

    Executing the Application ......75 Designer Reference Manual DRM046 — Rev 0 Table of Contents MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 9: Table Of Contents

    Jumper Reference of BLDC Drive Board ....73 DRM046 — Rev 0 Designer Reference Manual MOTOROLA List of Figures For More Information On This Product,...

  • Page 10

    Freescale Semiconductor, Inc. List of Figures Designer Reference Manual DRM046 — Rev 0 List of Figures MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 11

    BLDC Drive Board Jumper Settings .....73 DRM046 — Rev 0 Designer Reference Manual MOTOROLA List of Tables For More Information On This Product,...

  • Page 12

    Freescale Semiconductor, Inc. List of Tables Designer Reference Manual DRM046 — Rev 0 List of Tables MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 13: Section 1. Introduction

    This Application Note describes the design of a low power 3-phase BLDC (Brushless DC) motor drive with Hall Sensors, based on Motorola’s MC68HC908QY4 microcontroller. Figure 1-1. Low Power BLDC Drive for Fan BLDC motors are very popular in a wide application area. Compared...

  • Page 14

    The design can be used as a reference design for developing customer specific applications. Designer Reference Manual DRM046 — Rev 0 Introduction MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 15: Features

    Section 2. MC68HC908QY Family Advantages and Features The MC68HC908QY4 is a member of the low-cost, high-performance M68HC08 Family of 8-bit microcontroller units (MCUs). All MCUs in the family use the enhanced M68HC08 central processor unit (CPU08) and are available with a variety of modules, memory sizes and types, and package types.

  • Page 16

    Hall position sensor inputs and an ADC channel for voltage measurements as a minimum. Therefore 16-pin MC68HC908QY2 or MC68HC908QY4, that accommodate ADC, are the right choice. Designer Reference Manual DRM046 — Rev 0 MC68HC908QY Family Advantages and Features MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 17: Section 3. Bldc Motor Theory

    Therefore, BLDC motors often incorporate either internal or external position sensors to sense the actual rotor position, or the position can be detected without sensors. DRM046 — Rev 0 Designer Reference Manual MOTOROLA BLDC Motor Theory For More Information On This Product, Go to: www.freescale.com...

  • Page 18: Digital Control Of A Bldc Motor

    Figure 3-3. 3-phase BLDC Power Stage. The power stage utilizes six power transistors with switching in either the independent mode or complementary mode. Designer Reference Manual DRM046 — Rev 0 BLDC Motor Theory MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 19: Independent Switching Of Power Transistors

    During freewheeling all transistors are switched off (see Figure 3-4. Independent Switching of Power Transistors). DRM046 — Rev 0 Designer Reference Manual MOTOROLA BLDC Motor Theory For More Information On This Product, Go to: www.freescale.com...

  • Page 20: Complementary Switching Of Power Transistors

    Thus the current may be able to flow in the opposite direction. Figure 3-5. Complementary Switching of Power Transistors depicts the complementary switching. Designer Reference Manual DRM046 — Rev 0 BLDC Motor Theory MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 21: Commutation

    Flux Vectors at Six-Step Control. The same figure is illustrated in tables Table 3-1. Commutation Sequence for Counterclockwise Rotation and Table 3-2. Commutation Sequence for Clockwise Rotation. DRM046 — Rev 0 Designer Reference Manual MOTOROLA BLDC Motor Theory For More Information On This Product, Go to: www.freescale.com...

  • Page 22: Stator Flux Vectors At Six-step Control

    90°. The real angle varies from 60° to 120°. Designer Reference Manual DRM046 — Rev 0 BLDC Motor Theory MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 23: Situation Right Before Commutation

    Figure 3-7. Situation Right Before Commutation Figure 3-8. Situation Right After Commutation DRM046 — Rev 0 Designer Reference Manual MOTOROLA BLDC Motor Theory For More Information On This Product, Go to: www.freescale.com...

  • Page 24

    Table 3-2. Commutation Sequence for Clockwise Rotation Hall Sensor A Hall Sensor B Hall Sensor C Phase A Phase B Phase C Designer Reference Manual DRM046 — Rev 0 BLDC Motor Theory MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 25: Design

    • Option to connect user’s interface through terminals • Fault protection: – DC-Bus over-current fault protection (hardware/software) DRM046 — Rev 0 Designer Reference Manual MOTOROLA 3-Phase BLDC Low Voltage Reference Design For More Information On This Product, Go to: www.freescale.com...

  • Page 26: Application Description

    3-phase PWM output signals for a 3-phase inverter. Designer Reference Manual DRM046 — Rev 0 3-Phase BLDC Low Voltage Reference Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 27: System Concept

    The outputs are controlled purely by s/w. The advantage is the simplicity of the hardware where individual pins are connected directly to DRM046 — Rev 0 Designer Reference Manual MOTOROLA 3-Phase BLDC Low Voltage Reference Design For More Information On This Product, Go to: www.freescale.com...

  • Page 28

    The PWM duty cycle value, together with commutation vector, defines the PWM control signals for the BLDC power stage. The PWM is Designer Reference Manual DRM046 — Rev 0 3-Phase BLDC Low Voltage Reference Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 29

    PWM outputs are disabled in order to protect the drive. The drive can be enabled again using the run/stop switch. DRM046 — Rev 0 Designer Reference Manual MOTOROLA 3-Phase BLDC Low Voltage Reference Design For More Information On This Product, Go to: www.freescale.com...

  • Page 30

    Freescale Semiconductor, Inc. 3-Phase BLDC Low Voltage Reference Design Designer Reference Manual DRM046 — Rev 0 3-Phase BLDC Low Voltage Reference Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 31: Section 5. Hardware Design

    BLDC motor applications, are provided, - allowing 3-phase BLDC motors to be controlled in closed speed loop. An illustration of the drive is shown in Figure 5-2. Block Diagram. DRM046 — Rev 0 Designer Reference Manual MOTOROLA Hardware Design For More Information On This Product, Go to: www.freescale.com...

  • Page 32: Three-phase Bldc Drive

    Hall sensor terminal • DC input 48V with range form +36V to +56V accommodating: – Fuse on power line input Designer Reference Manual DRM046 — Rev 0 Hardware Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 33: Pin-by-pin Descriptions

    5.1 Pin-by-Pin Descriptions Inputs and outputs are located on five connectors. Pin descriptions for each of these connectors are included in this section. DRM046 — Rev 0 Designer Reference Manual MOTOROLA Hardware Design For More Information On This Product, Go to: www.freescale.com...

  • Page 34

    Table 5-3. Connector J5 Signal Descriptions. Table 5-3. Connector J5 Signal Descriptions Pin No. Signal Name Description Phase_A Phase_A supplies power to motor phase A. Designer Reference Manual DRM046 — Rev 0 Hardware Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 35

    Both signals are connected with the MCU through jumpers. If desired, the on-board interface may be disconnected and the external DRM046 — Rev 0 Designer Reference Manual MOTOROLA Hardware Design For More Information On This Product, Go to: www.freescale.com...

  • Page 36: Detailed Design Description

    5-3. Microcontroller with Logic. The individual interface signals are wired to the MCU as shown in Table 5-6. Connection of Signals to MCU. Designer Reference Manual DRM046 — Rev 0 Hardware Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 37

    Since the inputs of the 3-phase gate driver IR2132 have negative logic, the pull-up resistors R35-R40 disable the driver outputs. Also, pull down DRM046 — Rev 0 Designer Reference Manual MOTOROLA Hardware Design For More Information On This Product, Go to: www.freescale.com...

  • Page 38: Microcontroller With Logic

    +12V or +5V on pin 5 of the J1 connector, using zero-ohms resistors. WARNING: Never populate both resistors Designer Reference Manual DRM046 — Rev 0 Hardware Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 39: Hall Sensor Interface

    - connected through a jumper to channel AD2 of the ADC. A small ceramic capacitor C16 is inserted for signal filtering. The run/stop switch DRM046 — Rev 0 Designer Reference Manual MOTOROLA Hardware Design For More Information On This Product, Go to: www.freescale.com...

  • Page 40: User's Interface

    60V. Feedback signal proportional to DC-Bus voltage is provided for the microcontroller. DC-Bus voltage is scaled down by a voltage divider Designer Reference Manual DRM046 — Rev 0 Hardware Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 41

    The gate of the MOSFETs is protected by 18V Zener diodes D18 and D21 that eliminate possible dangerous peaks on the gate signals. Discharge resistors R44 and R47 are placed in parallel. DRM046 — Rev 0 Designer Reference Manual MOTOROLA Hardware Design For More Information On This Product, Go to: www.freescale.com...

  • Page 42: Phase H Bridge (phase A Shown)

    The gain is set to -10. The over-current trip is set internally to 0.5V. It corresponds to 10A for DC-Bus sensing resistor 0.005 ohms and Designer Reference Manual DRM046 — Rev 0 Hardware Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 43: Current Sensing - Detail

    400mA. The +12Vdc is further decreased by linear regulator MC78M05 giving +5Vdc. The +5Vdc is used for supplying the microcontroller, user DRM046 — Rev 0 Designer Reference Manual MOTOROLA Hardware Design For More Information On This Product, Go to: www.freescale.com...

  • Page 44

    Freescale Semiconductor, Inc. Hardware Design interface, logic, and optionally, the Hall position sensors. The +5Vdc power supply is rated to 400mA. Designer Reference Manual DRM046 — Rev 0 Hardware Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 45: Section 6. Software Design

    The control algorithm of closed loop BLDC drive is described in Figure 6-1. Algorithm Data Flow. It consists of processes described in following sub-sections. DRM046 — Rev 0 Designer Reference Manual MOTOROLA Software Design For More Information On This Product, Go to: www.freescale.com...

  • Page 46: Algorithm Data Flow

    6.1.1 Speed Command and ADC Measurement The input parameters of the process - run/stop switch and speed potentiometer are evaluated and the speed command, ucOmegaReq, is Designer Reference Manual DRM046 — Rev 0 Software Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 47

    In the case of deceleration over-voltage, the deceleration is interrupted and the motor runs with constant speed in order to discharge the capacitor. Then deceleration can continue. DRM046 — Rev 0 Designer Reference Manual MOTOROLA Software Design For More Information On This Product, Go to: www.freescale.com...

  • Page 48: Closed Loop Speed Control

    The PWM is generated on timer output of the microcontroller. Then the on-board logic is used for selection of the PWM to the 3-phase gate driver. Designer Reference Manual DRM046 — Rev 0 Software Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 49: Software Implementation

    Software Timer for the control algorithm time base. The interrupt states provides calculation of actual speed of the motor, fault handler and PWM generation process with motor commutation. DRM046 — Rev 0 Designer Reference Manual MOTOROLA Software Design For More Information On This Product, Go to: www.freescale.com...

  • Page 50: Software Implementation - General Overview

    – enables IRQ interrupt, enable IRQ pull-up • COP and LVI enable (CONFIG register) • disable KeyBoard interrupts • sets-up I/O ports Designer Reference Manual DRM046 — Rev 0 Software Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 51

    The background routine is called in 10msec time-out. The timing is based on counting of the PWM periods. The background routine provides: DRM046 — Rev 0 Designer Reference Manual MOTOROLA Software Design For More Information On This Product, Go to: www.freescale.com...

  • Page 52: Application Porting For The Customer Specific Bldc Motor

    BLDC motor. The sectors I - VI correspond with the sectors shown in Figure 6-4. Stator Flux Vectors with Sectors. Designer Reference Manual DRM046 — Rev 0 Software Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 53: Stator Flux Vectors With Sectors

    When the Hall sensor patterns are defined, the corresponding commutation vectors shall be determined. For each sector I-VI, the corresponding commutation vector A-F and Hall sensor pattern is DRM046 — Rev 0 Designer Reference Manual MOTOROLA Software Design For More Information On This Product, Go to: www.freescale.com...

  • Page 54

    In the case of clockwise direction of rotation, the commutation vector can be determined using the Table 6-3. Determination of Commutation Vector for CW. Designer Reference Manual DRM046 — Rev 0 Software Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 55

    In that case, the output channels are switched off (output signals are put into a safe state) in order to protect the drive. DRM046 — Rev 0 Designer Reference Manual MOTOROLA Software Design For More Information On This Product, Go to: www.freescale.com...

  • Page 56

    #define VECTOR_C 0x21 #define VECTOR_D 0x09 #define VECTOR_E 0x18 #define VECTOR_F 0x12 The output vector is then generated on port using command: Designer Reference Manual DRM046 — Rev 0 Software Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 57: Software Listing

    SpeedRamp() - contains speed ramp and DC-Bus over-voltage protection during deceleration • GetDutyCycle() - contains speed PI controller with calculation of PWM output duty cycle DRM046 — Rev 0 Designer Reference Manual MOTOROLA Software Design For More Information On This Product, Go to: www.freescale.com...

  • Page 58: Microcontroller Memory And Peripheral Usage

    I/O ports signals Clock Generation on-chip clock generation S/W runaway protection fault protection Low voltage protection Speed set-up DC-Bus voltage measurement Designer Reference Manual DRM046 — Rev 0 Software Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 59

    Freescale Semiconductor, Inc. Table 6-6. MC68HC908QY4 Modules Usage Module available on Used Purpose MC68HC908QY2/4 Reset after Power ON DRM046 — Rev 0 Designer Reference Manual MOTOROLA Software Design For More Information On This Product, Go to: www.freescale.com...

  • Page 60

    Freescale Semiconductor, Inc. Software Design Designer Reference Manual DRM046 — Rev 0 Software Design MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 61: Section 7. References

    Designer Reference Manual — DRM046 Section 7. References • MC68HC908QY4 Data SheetsMC68HC908QY4/D, Rev.0.1, Motorola 12/2002 • Application Note “Developer’s Serial Bootloader for M68HC08”, AN2295/D, Motorola 2003 DRM046 — Rev 0 Designer Reference Manual MOTOROLA References For More Information On This Product,...

  • Page 62

    Freescale Semiconductor, Inc. References Designer Reference Manual DRM046 — Rev 0 References MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 63: Section 8. Appendix A — Schematics And Parts List

    1/10 watt, have a ±5% tolerance, and have values shown in ohms. Interrupted lines coded with the same letters are electrically connected. DRM046 — Rev 0 Designer Reference Manual MOTOROLA Appendix A — Schematics and Parts List For More Information On This Product, Go to: www.freescale.com...

  • Page 64: Microcontroller With Hall Sensor Input And User's Interface

    Appendix A — Schematics and Parts List Figure 8-1. Microcontroller with Hall Sensor Input and User’s Interface Designer Reference Manual DRM046 — Rev 0 Appendix A — Schematics and Parts List MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 65: Power Stage

    Freescale Semiconductor, Inc. Appendix A — Schematics and Parts List Schematics Figure 8-2. Power Stage DRM046 — Rev 0 Designer Reference Manual MOTOROLA Appendix A — Schematics and Parts List For More Information On This Product, Go to: www.freescale.com...

  • Page 66: Power Supply

    Freescale Semiconductor, Inc. Appendix A — Schematics and Parts List Figure 8-3. Power Supply Designer Reference Manual DRM046 — Rev 0 Appendix A — Schematics and Parts List MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 67: Parts Lists

    MBR160 Semiconductor green LED SMD Kingbright KP-2012MGC D18,D19,D20, Zener diode 18V / 0.5W MMSZ5248BT1 D21,D22,D23 Semiconductor DRM046 — Rev 0 Designer Reference Manual MOTOROLA Appendix A — Schematics and Parts List For More Information On This Product, Go to: www.freescale.com...

  • Page 68

    Any acceptable 10kΩ resistor 1/10W 1% 0805 Any acceptable 22kΩ resistor 1/10W 5% 0805 Any acceptable Designer Reference Manual DRM046 — Rev 0 Appendix A — Schematics and Parts List MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 69

    Any acceptable R44,R45,R46, 47kΩ resistor 1/10W 5% 0805 Any acceptable R47,R48,R49 Alcoswitch / PCB mount vertical switch TT11DGPC-1FN Thomas&Betts MC68HC908QY4S microcontroller Motorola International 3-phase bridge driver IR2132S Rectifier step-down switching regulator, Linear LT1676 7.4-60Vdc input Technology linear regulator 5V / 1/2W...

  • Page 70

    Part Number 021-2220 no designator pot knob Radiatron type 71-10-1/8-Black no designator Stick-on rubber feet Fastex 5033-01-00-5001 Designer Reference Manual DRM046 — Rev 0 Appendix A — Schematics and Parts List MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 71: Section 9. Appendix B — System Set-up

    It incorporates the following modules: • 3-phase BLDC Drive • 3-phase BLDC motor with Hall Sensors • Power supply 48V DRM046 — Rev 0 Designer Reference Manual MOTOROLA Appendix B — System Set-up For More Information On This Product, Go to: www.freescale.com...

  • Page 72: Jumper Settings For Controller Board

    Hall sensors available on pin 5 of Hall sensor connector J1. • R41 populated with zero ohms resistor for +12Vdc on J5/1 Designer Reference Manual DRM046 — Rev 0 Appendix B — System Set-up MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 73: Jumper Reference Of Bldc Drive Board

    Speed Pot selected Pot - PA4 zero ohms +5Vdc selected for Hall sensor connector J1 pin 5 resistor DRM046 — Rev 0 Designer Reference Manual MOTOROLA Appendix B — System Set-up For More Information On This Product, Go to: www.freescale.com...

  • Page 74: Required Software Tools

    MCU through the serial bootloader, or using other Motorola programming tools. The Developer’s Serial Bootloader for M68HC08 is a low-cost, in-circuit programming solution. It allows in-circuit reprogramming of Motorola’s M68HC08 FLASH devices using standard communication media (e.g., a serial asynchronous port).

  • Page 75: Executing The Application

    DC Bus over-voltage or DC Bus under-voltage fault state can be left by MCU reset. DRM046 — Rev 0 Designer Reference Manual MOTOROLA Appendix B — System Set-up For More Information On This Product, Go to: www.freescale.com...

  • Page 76

    Freescale Semiconductor, Inc. Appendix B — System Set-up Designer Reference Manual DRM046 — Rev 0 Appendix B — System Set-up MOTOROLA For More Information On This Product, Go to: www.freescale.com...

  • Page 77

    Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com...

  • Page 78

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

Comments to this Manuals

Symbols: 0
Latest comments: