application note: sensorless brushless dc motor control
Post on 16-Oct-2021
16 Views
Preview:
TRANSCRIPT
AN035303-1015MultiMotor
SeriesMultiMotor
Series
Abstract
This MultiMotor Series application note investigates the closed-loop control of a 3-phase brushless direct current (BLDC) motor using a Z16FMC MCU. Zilog’s Z16FMC family of microcontrollers is designed specifically for motor control applications and, with this MultiMotor Series, features an on-chip integrated array of application-specific analog and digital modules using the MultiMotor Development Kit. The result is fast and precise fault control, high system efficiency, on-the-fly speed/torque and direction control, as well as ease of firmware development for customized applications.
This document further discusses ways in which to implement a sensorless feedback con-trol system using a Phase-Locked Loop with back-EMF sensing. Test results are based on using a MultiMotor Development kit equipped with a Z16FMC MCU module and a 3-phase, 24VDC, 30W, 3200RPM BLDC motor.
The source code file associated with this application note, AN0353-SC01, was tested with version 5.0.1 of ZDS II for ZNEO MCUs. Subsequent releases of ZDS II may require you to modify the code supplied with this application.
FeaturesThe power-saving features of this MultiMotor Series application include:
• Smooth S-curve motor start-up with reduced starting current
• Sensorless (back-EMF) control using Phase-Locked Loop feedback
• Microcontroller-based overcurrent protection
• Selectable speed or torque setting
• Selectable speed or torque control
• 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
Discussion
Z16FMC Series Flash microcontrollers are based on Zilog’s advanced 16-bit ZNEO CPU core. These Z16FMC devices set a standard of performance and efficiency with up to 20
Note:
AN035303-1015
Application Note
Sensorless Brushless DC Motor Control with the Z16FMC MCU
Page 1 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
MIPS performance at 20 MHz. The Z16FMC MCU supports 16-bit internal bus widths and provides near-single-cycle instruction execution.
Up to 128 kilobytes of internal Flash memory are accessible by the ZNEO CPU, 16 bits at a time, to improve processor throughput. Up to 4 KB of internal RAM provides storage of data, variables and stack operations.
Figure 1 displays a block diagram of the Z16FMC MCU architecture.
In each of the Z16FMC products, the novel device architecture allows for realization of a number of enhanced control features:
• Time Stamp for Speed Control
Figure 1. The Z16FMC MCU Architecture
WDT withRC Oscillator
POR/VBO& Reset Control
Internal PrecisionOscillator
ZNEO20 MHz CPU
ADC 10-bit12-Channel
Comparator
OperationalAmplifier
3 x Timer
I C
ESPI
2 x LIN-UARTwith IrDA
DMAController
InterruptController
FlashController
RAMController
A B C D E F G H
128 KB
4 KB
Multi-ChannelPWM Timers
2
Ports
8 8 8 8 8 1 1 4 Number of pins available
AN035303-1015 Page 2 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
• Integrated Operational Amplifier
• Multi-Channel PWM Timer
Time Stamp for Speed Control
Most microcontrollers use at least one dedicated comparator to detect the zero crossing of the input AC voltage signal so that the output driving pulses can be synchronized and adjusted to properly regulate motor speed. An alternative approach based on the Z16FMC MCU eliminates the requirement for this comparator by instead employing an analog-to-digital converter (ADC) in conjunction with a timer. In such a scenario, the ADC samples the AC line voltage, with the timer running in the background.
When the ADC samples the line voltage’s zero crossing, it reads the timer count and writes the result to a register. As a result, the timers are cued for the output Pulse Width Modulation (PWM) pulses to efficiently regulate the speed of the motor. This time stamp approach results in a very simple and cost-effective solution for smooth operation of the motor in a steady state.
Integrated Operational Amplifier
Appliance controllers almost invariably monitor motor speed by sensing the current through the 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 pro-cessor. The processor then synthesizes the PWM outputs to control motor speed.
In the case of the Z16FMC MCU, an on-chip integrated operational amplifier eliminates the requirement for an external component, thereby reducing overall system cost.
Multi-Channel PWM Timer
The Z16FMC 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 conduct safe operation of the motor by ensuring 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 poly-phase motors. For a detailed discussion of BLDC motor fundamentals, as well as closed-loop control using sensorless techniques, refer to the Motor Control Electronics Handbook by Richard Valentine, McGraw-Hill, NY, 1998.
In sensor-based control applications, the Hall elements are integrated, and are used to detect the position of the rotor for drive synchronization. In contrast, sensorless control employs the detection of back-EMF signals, which are generated (induced) by specific phase windings to synchronize the timing of the control loop.
A block diagram of the BLDC motor control system based on the Z16FMC MCU is shown in Figure 2. At any given instance in a 3-phase commutation arrangement, only two phases are energized. The back-EMF voltage is, in turn, generated in the unenergized
AN035303-1015 Page 3 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
phase winding, and the zero crossing of this induced voltage is detected for synchroniza-tion of the subsequent closed-loop control events. As discussed earlier, the innovative time stamp feature of the Z16FMC MCU provides for robust, efficient implementation of this critical sensing function without the requirement for an additional comparator.
The algorithm for back-EMF sensing is based on an implementation of a Phase-Locked Loop (PLL), which is described in Appendix C. Back-EMF Sensing Phase-Locked Loop on page 16. This algorithm is especially advantageous during startup, resulting in a very smooth increase in the motor speed, as well as a nearly-instantaneous reversal of direction of the rotation on command, as outlined below.
With a conventional approach during the start-up sequence, power is applied to the wind-ings to place the rotor in a known starting position, followed by commutation and the start of back-EMF sensing and control. In contrast to the traditional approach, the PLL-based approach implemented with this application makes it possible to lock the back-EMF signal from the onset of the start-up phase without the requirement for initial placement of the
Figure 2. . A 3-Phase BLDC Motor Control System
AN035303-1015 Page 4 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
rotor in a specific position. Moreover, this approach significantly reduces any erratic movement of the motor during startup, or even a reversal of direction.
During normal operation following the start-up period, phase torque/current mode control is achieved with a sensing of the voltage generated across a sense resistor in the motor drive circuit. This voltage is routed to the on-chip integrated ADC, after which data pro-cessing by the CPU, based on a predefined computational algorithm, results in the regula-tion of the PWM commutation signal period(s).
As discussed earlier, another key feature of the Z16FMC MCU is the direct coupling of the on-chip integrated comparator to the PWM module to enable fast, cycle-by-cycle shut-down during an overcurrent fault event. Oscilloscope-generated waveforms representing this sequence of events are shown in Figure 3.
In conjunction with the integrated on-chip hardware blocks, the 3-phase BLDC motor control software developed for this application allows for ease of programming to achieve the desired closed-loop control characteristics. The routines that enable the sensing of the motor’s back-EMF and current are all interrupt-driven. It is critical that the highest inter-rupt priority is assigned to the back-EMF sensing event for subsequent synchronization of the commutation events. In this case, Timer 0 is used for the Time Stamp function, as well as for updating the commutation period, if necessary.
Figure 3. Cycle-By-Cycle Shutdown
AN035303-1015 Page 5 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
Testing
This section describes how to run the code and demonstrate this sensorless brushless motor 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).
• 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)
• Z16FMC MultiMotor MCU Module (99C1357-001G) – Order separately
• Opto-Isolated USB SmartCable (99C0968) – Order separately
• Digital Oscilloscope or Logic Analyzer
Hardware SetupFigure 4 shows the application hardware connections.
Figure 4. The MultiMotor Development Kit with Z16FMC MCU Module and SmartCable
AN035303-1015 Page 6 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
Figure 5 displays the proper port settings in the terminal emulation program.
ProcedureObserve the following procedure to test the 3-Phase Sensorless BLDC Motor Control demo program on the Z16FMC MultiMotor MCU Module.
1. Install the ZDS II – ZNEO version 5.0.1 (or newer) software on your PC.
2. Connect the Opto-Isolated USB SmartCable to the PC.
– To install the driver of the Opto-Isolated USB SmartCable, refer to the installation guide for the Opto-Isolated USB SmartCable that is included in your MultiMotor Development Kit.
3. Connect the hardware as shown in Figure 4 on the previous page.
4. Power up the MultiMotor Development Board using the 24 VDC adapter included in the kit.
5. Open the AN0353-SC01 project in ZDS II for ZNEO.
Figure 5. Example: Terminal Display Settings
AN035303-1015 Page 7 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
6. From the main.c source file, choose the following mode for the Motor Control application:
#define LOOP_SELECT_VALUE 1u // 0u = torque loop, 1u = speed loop
7. Compile the application and download the code to the Z16FMC MultiMotor MCU Module.
8. In ZDS II, stop the Debug Mode. Unplug the power supply from the MultiMotor Development Board, then disconnect the Opto-Isolated USB Smart Cable.
9. Ensure that the RUN/STOP switch on the MultiMotor MCU Module is in the STOP position.
10. Connect the 24 V DC supply source to the MultiMotor Development Board.
11. Set the RUN/STOP switch on the MultiMotor MCU Module to RUN.
12. Additionally, observe the following points:
– If Speed Mode is selected, the speed of the motor can be varied by adjusting the potentiometer on the MultiMotor Development Board.
– If Torque Mode is selected, the motor speed is decreased with application of force on the shaft of the motor.
– The direction of rotation of the motor is set by changing the position of the direction switch on the MultiMotor Development Board.
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.
ResultsThis three-phase, sensorless, brushless motor control application was tested with a 3-phase BLDC motor connected to Zilog's MultiMotor Development Board. Testing of the Z16FMC MultiMotor MCU Modules confirms a seamless start-up of the motor from an idle mode to full operational speed, a safe on-the-fly reversal of the direction of rotation, an extremely fast fault-detection cycle, and a lower total solution cost.
• Maximum motor speed: 3200 RPM
• Two methods of controlling the motor:
– Manually using the Stop/Run & Direction switches and the speed pot on the MCU Module.
– Using menu-driven commands on a PC terminal emulator connected to the MultiMotor MCU Module through the UART connections
Note:
AN035303-1015 Page 8 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
• The Green LED illuminates when the motor is running
• The Yellow LED illuminates when under UART control
• The Red LED flashes when the motor is stopped or a fault is detected
Summary
This application note describes the closed-loop control of a sensorless BLDC motor using the advanced on-chip integrated features of the Z16FMC MCU. The software algorithm implemented in this application demonstrates how a three-phase BLDC motor is operated with a minimum set of peripherals using the ADC module for BEMF detection and a Phase Lock Loop for PI speed control. With this implementation, the need for an open loop start-up ramp was eliminated without sacrificing smooth motor start.
The results of this application confirm why the Z16FMC MCU is ideally suited for sensor-less brushless motor control applications. The Z16FMC MCU’s features, along with the powerful ZNEO CPU core and some of the best development tools available in the indus-try, result in less complex board designs and reduced design cycle time.
References
The following documents are associated with the Z16FMC Series of Motor Control MCUs; each is available for download on www.zilog.com.
• Z16FMC Series Motor Control MCU Product Specification (PS0287)
• MultiMotor Series Development Kit Quick Start Guide (QS0091)
• MultiMotor Series Development Kit User Manual (UM0262)
• Zilog Developer Studio II – ZNEO User Manual (UM0171)
• ZNEO CPU Core User Manual (UM0188)
• Space Vector Modulation of a 3-Phase AC Induction Motor with the Z16FMC MCU (AN0354)
• BLDC Motor Control on the Z16FMC MCU Using Sensored Sinusoidal PWM Modu-lation (AN0355)
• Three-Phase Hall Sensor BLDC Driver Using The Z16FMC MCU (AN0356)
• Implementing a Data Logger with Spansion SPI Flash (AN0360)
AN035303-1015 Page 9 of 20
AN0353 Page 10 of 20
r Control with the Z16FMC MCUltiMotor Series Application Note
Appe
UTING ALLOWS.
PB3
PH3
PC0
PC1
PH2
CS2-
CS2+
CS1-
CS1+
PC7_PWML0PC6_PWMH0
PD0_PWMH1ANA0 BEMF A
ANA1 BEMF BPD1_PWML1
ANA4PD2_PWMH2
HSB PD4HSC PD5
PD7_PWML2ANA2 BEMF C
HSA PD3
PD6
CSZ+
CSZ-
PC7_PWML0A_LPC6_PWMH0A_H
B_H PD0_PWMH1BEMF_A ANA0
BEMF_B ANA1PD1_PWML1B_L
PD2_PWMH2C_HC_L PD7_PWML2
CS1+BEMF_C ANA2
CS1-CS2+CS2-TEMP
CS2+
CS2-
PC0_T1IN_CINN
PC1_TOUT_COMPOUT
ANA6 CS1+
ANA7 CS1-
CS2+
CS2-
TEMPPH2_ANA10
PH3_ANA11_CPINP
PB3_ANA3_OPOUT
VCC_3v3
Buckeye Driveitas, CA 95035-457-9000 Website: www.zilog.com
Multi Motor Control Kit MCU Module. Z16FMC MCU
MCU
Buckeye Driveitas, CA 95035-457-9000 Website: www.zilog.com
Multi Motor Control Kit MCU Module. Z16FMC MCU
MCU
Buckeye Driveitas, CA 95035-457-9000 Website: www.zilog.com
Multi Motor Control Kit MCU Module. Z16FMC MCU
MCU
R3 0 ohm
J41
J2
HDR/PIN 2x15
1357911131517192123252729 30
28262422201816141210
8642
R5 0 ohm
J51
J61
J81
J13
HDR/PIN 1x16
12345678910111213141516
J111
J91
R4
0 ohm
J101
R6
0 ohm
J3
1
J121
03-1015
Sensorless Brushless DC MotoMu
ndix A. Schematic Diagrams
Figures 6 and 7 show the schematics for the Z16FMC MCU Module.
Figure 6. Z16FMC MultiMotor MCU Module, #1 of 2
DBGINTERFACE
-RESET
IF VCC_3v3 is usedremove R8 andinstall R10 = 3.3K
PLACE J3 - J12 WHERE THE RO
VREF
FAULTY
FAULT0
ONVBUS CTRL
MCU
Do Not Install.
XOUT
PC7_PWML0
PC1_TOUT_COMPOUTDBG
PC6_PWMH0
PB
7_A
NA
7_O
PIN
NA
NA
7
PC0_T1IN_CINN
PB
6_A
NA
6_O
PIN
PA
NA
6P
B5_
AN
A5
AN
A5
PB
3_A
NA
3_O
PO
UT
PH
3_A
NA
11_C
PIN
P
PD2_PWMH2
-RESET
GND
VREF
GND
VR
EF
PB7_ANA7_OPINN CS1-
PD1_PWML1PD0_PWMH1
DBG
GND
AG
ND
PB6_ANA6_OPINP CS1+
PH3_ANA11_CPINP
VREF
PE0PE1PE2
PA
4_R
XD
0P
A5_
TXD
0
PB3_ANA3_OPOUT
PD7_PWML2
-RESET
AN
A0
AN
A1
AN
A4
AN
A2
PD
3P
D4
CS
Z+C
SZ-
PA
1
PD
5
VBUS_M
ENABLE
PD4HSBPD5HSC
Vbus_MANA4ENABLE
PD3HSA
PE7
PA0
PH
2_A
NA
10TE
MP
SCK
MOSI
VCC_3v3
MISO
SS-
SCK
MO
SI
MIS
OSS-
ENABLEPE7
VCC_3v3
XIN
XINXOUT
PD6
VCC_3v3
VCC_3v3
VCC_3v3
VCC_3v3
VCC_3v3
VCC_5VM
VCC_3v3
PE0PE1PE2
PA4_RXD0
PA5_TXD0
PA0
PA1
Title
1590Milp408
Page
Title
1590Milp408
Page
Title
1590Milp408
Page
R2 10K
C5100PF
R10 3.3K
C14
0.01uF
C24680pF
C11
0.01uF
+
C3 10uF
1 2
Y2
20MHZ
R12 7.87KR115K
13
2R16 10K
C19
0.01uF
J14
6-CKT R/A HOUSING
1 23 45 6
J71
C16
0.01uF
C6 0.1uF
C4 0.01uF
R1
10K
R17 10K
C13
0.01uF
C2722pF
C10
0.01uF
R9 12.4K
C7
1000pF/1nF
R26 10K
C25680pF
J21
1
C2 0.01uF
R14 49.9K
C18
0.01uF
C28
22pF
R80 ohm
C8 12pF
J22
1
U2
S25FL032P
GND4
VCC8
CS1
WP3
SO2
HOLD7
SCK6
SI5
C15
0.01uF
C12
0.01uF
J20
123
SW2B3U-1000P
1 2
Y1
20MHZ
R7 10K
J11
C9
0.01uF
C26680pF
SW1B3U-1000P
1 2
R15 10KR13 1K
LQFP
U1Z16F2810
VS
S2
1
AV
DD
2
PH
0/A
NA
83
PH
1/A
NA
94
PB
0/A
NA
0/T0
IN0
5
PB
1/A
NA
1/T0
IN1
6
PB
4/A
NA
47
PB
5/A
NA
58
PB
6/A
NA
6/O
PIN
P/C
INN
9
PB
7/A
NA
7/O
PIN
N10
PB
3/A
NA
3/O
PO
UT
11
PB
2/A
NA
2/T0
IN2
12
PH
2/A
NA
1013
PH
3/A
NA
11/C
PIN
P14
VR
EF
15
AV
SS
16
PC0/T1IN/T1OUT/CINN17PC1/T1OUT/COMPOUT18DBG19PC6/T2IN/T2OUT/PWM0H20PC7/T2OUT/PWM0L21
PG323
PE725PE626PE527
PD7/PWM2L29PC3/SCK30PD6/CTS131PA7/SDA32
PA
6/S
CL
33P
A5/
TXD
034
PA
4/R
XD
035
PC
4/M
OS
I38
PD
5/TX
D1
39P
D4/
RX
D1
40P
D3/
DE
141
PC
5/M
ISO
42P
F743
PA
3/C
TS0/
FAU
LT0
46P
A2/
DE
0/FA
ULT
Y47
PA
1/T0
OU
T48
PA0/T0IN/T0OUT49
PD2/PWM2H50
PC2/SS51
RESET52
PE454
PE355
PE257
PE158
PE059
PD1/PWM1L61
PD0/PWM1H62
XOUT63
XIN64
VDD222
VDD324
VD
D4
37
VD
D5
44
VDD153
VSS356
VSS160
VSS428
VS
S5
36
VS
S6
45
C17
0.01uF
AN0353 Page 11 of 20
r Control with the Z16FMC MCUltiMotor Series Application Note
STOP/RUN
DIRECTION
VCC_3v3
J16
1 2 3
R22100K
SW3
EG1218
1
32
SW4
EG1218
1
32
R23100K
03-1015
Sensorless Brushless DC MotoMu
Figure 7. Z16FMC MultiMotor MCU Module, #2 of 2
3.3 OK
VCC_5VVCC_5V
VCC_3v3
VCC_3v3
VCC_5V
VCC_5V
VCC_5VM
VCC_5VL PE0
PE1
PE2
PA0
PA1
PA4_RXD0PA5_TXD0
R19330
C22
4.7uF
U3
NCP551SN33T1G
Vin1
Enable3
GND2
NC4
Vout5
D4GREEN
21
R20
330
D2
RED
21
J15
1 2 3
R24
100 ohm
C23
0.1uF, 50V
D3
YELL
21
C20
0.1uF
J18HDR/PIN 1x3
1 2 3R21
330
J19
1x6 RT-ANGL
123456
D1
PMEG3020
32
1
C21
4.7uF
R18
330
R25
100 ohm
J17
HDR/PIN 1x3
123
D5
GREEN
21
AN0353 Page 12 of 20
r Control with the Z16FMC MCUltiMotor Series Application Note
FOR USE WITH AC MOTOR
Phase_C
HSAHSBHSC
H
VE
H
Phase_APhase_BPhase_C
GC_L
GC_H
VCC_12V
VCC_3v3
ENABLE
Title
1590 Buckeye DriveMilpitas, CA 95035408-457-9000 Website: www.zilog.com
PageMulti Motor Control Kit. Main Board
Mosfets, gate drivers, MCU interface
Title
1590 Buckeye DriveMilpitas, CA 95035408-457-9000 Website: www.zilog.com
PageMulti Motor Control Kit. Main Board
Mosfets, gate drivers, MCU interface
Title
1590 Buckeye DriveMilpitas, CA 95035408-457-9000 Website: www.zilog.com
PageMulti Motor Control Kit. Main Board
Mosfets, gate drivers, MCU interface
2
Y64N055T
J3
5-POS
12345
C5
0.1uF, 50V
5
Y64N055T
J5
2 POS
12
D4
BAS16V
4
1
3
5
6
2
R13150K
J1
3-POS
123
Q3
IXTY64N055T
1
23
4
R2110K
C110.1uf
Q6
IXTY64N055T
1
23
4
R2310K
R6150K
C8
0.1uF, 50V
03-1015
Sensorless Brushless DC MotoMu
Figures 8 and 9 show the schematics for the MultiMotor Main Board.
Figure 8. 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
A_L
B_H
B_L
C_L
CS1+
CS1-
Vbus_M
Phase_CPhase_BPhase_A
BEMF_A BEMF_B
PD4SC PD5
bus_M ANA4NABLE 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
SA PD3
TEMP
GB_L
GB_HA_H
C_H
Phase_A
BEMF_C
PD4HSB
Phase_C
VCC_3v3
VCC_5VM
VCC_3v3
VBUS_B
C10
0.1uF
R12150K
TR3210K
Q
IXT
1
23
4
J2
HDR/PIN 2x15
1357911131517192123252729 30
28262422201816141210
8642
R1710K
U1
MIC4101YM
VC
C1
HB2
HO3
HS4
HI5
LI6
GN
D7
LO8
D2
BAV19WS
2 1
R9 22.1 ohm
Q7MMBT3904
3
1
2
Q
IXT
1
23
4
C1
0.1uF
R3110K
R2210K
R2910K
D3
BAV19WS
2 1
R8150K
R1022.1 ohm
R2 22.1 ohm
R15 10K
C4
0.1uF
R26150K
R4150K
R7 2.2 ohm
+ C3220uF, 50V
R24150K
R28100 ohm
C9
0.1uF
R5150K
R2710K
C120.1uf
U3
MIC4101YM
VC
C1
HB2
HO3
HS4
HI5
LI6
GN
D7
LO8
Q1
IXTY64N055T
1
23
4
C2
0.1uF
R16 22.1 ohm
R3010K
J4
1 2 3
C7
0.1uF, 50V
R180.100 ohm, 2W
R14 2.2 ohm
R322.1 ohm
C6
0.1uF
R11150K
Q4
IXTY64N055T
1
23
4
U2
MIC4101YM
VC
C1
HB2
HO3
HS4
HI5
LI6
GN
D7
LO8
R1922.1 ohm R20 10K
R25150K
J6
12
SH1
shunt
R1 2.2 ohm
D1
BAV19WS
2 1
AN0353 Page 13 of 20
r Control with the Z16FMC MCUltiMotor Series Application Note
5V
SHU1-22-3
USE HEATSINK
VCC_5VM
VBUS_B
C17
0.1uF
-220
U5
MIC29150-5
OUT3
GN
D2
IN
+ C1510uF
12
J12
123
2V
3
03-1015
Sensorless Brushless DC MotoMu
Figure 9. MultiMotor Development Board, #2 of 2
24VDC
GND
GND
12V
EXTERNAL VBUSUP TO 48VDC
holderNT POSITION EXTERNAL VBUS INTERNAL VBUS
NEED to change C25 to 50V Tantalum
50V
VBUS
VCC_24VVCC_12V
VCC_12V
VBUS
ENABLE
D51N4007-T
21
HS2
TO
11
22
33
J13
123
J8
123
1
+ C1410uF
12
+ C1310uF
12
J11
123
SH2
shunt
R33
2K
F1
FUSE/250V/2A
U4
MIC29150-12
OUT3
GN
D2
IN1
J10
123
J7
2 POS
12
FH1
250V/5x20
1 2
Q8MMBT3904
3
1
2
P1
PJ-003A
1
23
RL1
JS1A-1
1
52
D6BAS16
13
2
J14
123
HS1
TO-220
11
22
33
C16
0.1uF
J9
HDR/PIN 1x3
123
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
Appendix B. Flowcharts
This appendix displays flow charts that diagram the Main Function and the Read and Write APIs.
Figure 10 shows the main control loop.
The back-EMF sensing loop is shown in Figure 11.
Figure 10. Initialization and Application Code Space
Figure 11. Initialization and Application Code Space
Start
Peripheral Initialization
Enable Interrupts
Main Loop(Application Code)
t0_intrp (Back EMF ISR every Timer0time out forms Phase Locked Loop
Commutation Update(every other interrupt)
Back EMF Sensing and PLL Filter(opposite interrupt from Com Update)
Return
AN035303-1015 Page 14 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
A flow chart of the PWM loop is shown in Figure 12. This PWM loop can also be used for specific application code, such as communications or additional user interfaces.
Figure 12. Current Loop and Timed Housekeeping
pwm_timer_isr(Main Loop ISR every
PWM reload, 50μs)
Current Loop, PWM duty cycle control(500μs update)
LED Status (50μs update)and Blink (0.4 sec update)
Torque (current command from ADC2ms update, filtered)
Return
Direction Switch(7.5ms update, filtered)
AN035303-1015 Page 15 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
Appendix C. Back-EMF Sensing Phase-Locked Loop
The Phase-Locked Loop back-EMF algorithm, implemented to provide a smooth start-up of the motor, is shown in Figures 13 and 14. Additional details about the specific formulas in these figures are shown in Table 1; a description of these calculations follows.
Figure 13. Back-EMF Sensing Using the Phase-Locked Loop Algorithm
Figure 14. Proportional Integral (PI) Filter Representation for Back-EMF Sensing
Θrotor +
(radians)
Θerror VΘ
Back EMF Neutral(volts/radian)
Back EMF Divider(unitless)
ADC(counts/volt)
PI Filter(unitless)
speed
(sec) (radians/cycle/sec) (rev/cycle) (unitless) (radians/Hertz)Integrator
Frequency toAngular Frequency
ConversionRevolutions
per cycle
Electrical cyclesper Commutation
cycles
Commutationcycles per
Timer cycles
mec ƒmec ƒelect ƒcom ƒtimer
h h (cycles/sec) (cycles/sec)(rev/sec)(rev/sec)
(cycles/sec)
(radians) (volts) (volts) (counts) (counts)
kc + ѕτ21
TimerPrescale
R1 ADCcounts
Vcounts
ƒclock
Speed_countSpeed_constant
ѕτ2R1π
2π
+ R2
ѕ1
6
1
2
1
N
2
÷
Θ1(ѕ)
–
+ Θe(ѕ) Ud(s) = KdΘe(ѕ) Uƒ(s) = Ud(ѕ)F(ѕ)
VCO
FilterPhase Detector
Kd F(ѕ)
ѕKo
Θ2(ѕ)
AN035303-1015 Page 16 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
We begin with the transfer function of the Proportional Integral (PI) Filter in the s-plane:
Table 1. Back-EMF Sensing Phase-Locked Loop
AN035303-1015 Page 17 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
Next, by using the bilinear transform identity:
where T = the sampling period, yields the following equation.
When multiplying by:
the calculations that follow are:
where:
and:
Collecting terms and dividing by z yields the following result:
AN035303-1015 Page 18 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application Note
When writing this computation as a computer program, it takes the form of a recursive fil-ter, with the coefficients A0 and A1:
where:
• Y0 = Current output
• Y1 = Output at the last sample period
• R0 = Current ADC sample of back-EMF (phase voltage – VBUS / 2)
• R1 = Most recent sample of back-EMF from ADC
• A0 = a0
• A1 = –a1
AN035303-1015 Page 19 of 20
Sensorless Brushless DC Motor Control with the Z16FMC MCUMultiMotor Series Application 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.
ZNEO and Z16FMC are trademarks or registered trademarks of Zilog, Inc. All other product or service names are the property of their respective owners.
Warning:
AN035303-1015 Page 20 of 20
top related