Motorola M68HC08 manual Application Hardware and Software Configuration, Hardware Configuration

Page 113

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

User Guide

Application Hardware and Software Configuration

6.4 Application Hardware and Software Configuration

6.4.1 Hardware Configuration

As mentioned, the software can be configured to run on one of the three hardware and motor platforms:

High-Voltage Hardware Set Configuration

Low-Voltage Evaluation Motor Hardware Set Configuration

Low-Voltage Hardware Set Configuration

The hardware setups are shown in Figure 6-1, Figure 6-2, and

Figure 6-3. These setups are described in following subsections (see

Hardware and Drive Specifications for each platform characteristics).

The supplied controller boards for MC68HC908MR32 (ECCTRMR32) allows two possibilities for software execution:

1.MMDS Evaluation Board (KITMMDSMR32)

Using a real-time debugger (supplied with the Metrowerks compiler) the evaluation board is connected to the controller board (ECCTRMR32) via an emulator connector. This solution is recommended for software evaluation.

2.Programmed MCU (MC68HC908MR32)

Where a daughter board module, with MC68HC908MR32 processor, is plugged into the controller board (ECCTRMR32) instead of the emulator cable, the processor must be programmed in an external programmer. This solution is recommended for final tests.

Figure 6-1, Figure 6-2, and Figure 6-3show the configuration with

MMDS evaluation board.

NOTE: All the system parts are described in Section 4. Hardware Design. They can be ordered as a standard products. For the the supply and in detail document references see Section 4. Hardware Design.

DRM028 — Rev 0

 

Designer Reference Manual

 

 

 

MOTOROLA

User Guide

113

 

For More Information On This Product,

 

 

Go to: www.freescale.com

 

Image 113
Contents Freescale Semiconductor, Inc M68HC08For More Information On This Product Designer Reference Manual Rev Sensorless Bldc Motor Control Using MC68HC908MR32Revision history List of Sections List of Sections Table of Contents Table of Contents Title List of FiguresList of Figures List of Tables List of Tables Benefits of the Solution ContentsIntroduction Application FunctionalityIntroduction System Concept System DescriptionSystem Description System Specification Software written in C language specifications are listed Software SpecificationSoftware parameter tuning to a customer motor Software SpecificationsHigh-Voltage Hardware Set Specification Hardware and Drive SpecificationsMotor -Brake Set High Voltage Hardware Set SpecificationsLow-Voltage Hardware Set Specification Low-Voltage Evaluation Hardware Set SpecificationLow Voltage Evaluation Hardware Set Specifications Low Voltage Hardware Set Specifications Bldc Motor Targeted by This Application Bldc Motor ControlBrushless DC Motor Control Theory Semiconductor, Inc Bldc Motor Control Brushless DC Motor Control Theory Bldc Motor Back EMF and Magnetic Flux Why Sensorless Control? 2 3-Phase Bldc Power StagePower Stage Motor Topology Indirect Back EMF Sensing Stator Winding EquationsSame expressions can also be found for phase a and B Effect of Mutual Inductance Phase Voltage WaveformMutual Inductance Effect Detail of Mutual Inductance Effect Effect of Mutual Phase CapacitanceMutual Capacitance Model 10. Distributed Back-EMF by Unbalanced Capacity Coupling 11. Balanced Capacity Coupling Back-EMF Sensing Circuit Inc Alignment Starting Back-EMF Acquisition Running Used Control TechniqueSensorless Commutation Control Alignment 14. Commutation Control StagesRunning 15. AlignmentFreescale Semiconductor, Inc Commutation time calculation is shown in Figure Running Commutation Time Calculation17. Bldc Commutation Time with Zero Crossing Sensing Service of received back-EMF zero crossingWhere Starting Back-EMF Acquisition Freescale Semiconductor, Inc 18. Vectors of Magnetic Fields 19. Back-EMF at Start Up Computation coefficients are different Starting Commutation Time CalculationRunning Commutation Time Calculation, but the following PC Master Software Application ControlSpeed Control PC Master Software Communication Commands Communication with PC Master Software SpecificationsName Type Representing Description Range PC Master Software API VariablesBIT6 Reserved MotorStatusDef, FailureDefBIT2 Reserved SpeedRangeMaxRPM*PerSpeedMAXRange/PerZCrosFltT2 PerSpeedMAXRange and zero crossing period PerZCrosFltT2Freescale Semiconductor, Inc Hardware Design System Configuration and DocumentationMC68HC908MR32 Control Board For High-Voltage Hardware Set cofigurationEVM Motor Board Phase Low Voltage EVM Bldc Motor For Low-Voltage Evaluation Motor Hardware Set configurationLow-Voltage Hardware Set configuration Components will describe the individual boardsHigh-Voltage Hardware System Configuration High-Voltage Hardware Set ConfigurationSee References Described in MC68HC908MR32 Control Board User’sManual Motorola document order number Low-Voltage Evaluation Motor Hardware System Configuration Low-Voltage Evaluation Motor Hardware Set ConfigurationSystem configuration for low-voltage hardware set is shown Low-Voltage Hardware Set ConfigurationLow-Voltage Hardware System Configuration 1 MC68HC908MR32 Control Board All HW Sets ComponentsReferences Electrical characteristics in -1apply to operation at 25C 4shows a block diagram of the board’s circuitryHigh-Voltage Hardware Set Components Electrical Characteristics of Control Board1 3-Phase AC/BLDC High Voltage Power Stage Phase AC High Voltage Power Stage Optoisolation Board Electrical Characteristics of Power StageElectrical Characteristics Electrical Characteristics of the Optoisolation BoardEVM Motor Board 3 3-phase Bldc High Voltage Motor with Motor BrakeLow-Voltage Evaluation Motor Hardware Set Components Electrical Characteristics of the EVM Motor Board Electrical Characteristics of the EVM Motor Board2 3-phase Low Voltage EVM Bldc Motor Characteristics of the Bldc motorLow-Voltage Hardware Set Components 1 3-Ph AC/BLDC Low Voltage Power StageBlock Diagram Section 2 3-phase Bldc Low Voltage Motor with Motor BrakeSoftware Design Data Flow Main Software Flowchart State DiagramIntroduction Data FlowSoftware Variables Software Variables and Defined ConstantsImportant system variables are listed in Table Process Measurement Start/Stop Switch Reading and Start/Stop DecisionSys3Def Process Back, EMF Zero Crossing Sensing Main Data Flow Part1 Process Fault Control Fault StopFreescale Semiconductor, Inc Main Data Flow Part 2 Alignment, Starting Closed Loop Control System Process Desired Speed SettingProcess Alignment Control Processes Commutation and Zero Crossing Preset and SetBldc Speed Control and Calculation Bldc Commutation and Zero Crossing Selection Main Software FlowchartMain Software Flowchart Freescale Semiconductor, Inc Main Software Flowchart Main Software Loop Freescale Semiconductor, Inc Freescale Semiconductor, Inc Software Flowchart Interrupts State DiagramApplication State Transitions Initialize MCU State diagram for this software is shown in FigureInitialize Application Stand-ByFreescale Semiconductor, Inc Stand-by State Align State Starting Commutation Time Calculation Freescale Semiconductor, Inc 10. Back-EMF Acquisition Commutation Time Calculation Service of CommutationSet Explained in 5.5.5 Back-EMF Acquisition State Service of Received Back-EMF Zero CrossingRunning State Over Current 11. Running State Stop State 12. Stop State Fault StateSee Figure Implementation NotesSoftware Files Software files and structure are described in sectionSet Bldc Commutation and Bemf Zero Crossing Selection Preset Bldc Commutation and Bemf Zero Crossing SelectionBldc Commutation and Zero Crossing Selection Desired Speed Calculation Bldc Speed Control and CalculationPWM Duty Cycle PWMValMax = DUTYPWMMAX*MCPWMMODULUSTimer TimersFunction TIMACh3Int Designer Reference Manual DRM028 Rev 108 Software Design Application Suitability Guide User GuideMinimal Application Speed Motor’s nominal speedMotor Suitability Maximal Application SpeedVoltage Closed Loop Mutual Inductance Designer Reference Manual DRM028 Rev 112 User Guide Hardware setups are shown in -1, -2, Application Hardware and Software ConfigurationHardware Configuration Low-Voltage Evaluation Motor Hardware Set Configuration High-Voltage Hardware Set ConfigurationLow-Voltage Hardware Set Configuration Controller Board Settings Software Setup EVM Board SettingsEVM board settings are the same for all hardware platforms Application HC08 Software Files \bldczerocros08MR32\sources\bldc08.c, main program Application PC Master Software Control Files Execute from Evaluation Board Software ExecutionBuild Execute from Pre-programmed MCU When the software is built, the S-record fileBldczerocros08mr32MMDS.sx is generated Application ControlPC Master Software Remote Operating Mode Manual Operating ModePC Master Software Control Window For More Information On This Product Tuning for Customer Motor User Guide Tuning for Customer Motor Follow-up for Software Customizing to Customer Motor Follow-up for Advanced Software Customizing Start the PC master software parameters tuning application To have PC master software installed on your PC computer11. PC Master Software Parameters Tuning Control Window Software Parameters Setting Follow-up Labels in the File const.h Parameters File Selection Software Customizing to Power Stage\bldczerocros08MR32\sources\constcustlv.h, definitions for Example of Software Customizing to HardwareRange 0,infinity Voltage Setting Hardware CustomizingCurrent Setting Hardware Customizing Modified maximal measurable voltage is 55 V, so set Example of Software Customizing to HardwareMaximal and Minimal Voltage Limits Setting Software Customizing to Motor Voltage and Current SettingsDetailed description starts here Range 0,VOLTRANGEMAXRange 0,CURRENTRANGEMAXA Maximal and Minimal Current Limits SettingRange 0,8 Alignment Current and Current Regulator SettingCurrent during alignment state before motor starts Α From Evaluation Board Parameters Tuning with PC Master Software Project FileSet constcustx.h 12. PC Master Software Current Parameters Tuning Window Designer Reference Manual DRM028 Rev 142 User Guide MUSTCHANGEEXPERnn in file constcustx.h Commutation time period to discharge coil current ∝s Commutation ParametersStart-up Constants and Maximal Commutation Period Range -128,127 Start-up PeriodMaximal commutation period limit ∝s Constcustx.h Alignment Current and Current Regulator Setting 6.5.4.3Constcustx.h Set #define Percmtstartus in constcustx.h Ensure Percmtstartus =PERCMTMAXUS /2Constcustx.h file #define Speedpiregigain13. PC Master Software Start Parameters Tuning Window Range 0,255 Software Customizing to Motor Speed Control SettingNumber of commutations per motor revolution Range 0,SPEEDRANGEMAXRPM Maximal speed range rpmMinimal speed of the drive rpm Speedminrpm = 0.07 to 0.5SPEEDMAXRPM User Guide 153 Execute from Evaluation Board Start motor see Application Control and PC Master Software Set PC master software control mode and start motor seeRemote Operating Mode For the PWM frequency setting, follow the label PWM Frequency and Current Sampling Period SettingPWM frequency setting is provided by PWM FrequencyCurrent Sampling Period PWM Frequency SettingPWM period = Periodpwmus = SETPERPWM*2 EQ CANCHANGEPERCURSAMPn in const.h file Conclusion Software Parameters Setting and TuningPERCST1US = Periodpwmus * Setpercs ∝s Current Sampling InstantUser Guide 159 Designer Reference Manual DRM028 Rev 160 User Guide Appendix A. References AN1627, Motorola Motor using MC68HC705MC4 document order numberSG40N Appendix B. GlossaryGlossary Serial communications interface module SCI a module that Designer Reference Manual DRM028 Rev 166 Glossary Freescale Semiconductor, Inc HOW to Reach US USA/EUROPE/LOCATIONS not Listed