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

Similar documents
Electric Bike BLDC Hub Motor Control Using the Z8FMC1600 MCU

Using Z8 Encore! XP MCU for RMS Calculation

Generating DTMF Tones Using Z8 Encore! MCU

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU

DTMF Signal Detection Using Z8 Encore! XP F64xx Series MCUs

Vector Control of a 3-Phase PMSM Using the ZNEO Z16FMC MCU

Using the Z8 Encore! XP Timer

Motor Control using NXP s LPC2900

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

RX23T inverter ref. kit

Zilog Motor Control Technologies

CHAPTER 4 FUZZY BASED DYNAMIC PWM CONTROL

CHAPTER-5 DESIGN OF DIRECT TORQUE CONTROLLED INDUCTION MOTOR DRIVE

Technique for Measuring System Temperature Using the On-chip Temperature Sensor of the Z8 Encore! XP

Implementation of Brushless DC motor speed control on STM32F407 Cortex M4

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

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

Crystal Oscillator/Resonator Guidelines for ez80 and ez80acclaim! Devices

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

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

Lab Exercise 9: Stepper and Servo Motors

AVR443: Sensor-based control of three phase Brushless DC motor. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

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

AVR443: Sensorbased control of three phase Brushless DC motor. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

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

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

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

A Unipolar Stepper Motor Drive Using the Z8 Encore! MCU

VORAGO Timer (TIM) subsystem application note

Sensorless Brushless DC Motor Control with the Z8FMC16100 MCU

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

Design of A Closed Loop Speed Control For BLDC Motor

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

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

Motor Control Development Kit

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

CHAPTER 4 CONTROL ALGORITHM FOR PROPOSED H-BRIDGE MULTILEVEL INVERTER

Firmware plugin for STSW-ESC001V1 board with ST Motor Control FOC SDK

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

Nicolò Antonante Kristian Bergaplass Mumba Collins

CHAPTER 2 STATE SPACE MODEL OF BLDC MOTOR

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

System Board 6219 MAXREFDES89#: MAX14871 Full-Bridge DC Motor Driver MBED Shield

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

Space Vector Modulation of a 3- Phase BLDC Motor with the Z8FMC16100 MCU

Free Programmable Signal Processing inside a High Performance Servo Amplifier

Application Information

CHAPTER 6 CURRENT REGULATED PWM SCHEME BASED FOUR- SWITCH THREE-PHASE BRUSHLESS DC MOTOR DRIVE

CHAPTER-III MODELING AND IMPLEMENTATION OF PMBLDC MOTOR DRIVE

EE152 Final Project Report

Vector CONTROLLERS for BLDC Motors. State of Art Technology Most Reliable - High Efficiency Smooth control - Programmable

Speed control of sensorless BLDC motor with two side chopping PWM

crio Resolver Simulation crio RVDT Simulation Manual V3.0

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

Design of Joint Controller Circuit for PA10 Robot Arm

Brushed DC Motor Microcontroller PWM Speed Control with Optical Encoder and H-Bridge

CHAPTER 6 THREE-LEVEL INVERTER WITH LC FILTER

AN Sensorless single-shunt FOC on LPC2900. Document information. LPC2900, FOC, SVPWM, SMC, current observer, PMSM, single shunt DC-link

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

IRT Mini Evo. Technical Manual. quality IN MOTION. quality IN MOTION

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

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

ADVANCED ROTOR POSITION DETECTION TECHNIQUE FOR SENSORLESS BLDC MOTOR CONTROL

ML4818 Phase Modulation/Soft Switching Controller

Overview of the STM32F103xx ACIM and PMSM motor control software libraries release 2.0

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

CHAPTER 3 SINGLE SOURCE MULTILEVEL INVERTER

Temperature Monitoring and Fan Control with Platform Manager 2

Brushless DC Motor Drive using Modified Converter with Minimum Current Algorithm

AP08022 C504 / C508. Generating sinusoidal 3-Phase- Currents for Induction Maschines with a time-optimezed algorithm for the Capture Compare Unit

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013

3-in-1 Air Condition Solution

Temperature Monitoring and Fan Control with Platform Manager 2

Sensorless Vector Control with RL78G14

Using CME 2 with AccelNet

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

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

AN2170. AN2170 PSoC 1 - Sensored BLDC Motor Control using Hall Effect Sensors. Application Note Abstract. Introduction

This Application Note demonstrates how to use a PSoC to control a 3-phase Brushless Direct Current (BLDC) motor utilizing Hall-effect sensors.

Performance Evaluation of a Newly Constructed Three Phase Flexible Inverter for Speed Control of a Brushless Dc Motor

Project Final Report: Directional Remote Control

2013 Texas Instruments Motor Control Training Series. -V th. InstaSPIN Training

Sensorless PMSM Control on MKV46F256 Using Kinetis SDK

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

MSK4310 Demonstration

Sensorless Vector Control and Implementation: Why and How

TIDA Brushless DC Propeller Controller Reference Design

Automated PMSM Parameter Identification

Step vs. Servo Selecting the Best

CHAPTER 6 IMPLEMENTATION OF FPGA BASED CASCADED MULTILEVEL INVERTER

Application Note. Brushless DC Motor Control AN-1114

ISSN Vol.05,Issue.01, January-2017, Pages:

Digital PWM Techniques and Commutation for Brushless DC Motor Control Applications: Review

Electronic Speed Controls and RC Motors

Safety Mechanism Implementation for Motor Applications in Automotive Microcontroller

PMSM Control Using a Three-Phase, Six-Step 120 Modulation Inverter

Pulse-Width-Modulation Motor Speed Control with a PIC (modified from lab text by Alciatore)

Designing With Motion Handbook

Using the HCS08 TPM Module In Motor Control Applications

APPLICATION NOTE. MCRP03: Brushless DC Motor Control Reference Platform using Hall sensors

Transcription:

MultiMotor Series BLDC Motor Control on Z8FMC16 Series MCUs Using Sensored Sinusoidal PWM Modulation AN036102-0114 Abstract This application note discusses the control of a 3-phase brushless BLDC motor in Sinusoidal PWM Modulation mode using Zilog s Z8FMC16 Series of microcontrollers. This Z8FMC16 Series is designed specifically for motor control applications, featuring an onchip integrated array of application-specific analog and digital modules. The result is fast and precise fault control, high system efficiency and on-the-fly speed/torque control, and ease of firmware development for customized applications. This document further discusses ways in which to implement sinusoidal PWM modulation and phase-angle synchronization with Hall sensor feedback. The results are based on using a modified version of the Z8FMC16 Series Modular Development System (MDS) Module, a 3-phase motor control (MC) application board, and a 3-phase 24 VDC, 30 W, 3200 RPM BLDC motor with internal Hall sensors. Note: The source code file associated with this application note, AN0361-SC01.zip, is available free for download from the Zilog website. This source code has been tested with version 5.0.0 of ZDS II for Z8 Encore! MCUs. Subsequent releases of ZDS II may require you to modify the code supplied with this application note. Features This application offers the following power-saving features: Smooth motor start-up with reduced starting current Sinusoidal PWM modulation feedback from three Hall sensors Microcontroller-based overcurrent protection Adjustable speed and current (frequency and sine magnitude) Selectable control of motor direction UART interface for PC control LED to indicate motor operation LED to indicate UART control LED to indicate a fault condition AN036102-0114 Page 1 of 19

Figure 1 shows a block diagram of the Z8FMC16 Series MCU architecture. 3 Analog Supply and Reference Digital Supply 2 UART with LIN and IrDA Interrupt Control I 2 C Master/Slave Reset Control 1 8 Port A SPI Watch-Dog Timer Comparator RC Oscillator Operational Amplifier Internal Precision Oscillator Fault Shutdown Oscillator Control Internal/External 2 8-Channel Multiplexer 8 Port B Sample and Hold ez8 20 MHz CPU A/D Converter Debugger 1 1 Port C 16-Bit Counter/ Timer/PWM Register File (RAM) 512B x 8 6 12-Bit PWM Module for Motor Control Flash Program Memory Up to 16K x 8 Figure 1. The Z8FMC16 Series MCU Architecture AN036102-0114 Page 2 of 19

Discussion The Z8FMC16 Series Flash microcontrollers upon which this Sinusoidal PWM driver has been conceived are based on Zilog s advanced 8-bit Z8 Encore! CPU core. The Z8FMC1600 MCU, which is based on this core, sets the standard for performance and efficiency with a 20 MHz external clock that operates at a minimum of two clock cycles per instruction. Up to 16 KB internal Flash memory is accessible by the CPU to improve processor throughput. Up to 512 bytes of internal RAM provides storage of data, variables and stack operations. PWM sinusoidal operation has certain advantages over block-commutated PMSM motor driving approaches, most notably its lower electrical and lower acoustical noise signatures. By comparison, the block commutation method causes harsh current transitions through the PMSM motor coils, essentially turning the phase windings of the motor on and off between commutations. The PWM sinusoidal method does not create these harsh current transitions through the motor coils, because the current and phase voltages are sinusoidal in nature. Motors operating via the sinusoidal PWM method, however, typically run at a higher efficiency than block-commutated motors. Because of the advantages of a PWM sinusoidal driver scheme s attributes, PWM sinusoidal operation can be a better option for certain applications in which the life of ripple capacitors, ball bearings, and electrical noise are concerns. Sinusoidal PWM driving schemes can be used to drive either PMSM- or BLDC-type motors, however, to take advantage of a sinusoidal driving scheme, a PMSM-type motor is likely to demonstrate the best results due to its sinusoidal wound-phase wiring. This application implements a third harmonic injected sine wave which utilizes approximately fifteen percent more of the available bus voltage. Therefore, the third harmonic injected sine wave modulation approach has the same bus voltage utilization as the space vector modulation approach. In each of the Z8FMC16 Series products, the novel Z8 Encore! device architecture allows for the realization of the following enhanced control features. Each is described in the following sections. Time stamp for speed control Integrated operational amplifier Multichannel PWM timer Time Stamp for Speed Control The capture feature of the 16-bit timers can be used to take a time stamp of the Hall sensor s electrical timing periods. Upon a predefined Hall state, the asynchronously operating timer is read and its value is compared against a calculated speed reference value using PI closed loop control. AN036102-0114 Page 3 of 19

Integrated Operational Amplifier Appliance controllers almost invariably monitor motor speed by sensing current through the motor windings using sensor and sensorless techniques in conjunction with the ADC. Ordinarily, sampling instances by the ADC are synchronized by the MCU. With this process, an external operational amplifier is often used to convert the current signal to a voltage signal; the ADC next samples the voltage signal and outputs the result to the processor. The processor then synthesizes the PWM outputs to control motor speed. In the case of the Z8FMC16 Series of microcontrollers, an on-chip integrated operational amplifier eliminates the requirement for an external component, thereby reducing overall system cost. Multichannel PWM Timer Each Z8FMC16 Series MCU features a flexible PWM module with three complementary pairs or six independent PWM outputs supporting deadband operation and fault protection trip input. These features provide multiphase control capability for a variety of motor types and ensure safe operation of the motor by providing immediate shutdown of the PWM pins during a fault condition. Theory of Operation In a brushless DC motor, the rotor is comprised of permanent magnets, while the stator windings are similar to those in polyphase motors. Generally, there are two methods for determining motor position and speed, sensored control and sensorless control. In sensor-based control applications, the Hall elements are integrated into the motor and used to detect the position of the rotor for drive and sine wave synchronization. In contrast, sensorless control employs the detection of back-emf (BEMF) signals, which are generated (induced) by specific phase windings to synchronize the timing of a control loop. An inverter bridge is used to drive the PWM sine generated currents through the BLDC motor windings, as shown in Figure 2. AN036102-0114 Page 4 of 19

Figure 2. 3-Phase BLDC Motor Control System The algorithm for Hall sensing is based on an implementation using three I/O ports which are configured for an interrupt on edge change of the Hall sensor s signals. One of the advantages of using Hall sensors is that the angular position of the motor is known upon startup of the motor, therefore minimizing erratic start-up functionality and the requirement for a start-up ramp until BEMF zero crossings are detected. The PWM duty cycle presents at the motor windings then produces the torque to start the motor. The rotating motor generates the Hall signals that vector into a single I/O service interrupt routine, which determines the next commutation state. Another advantage using Hall sensors as opposed to BEMF sensing is that under sudden and strong load increase, the information of the commutation angle is not in jeopardy of becoming lost. In sensorless feedbacks, an extreme load increase can cause an inductive spike which results from the stored magnetic energy of the previously turned off phase to become wide enough to suppress the BEMF information. As a result, the commutation angle information can be lost and could cause the motor to stall. The Hall sensor s angular position provides the information to energize all three phase voltages at the correct commutation angle. As opposed to trapezoidal or block commutation, in which two of the three phases are energized for each commutation step, the sinusoidal commutation requires all three phases to be energized for each commutation step, as shown in Figure 2. To save computation time, the firmware implements a look up table in which the sine values are stored. The PWM-timer-interrupt-service-routine interrupts every 50 µs and is used to fetch the sine values from the sine table and update the PWM sine frequency for Phase A, Phase B, and Phase C. This method provides very regular time intervals to update the sine frequency and scaling of the sine magnitude for all three phases. Right before exiting AN036102-0114 Page 5 of 19

the PWM timer interrupt service routine, these three PWM channels are updated with the new PWM modulation values. For this application, a PWM timer frequency of 20 khz was chosen to minimize linear switching power losses in the MOSFETs, and to be out of the audible noise range. PWM Frequency Calculations Using every value in the 256 sine array, the frequency is: 1 1 = (PWM period 256) 50 µs 256 = 78.125 Hz If every second sine value is used instead, then the frequency is effectively doubled and becomes: 1 + n 2 = (PWM period 256) 50 µs 256 = 156.25 Hz In the second PWM frequency calculation equation, the numerator represents the 1 + nth number of an offset to the array elements; the larger the numerator, the higher the sine frequency. A better way of obtaining a wider sine frequency range and resolution of the sine wave is to use a 16-bit integer-type sine index of which only the upper byte is used to fetch the next PWM sine value from the look-up table. Depending on the frequency demand, the values of the upper byte can change with higher granularity, hitting each sine array value more or less times while the sine index continuously rolls over. Using this method, the lowest period using a 16-bit pointer to a 256-element sine table is: 65535 50 µs = 3.277 seconds Assuming the sine frequency is 60 Hz, the offset value for the sine table pointer is: SineIndexOffset = 60 65536 196 20000 The resolution of the generated sine wave is a function of the sine frequency. Sine and Hall Commutation and Frequency Adjustment Hall sensor interrupts are generated six times once every sixty degrees therefore providing data about the rotor position which is used to synchronize the sine wave commutation angle and frequency with the Hall commutation angle and frequency. Figure 2 on page 5 illustrates the generation of three 120-degree shifted sine waves based on values from a look-up table (LUT) which are then reconstructed in the PWM interrupt service routine. AN036102-0114 Page 6 of 19

Speed Calculations The angular period times of the rotor are captured every one-sixth of an electrical commutation, wherein Timer0 represents the number of timer ticks. These timer ticks are then compared against the demand speed coming from a potentiometer also represented in timer ticks and processed in a PI closed loop to adjust the look-up table values to change the frequency of the motor. If the motor is operated with open-loop speed control, then the speed demand coming from a potentiometer is used to directly generate the look-up table (LUT) values to change the motor frequency. The angular speed calculation is: d = ----- dt In this equation, dɵ is the angular displacement, and dt is the delta time taken for the angular displacement. The position information is provided by the Hall sensor binary state, and the time between angular positions is measured by Timer0 timer ticks. The frequency of a sinusoidal operated motor is calculated using the following equation: F(rotor) = RPM * p 120 The rotor frequency becomes: F(rotor) = p/2 Measured ticks * timer resolution * commutation steps * 60 RPM = (120*f) / N In the above equation, N is the number of pole pairs and f is the frequency. Figure 3 illustrates how these calculations can influence PWM sine operation of a 3-phase BLDC motor. AN036102-0114 Page 7 of 19

ThetaSine ThetaHall PhaseA = m * sin(θ) * 50% + 50% Sine frequency and magnitude scaling π PhaseB = m * sin θ * 50% + 50% 3 π PhaseC = m * sin θ + * 50% + 50% 3 BLDC/PMAC MOTOR FreqSine FreqHall Figure 3. Simplified PWM Sine Operation of a BLDC Motor The hardware used to realize the sinusoidal PWM motor driver approach discussed in this section is shown in the block diagram in Figure 4. AN036102-0114 Page 8 of 19

Figure 4. 3-Phase BLDC Motor Control System Overcurrent Protection Currents can reach excessive amounts during startup, load changes, or catastrophic failures, for which a motor and electronics must be protected. A key feature of the Z8FMC16 Series MCU is the direct coupling of the on-chip integrated comparator to the PWM module to enable a fast, cycle-by-cycle shutdown during an overcurrent event. Oscilloscopegenerated waveforms representing this sequence of events are shown in Figure 5. AN036102-0114 Page 9 of 19

Figure 5. Cycle-by-Cycle Shutdown Note: To see additional schematic diagrams that may apply to this application, refer to the Sensorless Brushless DC Motor Control with Z8 Encore! MC Microcontrollers Application Note (AN0226). AN036102-0114 Page 10 of 19

Testing This section describes how to run the code and demonstrate this sensored brushless DC motor application including its setup, implementation and configuration, and the results of testing. Equipment Used The tools and firmware that are used to operate this BLDC Motor Control application are listed below. Z8FMC16 Series Motor Control Development Kit (Z8FMC160100KITG) Optoisolated USB SmartCable ZDS II Z8 Encore! version 5.0.0 PWM sine driver firmware (AN0361-SC01.zip) 24 V power supply 30 W Linix BLDC motor Optional equipment: Digital oscilloscope or logic analyzer Tektronix A6302 current clamp 3.8 V/K RPM Class-F Permanent Magnet Synchronous Motor (PMSM) motor Hardware Setup The BLDC Motor Control application code developed for this application was tested with a modified version of the 3-phase demo control module contained in the Z8FMC16 Series Motor Control Development Kit. Figure 6 shows the application hardware connections. AN036102-0114 Page 11 of 19

Figure 6. Demo Control Module with a Linix 30W BLDC Motor Testing Procedure Observe the procedures in the next two sections to test/demonstrate the BLDC Motor Control on the Z8FMC16 Series MCU using Sensored Sinusoidal PWM Modulation. Connect the Motor to the Demo Control Module The MDS Module s prototype area can be used to simplify circuit modifications. To build, configure, and test the hardware and firmware for this application, complete the following modifications. Refer to Figure 7 on page 13 and/or to the schematic diagram in the Sensor- AN036102-0114 Page 12 of 19

less Brushless DC Motor Control with Z8 Encore! MC Microcontrollers (AN0226) for assistance. 1. Connect the black Hall sensor supply wire to Ground (TP1). 2. Connect the red Hall sensor supply wire to V CC (TP2). 3. Connect the white Hall sensor wire to PB0 (J1, pin 2). 4. Connect the green Hall sensor wire to PB1 (J1, pin 4). 5. Connect the blue Hall sensor wire to PB2 (J1, pin 6). 6. Place jumpers J4, J5, and J6 in positions 1-2 to allow proper Hall sensor signal routing from the motor through header J1 to the Z8FMC MCU. 7. Add a 680 pf capacitor between each Hall sensor input and ground. 8. Connect the white motor phase wire to P1-A. 9. Connect the blue motor phase wire to P2-B. 10. Connect the green motor phase wire to P3-C. Figure 7. Motor Connections Note: The 20 gauge motor phase wires are slightly wider in diameter than the 22 gauge Hall sensor wires. AN036102-0114 Page 13 of 19

Downloading and Running the Firmware 1. Download the AN0361-SC01.zip source code file from the Zilog website and unzip it to a convenient directory on your PC s hard drive. 2. Connect the optoisolated USB SmartCable to the PC and to the Demo Control Module to P3 with the ribbon cable. 3. Launch ZDS II for Z8 Encore! and open the project file that is contained in the AN0361-SC01 folder that you downloaded to your hard drive in Step 1. 4. Compile and run the code on ZDS II. 5. Open a terminal emulation console such as HyperTerminal or Tera Term and configure it to the following settings: 57600 baud rate 8 data bits no parity 1 stop bit No flow control 6. Connect the current probe clamp to one of the three motor phase wires to view the sine current. 7. Connect an oscilloscope probe between R9 and R10 on the Demo Control Module to view the sine voltage. 8. From the ZDS II toolbar, click the Go button in to start the motor. 9. Control the speed of the BLDC motor with the potentiometer located on the Demo Control Module. Results Linix BLDC-type and Teknik/Hudson PMSM-type motors were tested to compare their corresponding voltage and current waveforms. During operation of the BLDC motor, three oscilloscope probes were connected to the BEMF voltage dividers, and one oscilloscope channel was used to monitor one out of three current wave forms with a current probe. The scope channel was set to AC so that the positive and negative half of the sine wave modulate with respect to the midpoint. These three voltages and one current waveform are shown for the BLDC and PMSM motors in Figures 8 and 9, respectively. A characteristic of the third harmonic sine wave is the saddle shape on the top and bottom of the wave. AN036102-0114 Page 14 of 19

Figure 8. Linix BLDC Motor Phase Voltages and One Current Waveform AN036102-0114 Page 15 of 19

Figure 9. Hudson-Teknic PMSM Motor Phase Voltages and One Current Waveform Speed Control Performance in a Closed Loop To monitor performance of the speed control function while operating in a closed loop, the motor speed was set to 2000 RPM at a nominal operating voltage of 24 V. As this operating voltage was increased and decreased by plus and minus 4 V, motor speed was observed to remain constant. To test the PI loop under load, the motor load was increased, which caused the PI to quickly ramp up the current to maintain the set speed. PI loop stability was verified by observing the voltage sine wave while loading the running motor, a condition for which the sine wave period time must be maintained constant in both amplitude and frequency. Speed Control Performance in an Open Loop To monitor performance of the speed control function while operating in an open loop, the motor speed was set to 2000 RPM at a nominal operating voltage of 24V. As this operating voltage was increased and decreased by plus and minus 4 V, motor speed was observed to AN036102-0114 Page 16 of 19

Summary References vary. The motor load was then increased, which caused the motor current to be increased while its speed slightly dropped. The purpose of this application was to demonstrate the operation of a BLDC or PMSM type machine using the sinusoidal PWM technique with the Z8FMC16 Series MCU. To generate sinusoidal voltages and currents 120 degrees apart for a BLDC machine, a sine Look Up Table (LUT) was implemented to reconstruct the three sine waves and formulas have been shown to calculate the motor frequency. Because the frequency calculations include the PWM period, all sinusoidal wave constructions are executed in the PWM interrupt service routine. The execution time for the sine wave reconstruction in the PWM service interrupt routine takes 20 µs. The execution time of the Hall interrupt service routine takes 30 µs. Both execution times are based on a 20 MHz external clock. To maintain synchronization and commutation angle between the sine frequency and hall frequency, the Hall interrupt service routine captures the binary Hall state upon each interrupt and fetches the corresponding reference angle from a Look Up Table (LUT). The high byte of the PWM sine Look Up Table index is used to fetch the next value from the Sine Look Up Table (LUT). Larger or smaller offsets to this high byte can increase or decrease the frequency of the sine wave. Sinusoidal PWM operation has the advantage of commutating the BLDC or PMSM with less acoustical and electrical noise, because the sine current through the windings has no steep current transitions due to its sinusoidal currents. This allows for higher life expectancy of ripple current capacitor and ball bearings because the sinusoidal commutation approach causes virtually no torque or current ripple in a PMSM or BLDC type motor. In addition to electrical and acoustical noise reduction, the PWM sine approach also increases the efficiency in a BLDC-/PMSM-type motor. The bus utilization can be further increased if a third harmonic is injected into the PWM sine wave, which can utilize about 15% more of the bus voltage. Documents that support this application are listed below, in addition to external document references. Zilog documentation can be obtained from the Zilog website by clicking the link associated with its document number where indicated. Z8FMC16 Series Motor Control Product Specification (PS0246) Z8FMC16 Series Motor Control Development Kit Quick Start Guide (QS0054) Z8FMC16 Series Motor Control Development Kit User Manual (UM0192) Sensorless Brushless DC Motor Control with Z8 Encore! MC Microcontrollers Application Note (AN0226) Electric Bike BLDC Hub Motor Control Using the Z8FMC1600 MCU (AN0260) Motor Control Electronics Handbook, Richard Valentine; McGraw Hill. AN036102-0114 Page 17 of 19

Appendix A. Flow Charts Figure 10 presents an algorithm by which a 3-phase BLDC motor can be controlled using the Z8FMC MCU. Refer to the Sensorless Brushless DC Motor Control with Z8 Encore! MC Microcontrollers (AN0226) for related schematics. Figure 10. Simplified Control Algorithm AN036102-0114 Page 18 of 19

Customer Support To share comments, get your technical questions answered, or report issues you may be experiencing with our products, please visit Zilog s Technical Support page at http://support.zilog.com. To learn more about this product, find additional documentation, or to discover other facets about Zilog product offerings, please visit the Zilog Knowledge Base at http:// zilog.com/kb or consider participating in the Zilog Forum at http://zilog.com/forum. This publication is subject to replacement by a later edition. To determine whether a later edition exists, please visit the Zilog website at http://www.zilog.com. Warning: DO NOT USE THIS PRODUCT IN LIFE SUPPORT SYSTEMS. LIFE SUPPORT POLICY ZILOG S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS PRIOR WRITTEN APPROVAL OF THE PRESIDENT AND GENERAL COUNSEL OF ZILOG CORPORATION. As used herein Life support devices or systems are devices which (a) are intended for surgical implant into the body, or (b) support or sustain life and whose failure to perform when properly used in accordance with instructions for use provided in the labeling can be reasonably expected to result in a significant injury to the user. A critical component is any component in a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system or to affect its safety or effectiveness. Document Disclaimer 2014 Zilog, Inc. All rights reserved. Information in this publication concerning the devices, applications, or technology described is intended to suggest possible uses and may be superseded. ZILOG, INC. DOES NOT ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACY OF THE INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED IN THIS DOCUMENT. ZILOG ALSO DOES NOT ASSUME LIABILITY FOR INTELLECTUAL PROPERTY INFRINGEMENT RELATED IN ANY MANNER TO USE OF INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED HEREIN OR OTHERWISE. The information contained within this document has been verified according to the general principles of electrical and mechanical engineering. ZNEO and Z8 Encore! are trademarks or registered trademarks of Zilog, Inc. All other product or service names are the property of their respective owners. AN036102-0114 Page 19 of 19