bldc motor control using sensored sinusoidal z16fmc.pdf
TRANSCRIPT
-
AbstractThis application note discusses the control of a 3-phase brushless BLDC motor in Sinusoidal PWM Modulation mode using Zilogs Z8FMC16100 Series of microcontrollers (MCUs). Zilogs 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 modified version of the Z8FMC16100 MCU Module, a 3-phase motor control (MC) application board, and a 3-phase 24 VDC, 30 W, 3200 RPM BLDC motor with inter-nal 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.
FeaturesThe 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
Note:
Application Note
AN036701-0414
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUMultiMotor
SeriesMultiMotor
SeriesAN036701-0414
Selectable control of motor direction UART interface for PC control LED to ind
Figure 1 showsicate a fault condition
a block diagram of the Z8FMC16100 MCU architecture. Page 1 of 22
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application Note
DiscussionThe Z8FMC16100 Series Flash microcontrollers upon which this sinusoidal PWM driver
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
FaultShutdownAN036701-0414 Page 2 of 22
has been conceived are based on Zilogs advanced 8-bit eZ8 CPU core, which features a 20 MHz external clock with a minimum of two clock cycles per instruction.
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application 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 schemes 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-sors 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.AN036701-0414 Page 3 of 22
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application 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 OperationIn 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 sensors signals. One of the advantages of using Hall sensors is that the angular position of the motor is known upon
Figure 2. 3-Phase BLDC Motor Control SystemAN036701-0414 Page 4 of 22
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.
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application 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 sensors 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:
1=
1= 78.125 Hz
(PWM period 256) 50 s 256
1 + n=
2= 156.25 Hz
(PWM period 256) 50 s 256AN036701-0414 Page 5 of 22
65535 50 s = 3.277 seconds
Assuming the sine frequency is 60 Hz, the offset value for the sine table pointer is:
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application 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 stators 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:
SineIndexOffset =60 65536 196
20000
F(rotor) = RPM *p
120AN036701-0414 Page 6 of 22
RPM = (120*f) / N, where N is the number of pole pairs.
F(rotor) =p/2
Measured ticks * timer resolution * commutation steps * 60
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application 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
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
scalingAN036701-0414 Page 7 of 22
Figure 4. 3-Phase BLDC Motor Control System
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application 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.
TestingThis 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.
Figure 5. Cycle-by-Cycle ShutdownAN036701-0414 Page 8 of 22
Equipment UsedThe following equipment is used in the MultiMotor Series Development Kit to demon-strate the sinusoidal PWM modulation technique.
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application Note
Z8FMC16100 MultiMotor Control Module equipped with a Z8FMC16100 MCU (99C1395-001G)
MultiMotor Development Board (99C1358-001G) Opto-Isolated USB SmartCable (99C0968) Opto-Isolated UART-to-USB adapter (99C1359-001G) LINIX 3-phase 24 VDC, 30 W, 3200 RPM BLDC motor (45ZWN24-30) 24 V AC/DC power supply Digital Oscilloscope or Logic Analyzer
Hardware SetupFigure 6 shows the application hardware connections.AN036701-0414 Page 9 of 22
Figure 6. MultiMotor Series Development Kit and Linix BLDC Motor
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application 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 operationb. The cables from the opto-isolated USB SmartCable and the UART-to-USB
adapter must be connected to two of the PCs 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.AN036701-0414 Page 10 of 22
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 motors operation.
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application Note
11. At the Input Command: prompt, enter the letter H to reestablish hardware control; see Figure 8.
Figure 7. GUI Terminal Showing UART ControlAN036701-0414 Page 11 of 22
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application 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 Control Module to free the Reset pin and apply a power cycle to reset the MCU from Debug Mode.
ResultsLinix 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
Figure 8. GUI Terminal Showing Hardware Control
Note:AN036701-0414 Page 12 of 22
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.
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application Note
Figure 9. Linix BLDC Motor Phase Voltages and One Current WaveformAN036701-0414 Page 13 of 22
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application 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 Loop
Figure 10. Hudson Teknic PMSM Motor Phase Voltages and One Current WaveformAN036701-0414 Page 14 of 22
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
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application Note
vary. Motor load was then increased, which caused the motor current to be increased while its speed slightly dropped.
SummaryThe 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.
ReferencesThe 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)AN036701-0414 Page 15 of 22
Space Vector Modulation of a 3- Phase AC Induction Motor with the Z8FMC16100 MCU Application Note (AN0369)
Sensorless Brushless DC Motor Control with the Z16FMC MCU (AN0353)
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application Note
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z16FMC MCU (AN0355)
Three-Phase Hall Sensor BLDC Driver Using The Z16FMC MCU (AN0356) Motor Control Electronics Handbook, Richard Valentine; McGraw Hill, 1998AN036701-0414 Page 16 of 22
-
AN0367 Page 17 of 22
tion with the Z8FMC16100 MCUApplication Note
Appeotor Control Module.
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
J5101-0414
BLDC Motor Control Using Sensored Sinusoidal PWM Modula
ndix A. Schematic DiagramsFigures 11 and 12 show basic block and MCU schematics, respectively, for the Z8FMC16100 MultiM
Figure 11. Z8FMC16100 MultiMotor Control Module, #1 of 2
DBGINTERFACE
-RESET/-FAULT
IF VCC_3v3 is used remove R8and install R10 = 3.3K
VREF
FAULT0
ONVBUS CTRLMCU
UART FLASHSELECTION
XOUT
VREF
OPINN CS1-
DBG
OPINP CS1+
CPINP
VREF
A
N
A
6
OPOUT
-RESET
VBUS_M
ENABLE
HSBHSC
Vbus_M ANA4ENABLE
HSA
VCC_3v3
MISO
SS-
ENABLEPB7
VCC_3v3
XIN
-
R
E
S
E
T
AGNDAVCC
PWMH1PWML0PWMH0
OPINPCS+OPINNCS-
SENS_ASENS_BSENS_C
R
X
D
_
M
I
S
O
T
X
D
_
M
O
S
I
S
S
-
P
B
7
A
N
A
6
A
N
A
5
A
N
A
4
O
P
O
U
T
GND
AVCC
AGND
VREF
C
P
I
N
P
P
W
M
L
1
P
W
M
H
2
P
W
M
L
2
P
C
0
D
B
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
1
3
2
J11
C24680pF
R29
470
Y1
20MHZ
J23
1
U4Z8FMCxx _32LQFP
PB2/ANA2/T0IN21PB1/ANA1/T0IN12PB0/ANA0/T0IN03AVDD4AVSS5VREF6PA0/OPINN7PA1/OPINP/CINN8
P
A
2
/
C
I
N
P
9
P
A
7
/
F
A
U
L
T
1
/
T
0
O
U
T
/
C
O
M
P
O
U
T
1
0
R
E
S
E
T
/
F
A
U
L
T
0
1
1
D
B
G
1
2
P
C
0
/
T
0
O
U
T
1
3
P
W
M
2
L
1
4
P
W
M
2
H
1
5
P
W
M
1
L
1
6
PWM1H17
PWM0L18
PWM0h19
VSS20
XOUT21
XIN22
VDD23
PA3/TXDE/SCK/SCL24
P
A
4
/
R
X
D
/
M
I
S
O
2
5
P
A
5
/
T
X
D
/
M
O
S
I
2
6
P
A
6
/
C
T
S
/
S
S
/
S
D
A
2
7
P
B
7
/
A
N
A
7
2
8
P
B
6
/
A
N
A
6
2
9
P
B
5
/
A
N
A
5
3
0
P
B
4
/
A
N
A
4
/
C
I
N
N
3
1
P
B
3
/
A
N
A
3
/
O
P
O
U
T
3
2
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
-
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
R23100K01-0414
BLDC Motor Control Using Sensored Sinusoidal PWM Modula
Figure 12. Z8FMC16100 MultiMotor Control 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
2
1
-
AN0367 Page 19 of 22
tion with the Z8FMC16100 MCUApplication Note
interfaces.
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
2
3
4
Q6
IXTY64N055T
1
2
3
4
J5
2 POS
12
R2110K
J3
5-POS
12345
J1
3-POS
123
D4
BAS16V
4
1
3
5
6
201-0414
BLDC Motor Control Using Sensored Sinusoidal PWM Modula
Figure 13 shows the schematics for the Z8FMC16100 MultiMotor Control Modules power and serial
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
2
3
4
J2
HDR/PIN 2x15
1357911131517192123252729 30
28262422201816141210
8642
C4
0.1uF
R28100 ohm
R5150K
Q4
IXTY64N055T
1
2
3
4
1
2
3
R35 10 ohm
1 2
C1
0.1uF
R10 22.1 ohm
R4150K
C32
0.01uF
R9 22.1 ohm
1
2
3
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_LO 5BRIDGE 6DRV_HI 7VBOOT 8
R15 10K
U3
NCP5106B
VCC1
IN_HI2
IN_LO3
GND4 DRV_LO 5BRIDGE 6DRV_HI 7VBOOT 8
R1 2.2 ohm
D1
BAV19WS
2 1
R1710K
U1
NCP5106B
VCC1
IN_HI2
IN_LO3
GND4 DRV_LO 5BRIDGE 6DRV_HI
7VBOOT 8
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
-
AN0367 Page 20 of 22
tion with the Z8FMC16100 MCUApplication Note
5V
HEATSINK VCC_5VM
VBUS_B
C17
0.1uF
MIC29150-5
OUT 3
G
N
D
2
+ C1510uF
1
2
J12
12301-0414
BLDC Motor Control Using Sensored Sinusoidal PWM Modula
Figure 14 shows Z8FMC16100 MultiMotor Control Module interface schematics.
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
1
3
2
J13
123
J8
123
+ C1410uF
1
2
U5
IN1
+ C1310uF
1
2
J11
123
SH1
shunt
R33
2K
F1
FUSE/250V/2A
D51N4007
2
1
HS1
TO-220
1
1
2
2
U4
MIC29150-12
OUT 3
G
N
D
2
IN1
J10
123
J7
2 POS
12
FH1
250V/5x20
12
Q8MMBT3904
3
12
P1
PJ-003A
1
23
RL1
JS1A-12V
13
52
J14
123
C16
0.1uF
J9
HDR/PIN 1x3
123
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application Note
Appendix B. Flow ChartsFigure 15 presents an algorithm by which a 3-phase BLDC motor can be controlled using the Z8FMC16100 MCU. AN036701-0414 Page 21 of 22
Figure 15. Simplified Control Algorithm
-
BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCU
Application Note
Customer SupportTo share comments, get your technical questions answered, or report issues you may be experiencing with our products, please visit Zilogs 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 POLICYZILOGS 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 hereinLife 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 Disclaimer2014 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.
Warning:AN036701-0414 Page 22 of 22
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.
Application Note:BLDC Motor Control Using Sensored Sinusoidal PWM Modulation with the Z8FMC16100 MCUAbstractFeaturesDiscussionTime Stamp for Speed ControlIntegrated Operational AmplifierMultichannel PWM Timer
Theory of OperationPWM Frequency CalculationsSine and Hall Commutation and Frequency AdjustmentSpeed CalculationsOvercurrent Protection
TestingEquipment UsedHardware SetupTesting Procedure
ResultsSpeed Control Performance in a Closed LoopSpeed Control Performance in an Open Loop
SummaryReferencesAppendix A. Schematic DiagramsAppendix B. Flow ChartsCustomer Support