Top Banner
AN036702-1115 Page 1 of 22 Abstract This application note discusses the control of a 3-phase brushless BLDC motor in Sinusoidal PWM Modulation mode using Zilog’s Z8FMC16100 Series of microcontrollers (MCUs). Zilog’s Z8FMC16100 Series of microcontrollers is designed specifically for motor control applications and, with this MultiMotor Series, features an on-chip integrated array of applica- tion-specific analog and digital modules using the MultiMotor Development Kit. The result is fast and precise fault control, high system efficiency and on-the-fly speed/torque control, as well as 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 MultiMotor MCU Module equiped with a Z8FMC16100 MCU, a 3-phase Mul- tiMotor Development Board, and a 3-phase, 24VDC, 30W, 3200RPM BLDC motor with internal hall sensors. The source code file associated with this application note, AN03 67- 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 The power-saving features of this Z8FMC16100 application code include: Smooth motor start-up with reduced starting current 3-Hall sensor feedback sinusoidal PWM modulation Microcontroller-based overcurrent protection Adjustable speed and current (frequency and sine magnitude) in open and closed loops Selectable control of motor direction UART interface for PC control LED to indicate a fault condition Figure 1 shows a block diagram of the Z8FMC16100 MCU architecture. Note: Application Note AN036702-1115 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU MultiMotor Series MultiMotor Series
22

Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

Mar 31, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

AN036702-1115MultiMotor

SeriesMultiMotor

Series

Abstract

This application note discusses the control of a 3-phase brushless BLDC motor in Sinusoidal PWM Modulation mode using Zilog’s Z8FMC16100 Series of microcontrollers (MCUs). Zilog’s Z8FMC16100 Series of microcontrollers is designed specifically for motor control applications and, with this MultiMotor Series, features an on-chip integrated array of applica-tion-specific analog and digital modules using the MultiMotor Development Kit. The result is fast and precise fault control, high system efficiency and on-the-fly speed/torque control, as well as 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 MultiMotor MCU Module equiped with a Z8FMC16100 MCU, a 3-phase Mul-tiMotor Development Board, and a 3-phase, 24VDC, 30W, 3200RPM BLDC motor with internal hall sensors.

The source code file associated with this application note, AN0367-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

The power-saving features of this Z8FMC16100 application code include:

• Smooth motor start-up with reduced starting current

• 3-Hall sensor feedback sinusoidal PWM modulation

• Microcontroller-based overcurrent protection

• Adjustable speed and current (frequency and sine magnitude) in open and closed loops

• Selectable control of motor direction

• UART interface for PC control

• LED to indicate a fault condition

Figure 1 shows a block diagram of the Z8FMC16100 MCU architecture.

Note:

AN036702-1115

Application Note

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

Page 1 of 22

Page 2: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

Discussion

The Z8FMC16100 Series Flash microcontrollers upon which this sinusoidal PWM driver has been conceived are based on Zilog’s advanced 8-bit eZ8 CPU core, which features a 20 MHz external clock with a minimum of two clock cycles per instruction.

Figure 1. The Z8FMC16100 MCU Architecture

Analog Supplyand Reference

UART with LINand IrDA

I2CMaster/Slave

SPI

OperationalAmplifier

A/D Converter

16-Bit Counter/Timer/PWM

Digital Supply

Interrupt Control

Reset Control

Watchdog Timer

RC Oscillator

Internal PrecisionOscillator

Oscillator ControlInternal/External

Debugger

Register File (RAM)512 B x 8

Flash ProgramMemory

Up to 16 KB x 8

Comparator

1

2

1

23

6

8

eZ820 MHz CPU

8

1

12-Bit PWM Modulefor Motor Control

Port A

Port B

Port C

8-ChannelMultiplexer

Sample and Hold

FaultShutdown

AN036702-1115 Page 2 of 22

Page 3: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

Up to 16 KB internal Flash memory is accessible by the CPU. 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 signa-tures. 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, typi-cally run at a higher efficiency than block-commutated motors when the third harmonic-injected sine wave is implemented as described in this document.

Because of the advantages of a PWM sine driver scheme’s attributes, PWM sinusoidal operation may be a better option for certain applications in which a smoother torque and the life of ripple capacitors and ball bearings are concerns, in addition to electrical noise.

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 show the best results due to its sinusoidal wound-phase wiring.

In each of the Z8FMC16100 Series products, the novel eZ8 architecture allows for the realization of the following enhanced control features; each is described in this section.

• Time stamp for speed control

• Integrated operational amplifier

• Multichannel PWM timer

Time Stamp for Speed ControlThe Capture feature of the 16-bit timers can be used to take a time stamp of the Hall sen-sor’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.

Integrated Operational AmplifierAppliance 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 pro-cess, an external operational amplifier is often used to convert the current signal to a volt-age 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 Z8FMC16100 Series of microcontrollers, an on-chip integrated operational amplifier eliminates the requirement for an external component, thereby reducing overall system cost.

AN036702-1115 Page 3 of 22

Page 4: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

Multichannel PWM TimerEach Z8FMC16100 MCU features a flexible PWM module with three complementary pairs – or six independent PWM outputs – supporting deadband operation and fault pro-tection 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 con-trol 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.

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 behavior. The PWM duty cycle presents the voltage at the motor windings to produce the torque for the motor. The rotat-ing motor generates the Hall signals that vector into a single I/O service interrupt routine, which determines the next commutation state.

Figure 2. 3-Phase BLDC Motor Control System

AN036702-1115 Page 4 of 22

Page 5: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

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 may 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 commuta-tion, in which two of the three phases are energized for each commutation step, the sinu-soidal 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 val-ues 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 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 CalculationsUsing every value in the 256 sine array, the frequency is:

If every second sine value is used instead, then the frequency is effectively doubled and becomes:

In this second 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:

1=

1= 78.125 Hz

(PWM period × 256) 50 µs × 256

1 + n=

2= 156.25 Hz

(PWM period × 256) 50 µs × 256

AN036702-1115 Page 5 of 22

Page 6: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

The resolution of the generated sine wave is a function of the sine frequency.

Sine and Hall Commutation and Frequency AdjustmentHall sensor interrupts are generated six times – once every sixty degrees – therefore pro-viding data about the rotor position which is used to synchronize the sine wave commuta-tion angle and frequency with the Hall commutation angle and frequency. In other words, the rotor frequency and angular position are synchronized with the stator frequency and angular position. The goal of this synchronization is to maintain 90 degrees between the rotor and stator’s angular position.

Figure 2 on page 4 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.

Speed CalculationsThe angular period times of the rotor are captured every one-sixth of an electrical commu-tation, 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. In open or closed loops, the increment value for the sine fre-quency is a function of the rotor frequency.

The angular speed calculation is:

In this equation, dɸ is the angular displacement and dt is the time taken for the angular dis-placement.

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:

The rotor frequency becomes:

RPM = (120*f) / N, where N is the number of pole pairs.

SineIndexOffset =60 × 65536

≈ 19620000

F(rotor) = RPM *p

120

F(rotor) =p/2

Measured ticks * timer resolution * commutation steps * 60

AN036702-1115 Page 6 of 22

Page 7: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

Figure 3 illustrates how these calculations can influence a the PWM sine operation of a 3-phase BLDC motor. The hardware used to realize the sinusoidal PWM motor driver approach discussed above is shown in the block diagram in Figure 4.

Figure 3. Simplified PWM Sine Operation of a BLDC Motor

Figure 4. 3-Phase BLDC Motor Control System

ThetaSine ThetaHall

FreqSine FreqHall

BLDC/PMAC MOTOR

PhaseA = m * sin(θ) * 50% + 50%

PhaseB = m * sin θ – * 50% + 50%π3

PhaseC = m * sin θ + * 50% + 50%π3

Sine frequencyand magnitude

scaling

AN036702-1115 Page 7 of 22

Page 8: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

Overcurrent ProtectionCurrents can reach excessive amounts during startup, load changes, or catastrophic fail-ures, for which a motor and electronics must be protected. A key feature of the Z8FMC16100 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. Oscilloscope-generated waveforms representing this sequence of events are shown in Fig-ure 5.

Testing

This section describes how to run the code and demonstrate this sensored sinusoidal PWM application including its setup, implementation and configuration, and the results of testing.

Equipment UsedThe following equipment is used for the setup; the first four items are contained in the MultiMotor Development Kit (ZMULTIMC100ZCOG).

Figure 5. Cycle-by-Cycle Shutdown

AN036702-1115 Page 8 of 22

Page 9: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

• MultiMotor Development Board (99C1358-0001G)

• 24 V AC/DC power supply

• LINIX 3-phase 24 VDC, 30W, 3200RPM BLDC motor (45ZWN24-30)

• Opto-Isolated UART-to-USB adapter (99C1359-001G)

• Z8FMC MultiMotor MCU Module (99C1395-001G) – Order separately

• Opto-Isolated USB SmartCable (99C0968) – Order separately

• Digital Oscilloscope or Logic Analyzer

Hardware SetupFigure 6 shows the application hardware connections.

Figure 6. MultiMotor Development Kit with Z8FMC MCU Module and SmartCable

AN036702-1115 Page 9 of 22

Page 10: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

Testing ProcedureObserve the following procedure to test sensored sinusoidal PWM modulation on the Z8FMC16100 MCU Module.

1. Download ZDS II – Z8 Encore! version 5.0.0 (or newer) from the Zilog Store and install it onto your PC.

2. Download the AN0367-SC01.zip source code file from the Zilog website and unzip it to an appropriate location on your PC.

3. Connect the hardware, as shown in Figure 6.

a. Verify that the Z8FMC16100 MCU Module (99C1395) jumpers are configured properly, as follows:

• The J20 jumper is in the ON position to activate the VBUS relay on the main board

• The two J21 jumpers are in positions 3-4 and 7-8 to allow the UART to function properly

• The three J22 jumpers are in the HSx positions to allow proper sensorless motor control operation

b. The cables from the opto-isolated USB SmartCable and the UART-to-USB adapter must be connected to two of the PC’s USB ports.

c. Download and install the drivers for the SmartCable and the UART-to-USB adapter, if required. For assistance, refer to the MultiMotor Series Development Kit Quick Start Guide (QS0091).

4. Power up the MultiMotor Development Board using the 24 VDC adapter that is included in the Kit.

5. Using a serial terminal emulation program such as HyperTerminal, TeraTerm, or Real- Term, configure the serial port to 57600-8-N-1-N. A console screen should appear on the PC which will show the status of the motor and allow changes to the motor's oper-ation.

6. Launch ZDS II – Z8 Encore! and select Open Project from the File menu. Browse to the directory on your PC into which you downloaded the AN0367-SC01 source code. Locate the AN0367_SC01.zdsproj file, click to highlight it, and select Open.

7. Ensure that the RUN/STOP switch on the Z8FMC16100 MCU Module is in the STOP position.

8. In ZDS II, compile and flash the firmware to the Z8FMC16100 MCU Module by selecting Rebuild All from the Build menu. Next, select Debug → Download code, followed by Debug → Go.

9. Set the RUN/STOP switch on the Z8FMC16100 MCU Module to RUN. The motor should begin turning.

10. In the GUI terminal console, enter the letter U to switch to UART control; a menu sim-ilar to the example shown in Figure 7 should appear. As a result, commands can now be entered using the console to change the motor’s operation.

AN036702-1115 Page 10 of 22

Page 11: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

11. At the Input Command: prompt, enter the letter H to reestablish hardware control; see Figure 8.

Figure 7. GUI Terminal Showing UART Control

 

AN036702-1115 Page 11 of 22

Page 12: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

You can now add your application software to the main program to experiment with addi-tional functions.

While debugging your code, ensure that the Opto-Isolated USB SmartCable controls the reset pin of the MCU. After debugging and running your code, detach the Opto-Isolated USB SmartCable from J14 of the MultiMotor MCU Module to free the Reset pin and apply a power cycle to reset the MCU from Debug Mode.

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 Hall sensors, and a scope probe was con-nected to one of the three motor phase BEMF resistor dividers with filters to show the three 120-degree shifted Hall sensors in conjunction with one of three sine wave phase voltages. The scope channel was set to AC so that the positive and negative half of the sine wave modulates with respect to the midpoint. These three voltages and one current wave-form are shown for the BLDC and PMSM motors in Figures 9 and 10, respectively.

Figure 8. GUI Terminal Showing Hardware Control 

Note:

AN036702-1115 Page 12 of 22

Page 13: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

Figure 9. Linix BLDC Motor Phase Voltages and One Current Waveform

AN036702-1115 Page 13 of 22

Page 14: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

Speed Control Performance in a Closed LoopTo 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 operat-ing 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 condi-tion for which the sine wave period time must be maintained constant in both amplitude and frequency.

Speed Control Performance in an Open LoopTo 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

Figure 10. Hudson Teknic PMSM Motor Phase Voltages and One Current Waveform

AN036702-1115 Page 14 of 22

Page 15: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

vary. Motor load was then increased, which caused the motor current to be increased while its speed slightly dropped.

Summary

The purpose of this application was to demonstrate the operation of a BLDC or PMSM type machine using the sinusoidal PWM technique.

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 formu-las have been shown to calculate the motor frequency. Since 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 rou-tine takes 30 µs. Both execution times are based on a 20 MHz external clock.

To maintain the 90-degree relationship between the rotor and stator positions, 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). Any offset value to the high byte of the PWM sine Look Up Table index will change 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. As a result, a smoother torque and higher life expectancy can be expected for the ripple current capacitor and ball bearings because the sinusoidal commu-tation approach causes 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 by about 15 percent when a third harmonic is injected into the sine wave, as is the case in this application.

References

The following documents are each associated with the Z8FMC16100 Series of Motor Control MCUs; each is available free for download from the Zilog website.

• Z8FMC16 Series Motor Control Product Specification (PS0246)

• MultiMotor Series Development Kit Quick Start Guide (QS0091)

• MultiMotor Series Development Kit User Manual (UM0262)

• eZ8 CPU Core User Manual (UM0128)

• Zilog Developer Studio II – Z8 Encore! User Manual (UM0130)

• Three-Phase Hall Sensor BLDC Driver Using The Z8FMC16100 MCU Application Note (AN0368)

AN036702-1115 Page 15 of 22

Page 16: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

• Space Vector Modulation of a 3- Phase AC Induction Motor with the Z8FMC16100 MCU Application Note (AN0369)

• Sensorless Brushless DC Motor Control with the Z8FMC16100 MCU Application Note (AN0370)

• Motor Control Electronics Handbook, Richard Valentine; McGraw Hill, 1998

AN036702-1115 Page 16 of 22

Page 17: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

AN0367 Page 17 of 22

tion with the Z8FMC16100 MCUApplication Note

Appe

PLACE J3 - J6, J8, J9 WHERE THE ROUTING ALLOWS.

OPOUT

CPINP

PC0

ANA5

CS1-

CS1+

CS2

PWML0PWMH0

PWMH1BEMF_A

BEMF_BPWML1

ANA4PWMH2

HSBHSC

PWML2BEMF_C

HSA

PWML0A_LPWMH0A_H

B_H PWMH1BEMF_A ANA0

BEMF_B ANA1PWML1B_L

PWMH2C_HC_L PWML2

CS1+BEMF_C ANA2

CS1-

TEMPANA5

PC0

CS1+

CS1-

TEMPANA5

CPINP

OPOUT

SCK

MOSI

VCC_3v3

VCC_3v3

J61

J10

HDR/PIN 1x16

12345678910111213141516

J81

FL032P

VCC8

HOLD7

SCK6

SI5

J41

J3

1

J91

J2

DR/PIN 2x15 RA

1357911131517192123252729 30

28262422201816141210

8642

J51

02-1115

BLDC Motor Control Using Sensored Sinusoidal PWM Modula

ndix A. Schematic Diagrams

Figures 11 and 12 show the schematics for the Z8FMC MultiMotor MCU Module.

Figure 11. Z8FMC16100 MultiMotor MCU Module, #1 of 2

DBGINTERFACE

-RESET/-FAULT

IF VCC_3v3 is used remove R8and install R10 = 3.3K

VREF

FAULT0

ONVBUS CTRL

MCU

UART FLASHSELECTION

XOUT

VREF

OPINN CS1-

DBG

OPINP CS1+

CPINP

VREF

AN

A6

OPOUT

-RESET

VBUS_M

ENABLE

HSBHSC

Vbus_M ANA4ENABLE

HSA

VCC_3v3

MISO

SS-

ENABLEPB7

VCC_3v3

XIN

-RE

SE

T

AGNDAVCC

PWMH1PWML0PWMH0

OPINPCS+OPINNCS-

SENS_ASENS_BSENS_C

RX

D_M

ISO

TXD

_MO

SI

SS

-P

B7

AN

A6

AN

A5

AN

A4

OP

OU

T

GND

AVCC

AGND

VREF

CP

INP

PW

ML1

PW

MH

2P

WM

L2P

C0

DB

G

SCKMOSITXDMISORXD

BEMF_ABEMF_BBEMF_C

TXD_MOSI

RXD_MISO

SENS_C

SENS_ASENS_B

PB7

VCC_3v3

VCC_3v3

VCC_3v3

VCC_5VM

VCC_3v3RXD

TXD

DIRECTION

STOP/-RUN

R10 3.3K

R115K

13

2

J11

C24680pF

R29

470

Y1

20MHZ

J23

1

U4Z8FMCxx _32LQFP

PB2/ANA2/T0IN21PB1/ANA1/T0IN12PB0/ANA0/T0IN03AVDD4AVSS5VREF6PA0/OPINN7PA1/OPINP/CINN8

PA

2/C

INP

9P

A7/

FAU

LT1/

T0O

UT/

CO

MP

OU

T10

RE

SE

T/FA

ULT

011

DB

G12

PC

0/T0

OU

T13

PW

M2L

14P

WM

2H15

PW

M1L

16

PWM1H17

PWM0L18

PWM0h19

VSS20

XOUT21

XIN22

VDD23

PA3/TXDE/SCK/SCL24

PA

4/R

XD

/MIS

O25

PA

5/TX

D/M

OS

I26

PA

6/C

TS/S

S/S

DA

27

PB

7/A

NA

728

PB

6/A

NA

629

PB

5/A

NA

530

PB

4/A

NA

4/C

INN

31

PB

3/A

NA

3/O

PO

UT

32

C4 0.01uF

C7

1000pF/1nF

C8 12pF

R12 7.87K

R9 12.4K

J22

HDR/PIN 2x6

1 23 45 67 89 1011 12

J20

123

C2 0.01uF

R7 10K

C6 0.1uF

U2

S25

GND4

CS1

WP3

SO2

J14

6-CKT R/A HOUSING

1 23 45 6

R17 10K

C10

0.01uF

R26 10KD6

RED

2 1

SW2B3U-1000P

1 2

R15 10KR13 1K

R16 10K

J21

HDR/PIN 2x4

1 23 45 67 8

H

C26680pF

C25680pF

R28

0 ohm

C5100PF

+

C3 10uF

1 2

C9

0.01uF

R14 49.9K

R80 ohm

Page 18: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

AN0367 Page 18 of 22

tion with the Z8FMC16100 MCUApplication Note

STOP/-RUN

DIRECTION

VCC_3v3

V

R22100K

SW3

EG1218

1

32

SW4

EG1218

1

32

J16

1 2 3

R23100K

02-1115

BLDC Motor Control Using Sensored Sinusoidal PWM Modula

Figure 12. Z8FMC16100 MultiMotor MCU Module, #2 of 2

3.3 OK

VCC_5VVCC_5V

VCC_3v3

VCC_3v3

VCC_5V

VCC_5V

VCC_5VM

CC_5VL

DIRECTION

STOP/-RUN

RXDTXD

J19

1x6 RT-ANGL

123456

D1

PMEG3020

32

1

C20

0.1uF

J17

HDR/PIN 1x3

123

U3

NCP551SN33T1G

Vin1

Enable3

GND2

NC4

Vout5

C23

0.1uF, 50V

R25

100 ohm

R19330

R24

100 ohm

C21

4.7uF

D51N4448W

J18HDR/PIN 1x3

1 2 3

C22

4.7uF

D4GREEN

21

Page 19: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

AN0367 Page 19 of 22

tion with the Z8FMC16100 MCUApplication Note

FOR USE WITH AC MOTOR

Phase_C

HSCHSBHSA

+

-

HS

VbuEN

HS

Phase_APhase_BPhase_C

GC_L

GC_H

VCC_1

VCC_3v3

ENABLE

R13150K

R2310K

R6150K

C110.1uf

Q2

IXTY64N055T

4

C5

0.1uF, 50V

Q5

IXTY64N055T

4

C8

0.1uF, 50V

Q3

IXTY64N055T

1

23

4

Q6

IXTY64N055T

1

23

4

J5

2 POS

12

R2110K

J3

5-POS

12345

J1

3-POS

123

D4

BAS16V

4

1

3

5

6

2

02-1115

BLDC Motor Control Using Sensored Sinusoidal PWM Modula

Figures 13 and 14 show the schematics for the MultiMotor Main Development Board.

Figure 13. MultiMotor Development Board, #1 of 2

J16 SETTINGS:1-2 AC MOTOR2-3 BLDC MOTOR

GA_H

GA_L

Phase_B

Phase_A

GA_H

GA_L

GB_L

GB_H

GC_L

GC_H

Phase_B

B_H

B_L

C_L

CS1

CS1

Vbus_M

Phase_CPhase_BPhase_A

BEMF_A

PD4C PD5

s_M ANA4ABLE PE7

A_LPC7_PWML0A_HPC6_PWMH0

B_HPD0_PWMH1BEMF_A

BEMF_BB_LPD1_PWML1

C_HPD2_PWMH2C_LPD7_PWML2

CS1+BEMF_C

CS1-CS2+CS2-TEMP

A PD3

TEMP

GB_L

GB_H

C_H

Phase_A

PD4HSB

BEMF_B BEMF_C

A_H

A_L

Phase_C

2V

VCC_3v3

VCC_5VM

VCC_3v3

VBUS_B

TR3210K

C9

0.1uF

Q1

IXTY64N055T

1

23

4

J2

HDR/PIN 2x15

1357911131517192123252729 30

28262422201816141210

8642

C4

0.1uF

R28100 ohm

R5150K

Q4

IXTY64N055T

1

23

4

1

23

R35 10 ohm

1 2

C1

0.1uF

R10 22.1 ohm

R4150K

C32

0.01uF

R9 22.1 ohm

1

23

C31

0.01uF

D3

BAV19WS

2 1

R2 22.1 ohm

R24150K

C7

0.1uF, 50V

J6

12

SH2

shunt

D2

BAV19WS

2 1

R2210K

R2910K

J4

1 2 3

R34 10 ohm

1 2

C30

0.01uF

R3 22.1 ohm

U2

NCP5106B

VCC1

IN_HI2

IN_LO3

GND4

DRV_LO5

BRIDGE6

DRV_HI7

VBOOT8

R15 10K

U3

NCP5106B

VCC1

IN_HI2

IN_LO3

GND4

DRV_LO5

BRIDGE6

DRV_HI7

VBOOT8

R1 2.2 ohm

D1

BAV19WS

2 1

R1710K

U1

NCP5106B

VCC1

IN_HI2

IN_LO3

GND4

DRV_LO5

BRIDGE6

DRV_HI7

VBOOT8

R14 2.2 ohm

R19 22.1 ohm

R20 10K

R16 22.1 ohm

D9

BAV19WS

2 1

R180.100 ohm, 2W

D8

BAV19WS

2 1

D7

BAV19WS

2 1

C120.1uf

R26150K

R2710K

C10

0.1uF

R3110K

R7 2.2 ohm

R25150K

R12150K

R8150K

+ C3220uF, 50V

R3010K

C6

0.1uF

Q7MMBT3904

3

1

2

R36 10 ohm

1 2

C2

0.1uF

R11150K

Page 20: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

AN0367 Page 20 of 22

tion with the Z8FMC16100 MCUApplication Note

5V

HEATSINK VCC_5VM

VBUS_B

C17

0.1uF

MIC29150-5

OUT3

GN

D2

+ C1510uF

12

J12

123

02-1115

BLDC Motor Control Using Sensored Sinusoidal PWM Modula

Figure 14. MultiMotor Development Board, #2 of 2

24VDC

GND

GND

12V

EXTERNAL VBUSUP TO 48VDC

holder

SHUNT POSITION1-2 EXTERNAL VBUS2-3 INTERNAL VBUS

USE

50V

USE HEATSINK

VBUS

VCC_24VVCC_12V

VCC_12V

VBUS

ENABLE

D6BAS16

13

2

J13

123

J8

123

+ C1410uF

12

U5

IN1

+ C1310uF

12

J11

123

SH1

shunt

R33

2K

F1

FUSE/250V/2A

D51N4007

21

HS1

TO-220

11

22

U4

MIC29150-12

OUT3

GN

D2

IN1

J10

123

J7

2 POS

12

FH1

250V/5x20

12

Q8MMBT3904

3

1

2

P1

PJ-003A

1

23

RL1

JS1A-12V

13

52

J14

123

C16

0.1uF

J9

HDR/PIN 1x3

123

Page 21: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

Appendix B. Flow Charts

Figure 15 presents an algorithm by which a 3-phase BLDC motor can be controlled using the Z8FMC16100 MCU.

Figure 15. Simplified Control Algorithm

AN036702-1115 Page 21 of 22

Page 22: Application Note: BLDC Motor Control Using Sensored ...AN036702-1115 Page 3 of 22 BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU Application Note

BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUApplication Note

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

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

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

Z8 Encore! and eZ8 are trademarks or registered trademarks of Zilog, Inc. All other product or service names are the property of their respective owners.

Warning:

AN036702-1115 Page 22 of 22