Академический Документы
Профессиональный Документы
Культура Документы
+VDC
Blue Winding
GND
1 2 3 4 5 6
Sector
Back-EMF
C
GND +
RR B
_
To IC2
Virtual Neutral
To
GND C B ADC
The neutral point signal can also be reconstructed in soft-
ware, by averaging the values of three simultaneously
sampled ADC channels (Equation 2). The reconstructed
motor neutral voltage is then compared to each BEMF
signal to determine the zero-crossing events. An event
GND occurs when the BEMF signals are equal to the motor
neutral point.
Assume that the motor is in commutation Step 1 (refer
to Figure 1), in which Phase A is connected to +VBUS EQUATION 2: VIRTUAL NEUTRAL POINT
through an electronic switch, Phase C is connected to AND BEMF SIGNALS
GND through an electronic switch and Phase B is RELATIONSHIP
open. The BEMF signal observed on Phase B has a
negative slope and its minimum value is almost equal BEMF A + BEMF B + BEMF C-
Vn = ---------------------------------------------------------------------------
to +VDC just before the commutation Step 2 occurs. 3
Phase B reaches the value of GND when commutation
Step 2 occurs. where: Vn is motor neutral voltage
At that instant, Phase B is now connected to GND BEMF A is the BEMF voltage in Phase A
through an electronic switch, Phase C is now open and BEMF B is the BEMF voltage in Phase B
Phase A remains connected to VDC. The BEMF signal BEMF C is the BEMF voltage in Phase C
observed on Phase C has a positive slope and its
maximum value is almost equal to VDC just before com-
mutation Step 3 occurs. Both slopes observed on
Phase B and Phase C are compared to VDC/2 in order
to determine the zero-crossing event. This is easily
implemented with operational amplifiers configured as
comparators.
dsPIC30F2010
BLDC
PWM3H
PWM3L
PWM2H 3-Phase
PWM2L Inverter
PWM1H
PWM1L
R49 R41 R34 R36
FLTA Fault
R44
AN2 R52
Demand
AN3
AN4
AN5
Phase Terminal Voltage Feedback
FIGURE 10: BEMF SAMPLING OVER A PWM PERIOD (HIGH PWM DUTY CYCLE)
Commutation
Filter Output
Logical Test
Zero-Cross
BEMF Phase
Phase Phase
ANGLE
Event
Step
AND XOR
Mask Mask
C B A C B A C B A
Logical Test N
Commutation
Filter Output
BEMF Phase
Zero-Cross
Phase Phase
Angle
Event
Step
AND XOR
Mask Mask
C B A C B A C B A
START
STATE_STOPPING Stop_Motor()
Initialization Code:
-Clock Frequency
-PWM Module Go to
STATE_STARTING
-ADC PWM ISR
-Timers
-RTDM
STATE_FAULT Stop_Motor()
Infinite
Loop
Spinning
STATE_STARTED Direction
Change?
Check if Buttons
are Pressed Y
Stop_Motor()
Change State to
Button 1
Pressed? Y STARTING/
STOPPING Wait for Motor
to Stop
(Re)Start_Motor()
with New Direction
Change Spinning Button 2
Y
Direction Pressed?
Spinning
STATE_STOPPED Direction
N
Check
Execute State
Machine
In Reconstruct
Sample BEMF
Pre-Commutation N MotorVirtualNeutral
State? Signal N Voltage
Y
Waited for
Blanking
Time?
Use POT Y
Control?
Filter
BEMF Signal
Y Zero-Crossing
Point Detected?
Calculate the
Average Ticks
Timer2 Counted
from 0 to 30 Calculate RPM
and Set
Pre-Commutation
State
Add Phase
Advance
Set Timer1 to do
an Interrupt
when the Rotor
Reaches 60
Execute
Exit ADC ISR PI Control Loop
or Open Loop
PWM Interrupt Service Routine (20 kHz PWM Frequency) Timer1 Interrupt Service Routine
Change Motor
State Sector and PWM
Y Init Ready? Y Start_Motor()
STARTING? Overdrive
N N
Go to
Stall Detected? Y Init_Motor()
STATE_FAULT
Init_Motor() Start_Motor()
Change Motor
Sector and PWM
Init Variables for Overdrive
Current Spinning
Direction
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchips Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as unbreakable.
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchips code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
QUALITY MANAGEMENT SYSTEM Microchip received ISO/TS-16949:2009 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
CERTIFIED BY DNV Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Companys quality system processes and procedures
are for its PIC MCUs and dsPIC DSCs, KEELOQ code hopping
== ISO/TS 16949 == devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchips quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.