Freescale Semiconductor, Inc... Freescale Semiconductor, Inc. Sensorless BLDC Motor Control Using the MC68HC908MR32 Designer Reference Manual M68HC08 Microcontrollers DRM028/D Rev. 0, 03/2003 MOTOROLA.COM/SEMICONDUCTORS For More Information On This Product, Go to: www.freescale.
Freescale Semiconductor, Inc... Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Sensorless BLDC Motor Control Using the MC68HC908MR32 Designer Reference Manual — Rev 0 by: Libor Prokop Motorola Czech System Laboratories Roznov pod Radhostem, Czech Republic DRM028 — Rev 0 Designer Reference Manual MOTOROLA 3 For More Information On This Product, Go to: www.freescale.
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 Freescale Semiconductor, Inc... The following revision history table summarizes changes contained in this document.
Freescale Semiconductor, Inc. Designer Reference Manual — Sensorless BLDC Motor Control List of Sections Section 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Freescale Semiconductor, Inc... Section 2. System Description. . . . . . . . . . . . . . . . . . . . . 15 Section 3. BLDC Motor Control . . . . . . . . . . . . . . . . . . . . 23 Section 4. Hardware Design. . . . . . . . . . . . . . . . . . . . . . . 57 Section 5. Software Design . . . . . . . . . . . . . . . . . . . . .
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... List of Sections Designer Reference Manual DRM028 — Rev 0 6 MOTOROLA For More Information On This Product, Go to: www.freescale.
Freescale Semiconductor, Inc. Designer Reference Manual — Sensorless BLDC Motor Control Table of Contents Freescale Semiconductor, Inc... Section 1. Introduction 1.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 1.2 Application Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.3 Benefits of the Solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Section 2. System Description 2.1 Contents . . . . . .
Freescale Semiconductor, Inc. Table of Contents Freescale Semiconductor, Inc... Section 5. Software Design 5.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75 5.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 5.3 Data Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 5.4 Main Software Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 5.
Freescale Semiconductor, Inc. Designer Reference Manual — Sensorless BLDC Motor Control List of Figures Figure Freescale Semiconductor, Inc... 2-1 3-1 3-2 3-3 3-4 3-5 3-6 3-7 3-8 3-9 3-10 3-11 3-12 3-13 3-14 3-15 3-16 3-17 3-18 3-19 3-20 4-1 4-2 4-3 4-4 Title Page System Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 BLDC Motor Cross Section. . . . . . . . . . . . . . . . . . . . . . . . . . . .24 3-Phase Voltage System . . . . . . . . . . . . . . . . . . . . . . .
Freescale Semiconductor, Inc. List of Figures 4-5 4-6 5-1 5-2 Freescale Semiconductor, Inc... 5-3 5-4 5-5 5-6 5-7 5-8 5-9 5-10 5-11 5-12 5-13 6-1 6-2 6-3 6-4 6-5 6-6 6-7 6-8 6-9 6-10 6-11 6-12 6-13 6-14 3-Phase AC High Voltage Power Stage . . . . . . . . . . . . . . . . . . 67 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Main Data Flow — Part1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Freescale Semiconductor, Inc. Designer Reference Manual — Sensorless BLDC Motor Control List of Tables Table Freescale Semiconductor, Inc... 2-1 2-2 2-3 2-4 3-1 3-2 4-1 4-2 4-3 4-4 4-5 4-6 5-1 6-1 6-2 6-3 Title Page Software Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 High Voltage Hardware Set Specifications . . . . . . . . . . . . . . . . 20 Low Voltage Evaluation Hardware Set Specifications . . . . . . . 21 Low Voltage Hardware Set Specifications . . . . . . . . .
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... List of Tables Designer Reference Manual DRM028 — Rev 0 12 MOTOROLA For More Information On This Product, Go to: www.freescale.
Freescale Semiconductor, Inc. Designer Reference Manual — Sensorless BLDC Motor Control Section 1. Introduction Freescale Semiconductor, Inc... 1.1 Contents 1.2 Application Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.3 Benefits of the Solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.
Freescale Semiconductor, Inc. Introduction Once using the semiconductor components, it is opened to replace classical universal and DC-motors with maintenance-free electrically commutated BLDC motors. This brings many advantages of BLDC motors when the system costs could be maintained equivalent. Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Designer Reference Manual — Sensorless BLDC Motor Control Section 2. System Description Freescale Semiconductor, Inc... 2.1 Contents 2.2 System Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.3 System Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2 System Concept The application block diagram is shown in Figure 2-1.
Freescale Semiconductor, Inc. System Description Three-Phase Inverter DC Bus Current & DC Bus Voltage Sensing Power line 3-ph BLDC Motor 3 BEMF Voltage Zero Crossing Comparators 3 phase BLDC Power Stage Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. System Description System Specification The A/D converter is also used to sense the dc-bus voltage and the drive temperature. The dc-bus voltage is stepped down to a 3.3-V signal level by a resistor network. Freescale Semiconductor, Inc... The six IGBTs (copack with built-in fly back diode), or MOSFETs, and gate drivers create a compact power stage. The drivers provide the level shifting that is required to drive the high side switch.
Freescale Semiconductor, Inc. System Description 2.3.1 Software Specification The application software is practically the same for all three hardware platforms. The only modification needed is to include one of three constants that customize the hardware and motor parameter settings. Freescale Semiconductor, Inc... The software (written in C language) specifications are listed in Table 2-1. A useful feature of the software is serial communication with PC master software protocol via RS232.
Freescale Semiconductor, Inc. System Description System Specification Table 2-1. Software Specifications Freescale Semiconductor, Inc... Minimal BLDC Motor Commutation Period (with PC Master Software Control) Targeted Hardware Software Configuration and Parameters Setting 520 µs (with default software setting and COEF_HLFCMT = 0.
Freescale Semiconductor, Inc. System Description and motor set are listed in Table 2-2. The hardware operates on both 230 Vac and 115 Vac mains. Table 2-2. High Voltage Hardware Set Specifications Input voltage: Hardware Boards Characteristics Freescale Semiconductor, Inc... Motor -Brake Set Maximum dc-bus voltage: 407 V Maximal output current: 2.93A Manufactured Motor type: Motor Characteristics Speed range: 2500 rpm (at 310 V) 3*220 V Phase current: 0.
Freescale Semiconductor, Inc. System Description System Specification 2.3.2.2 Low-Voltage Evaluation Hardware Set Specification This hardware set is dedicated for 12 V voltage and very low power (phase current < 4 A). The specifications for a low-voltage evaluation hardware and motor set are listed in Table 2-3. It is targeted first of all to software evaluation with small motors. Freescale Semiconductor, Inc... Table 2-3.
Freescale Semiconductor, Inc. System Description Table 2-4. Low Voltage Hardware Set Specifications Input voltage: Hardware Boards Characteristics Maximum dc-bus voltage: Maximal output current: Motor -Brake Set Manufactured Freescale Semiconductor, Inc... Motor type: Motor Characteristics EM Brno SM40N 3 phase, star connected BLDC motor, 3000 rpm (at 12 V) 150 W Phase voltage: 3*6.5 V Phase current: 17 A SG40N 3-Phase BLDC Motor Nominal Voltage: 3 x 27 V Nominal Current: 2.
Freescale Semiconductor, Inc. Designer Reference Manual — Sensorless BLDC Motor Control Section 3. BLDC Motor Control Freescale Semiconductor, Inc... 3.1 Contents 3.2 Brushless DC Motor Control Theory. . . . . . . . . . . . . . . . . . . . .23 3.3 Used Control Technique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 3.4 Application Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 3.2 Brushless DC Motor Control Theory 3.2.
Freescale Semiconductor, Inc. BLDC Motor Control STATOR STATOR WINDING (IN SLOTS) SHAFT Freescale Semiconductor, Inc... ROTOR AIR GAP PERMANENT MAGNETS Figure 3-1. BLDC Motor Cross Section The motor can have more than just one pole-pair per phase. This defines the ratio between the electrical revolution and the mechanical revolution. The BLDC motor shown has three pole-pairs per phase, which represent three electrical revolutions per one mechanical revolution.
Freescale Semiconductor, Inc. BLDC Motor Control Brushless DC Motor Control Theory back-EMF and commutation events is very important. In this condition, the motor behaves as a dc motor and runs at the best working point. Thus, simplicity of control and good performance make this motor a natural choice for low-cost and high-efficiency applications. Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. BLDC Motor Control Phase Magnetic Flux Linkage Psi_A Psi_B Psi_C PH. A PH. B Freescale Semiconductor, Inc... Phase Back EMF PH. C Ui_A PH. A Atop Btop Cbot Abot Ui_B PH. B Ctop PH. C Ui_C SPEED REVERSAL Speed reversal “NATURAL” COMMUTATION POINT point “Natural” commutation Bbot ACTING POWER SWITCH IN THE POWER STAGE Phase-Phase Back EMF Ui_AB Ui_BC Ui_CA A–B B–C C–A Figure 3-3.
Freescale Semiconductor, Inc. BLDC Motor Control Brushless DC Motor Control Theory 3.2.2 3-Phase BLDC Power Stage The voltage for 3-phase BLDC motor is provided by a 3-phase power stage controlled by digital signals. Its topology is the one as for the AC induction motor (refer to Figure 3-5). The power stage is usually controlled by a dedicated microcontroller with on-chip PWM module. Freescale Semiconductor, Inc... 3.2.
Freescale Semiconductor, Inc. BLDC Motor Control Id0 ud/2 + = SAt S Bt SCt - ud/2 + = SAb ISa ISb S Bb ISc SCb - Freescale Semiconductor, Inc... u VA u AB u BC u VB uVC uCA u Sb u0 B uRb uLb ubackEMF b O ubackEMF c uSa u uLa backEMF a A uRa uLc uSc uRc C Figure 3-5. Power Stage — Motor Topology The second goal of the model is to find how the motor characteristics depend on the switching angle.
Freescale Semiconductor, Inc. BLDC Motor Control Brushless DC Motor Control Theory 3.2.4.1 Stator Winding Equations The BLDC motor is usually very symmetrical. All phase resistances, phase and mutual inductances, flux-linkages can be thought of as equal to, or as a function of the position θ with a 120° displacement. The electrical BLDC motor model then consists of a set of the following stator voltage equations (EQ 3-1.). Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. BLDC Motor Control After evaluation the expression of the branch voltage uVc is as follows: di 3 1 u VC = --- u backEMF c – --- ( L ac – L bc ) ---2 2 dt (EQ 3-4.) Freescale Semiconductor, Inc... The same expressions can also be found for phase A and B: di 3 1 u VA = --- u backEMF a – --- ( L ba – L ca ) ---dt 2 2 (EQ 3-5.) di 3 1 u VB = --- u backEMF b – --- ( L cb – L ab ) ---2 2 dt (EQ 3-6.) The first member in the equation (EQ 3-6.
Freescale Semiconductor, Inc. BLDC Motor Control Brushless DC Motor Control Theory 0 30 60 90 120 150 180 210 240 270 300 330 360 390 uVA uSa Freescale Semiconductor, Inc... - Back-EMF can be sensed Figure 3-6. Phase Voltage Waveform However simple this solution looks, in reality it is more difficult, because the sensed “branch” voltage also contains some ripples. 3.2.4.3 Effect of Mutual Inductance As shown in previous equations (EQ 3-4.) through (EQ 3-6.
Freescale Semiconductor, Inc. BLDC Motor Control 0V Freescale Semiconductor, Inc... Figure 3-7. Mutual Inductance Effect Due to the construction of the BLDC motor, both mutual inductances vary. They are equal at the position that corresponds to the back-EMF zero crossing detection. The branch waveform detail is shown in Figure 3-8. Channel 1 in Figure 3-8 shows the disturbed “branch” voltage.
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... BLDC Motor Control Brushless DC Motor Control Theory Figure 3-8. Detail of Mutual Inductance Effect 3.2.4.4 Effect of Mutual Phase Capacitance The negative effect of mutual inductance is not the only one to disturb the back-EMF sensing. So far, the mutual capacitance of the motor phase windings was neglected in the motor model, since it affects neither the phase currents nor the generated torque. Usually the mutual capacitance is very small.
Freescale Semiconductor, Inc. BLDC Motor Control Id0 ud/2 + = A S At SBt u VA + = S Ab RC u Cba ISb SBb C iCab - uVB Freescale Semiconductor, Inc... C RC - ud/2 u Cac iC iC C uVC Cap C B u Ccb RC Figure 3-9. Mutual Capacitance Model Let us focus on the situation when the motor phase A is switched from negative dc-bus rail to positive, and the phase B is switched from positive to negative. This is described by these conditions (EQ 3-8.
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... BLDC Motor Control Brushless DC Motor Control Theory Figure 3-10. Distributed Back-EMF by Unbalanced Capacity Coupling Channel 1 in Figure 3-11 shows the disturbed “branch” voltage, while the other phase (channel 2) is not affected because it faces balanced mutual capacitance. The unbalance was purposely made by adding a small capacitor on the motor terminals, in order to better demonstrate the effect.
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... BLDC Motor Control Figure 3-11. Balanced Capacity Coupling NOTE: The configuration of the phase windings end-turns has significant impact; therefore, it needs to be properly managed to preserve the balance in the mutual capacity. This is important, especially for prototype motors that are usually hand-wound.
Freescale Semiconductor, Inc. BLDC Motor Control Brushless DC Motor Control Theory 560k 560k 560k 560k 560k 560k 560k 2x27k 1n 2x27k 1n 2x27k 1n MUX – + 560k – + 560k 1n Freescale Semiconductor, Inc... PHASE C – + +DC_BUS PHASE A PHASE B MUX COMMAND ZERO CROSSING DETECTION SIGNAL 2x27k Figure 3-12.
Freescale Semiconductor, Inc. BLDC Motor Control Phase Selection MUX Command Phase Comparator Output (Zero crossing edge) Freescale Semiconductor, Inc... "Branch" Voltage (Interval of phase Back-EMF zero crossing detection) Reference Level Commutation Signal 90° Zero Crossing Signal Figure 3-13. The Zero Crossing Detection 3.3 Used Control Technique 3.3.1 Sensorless Commutation Control This section concentrates on sensorless BLDC motor commutation with back-EMF zero crossing technique.
Freescale Semiconductor, Inc. BLDC Motor Control Used Control Technique position is known, and can be used to calculate the speed and processing of the commutation in the running state. START MOTOR Freescale Semiconductor, Inc... ALIGNMENT ALIGNMENT TIME EXPIRED? NO YES STARTING (BACK-EMF ACQUISITION) MINIMAL CORRECT COMMUTATIONS DONE? NO YES RUNNING Figure 3-14. Commutation Control Stages 3.3.1.
Freescale Semiconductor, Inc. BLDC Motor Control The current controller subroutine, with PI regulator, is called to control dc-bus current. It sets the correct PWM ratio for the required current. The current PI controller works with constant execution (sampling) period. This period should be a multiple of the PWM period, in order to synchronize the current measurement with PWM: Current controller period = n/PWM frequency Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. BLDC Motor Control Used Control Technique • BLDC motor commutation service • Back-EMF zero crossing moment capture service • Calculation of commutation time • Interactions between these commutation processes Freescale Semiconductor, Inc... From diagrams an overview of how the commutation works can be understood.
Freescale Semiconductor, Inc. BLDC Motor Control COMMUTATION DONE BEMF ZERO CROSSING DETECTED BETWEEN PREVIOUS COMMUTATIONS? NO CORRECTIVE CALCULATION 1. YES Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. BLDC Motor Control Used Control Technique T_Cmt[n-2] T_Cmt[n-1] T2[n-3] T2[n-2] n-1 n-2 T_Cmt[n] T2[n-1] T2[n] n 2*Per_ZCrosFlt[n-1] COMMUTATION IS PRESET ZERO CROSSING DETECTION SIGNAL Freescale Semiconductor, Inc... Per_ZCros[n] COMMUTATED AT PRESET TIME NO BACK-BMF FEEDBACK WAS RECEIVED CORRECTIVE CALCULATION 1.
Freescale Semiconductor, Inc. BLDC Motor Control The best commutation was get with Advance_angle: 60Deg*1/8 = 7.5Deg which means Coef_HlfCmt = 0.375 at Running state with default s/w setting Per_Toff[n+1] = Per_ZCrosFlt*Coef_Toff and Per_Dis minimum Coef_Toff = 0.375 at Running state, Per_Dis = 150 with default s/w setting Per_ZCros0 <-- Per_ZCros[n] T_ZCros0 <-- T_ZCros[n] T2*[n] = T_ZCros[n] + HlfCmt[n] Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. BLDC Motor Control Used Control Technique Per_HlfCmt = Period from zero crossing to commutation (half commutation) The required commutation timing is provided by setting commutation constants Coef_HlfCmt, COEF_TOFF. 3.3.1.4 Starting (Back-EMF Acquisition) Freescale Semiconductor, Inc... The back-EMF sensing technique enables a sensorless detection of the rotor position; however, the drive must be first started without this feedback.
Freescale Semiconductor, Inc. BLDC Motor Control during several commutations, while producing the required torque. Until the back-EMF feedback is locked, the commutation process (explained in Running) assures that commutations are done in advance, so that successive back-EMF zero crossing events are not missed. Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. BLDC Motor Control Used Control Technique MOTOR IS RUNNING MOTOR IS STARTING AT STEADY-STATE CONDITION WITH REGULAR BACK-EMF FEEDBACK STATOR MAGNETIC FIELD ROTOR MAGNETIC FIELD (CREATED BY PM) ALIGNMENT STATE The rotor position is stabilized by applying PWM signals to only two motor phases Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. BLDC Motor Control Figure 3-19 demonstrates the back-EMF during the start up. The amplitude of the back-EMF varies according to the rotor speed. During the starting (back-EMF acquisition) state the commutation is done in advance. In the running state the commutation is done at the right moments. Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. BLDC Motor Control Used Control Technique T_Cmt[1] T_Cmt[2] T2[1] n=1 T_Cmt[3] T2[2] n=2 T2[n] n=3 2*Per_ZCrosFlt[n-1] Per_CmtStart 2*Per_CmtStart COMMUTATION IS PRESET Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. BLDC Motor Control Coef_Toff = 0.5 at Running state, Per_Dis = 150 with default s/w setting Freescale Semiconductor, Inc... 3.3.2 Speed Control The speed close loop control is provided by a well known PI regulator. The required speed is calculated from speed input variable, as explained in Process Desired Speed Setting.
Freescale Semiconductor, Inc. BLDC Motor Control Application Control 3.4.1.1 Communication with PC Master Software Specifications SCI communication protocol with a default of 9.6 Kbaud, is used for communication as described in User’s Manual for PC Master Software, Motorola 2000, found on the World Wide Web at: http://e-www.motorola.com Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. BLDC Motor Control Table 3-1. PC Master Software Communication Commands Command Comman d Code Data Byte s 02 None Set manual mode Demo Suitcase Action Respon s Byte Response Descriptio n 00 55 OK Failed Setting of manual mode Freescale Semiconductor, Inc... 3.4.1.
Freescale Semiconductor, Inc. BLDC Motor Control Application Control Type: S8- signed 8 bit, U8- unsigned 8 bit,S16- signed 16bit, U16unsigned 16bit The system registers Sys3, Motor_Ctrl, Motor_Status, Failure flags are described by definitions of Sys3_Def, Motor_Ctrl_Def, Motor_Status_Def, Failure_Def: Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. BLDC Motor Control Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. BLDC Motor Control Application Control The Sp_Input variable is used for speed control. In PC master software mode, it can be modified from PC master software (otherwise, it is set according to speed potentiometer value). Desired speed [rpm] = Sp_Input/255*(Speed_Max_RPM-Speed_Min_RPM) + Speed_Min_RPM Freescale Semiconductor, Inc... So, the required motor commutation period is determined by the Speed_Max_RPM and Speed_Min_RPM variables.
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... BLDC Motor Control Designer Reference Manual 56 DRM028 — Rev 0 BLDC Motor Control For More Information On This Product, Go to: www.freescale.
Freescale Semiconductor, Inc. Designer Reference Manual — Sensorless BLDC Motor Control Section 4. Hardware Design Freescale Semiconductor, Inc... 4.1 Contents 4.2 System Configuration and Documentation . . . . . . . . . . . . . . . . 57 4.3 All HW Sets Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 4.3 All HW Sets Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 4.4 High-Voltage Hardware Set Components. . . . . . . . . . . . . . . . . 66 4.
Freescale Semiconductor, Inc. Hardware Design • 3-Phase AC/BLDC High Voltage Power Stage • Optoisolation Board • 3-phase BLDC High Voltage Motor with Motor Brake For Low-Voltage Evaluation Motor Hardware Set configuration: • EVM Motor Board • 3-phase Low Voltage EVM BLDC Motor Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Hardware Design System Configuration and Documentation 4.2.1 High-Voltage Hardware Set Configuration The system configuration for a high-voltage hardware set is shown in Figure 4-1. +12VDC PC Computer RS232 PC Master 40w flat ribbon cable U2 L J11.1 J11.2 N PE 3ph AC/BLDC High Voltage Power Stage J14 U3 J1 40w flat ribbon cable U1 JP1.1 JP1.2 Optoisolation Board J2 J5 ECOPT 100 - 240VAC 49 - 61 Hz Controller Board HC908MR32 ECCTR908MR32 J13.1 J13.2 J13.
Freescale Semiconductor, Inc. Hardware Design – Described in: MC68HC908MR32 Control Board — User’s Manual (Motorola document order number MEMCMR32CBUM/D), see References 3 • U2 — 3-Phase AC/BLDC High Voltage Power Stage: – Supplied in kit with optoisolation board as: ECOPTHIVACBLDC Freescale Semiconductor, Inc... – Described in: 3-Phase AC Brushless DC High Voltage Power Stage User’s Manual (Motorola document order number MEMC3PBLDCPSUM/D), see References 4.
Freescale Semiconductor, Inc. Hardware Design System Configuration and Documentation 4.2.2 Low-Voltage Evaluation Motor Hardware Set Configuration The system configuration for a low-voltage evaluation motor hardware set is shown in Figure 4-2. PC Computer RS232 PC Master 40w flat ribbon cable Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Hardware Design – Described in: MC68HC908MR32 Control Board — User’s Manual (Motorola document order number MEMCMR32CBUM/D), see References 3 • M1 — IB23810 Motor – Supplied in kit with IB23810 Motor as: ECMTREVAL — Evaluation Motor Board Kit Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Hardware Design System Configuration and Documentation 40w flat ribbon cable U2 +12 J19 GND J20 3ph AC/BLDC Low Voltage Power Stage J13 U1 Controller Board HC908MR32 ECCTR908MR32 J5 ECLOVACBLDC J16 MB1 J17 J18 Black White Red 12VDC Freescale Semiconductor, Inc... PC Computer RS232 PC Master Motor-Brake SM40N SG40N EVM1 KITMMDS08MR32 Not Connected Black White Red J5 ECMTRLOVBLDC PC Computer RS232 emulator Not Connected Figure 4-3.
Freescale Semiconductor, Inc. Hardware Design – Described in: Motorola Embedded Motion Control 3-Phase BLDC Low-Voltage Power Stage User’s Manual (Motorola document order number MEMC3PBLDCLVUM/D3), see References 7 • MB1 — Motor-Brake SM40N + SG40N Freescale Semiconductor, Inc... – Supplied as: ECMTRLOVBLDC The individual modules are described in some sections below. More detailed descriptions of the boards can be found in comprehensive User’s Manuals belonging to each board (References 3, 7).
Freescale Semiconductor, Inc. Hardware Design All HW Sets Components through the 40-pin ribbon cable from the optoisolation board or low-voltage power stage. The control board is designed to run in two configurations. It can be connected to an M68EM08MR32 emulator via an M68CBL08A impedance matched ribbon cable, or it can operate using the daughter board. The M68EM08MR32 emulator board may be used in either an MMDS05/08 or MMEVS05/08 emulation system.
Freescale Semiconductor, Inc. Hardware Design Table 4-1. Electrical Characteristics of Control Board Freescale Semiconductor, Inc... Characteristic Symbol Min Typ Max Units dc power supply voltage(1) Vdc 10.8 12 16.5 V Quiescent current ICC — 80 — mA Min logic 1 input voltage (MR32) VIH 2.0 — — V Max logic 0 input voltage (MR32) VIL — — 0.8 V Propagation delay (Hall sensor/encoder input) tdly — — 500 ns Analog input range VIn 0 — 5.
Freescale Semiconductor, Inc. Hardware Design High-Voltage Hardware Set Components 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. Freescale Semiconductor, Inc... The high-voltage ac power stage has both a printed circuit board and a power substrate.
Freescale Semiconductor, Inc. Hardware Design Table 4-2. Electrical Characteristics of Power Stage Freescale Semiconductor, Inc... Characteristic Symbol Min Typ Max Units dc input voltage Vdc 140 160 230 V ac input voltage Vac 100 208 240 V Quiescent current ICC — 70 — mA Min logic 1 input voltage VIH 2.0 — — V Max logic 0 input voltage VIL — — 0.8 V Input resistance RIn — 10 kΩ — Analog output range VOut 0 — 3.
Freescale Semiconductor, Inc. Hardware Design High-Voltage Hardware Set Components 250 ns for digital signals, and 2 µs for analog signals. Grounds are separated by the optocouplers’ galvanic isolation barrier. Freescale Semiconductor, Inc... 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.
Freescale Semiconductor, Inc. Hardware Design 4.4.3 3-phase BLDC High Voltage Motor with Motor Brake Freescale Semiconductor, Inc... The High Voltage BLDC motor-brake set incorporates a 3-phase High Voltage BLDC motor and attached BLDC motor brake. The BLDCmotor has six poles. The incremental position encoder is coupled to the motor shaft, and position Hall sensors are mounted between motor and brake. They allow sensing of the position if required by the control algorithm.
Freescale Semiconductor, Inc. Hardware Design Low-Voltage Evaluation Motor Hardware Set Components 4.5.1.1 Electrical Characteristics of the EVM Motor Board The electrical characteristics in Table 4-4 apply to operation at 25°C and a 12-Vdc power supply voltage. Table 4-4. Electrical Characteristics of the EVM Motor Board Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Hardware Design Freescale Semiconductor, Inc... Table 4-5. Characteristics of the BLDC motor Voltage Constant Ke — 8.4 — V/kRPM Winding Resistance Rt — 2.8 — Ω Winding Inductance L — 8.6 — mH Continuous Current Ics — — 2 A Peak Current Ips — — 5.9 A Inertia Jm — 0.075 — kgcm2 — — 3.6 °C/W Thermal Resistance 4.6 Low-Voltage Hardware Set Components 4.6.
Freescale Semiconductor, Inc. Hardware Design Low-Voltage Hardware Set Components Freescale Semiconductor, Inc... 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.
Freescale Semiconductor, Inc. Hardware Design Table 4-6. Electrical Chatacteristics of the 3-Ph BLDC Low Voltage Power Stage Freescale Semiconductor, Inc... Characteristic Symbol Min Typ Max Units Motor Supply Voltage Vac 10 12 16 V Quiescent current ICC — 175 — mA Min logic 1 input voltage VIH 2.0 — — V Max logic 0 input voltage VIL — — 0.8 V Analog output range VOut 0 — 3.
Freescale Semiconductor, Inc. Designer Reference Manual — Sensorless BLDC Motor Control Section 5. Software Design Freescale Semiconductor, Inc... 5.1 Contents 5.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 5.3 Data Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 5.4 Main Software Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 5.5 State Diagram. . . . . . . . . . . . . . . . . .
Freescale Semiconductor, Inc. Software Design 5.3.1 Software Variables and Defined Constants Important system variables are listed in Table 5-1. Freescale Semiconductor, Inc... Table 5-1.
Freescale Semiconductor, Inc. Software Design Data Flow Type: S8- signed 8 bit, U8- unsigned 8 bit, S16- signed 16bit, U16unsigned 16bit, (union)- 16 bits access or 2*8bit access Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design PC MASTER SOFTWARE A/D CONVERTERS TIMER 1 PCM COMMAND Freescale Semiconductor, Inc... PROCESS SPEED INPUT, DC-BUS VOLTAGE AND DC-BUS CURRENT MEASUREMENT PC Mode Start Ctrl Switch_Start Running START/STOP SWITCH START/STOP SWITCH READING AND START/STOP DECISION Sp_Input VOLTAGE Stop_F CURRENT PROCESS ALIGNMENT, STARTING, RUNNING CONTROL PROCESS FAULT CONTROL FAULT STOP Volt_Max_Fault Curr_Max_Fault FFLAG1 FFLAG2 Figure 5-1.
Freescale Semiconductor, Inc. Software Design Data Flow • Evaluates the zero crossing • Records its time in T_ZCros Freescale Semiconductor, Inc... Further explanation is provided in Data Flow and Figure 5-6. DRM028 — Rev 0 MOTOROLA Designer Reference Manual Software Design For More Information On This Product, Go to: www.freescale.
Freescale Semiconductor, Inc. Software Design Speed_Min_U8 BACK-EMF ZERO CROSSING INPUT TIMER 2 ACTUAL TIME Sp_Input Coef_Speed_Inp V_TASC2 CORRECTIVE CALCULATION 1 OF COMMUTATION PARAMTERS PROCESS DESIRED SPEED SETTING CORRECTIVE CALCULATION 2 OF COMMUTATION PARAMETERS (ACCELERATION) PROCESS BACK-EMF ZERO CROSSING SENSING Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design Data Flow 5.3.6 Process Commutation Time Calculation, Corrective Calculation 1, Corrective Calculation 2 Freescale Semiconductor, Inc... These processes provide calculations of commutation time intervals (periods) (Per_ZCros, Per_ZCrosFlt), from captured time (T_Cmt, T_ZCros, T_ZCros0), and sets Timer 2 with variable T2. These calculations are described in 3.3.1.5 Starting — Commutation Time Calculation and 3.3.1.3 Running — Commutation Time Calculation. 5.
Freescale Semiconductor, Inc. Software Design This information is compared with the reference set point and the error signal is generated. The magnitude and polarity of the error signal corresponds to the difference between the actual and desired speeds. Based on the speed error, the PI controller generates the corrected motor voltage in order to compensate for the error. The speed regulator parameters (gain...), internal, and input/output variables are located in the structure PIParamsScl_U8_Speed.
Freescale Semiconductor, Inc. Software Design Main Software Flowchart 3.2.5 Back-EMF Sensing Circuit.The zero crossing selection is provided by the multiplexer setting. Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design RESET MCU INITIALIZATION: – SYSTEM REGISTERS INITIALIZATION – PORTS INITIALIZATION – PLL — CPU CLOCK INITIALIZATION Freescale Semiconductor, Inc... – PC MASTER SOFTWARE (PORT) INITIALIZATION APPLICATION INITIALIZATION: – CURRENT OFFSET CALIBRATION – SYSTEM REGISTERS INITIALIZATION – PWM INITIALIZATION – TIMER 1 CURRENT SENSING TO PWM SYNCHRONIZATION – ADC MEASUREMENT INITIALIZATION MAIN S/W LOOP: – SEE FIGURE 5-5 Figure 5-4.
Freescale Semiconductor, Inc. Software Design Main Software Flowchart Freescale Semiconductor, Inc... preset calculations are prepared in the StrtCmtPreset() function, and commutation time set calculations are provided by the StrtCmtSet() function. DRM028 — Rev 0 MOTOROLA Designer Reference Manual Software Design For More Information On This Product, Go to: www.freescale.
Freescale Semiconductor, Inc. Software Design ALIGNMENT STATE: – TIME ALIGNMENT (TIMER3) – APPLY VOLTAGE NO FAILURE – CURRENT CONTROL LOOP – IF STOP OR FAULT CONDITION: STOP MOTOR EXIT RUNNING STATE YES FAULT STATE: – STOP MOTOR – WAIT UNTIL FAULT CLEAR YES Stop_F Flag or Failure Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design Main Software Flowchart When the start is successfully completed, the Running () function is called from main(). During the Running state, the commutation time preset calculations are provided by the CmtPreset() function, and commutation time set calculations are provided by the CmtSet() function. Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design • Phase commutated flag PC_F is set • Actual time (from timer counter register) = commutation time is recorded in T_Cmt. This interrupt is provided by the TIMACh3_Int() function. Freescale Semiconductor, Inc... Interrupt PWM Reload provides back-EMF zero crossing sensing. The zero crossing input is sampled 2 or 3 times. The back-EMF state value is compared with expecting (rising/falling) edge.
Freescale Semiconductor, Inc. Software Design State Diagram INTERRUPT PWM RELOAD INTERRUPT TIMER 1 (TIM A CH1) BEMF ZERO CROSSING SENSING ISR: CURRENT MEASUREMENT ISR: – START ADC DC-BUS CURRENT CHANNEL SENSE ZERO CROSSING INPUT: – SERVE VIRTUAL TIMER3 – TAKE 3 ZC INPUT SAMPLES – CURR = VALUE FROM ADC – BEMF STATE = S1&S2 | S2&S3 – IF CURR > CURR_MAX_FAULT: SET OVC_F (OVERCUR.) FLAG Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design RESET INITIALIZE MCU INITIALIZE APPLICATION Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design State Diagram 5.5.1 Initialize MCU Freescale Semiconductor, Inc... This state is entered after the MCU is reset, and performs the following actions: • MCU ports are configured for the application • Some application (system) variables are initialized • MCU clock PLL is locked • Hardware boards used are identified, and parameters initialized • PC master communication software is initialized with SCI port • ADC is initialized and the state is exited.
Freescale Semiconductor, Inc. Software Design Current measurement and current calibration when PWM is OFF Before testing of the start switch, dc-bus current is measured when PWM is OFF. This way the dc-bus current measurement path is calibrated. The calibrated value Offset0_Curr is used for the final current calculation. This offset on the ADC input should ideally be 1.65 V at 0 dc-bus current. Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design State Diagram ENTER CURRENT MEASUREMENT AND CURRENT CALIBRATION WHEN PWM IS OFF CURRENT IS HIGHER THAN LIMIT ERROR IN HARDWARE Freescale Semiconductor, Inc... DONE START CONDITION TEST FAULT STATE START CONDITION (START SWITCH CHANGED FROM STOP TO START OR START AND PC MODE AND START CTRL) OVER VOLTAGE OR UNDER VOLTAGE SPEED INPUT AND DC-BUS VOLTAGE MEASUREMENTS DONE EXIT Figure 5-8.
Freescale Semiconductor, Inc. Software Design 5.5.4 Align State In the align state the rotor position is stabilized by applying PWM signals to only two motor phases (no commutation). When preset time-out expires, then this state is finished. See Figure 5-9. ENTER Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design State Diagram the over-current detection. The CMD_F (current measurement done) flag indicates that the new value of dc-bus current is ready to be processed by the current controller. The time-out (software timer 3) of this state is defined in the software by the constants: PER_T_ALIGN and PER_BASE_T3_ALIGN. Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design Second Commutation The commutation time (T2) is calculated from the previous commutation time and the start commutation period (Per_CmtStart). This time is set to timer 2. Then, the new PWM multiplexer logic data is readied for when the commutation interrupt performs the next commutation. The calculation of the commutation time is explained in 3.3.1.5 Starting — Commutation Time Calculation. Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design State Diagram PWM DUTY CYCLE IS LEFT AT VALIE FOUND BY THE CURRENT CONTROLLER DURING THE ALIGN STATE ENTER EXIT FIRST COMMUTATION COMMUTATIONS ARE LOCKED TO THE BACK-BMF FEEDBACK (START_F = 0) Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design Service of Commutation As already explained, the motor phase commutation is performed in the OC interrupt service routine. The phase commutated flag (PC_F=1) indicates this action to the scheduler, which allows the performed commutation to be serviced. Detailed explanation of this state is in Processes Commutation and Zero Crossing Preset and Set. Service of Received Back-EMF Zero Crossing Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design State Diagram The output compare function is used to synchronize initiating the dc-bus current sampling with the PWM cycle, and also for the commutation timing. Freescale Semiconductor, Inc... Error Handler If the BLDC motor is controlled properly, commutation events must be locked to the back-EMF zero crossing feedback. When that feedback is lost, commutation time is derived from previous commutation events.
Freescale Semiconductor, Inc. Software Design Explained in 5.5.5 Back-EMF Acquisition State. The difference is that the commutation parameters are recalculated with different constants (see 3.3.1.3 Running — Commutation Time Calculation) BEMF Zero Crossing Interrupt Service Routine Explained in 5.5.5 Back-EMF Acquisition State. Current Measurement Interrupt Service Routine Explained in 5.5.5 Back-EMF Acquisition State. Freescale Semiconductor, Inc... Error Handler Explained in 5.5.
Freescale Semiconductor, Inc. Software Design State Diagram ENTER EXIT MOTOR STOP IS REQUIRED (STOP_F = 1) T3 TIME-OUT (T3_F = 1) SPEED CONTROL CURRENT MEASUREMENT IS DONE DONE Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Software Design 5.5.7 Stop State When motor stop is required, the PWM signals are disabled and the power switches are switched off. The state diagram for this state is shown in Figure 5-12. Freescale Semiconductor, Inc... ENTER MOTOR STOP IS REQUIRED (STOP_F = 1) TIMER1 (TIM A CH1) INTERRUPT MOTOR IS STOPPED PWM IS OFF CURRENT MEASUREMENT ISR CURRENT MEASUREMENT IS DONE (CMD_F=1) EXIT Figure 5-12. STOP State 5.5.
Freescale Semiconductor, Inc. Software Design Implementation Notes The failure (Failure = 0) is tested. In manual mode (PCMode = 0), the switch in the stop position clears the failure. In PC master software mode (PCMode = 1), the failure is cleared by ClearFail flag or the switch in the stop position. If start condition is valid Strt_F is set, Stop_F is cleared, and the next state entered. Freescale Semiconductor, Inc... See Figure 5-13.
Freescale Semiconductor, Inc. Software Design 5.6.2 BLDC Commutation and Zero Crossing Selection The required BLDC motor voltage system commutation is provided using the MC68HC08MR32 PWM block. The zero crossing selection is provided by setting port F pins PTF1–PTF3 connected to the multiplexer. Freescale Semiconductor, Inc... As shown in Data Flow, the commutation and back-EMF zero-crossing selection process is split into two actions: 1. Preset BLDC commutation and BEMF zero-crossing selection 2.
Freescale Semiconductor, Inc. Software Design Implementation Notes PVAL6L registers. Then the back-EMF zero crossing selection set is provided by setting PORTF according to V_MUX variable. 5.6.3 BLDC Speed Control and Calculation Freescale Semiconductor, Inc... Desired speed calculation and PWM duty cycle setting is quite simple, but there are some C language syntax tricks. Also, the scaling aspect needs to be taken into consideration. 5.6.3.
Freescale Semiconductor, Inc. Software Design 5.6.4 Timers Timer 1 and timer 2 are implemented using MC68HC08MR32 timers. Timer 3 is a software virtual timer using time base of timer 1. 5.6.4.1 Timer 1 Freescale Semiconductor, Inc... Timer 1 is provided by timer A channel 1 set in output compare mode. In this mode the registers TACH1H and TACH1L are used for setting the output compare value, T1. • TACNTH and TACNTL form a 16-bit timer A counter with an infinite counting 16-bit roll over.
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Software Design Implementation Notes • The value T2 (e.g., T2 = T_Cmt + Per_HlfCmt) is calculated using a 16-bit addition with no saturation. So, the time duration up to 65,536 UNIT_PERIOD_T2_US from actual time (TACNTH, TACNTL) can be timed at any TACNTH, TACNTL timer A counter value.
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Software Design Designer Reference Manual 108 DRM028 — Rev 0 Software Design For More Information On This Product, Go to: www.freescale.
Freescale Semiconductor, Inc. Designer Reference Manual — Sensorless BLDC Motor Control Section 6. User Guide Freescale Semiconductor, Inc... 6.1 Contents 6.2 Application Suitability Guide . . . . . . . . . . . . . . . . . . . . . . . . . . 109 6.3 Warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 6.4 Application Hardware and Software Configuration . . . . . . . . . 113 6.5 Software Parameters Setting and Tuning for Customer Motor. . . . . . . . . . . .
Freescale Semiconductor, Inc. User Guide 6.2.2 Maximal Application Speed The maximal motor speed is limited by the minimal commutation period: 6 60 ( 10 ) maximal speed[rpm] = -------------------------------------------------------------------------------------------------------------------------min. commutation period [us]*COMMUT_REV (EQ 6-1.) Freescale Semiconductor, Inc... COMMUT_REV — commutations per motor revolution, must be set according to rotor poles: 6p COMMUT_REV = ------2 (EQ 6-2.
Freescale Semiconductor, Inc. User Guide Application Suitability Guide 6.2.4.1 Effect of Mutual Phase Capacitance Freescale Semiconductor, Inc... The effect of the mutual phase capacitances can play an important role in the back-EMF sensing. Usually the mutual capacitance is very small. Its influence is only significant during the PWM switching when the system experiences very high du/dt.The effect of mutual capacitance is described in section 3.2.4.4 Effect of Mutual Phase Capacitance.
Freescale Semiconductor, Inc. User Guide 6.3 Warning 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. Freescale Semiconductor, Inc... An isolation transformer should be used when operating off an ac power line.
Freescale Semiconductor, Inc. User Guide Application Hardware and Software Configuration 6.4 Application Hardware and Software Configuration 6.4.1 Hardware Configuration Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. User Guide 6.4.1.1 High-Voltage Hardware Set Configuration The system configuration for a high-voltage hardware set is shown in Figure 6-1 +12VDC PC Computer RS232 PC Master 40w flat ribbon cable U2 L N 3ph AC/BLDC High Voltage Power Stage J11.1 J11.2 PE J14 U3 J1 40w flat ribbon cable U1 JP1.1 JP1.2 Optoisolation Board J2 J5 ECOPT 100 - 240VAC 49 - 61 Hz Controller Board HC908MR32 ECCTR908MR32 J13.1 J13.2 J13.
Freescale Semiconductor, Inc. User Guide Application Hardware and Software Configuration PC Computer RS232 PC Master 40w flat ribbon cable U2 +12 J3 GND Evaluation Motor Board J1 12VDC U1 J5 Controller Board HC908MR32 ECCTR908MR32 Freescale Semiconductor, Inc... J2 Motor ECMTREVAL M1 EVM1 KITMMDS08MR32 IB23810 PC Computer RS232 emulator Figure 6-2. Low-Voltage Evaluation Motor Hardware System Configuration NOTE: All the system parts are described in section Section 4. Hardware Design.
Freescale Semiconductor, Inc. User Guide 40w flat ribbon cable U2 +12 J19 GND J20 3ph AC/BLDC Low Voltage Power Stage J13 U1 Controller Board HC908MR32 ECCTR908MR32 J5 ECLOVACBLDC J16 MB1 J17 J18 Black White Red 12VDC Motor-Brake SM40N SG40N EVM1 KITMMDS08MR32 Not Connected Black White J5 Red Freescale Semiconductor, Inc... PC Computer RS232 PC Master ECMTRLOVBLDC Not Connected PC Computer RS232 emulator Figure 6-3.
Freescale Semiconductor, Inc. User Guide Application Hardware and Software Configuration Freescale Semiconductor, Inc... PC Master S/W RS232 START/STOP switch SPEED potentiometer to evaluation board connect JP13! indication LEDs to power stage board Figure 6-4. Controller Board 6.4.1.5 EVM Board Settings EVM board settings are the same for all hardware platforms. CAUTION: Remember, the MMDS MCU clock must be set to 4 MHz.
Freescale Semiconductor, Inc. User Guide For application PC master software (remote) control, the following software is needed: • PC master software for PC — installed on your PC computer • Sensorless BLDC application PC master software control files (located in bldc_zerocros08MR32\pc_master directory) Freescale Semiconductor, Inc... Both the HC08 and PC master software control files for the sensorless BLDC application are delivered together in the bldc_zerocros08MR32 directory.
Freescale Semiconductor, Inc. User Guide Application Hardware and Software Configuration Freescale Semiconductor, Inc... Table 6-1. Required Software Configuration for Dedicated Hardware Platform Hardware Platform Dedicated Customizing File Required Software Configuration Low-voltage evaluation motor hardware const_cust_evmm. h #include const_cust_evmm.h into code.fun.c Low-voltage hardware const_cust_lv.h #include const_cust_lv.h into code.fun.c • ...\bldc_zerocros08MR32\sources\code_fun.
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... User Guide • ...\bldc_zerocros08MR32\sources\ram.c, general RAM definitions • ...\bldc_zerocros08MR32\sources\ram.h, general RAM declarations header • ...\bldc_zerocros08MR32\sources\ram_bit.h, general RAM bits definitions header • ...\bldc_zerocros08MR32\sources\ram_cust_param.c, RAM variables for software customizing definitions • ...\bldc_zerocros08MR32\sources\ram_cust_param.
Freescale Semiconductor, Inc. User Guide Application Hardware and Software Configuration 6.4.3 Software Execution 6.4.3.1 Build Freescale Semiconductor, Inc... To build the BLDC sensorless with the back-EMF zero crossing application, open the bldc_zerocross.mcp project file and execute the Make command, as shown in Figure 6-5. This will build and link the application and all needed Metrowerks libraries. Figure 6-5. Execute Make Command 6.4.3.
Freescale Semiconductor, Inc. User Guide NOTE: Remember, the MMDS MCU clock must be set to 4 MHz. Change the crystal oscillator, or set oscillator W1 to MMDS, and set 4 MHz in the real-time debugger — MMDS0508/target signals/4 MHz! Once the application is running, move the RUN/STOP switch to the RUN position and set the required speed with the SPEED potentiometer. If successful, the BLDC motor will be spinning. Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. User Guide Application Hardware and Software Configuration 6.4.4.1 Manual Operating Mode Freescale Semiconductor, Inc... In the manual operating mode, the drive is controlled by the RUN/STOP switch and the required speed is set by the SPEED potentiometer. The RUN/STOP switch enables/disables motor spinning. The yellow LED will light whenever the application software correctly executes (so, it will also light when motor spinning is disabled or at a fault state).
Freescale Semiconductor, Inc. User Guide Freescale Semiconductor, Inc... NOTE: After you start the PC master software, the algorithm block description window appears instead of the PC master control window; therefore, press “control page”. If the PC master software project (..pmp file) is unable to control the application, it is possible that the wrong load map (..\bin\bldc_zerocros08mr32_MMDS.map file) has been selected.
Freescale Semiconductor, Inc. User Guide Application Hardware and Software Configuration NOTE: Application control from PC master software requires that PC master software control mode must be set. Before changing PC master software/manual control mode (by PC Master Mode Radio button) the controller board START/STOP switch must be set to STOP. This is a protection feature that prevents the motor from unexpected starts! • Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. User Guide 6.5 Tuning for Customer Motor Freescale Semiconductor, Inc... This section describes how to modify the software parameters for any BLDC motor and some hardware adaptations. The software parameters can be evaluated from a PC computer using PC master software, so the first subsection describes tuning the PC master software project file. • A follow-up for software customizing to a customer motor is shown in Figure 6-7.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor frequency or to the current regulator sampling period as explained in the section 6.5.7 PWM Frequency and Current Sampling Period Setting. Freescale Semiconductor, Inc... If there’s still a problem running the motor, check if the motor is suitable for sensorless control with back-EMF zero crossing (see Figure 6-9.) as described in the section 6.2.4 Motor Suitability. Then, again check the application suitability.
Freescale Semiconductor, Inc. User Guide Decision on the Application Suitability — CHECK MINIMAL APPLICATION SPEED — CHECK MAXIMAL MOTOR SPEED OK Freescale Semiconductor, Inc... Selection of the Power Stage HV EVM LV Modified H/W INCLUDE: — CONST_CUST_HV.H — INTO CODE_FUN.C FILE INCLUDE: — CONST_CUST_EVMM.H — INTO CODE_FUN.C FILE INCLUDE: — CONST_CUST_LV.H — INTO CODE_FUN.C FILE INCLUDE APPROPRIATE: — CONST_CUST_X.H — INTO CODE_FUN.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor PWM Frequency and Current Sampling Period Setting — SET PWM FREQUENCY SET_PER_PWM — SET CURRENT SAMPLING PERIOD SET_PER_CS — SET PERIOD FROM PWM RELOAD TO CURRENT SAMPLING SET_PER_CS Freescale Semiconductor, Inc... Figure 6-8.
Freescale Semiconductor, Inc. User Guide setting, and PC master software “oscilloscope“ windows for watching dedicated parameters (variables). NOTE: For software parameter tuning with PC master software, it is necessary to have PC master software installed on your PC computer! Freescale Semiconductor, Inc... click here for Current Parameters Tuning click here for Start Parameters Tuning click here for Speed Parameters Tuning click here to display control page modify variables here Figure 6-10.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor ...\bldc_zerocros08MR32\pc_master\tuning_bldc.pmp Freescale Semiconductor, Inc... After you start the PC master software, you can choose which parameters you are going to tune (current, start-up, speed parameters — see Figure 6-10). Then you can press “control page” to make the control window visible (and provide control in the same way as in PC Master Software (Remote) Operating Mode).
Freescale Semiconductor, Inc. User Guide Freescale Semiconductor, Inc... NOTE: The software parameters can be temporarily modified and evaluated using the PC master software tuning file. But, the parameter settings are not stored in the non-volatile memory (after reset the software loads parameters from const_cust_x.h file). When you finish the software parameters evaluation, you must open one of the const_cust_hv.h, const_cust_evmm.h, and const_cust_lv.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor /* MUST_CHANGE_nn: */ Label for changes which must be set (changed) when adapting software for a motor /* MUST_CHANGE_nn_EXPER: */ Label for changes which must be set (changed) when adapting software for a motor — the setting can be done experimentally Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. User Guide 6.5.3 Parameters File Selection As explained before (see Software Setup) one of the following files is used for most of software parameters configuration: ...\bldc_zerocros08MR32\sources\const_cust_hv.h, definitions for software customizing, for high-voltage (230/115 Vac ) power board Freescale Semiconductor, Inc... ...\bldc_zerocros08MR32\sources\const_cust_evm.h, definitions for software customizing for EVM motor board (12 V low power) ...
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor /* MUST_IF_HW_CHANGE_1: */ #define DUTY_PWM_MAX 0.96 Range: <0,1> Proportional value of maximal PWM duty cycle is determined by power stage boards used. Freescale Semiconductor, Inc... DUTY_PWM_MAX must be set for any hardware customizing. Some hardware boards need maximal duty cycle<1, in order to charge high side drivers for power inverters. 6.5.3.
Freescale Semiconductor, Inc. User Guide Minimal measurable current determined by hardware current sensing [A]: /* MUST_IF_HW_CHANGE_5: */ #define CURR_HW_MIN_A (-2.93) Range: (-infinity,0> CURR_HW_MAX_A and CURR_HW_MIN_A must be changed when current sensing range is different from default hardware. Freescale Semiconductor, Inc... Maximal limit of dc-bus current allowable for the hardware [A]: /* MUST_IF_HW_CHANGE_6: */ #define CURR_MAX_FAULT_A 1.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor When the software parameters are set for the hardware, you should follow the settings in Software Customizing to Motor — Voltage and Current Settings. 6.5.4 Software Customizing to Motor — Voltage and Current Settings Freescale Semiconductor, Inc... The software parameter settings according to customer motor are described in this section. NOTE: First of all, voltage and current settings need to be done.
Freescale Semiconductor, Inc. User Guide VOLT_MIN_FAULT_V determines the minimal voltage when the drive fault state should be entered. So the constants VOLT_MIN_FAULT_V must be set according to minimal voltage limits of the motor application. It should be changed when there are problems with under-voltage. Dc-bus voltage threshold mains 120V/230V [V]: /* CAN_CHANGE_10: */ #define VOLT_120_THRESHOLD_V 150 Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor CURR_MAX_FAULT_A should be changed for a motor with maximal allowable current lower than the board. Initial value for OVer-Current Counter [-]: /* CAN_CHANGE_5: */ #define I_CNTR_OVC 0x04 Freescale Semiconductor, Inc... Range: <0,255> I_CNTR_OVC determines the number of current samples with current value > CURR_MAX_FAULT_A needed before entering the drive fault state.
Freescale Semiconductor, Inc. User Guide #define CURR_PIREG_I_GAINSCALELEFT 0 Range: <0,8> /* MUST_CHANGE_5_EXPER: */ #define CURR_PIREG_I_GAIN 64 Range: <0,255> where the current regulator integral gain is: KP = CUR_PIREG_I_GAIN*2CURR_PIREG_I_GAINSCALELEFT (EQ 6-5.) Freescale Semiconductor, Inc... These constants can be calculated according to regulators theory. The current sampling (regulator execution) period is PER_CS_T1_US = 128 µs, at the default software setting.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor on the Current Parameters Tuning\New Scope, or measure the powered motor coil current on real oscilloscope Freescale Semiconductor, Inc... 7. Set PC master software control mode, and start the motor (see Application Control and PC Master Software (Remote) Operating Mode) Click here for Current Parameters Tuning click here to display control page click here to display oscilloscope modify values here Figure 6-12.
Freescale Semiconductor, Inc. User Guide 9. If CURR_PIREG_P_GAIN is set to 128, do further proportional gain increase CURR_PIREG_P_GAINSCALELEFT with PC master software, steps 0, 1, 2...8, otherwise leave CURR_PIREG_P_GAINSCALELEFT as 0 10. Increase, step by step, the integral gain CURR_PIREG_I_GAIN with PC master software, up to current oscillation or noise, or up to 128 Freescale Semiconductor, Inc... 11.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor 22. Observe the current transient at Alignment start, then stop motor (or reset software) 23. Then modify the regulator parameters with PC master software as in steps 8., 9., 10., and 11. 24. Repeat steps 21. to 23. until regulation is improved 25. Open const_cust_x.h and modify the regulator parameters with the final variable values evaluated with PC master software Freescale Semiconductor, Inc... 26.
Freescale Semiconductor, Inc. User Guide 6.5.5.1 Commutation Parameters Commutation time period to discharge coil current [µs] /* MUST_CHANGE_7: */ #define PER_DIS_US 300.0 Range: <0,minimal commutation period*COEF_TOFF> It is the maximal allowed current decay period, determined by motor winding and maximal current. Must be: Freescale Semiconductor, Inc... PER_DIS_US < minimal motor commutation period[µs] * COEF_TOFF where: COEF_TOFF is commutation Toff period coefficient from const.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor In the real system, the ZC-Cmt angle is a little bit greater than the theoretical calculation. This is due to the response time of the hardware back-EMF zero crossing sensing. Therefore, the default software setting is COEF_HLFCMT = 0.375 Freescale Semiconductor, Inc... Normally, COEF_HLFCMT should only be changed if you need a different commutation angle (time from back-EMF zero crossing to commutation).
Freescale Semiconductor, Inc. User Guide Running state, or has a low start-up torque, DO decrease or increase the PER_CMT_START_US value. Table 6-2 shows typical setting examples. Must be: PER_CMT_START_US<=PER_CMT_MAX_US/2 Freescale Semiconductor, Inc... NOTE: Setting this constant is an empirical process.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor START_INCR_OOUTREG should not necessarily be changed for a motor accommodation. It can be set experimentally. If the motor has a low torque, increase the value. If the motor starts with a high speed, then slows down by regulator, decrease the value. NOTE: START_INCR_OOUTREG can be evaluated with PC master software tuning file tuning_bldc.pmp.
Freescale Semiconductor, Inc. User Guide #define SPEED_PIREG_I_GAIN 0 8. in const_cust_x.h file 9. Build and run the code (see Software Execution, Build, and Execute from Evaluation Board) 10. Start the PC master software tuning project Freescale Semiconductor, Inc... 11. Select Start Parameters Tuning subproject (see Software Parameters Tuning with PC Master Software Project File) in order to be able to modify the start parameters 12.
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... User Guide Tuning for Customer Motor Click here for Start Parameters Tuning click here to display control page click here to display oscilloscope modify values here Figure 6-13. PC Master Software Start Parameters Tuning Window 13. Set PC master software control mode (see Application Control and PC Master Software (Remote) Operating Mode) 14. Start motor (see Application Control and PC Master Software (Remote) Operating Mode) 15.
Freescale Semiconductor, Inc. User Guide it is recommended to change START_INCR_OOUTREG by PC master software. (If it is a problem to start the motor, then I_CNTR_FOK can also be changed from default 0x03, but not recommended!) 17. If the motor starts and continues running, after you repeatedly start/stop, the start-up parameters are set properly Freescale Semiconductor, Inc... 18. Open const_cust_x.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor COMMUT_REV period must be changed for any motor accommodation. Set the number of commutations according to the number of rotor poles (there are six commutations for one electrical angle revolution). Therefore: poles COMMUT_REV = 6*motor -----------------------2 (EQ 6-9.) Maximal speed range [rpm]: Freescale Semiconductor, Inc... /* MUST_CHANGE_10: */ #define SPEED_RANGE_MAX_RPM 3000.
Freescale Semiconductor, Inc. User Guide SPEED_MIN_RPM determines the minimal desired speed. It must be changed for any motor accommodation. The minimal speed is also determined by the back-EMF zero crossing technique. Usually: SPEED_MIN_RPM = (0.07 to 0.5)SPEED_MAX_RPM (EQ 6-11.) Therefore, for low speed requirements minimal speed SPEED_MIN_RPM must be evaluated experimentally. Freescale Semiconductor, Inc... NOTE: SPEED_MIN_RPM can be evaluated with PC master software tuning file tuning_bldc.pmp.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor Range: <0,255> where the current regulator integral gain is: KI = SPEED_PIREG_I_GAIN*2 ( – SPEED_PIREG_I_GAINSCALERIGHT ) (EQ 6-13.) Freescale Semiconductor, Inc... These constants can be calculated according to regulators theory. The speed sampling (regulator execution) period is PER_T3_RUN_US = 2.560 ms at default software setting. Another recommended solution is experimental setting.
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... User Guide click here to display control page Click here for Speed Parameters Tuning click here to display oscilloscope modify values here Figure 6-14. PC Master Software Speed Parameters Tuning Window 5. Build and run the code (see Software Execution, Build, and Execute from Evaluation Board) 6. Start the PC master software tuning project 7.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor 9. Set PC master software control mode and start motor (see Application Control and PC Master Software (Remote) Operating Mode) 10. Set the speed to the middle of minimal and maximal speed 11. Increase, step by step, the proportional gain SPEED_PIREG_P_GAIN with PC master software, until speed noise or oscillation appears, or up to 128 Freescale Semiconductor, Inc... 12.
Freescale Semiconductor, Inc. User Guide 22. Set minimal speed 23. Set maximal speed and observe the speed transient 24. Set minimal speed and observe the speed transient 25. Then, modify the regulator parameters with PC master software as in steps 11. to 14. 26. Change SPEED_MIN_RPM if problems occur at low speed Freescale Semiconductor, Inc... 27. Repeat steps 21. to 25. until regulation is improved 28. Open const_cust_x.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor Range: <1,255> The final PWM period is defined by setting SET_PER_PWM. The PWM period [µs] is: PWM period = PERIOD_PWM_US = SET_PER_PWM*2 (EQ 6-14.) With default software setting (oscillator clock, etc.). Freescale Semiconductor, Inc... The final PWM frequency [Hz] is: 6 10 PWMfrequency = ------------------------------------------------2SET_PER_PWM (EQ 6-15.) With default software setting.
Freescale Semiconductor, Inc. User Guide For current sampling period setting follow the label CAN_CHANGE_PERCURSAMP_n in const.h file. Current sampling period setting is provided by: /* CAN_CHANGE_FPWM_n: */ /* CAN_CHANGE_PERCURSAMP_n: */ #define SET_PER_CS 2.0 Range: <1,-> Freescale Semiconductor, Inc... The final current sampling period [µs] is: Current sampling period = PWM period*SET_PER_CS (EQ 6-16.
Freescale Semiconductor, Inc. User Guide Tuning for Customer Motor Freescale Semiconductor, Inc... software may not be suitable for some applications. Some important recommendations can also be found under the Caution and Note labels in this designer reference manual. DRM028 — Rev 0 MOTOROLA Designer Reference Manual User Guide For More Information On This Product, Go to: www.freescale.
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... User Guide Designer Reference Manual 160 DRM028 — Rev 0 User Guide For More Information On This Product, Go to: www.freescale.
Freescale Semiconductor, Inc. Designer Reference Manual — Sensorless BLDC Motor Control Appendix A. References Freescale Semiconductor, Inc... 1. Sensorless BLDC Motor Control on MC68HC908MR32 - Software Porting to Customer Motor (document order number AN2356/D), Motorola 2002 2. Motion Control Development Tools found on the World Wide Web at: http://e-www.motorola.com 3. Motorola Embedded Motion Control MC68HC908MR32 Control Board User’s Manual, (document order number MEMCMR32CBUM/D), Motorola 2000 4.
Freescale Semiconductor, Inc. References Freescale Semiconductor, Inc... Motor using MC68HC(7)05MC4 (document order number AN1627), Motorola Designer Reference Manual 162 DRM028 — Rev 0 References For More Information On This Product, Go to: www.freescale.
Freescale Semiconductor, Inc. Designer Reference Manual — Sensorless BLDC Motor Control Appendix B. Glossary AC — Alternative Current. Freescale Semiconductor, Inc... ACIM — AC Induction Motor. A/D converter— analog to digital converter. ADC — analog to digital converter - see “A/D converter” back-EMF — back Electro-Motive Force (in this document it means the voltage inducted into motor winding due to rotor movement) BLDC — Brushless DC motor.
Freescale Semiconductor, Inc. Glossary ECMTREVAL — Evaluation Motor Board Kit (supplied in kit with trapezoidal BLDC IB23810) ECOPTHIVACBLDC — 3-ph AC/BLDC High Voltage Power Stage + Optoisolation Board ECMTRHIVBLDC — 3-ph BLDC High Voltage Motor-Brake SM40V + SG40N Freescale Semiconductor, Inc...
Freescale Semiconductor, Inc. Glossary PCM — PC master software for communication between PC computer and system phase-locked loop (PLL) — A clock generator circuit in which a voltage controlled oscillator produces an oscillation which is synchronized to a reference signal. PMP — PC master software project file Freescale Semiconductor, Inc... PVAL — PWM value register of motor control PWM module of MC68HC908MR32 microcontroller. It defines the duty cycle of generated PWM signal.
Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Glossary Designer Reference Manual 166 DRM028 — Rev 0 Glossary For More Information On This Product, Go to: www.freescale.
Freescale Semiconductor, Inc... Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.
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 Freescale Semiconductor, Inc... ASIA/PACIFIC: Motorola Semiconductors H.K. Ltd.; Silicon Harbour Centre, 2 Dai King Street, Tai Po Industrial Estate, Tai Po, N.T.