Drives & Control June 2003 A. Jansen 1 Brushless DC Motor Control with C868 and CAPCOM6
Drives & Control June 2003A. Jansen2
Agenda Basics of a BLDC Motor
TopologyBLDC Motor with Hall Sensors
BLDC Motor with Hardware BEMF-Detection
BLDC Motor Sensor less Control
Switching Pattern for Driving a BLDC
How to use the CAPCOM6E for a BLDC
Introduction CAPCOM6E for BLDC purpose
CAPCOM6E & ADC
Drives & Control June 2003A. Jansen3
Electrical Motor Types
ElectricMotor types
AC
Asynchronous Synchronous
Induction
StepperSynchronousPMSM Switched Rel.
DC
Drives & Control June 2003A. Jansen5
Basics of a BLDC Motor
DC Motor with 3 Brushes
VW
UU
VW
+
-
3-Phase Brush-less DC Motor
According to the theory of DC machine, the motor rotational speed can be written as follows:
N = ( Ud - I R ) / (Ke )While,
“N” stands for the motor rotational speed“Ud” stands for the DC voltage applied to the motor windings“R” is the pure resistance of the winding while “I” stands for the winding current “Ke” is the magnet coefficient while “” stands for the motor magnetic flux
From the above formula, there are two methods to change the speed of DC motor: One is to change the DC voltage of the motor windings (Ud), the other one is to change the magnetic flux of the motor (). As the BLDC motor has permanent magnet rotor, only the first method can be used in practical application. The principal of generating variable DC voltage is to use PWM for chopping: change the duty cycle of the PWM voltage, proportionally change the DC voltage.
N
S
Drives & Control June 2003A. Jansen8
How an Inverter Turns a BLDC (3)
C+
B-
A’
B’
B C
C’
A11>>0
0
N
S
Drives & Control June 2003A. Jansen10
How an Inverter Turns a BLDC (5)
B+
A-
A’
B’
B C
C’
A
N
S
1>>00
0
Drives & Control June 2003A. Jansen11
How an Inverter Turns a BLDC (6)
B+
A-
A’
B’
B C
C’
A
NS
1>>00
0
Drives & Control June 2003A. Jansen12
BLDC with Hall Sensors – Switching Pattern
Typical Switching Pattern for a BLDC Hall Sequence depends on motor construction Output pattern levels depends on inverter topology
Drives & Control June 2003A. Jansen14
BLDC with Hall Sensors -- Topology Typical Circuit Block Diagram
Hall Sensors detect the position Over current protection and control via ADC
Hall Sensor
C868
+-
HV Driver
V+
M otorCC60CO UT60
CC61CO UT61
CC62CO UT62CTRAP
CCPOS2
CCPOS1
CCPOS0
Drives & Control June 2003A. Jansen15
Block Diagram CAPCOM6E for BLDC Usage
channel 0
channel 1
channel 2
T12
capture/com pare input / output control
CC62
COUT
62CC
61CO
UT61
CC60
COUT
60
CTRA
P
channel 3T13
CCPO
S0
222
com pare
capture
trapcontrol
1
port control
CCPO
S1CC
POS2
3
noisefilter
com pare m ulti-channel control
com pare
Drives & Control June 2003A. Jansen16
H ardw are N oiseS uppression
ch0 gets capturedvalue for act. speed
ch1 com parefor phase delay
ch2 com parefor tim eout
C C 6x
act. speedC C 60
phase delayC C 61
tim eoutC C 62
C O U T6y
110001C C P O S 2
C C P O S 0 1 1 1 0 0 0
C C P O S 1 0 0 1 1 1 1
C aptureE vent
R esets T 12
Usage of CAPCOM6E to Control a BLDC (1)
BEMF-Detection/Hall Signals
HW-noise filter on CCPOSx inputs (BEMF-signals)
Drives & Control June 2003A. Jansen17
H ard w are N oiseS uppression
ch0 gets capturedvalue for act. speed
ch1 com parefor phase delay
ch2 com parefor tim eout
C C 6x
act. speedC C 60
phase delayC C 61
tim eoutC C 62
C O U T6y
110001C C P O S 2
C C P O S 0 1 1 1 0 0 0
C C P O S 1 0 0 1 1 1 1
C aptureE vent
R esets T 12
Usage of CAPCOM6E to Control a BLDC (2)
BEMF-Detection/Hall Signals
HW-noise filter on CCPOSx inputs (BEMF-signals)
automatic reset of T12 with interrupt
actual speed by capture ch0
Drives & Control June 2003A. Jansen18
H ardw are N oiseS uppression
ch0 gets capturedvalue for act. speed
ch1 com parefor phase delay
ch2 com parefor tim eout
C C 6x
act. speedC C 60
phase delayC C 61
tim eoutC C 62
C O U T6y
110001C C P O S 2
C C P O S 0 1 1 1 0 0 0
C C P O S 1 0 0 1 1 1 1
C aptureE vent
R esets T 12
Usage of CAPCOM6E to Control a BLDC (3)
BEMF-Detection/Hall Signals
HW-noise filter on CCPOSx inputs (BEMF-signals)
automatic reset of T12 with interrupt
actual speed by capture ch0
phase delay function on ch1
Drives & Control June 2003A. Jansen19
H ardw are N oiseS uppression
ch0 gets capturedvalue for act. speed
ch1 com parefor phase delay
ch2 com parefor tim eout
C C 6x
act. speedC C 60
phase delayC C 61
tim eoutC C 62
C O U T6y
110001C C P O S 2
C C P O S 0 1 1 1 0 0 0
C C P O S 1 0 0 1 1 1 1
C aptureE vent
R esets T 12
Usage of CAPCOM6E to Control a BLDC (4)
BEMF-Detection/Hall Signals
HW-noise filter on CCPOSx inputs (BEMF-signals)
automatic reset of T12 with interrupt
actual speed by capture ch0
phase delay function on ch1
time out function on ch2
Drives & Control June 2003A. Jansen20
Usage of CAPCOM6E – Hall Sensor Mode (1)
Hall n n+1
Hall n+1 n+2
0 0
0 0
1
1
0
1 0H2H1H0
? ?startDead T ime Counterafter edge detection
CCPOSx Inputs for Hallsensor Interface
MCMOUTSH / MCMOUTSL SW programmable state machine
Drives & Control June 2003A. Jansen21
Usage of CAPCOM6E – Hall Sensor Mode (2)
Hall n n+1
Hall n+1 n+2
0 0
0 0
1
1
0
1 0H2H1H0
? ?noise C orrect
expectedHall E vent
comparevalid level
afterDTC count down
CCPOSx Inputs edge detection triggers Dead Time
Counter
MCMOUTSH / MCMOUTSL compare CCPOSx level with programmed
value
Drives & Control June 2003A. Jansen22
Usage of CAPCOM6E – Hall Sensor Mode (2)
Hall n+1 n+2
Hall n+1 n+2
0 0
0 0
1
1
0
1 0H2H1H0
? !noise C orrect
expectedHall E vent
setCHE -flag
CCPOSx Inputs MCMOUTSH / MCMOUTSL switch to next state on valid edge by
hardware
Drives & Control June 2003A. Jansen23
Usage of CAPCOM6E – Hall Sensor Mode (3)
prepare next state
Hall n+1 n+2
Hall n+2 n+3
0 0
0 0
1
1
0
1 0H2H1H0
? ?wait onedge
CCPOSx Inputs wait on edge
MCMOUTSH / MCMOUTSL prepare next state by software
Drives & Control June 2003A. Jansen24
Usage of CAPCOM6E – Modulation Control (some Choices)
T12.COUT0
M ODT13out
M CM OUTH.1
CTRAP#
1
11
A-1
T12.COUT0
M ODT13out
M CM OUTH.1
CTRAP#
1
11
A-T12.COUT0
M ODT13out
M CM OUTH.1
CTRAP#
1
01
A-
T12.COUT0
M ODT13out
M CM OUTH.1
CTRAP#
11
A-
T12.COUT0
M ODT13out
M CM OUTH.1
CTRAP#
1
10
A-1
Drives & Control June 2003A. Jansen25
Usage of CAPCOM6E – Generate the PWM Pattern for BLDC
T12.COUT2
M ODT13out
M CM OUTH.5
CTRAP#
1
0>0>0>1>1>0>01
T12.CC2
M ODT13out
M CM OUTH.4
CTRAP#
1
1>1>0>0>0>0>11
T12.COUT1
M ODT13out
M CM OUTH.3
CTRAP#
1
1>0>0>0>0>1>11
T12.CC1
M ODT13out
M CM OUTH.2
CTRAP#
1
0>0>1>1>0>0>01
T12.COUT0
M ODT13out
M CM OUTH.1
CTRAP#
1
0>1>1>0>0>0>01
T12.CC0
M ODT13out
M CM OUTH.0
CTRAP#
1
0>0>0>0>1>1>01
1
1
C+
B-
C-
B+
A+
A-
H2H1H0
1
Drives & Control June 2003A. Jansen26
Usage of CAPCOM6E – Generate the PWM Pattern for BLDC
T12.COUT2
M ODT13out
M CM OUTH.5
CTRAP#
1
0>0>0>1>1>0>01
T12.CC2
M ODT13out
M CM OUTH.4
CTRAP#
1
1>1>0>0>0>0>11
T12.CO UT1
M ODT13out
M CM OUTH.3
CTRAP#
1
1>0>0>0>0>1>11
T12.CC1
M ODT13out
M CM OUTH.2
CTRAP#
1
0>0>1>1>0>0>01
T12.CO UT0
M ODT13out
M CM OUTH.1
CTRAP#
1
0>1>1>0>0>0>01
T12.CC0
M ODT13out
M CM OUTH.0
CTRAP#
1
0>0>0>0>1>1>01
1
1
C+
B-
C-
B+
A+
A-
H2H1H0
1
Drives & Control June 2003A. Jansen27
Usage of CAPCOM6E – Generate the PWM Pattern for BLDC
T12.CO UT2
M O DT13out
M CM O UTH.5
CTRAP#
1
0>0>0>1>1>0>01
T12.CC2
M O DT13out
M CM O UTH.4
CTRAP#
1
1>1>0>0>0>0>11
T12.COUT1
M O DT13out
M CM O UTH.3
CTRAP#
1
1>0>0>0>0>1>11
T12.CC1
M O DT13out
M CM O UTH.2
CTRAP#
1
0>0>1>1>0>0>01
T12.COUT0
M O DT13out
M CM O UTH.1
CTRAP#
1
0>1>1>0>0>0>01
T12.CC0
M O DT13out
M CM O UTH.0
CTRAP#
1
0>0>0>0>1>1>01
1
1
C+
B-
C-
B+
A+
A-
H2H1H0
1
Drives & Control June 2003A. Jansen28
Usage of CAPCOM6E – Generate the PWM Pattern for BLDC
T12.COUT2
M ODT13out
M CM OUTH.5
CTRAP#
1
0>0>0>1>1>0>01
T12.CC2
M O DT13out
M CM OUTH.4
CTRAP#
1
1>1>0>0>0>0>11
T12.CO UT1
M O DT13out
M CM OUTH.3
CTRAP#
1
1>0>0>0>0>1>11
T12.CC1
M O DT13out
M CM OUTH.2
CTRAP#
1
0>0>1>1>0>0>01
T12.CO UT0
M O DT13out
M CM OUTH.1
CTRAP#
1
0>1>1>0>0>0>01
T12.CC0
M O DT13out
M CM OUTH.0
CTRAP#
1
0>0>0>0>1>1>01
1
1
C+
B-
C-
B+
A+
A-
H2H1H0
1
Drives & Control June 2003A. Jansen29
Usage of CAPCOM6E – Generate the PWM Pattern for BLDC
T12.CO UT2
M O DT13out
M CM O UTH.5
CTRAP#
1
0>0>0>1>1>0>01
T12.CC2
M O DT13out
M CM OUTH.4
CTRAP#
1
1
T12.CO UT1
M O DT13out
M CM OUTH.3
CTRAP#
1
1>0>0>0>0>1>11
T12.CC1
M O DT13out
M CM OUTH.2
CTRAP#
1
0>0>1>1>0>0>01
T12.CO UT0
M O DT13out
M CM OUTH.1
CTRAP#
1
0>1>1>0>0>0>01
T12.CC0
M O DT13out
M CM OUTH.0
CTRAP#
1
0>0>0>0>1>1>01
1
1
C+
B-
C-
B+
A+
A-
H2H1H0
1
1>1>0>0>0>0>1
Drives & Control June 2003A. Jansen30
Usage of CAPCOM6E – Generate the PWM Pattern for BLDC
T12.CO UT2
M O DT13out
M CM O UTH.5
CTRAP#
1
0>0>0>1>1>0>01
T12.CC2
M ODT13out
M CM O UTH.4
CTRAP#
1
1
T12.CO UT1
M ODT13out
M CM O UTH.3
CTRAP#
1
1>0>0>0>0>1>11
T12.CC1
M ODT13out
M CM O UTH.2
CTRAP#
1
0>0>1>1>0>0>01
T12.CO UT0
M ODT13out
M CM O UTH.1
CTRAP#
1
0>1>1>0>0>0>01
T12.CC0
M ODT13out
M CM O UTH.0
CTRAP#
1
0>0>0>0>1>1>01
1
1
C+
B-
C-
B+
A+
A-
H2H1H0
1
1>1>0>0>0>0>1
Drives & Control June 2003A. Jansen31
Usage of CAPCOM6E – Modulation and Synchronization
CorrectHall Event
M CM P
M CM PS
to m odulationselection
6
write by software6T12pm
T13pm
T12c1cm
T13zm
Flag
T12zm
direct
T12om
SW -Triggerno action
Reset
MC MOUTS L
MC MOUTL
Drives & Control June 2003A. Jansen32
Usage of CAPCOM6E – Modulation and Synchronization
CorrectHall Event
M CM P
M CM PS
to m odulationselection
6
write by software6T12pm
T13pm
T12c1cm
T13zm
Flag
T12zm
direct
T12om
SW -Triggerno action
Reset
MC MOUTS L
MC MOUTL
Drives & Control June 2003A. Jansen33
Usage of CAPCOM6E – Modulation and Synchronization
CorrectHall Event
M CM P
M CM PS
to m odulationselection
6
write by software6T12pm
T13pm
T12c1cm
T13zm
Flag
T12zm
direct
T12om
SW -Triggerno action
Reset
MC MOUTS L
MC MOUTL
Drives & Control June 2003A. Jansen34
Usage of CAPCOM6E – Modulation and Synchronization
CorrectHall Event
M CM P
M CM PS
to m odulationselection
6
write by software6T12pm
T13pm
T12c1cm
T13zm
Flag
T12zm
direct
T12om
SW -Triggerno action
Reset
MC MOUTS L
MC MOUTL
Drives & Control June 2003A. Jansen35
Usage of CAPCOM6E to Control a BLDC (5)
0 0 0
1 1 0 1 0 0
1 0 00 1 0
0 1 1 0 0 0
0 1 0
MCMOUT S L
MCMOUTL
MCMOUTS H
MCMOUT H
C+
B-
11
0
A’
B’
B C
C’
A
N
S
Drives & Control June 2003A. Jansen36
Usage of CAPCOM6E to Control a BLDC (6)
0 0 0
1 0 0 0 0 0
1 0 00 1 0
0 1 1 0 0 0
0 1 0
MCMOUT S L
MCMOUTL
MCMOUT S H
MCMOUTH
C+
B-
A’
B’
B C
C’
A11>>0
0
N
S
Drives & Control June 2003A. Jansen37
Usage of CAPCOM6E to Control a BLDC (7)
0 0 1
1 0 0 0 0 0
0 0 00 1 0
0 1 0 0 1 0
0 1 0
MCMOUT S L
MCMOUTL
MCMOUTS H
MCMOUT H
C+
A-
10
0
A’
B’
B C
C’
A
NS
Drives & Control June 2003A. Jansen38
Usage of CAPCOM6E to Control a BLDC (8)
0 0 1
0 0 0 0 0 1
0 0 00 0 0
0 1 0 0 1 0
0 1 1
MCMOUTS L
MCMOUTL
MCMOUTS H
MCMOUTH
B+
A-
A’
B’
B C
C’
A
N
S
1>>00
0
Drives & Control June 2003A. Jansen40
BLDC in Theory – Back Electro Magnetic Force
Theory UP = (R x i) + (L x di/dt) + eP
where"UP" stands for phase voltage"R" stands for winding resistance"i" stands for actual phase current"L" stands for phase inductance"di/dt" stands for changment of phase current over time"eP" stands for electromagnetic voltage caused by magnet
whilei = 0 and di/dt = 0:UP = eP
by measuring UPa position detectionis possible
iavai
30°
ibvbi
120°
Drives & Control June 2003A. Jansen41
BLDC in Reality (1) – BEMF vs. Current
iav
ai
Real BEMF Voltage and Current: shape depends on magnets, motor speed, voltage
Drives & Control June 2003A. Jansen42
BLDC in Reality (2a) – BEMF vs. Current
Zoom In: BEMF is only visible at active switching
PhaseCurren
t
BEMFVoltag
e
Drives & Control June 2003A. Jansen43
BLDC in Reality (2b) – BEMF vs. Current
Current Commutation in a Coil Freewheeling diode conducts
PhaseCurren
t
BEMFVoltag
e
V+
G ND
CurrentFlow
M otor
V+
G ND
Current FlowFreewheeling
Diode
M otor
Drives & Control June 2003A. Jansen44
BLDC in Reality (3) – All Important Signals
PhaseCurren
t
BEMFVoltag
e
Drives & Control June 2003A. Jansen45
BLDC Sensor less with Hardware BEMF-Detection
Typical Circuit Block Diagram Comparators and RC-Filter detect the BEMF zero
crossing for position detection
C868
RCFilter
virtualStar
-+
-+
-+
+-
HV Driver
V+
M otorCC60COUT60
CC61COUT61
CC62COUT62CTRAP
CCPOS2
CCPOS1
CCPOS0
Drives & Control June 2003A. Jansen46
BLDC Sensor less Using ADC
Typical Circuit Block DiagramUse simple resistor divider and ADC for position detection
C868
+-
HV Driver
V+
M otorCC60COUT60
CC61COUT61
CC62COUT62CTRAP
AN2
AN1
AN0
BEM FDetection
Drives & Control June 2003A. Jansen47
CAPCOM6E & ADC Synchronize ADC on T13
T13 period match can trigger the ADC equidistant sampling of analog
signals exact timing guaranteed by hardware no timing jitter due to software
delays
f(n-1) f(n) f(n+1)
f(n+2)
conversionchannel 0
T13
analogsignal
ADC
start sam plingby hardware
Drives & Control June 2003A. Jansen48
CAPCOM6E & ADC Synchronize T13 on
T12 T13 performs delay
for stable measurement
T13 period match triggers ADC
Useful for Current Measurement E.g. induction
machine
Compare value
T12
T13
CC6x
PhaseCurrent x
synchronizeT13 on T12cm
S tart ADC whensignal is stable after aprogrammable delay
Drives & Control June 2003A. Jansen49
CAPCOM6E & ADC T13PM triggers ADC
Delay between T13PM and high voltage switching event due to driving circuit
Useful for Voltage or Current Measurement E.g. BEMF detection Sample shortly
before power device is switched off (BEMF is noise free)
BEM Fsignal
IGBTdrainvolt.
CC6x
T13Modulation for
Block-Commutation
Delay due toIGBT driv ing circuit
IGBT ’s gate signal
V oltage signal atcurrentless phase
for position detection
S tart ADC sampling
Drives & Control June 2003A. Jansen50
CAPCOM6E & ADC T13PM triggers ADC
Delay between T13PM and high voltage switching event due to driving circuit
Useful for Voltage or Current Measurement E.g. Current in DC link
path Sample shortly before
power device is switched off (current is noise free)
IGBTdrainvolt.
CC6x
T13Modulation for
Block-Commutation
Delay due toIGBT driv ing circuit
IGBT ’s gate signal
DC LinkCurrent
S tart ADC sampling
Drives & Control June 2003A. Jansen51
BLDC Sensor less Using ADC T13 used for
ModulationADC trigger
T12 used for Phase delay
Software (for 60° sector)
With every T13PMthe BEMF voltage is sampled and compared to a BEMF-wave table
When crossing a limit the software generates a CHE-event (1)
Speed reference is captured and phase delay for T12ch1 is calculated
At T12ch1 the pattern for the next sector is switched (2)
BEM FVoltagePhaseC
T13
T12
CurrentPhase C
CurrentPhase A
M easureBEM F-Voltage(Phase C)
M easureDC-Link Current
(Phase A)
M easureVoltage(PhaseB)
1 2
AnalogCom pareValue
Com pareValueT12_ch1
Drives & Control June 2003A. Jansen52
BLDC Sensor less with Current Control T13 used for
ModulationADC trigger
T12 used for Phase delay
Software (for 60° sector)
With every T13PM the ADC alternatively samples BEMF voltage Phase current
The current set value can be controlled by adjusting the PWM duty cycle
BEM FVoltagePhaseC
T13
T12
CurrentPhase C
CurrentPhase A
M easureDC-LinkCurrent(Phase A)
M easureBEM FVoltage(Phase C)
M easureDC-Link Current
(Phase A)
M easureBEM FVoltage(PhaseB)
M easureDC-LinkCurrent(Phase C)
1 2
Com pareValueT12_ch1
AnalogCom pareValue
ControlCurrent Value
Drives & Control June 2003A. Jansen53
BLDC Sensor less Scope Shots
Port pin toggles when BEMF is below limit
BEMFVoltag
e
PhaseCurren
t
Drives & Control June 2003A. Jansen54
Application: Line powered Industrial Drives
Power: 750 W Current: max. 5 A AC Input Voltage: 110 to 264 VAC
Features: 8-bit MCU: C868 with on-chip 8 kB SRAM,
with 8-bit ADC and powerful PWM module CoolSet: TDA61831G instead of a
transformer for 12V supply 6 rugged IGBT DuoPacks EEPROM: 8 kB to store program + stand
alone boot option Optically Isolated Serial Interface to
PC for SW development + boot from PC option
Protection: shut down protection for over current and over temperature
Extension for alternative MCU like XC164 or TC1775
SW environment: Keil Compiler + Debugger or Mini Debugger (free software)
Board can be used for current/torque or speed control
Supports Hall-Effect sensors or sensor-less control
High Voltage 3-Phase Brushless DC / Induction MotorReference Design and Development Kit
Drives & Control June 2003A. Jansen55
Low Voltage 3-Phase Brushless DC / Induction MotorReference Design and Development Kit
Application: Industrial & Automotive Drives
Power: 1.2 kW Current: max. 50 A Voltage: 12 - 24 V DC
Features: 8-bit MCU: C868 with on-chip 8 kB SRAM,
with 8-bit ADC and powerful PWM module 3-Phase Bridge Driver: TLE6280G 6 OptiMOS MOSFETs EEPROM: 8 kB to store program + stand
alone boot option RS232: Interface to PC for SW
development + boot from PC option Protection: shut down protection for
over current and over temperature Extension for alternative MCU like
XC164 SW environment: Keil Compiler +
Debugger or Mini Debugger (free software)
Board can be used for current/torque or speed control
Supports Hall-Effect sensors or sensor-less control