AN843

M
AN843
Speed Control of 3-Phase Induction Motor Using
PIC18 Microcontrollers
Author:
Padmaraja Yedamale
Microchip Technology Inc.
INTRODUCTION
Induction motors are the most widely used motors for
appliances, industrial control, and automation; hence,
they are often called the workhorse of the motion industry. They are robust, reliable, and durable. When power
is supplied to an induction motor at the recommended
specifications, it runs at its rated speed. However,
many applications need variable speed operations. For
example, a washing machine may use different speeds
for each wash cycle. Historically, mechanical gear systems were used to obtain variable speed. Recently,
electronic power and control systems have matured to
allow these components to be used for motor control in
place of mechanical gears. These electronics not only
control the motor’s speed, but can improve the motor’s
dynamic and steady state characteristics. In addition,
electronics can reduce the system’s average power
consumption and noise generation of the motor.
Induction motor control is complex due to its nonlinear
characteristics. While there are different methods for
control, Variable Voltage Variable Frequency (VVVF) or
V/f is the most common method of speed control in
open loop. This method is most suitable for applications without position control requirements or the need
for high accuracy of speed control. Examples of these
applications include heating, air conditioning, fans and
blowers. V/f control can be implemented by using low
cost PICmicro microcontrollers, rather than using
costly digital signal processors (DSPs).
Many PICmicro microcontrollers have two hardware
PWMs, one less than the three required to control a
3-phase induction motor. In this application note, we
will generate a third PWM in software, using a general
purpose timer and an I/O pin resource that are readily
available on the PICmicro microcontroller. This application note also covers the basics of induction motors and
different types of induction motors.
Note:
Refer to Appendix C for glossary of
technical terms.
 2002 Microchip Technology Inc.
Induction Motor Basics
NAMEPLATE PARAMETERS
A typical nameplate of an induction motor lists the
following parameters:
•
•
•
•
•
•
•
•
•
Rated terminal supply voltage in Volts
Rated frequency of the supply in Hz
Rated current in Amps
Base speed in RPM
Power rating in Watts or Horsepower (HP)
Rated torque in Newton Meters or Pound-Inches
Slip speed in RPM, or slip frequency in Hz
Winding insulation type - Class A, B, F or H
Type of stator connection (for 3-phase only), star
(Y) or delta (∆)
When the rated voltage and frequency are applied to
the terminals of an induction motor, it draws the rated
current (or corresponding power) and runs at base
speed and can deliver the rated torque.
MOTOR ROTATION
When the rated AC supply is applied to the stator windings, it generates a magnetic flux of constant magnitude, rotating at synchronous speed. The flux passes
through the air gap, sweeps past the rotor surface and
through the stationary rotor conductors. An electromotive force (EMF) is induced in the rotor conductors
due to the relative speed differences between the rotating flux and stationary conductors.
The frequency of the induced EMF is the same as the
supply frequency. Its magnitude is proportional to the
relative velocity between the flux and the conductors.
Since the rotor bars are shorted at the ends, the EMF
induced produces a current in the rotor conductors.
The direction of the rotor current opposes the relative
velocity between rotating flux produced by stator and
stationary rotor conductors (per Lenz's law).
To reduce the relative speed, the rotor starts rotating in
the same direction as that of flux and tries to catch up
with the rotating flux. But in practice, the rotor never
succeeds in 'catching up' to the stator field. So, the
rotor runs slower than the speed of the stator field. This
difference in speed is called slip speed. This slip speed
depends upon the mechanical load on the motor shaft.
DS00843A-page 1
AN843
The frequency and speed of the motor, with respect to
the input supply, is called the synchronous frequency
and synchronous speed. Synchronous speed is
directly proportional to the ratio of supply frequency
and number of poles in the motor. Synchronous speed
of an induction motor is shown in Equation 1.
Note 1: Percentage of slip varies with load on the
motor shaft.
2: As the load increases, the slip also
increases.
INDUCTION MOTOR TYPES
EQUATION 1:
Based on the construction of the rotor, induction motors
are broadly classified in two categories: squirrel cage
motors and slip ring motors. The stator construction is
the same in both motors.
Synchronous Speed (Ns) = 120 x F/P
where:
F = rated frequency of the motor
P = number of poles in the motor
Squirrel Cage Motor
Note 1: The number of poles is the number of
parallel paths for current flow in the stator.
2: The number of poles is always an even
number to balance the current flow.
3: 4-pole motors are the most widely used
motors.
Synchronous speed is the speed at which the stator
flux rotates. Rotor flux rotates slower than synchronous
speed by the slip speed. This speed is called the base
speed. The speed listed on the motor nameplate is the
base speed. Some manufacturers also provide the slip
as a percentage of synchronous speed as shown in
Equation 2.
Base Speed N = Synchronous Speed – Slip Speed
(Synchronous Speed – Base Speed) x 100
Synchronous Speed
FIGURE 1:
a)
b)
EQUATION 2:
Percent Slip =
Almost 90% of induction motors are squirrel cage
motors. This is because the squirrel cage motor has a
simple and rugged construction. The rotor consists of a
cylindrical laminated core with axially placed parallel
slots for carrying the conductors. Each slot carries a
copper, aluminum, or alloy bar. If the slots are semiclosed, then these bars are inserted from the ends.
These rotor bars are permanently short-circuited at
both ends by means of the end rings, as shown in
Figure 1. This total assembly resembles the look of a
squirrel cage, which gives the motor its name. The rotor
slots are not exactly parallel to the shaft. Instead, they
are given a skew for two main reasons:
To make the motor run quietly by reducing the
magnetic hum.
To help reduce the locking tendency of the rotor.
Rotor teeth tend to remain locked under the stator teeth due to direct magnetic attraction
between the two. This happens if the number of
stator teeth are equal to the number of rotor
teeth.
TYPICAL SQUIRREL CAGE ROTOR
Conductors
End rings
Shaft
Bearings
Skewed Slots
DS00843A-page 2
 2002 Microchip Technology Inc.
AN843
Slip Ring Motors
The windings on the rotor are terminated to three insulated slip rings mounted on the shaft with brushes resting on them. This allows an introduction of an external
resistor to the rotor winding. The external resistor can
be used to boost the starting torque of the motor and
change the speed-torque characteristic. When running
under normal conditions, the slip rings are shortcircuited, using an external metal collar, which is
pushed along the shaft to connect the rings. So, in
normal conditions, the slip ring motor functions like a
squirrel cage motor.
SPEED-TORQUE CHARACTERISTICS OF
INDUCTION MOTORS
Figure 2 shows the typical speed-torque characteristics of an induction motor. The X axis shows speed and
slip. The Y axis shows the torque and current. The
characteristics are drawn with rated voltage and
frequency supplied to the stator.
During start-up, the motor typically draws up to seven
times the rated current. This high current is a result of
stator and rotor flux, the losses in the stator and rotor
windings, and losses in the bearings due to friction. This
high starting current overcomes these components and
produces the momentum to rotate the rotor.
At start-up, the motor delivers 1.5 times the rated
torque of the motor. This starting torque is also called
locked rotor torque (LRT). As the speed increases, the
current drawn by the motor reduces slightly (see
Figure 2).
FIGURE 2:
The current drops significantly when the motor speed
approaches ~80% of the rated speed. At base speed,
the motor draws the rated current and delivers the
rated torque.
At base speed, if the load on the motor shaft is
increased beyond its rated torque, the speed starts
dropping and slip increases. When the motor is running
at approximately 80% of the synchronous speed, the
load can increase up to 2.5 times the rated torque. This
torque is called breakdown torque. If the load on the
motor is increased further, it will not be able to take any
further load and the motor will stall.
In addition, when the load is increased beyond the
rated load, the load current increases following the current characteristic path. Due to this higher current flow
in the windings, inherent losses in the windings
increase as well. This leads to a higher temperature in
the motor windings. Motor windings can withstand different temperatures, based on the class of insulation
used in the windings and cooling system used in the
motor. Some motor manufacturers provide the data on
overload capacity and load over duty cycle. If the motor
is overloaded for longer than recommended, then the
motor may burn out.
As seen in the speed-torque characteristics, torque is
highly nonlinear as the speed varies. In many applications, the speed needs to be varied, which makes the
torque vary. We will discuss a simple open loop method
of speed control called, Variable Voltage Variable
Frequency (VVVF or V/f) in this application note.
SPEED-TORQUE CHARACTERISTICS OF INDUCTION MOTORS
Current
Torque
Breakdown Torque
Locked Rotor Torque
Torque
Current
Full Load Torque
TRATED
IRATED
Pull-up Torque
NB
NS
Slip Speed
 2002 Microchip Technology Inc.
DS00843A-page 3
AN843
V/f CONTROL THEORY
EQUATION 3:
As we can see in the speed-torque characteristics, the
induction motor draws the rated current and delivers
the rated torque at the base speed. When the load is
increased (over-rated load), while running at base
speed, the speed drops and the slip increases. As we
have seen in the earlier section, the motor can take up
to 2.5 times the rated torque with around 20% drop in
the speed. Any further increase of load on the shaft can
stall the motor.
The torque developed by the motor is directly proportional to the magnetic field produced by the stator. So,
the voltage applied to the stator is directly proportional
to the product of stator flux and angular velocity. This
makes the flux produced by the stator proportional to
the ratio of applied voltage and frequency of supply.
By varying the frequency, the speed of the motor can
be varied. Therefore, by varying the voltage and frequency by the same ratio, flux and hence, the torque
can be kept constant throughout the speed range.
FIGURE 3:
Stator Voltage (V) ∝ [Stator Flux(φ)] x [Angular Velocity (ω)]
V ∝ φ x 2πf
φ ∝ V/f
This makes constant V/f the most common speed
control of an induction motor.
Figure 3 shows the relation between the voltage and
torque versus frequency. Figure 3 demonstrates voltage and frequency being increased up to the base
speed. At base speed, the voltage and frequency reach
the rated values as listed in the nameplate. We can
drive the motor beyond base speed by increasing the
frequency further. However, the voltage applied cannot
be increased beyond the rated voltage. Therefore, only
the frequency can be increased, which results in the
field weakening and the torque available being
reduced. Above base speed, the factors governing
torque become complex, since friction and windage
losses increase significantly at higher speeds. Hence,
the torque curve becomes nonlinear with respect to
speed or frequency.
SPEED-TORQUE CHARACTERISTICS WITH V/f CONTROL
Voltage
Voltage
Vrated
Torque
Torque
oltage
Voltage
Vmin
fmin
frated(base speed)
fmax
Frequency
Frequency
DS00843A-page 4
 2002 Microchip Technology Inc.
AN843
IMPLEMENTATION
time, a maximum of three switches will be on, either
one upper and two lower switches, or two upper and
one lower switch.
Power
Standard AC supply is converted to a DC voltage by
using a 3-phase diode bridge rectifier. A capacitor filters the ripple in the DC bus. This DC bus is used to
generate a variable voltage and variable frequency
power supply. A voltage source power inverter is used
to convert the DC bus to the required AC voltage and
frequency. In summary, the power section consists of a
power rectifier, filter capacitor, and power inverter.
The motor is connected to the inverter as shown in
Figure 4. The power inverter has 6 switches that are
controlled in order to generate an AC output from the
DC input. PWM signals generated from the microcontroller control these 6 switches. The phase voltage
is determined by the duty cycle of the PWM signals. In
FIGURE 4:
When the switches are on, current flows from the DC
bus to the motor winding. Because the motor windings
are highly inductive in nature, they hold electric energy
in the form of current. This current needs to be dissipated while switches are off. Diodes connected across
the switches give a path for the current to dissipate
when the switches are off. These diodes are also called
freewheeling diodes.
Upper and lower switches of the same limb should not
be switched on at the same time. This will prevent the
DC bus supply from being shorted. A dead time is given
between switching off the upper switch and switching
on the lower switch and vice versa. This ensures that
both switches are not conductive when they change
states from on to off, or vice versa.
3-PHASE INVERTER BRIDGE
DC+
PWM1
PWM2
PWM3
Motor
PWM4
PWM5
PWM6
DC-
 2002 Microchip Technology Inc.
DS00843A-page 5
AN843
Control
To derive a varying AC voltage from the power inverter,
pulse width modulation (PWM) is required to control the
duration of the switches’ ON and OFF times. Three
PWMs are required to control the upper three switches
of the power inverter. The lower switches are controlled
by the inverted PWM signals of the corresponding
upper switch. A dead time is given between switching
off the upper switch and switching on the lower switch
and vice versa, to avoid shorting the DC bus.
PIC18XXX2 has two 10-bit PWMs implemented in the
hardware. The PWM frequency can be set using the
PR2 register. This frequency is common for both
PWMs. The upper eight bits of duty cycle are set using
the register CCPRxL. The lower two bits are set in
CCPxCON<5:4>. The third PWM is generated in the
software and output to a port pin.
SOFTWARE PWM IMPLEMENTATION
Timer2 is an 8-bit timer used to control the timing of
hardware PWMs. The main processor is interrupted
when the Timer2 value matches the PR2 value, if a corresponding interrupt enable bit is set.
Timer1 is used for setting the duty cycle of the software
PWM (PWM3). In the Timer2 to PR2 match Interrupt
Service Routine (ISR), the port pin designated for
PWM3 is set to high. Also, the Timer1 is loaded with the
value which corresponds to the PWM3 duty cycle. In
Timer1 overflow interrupt, the port pin designated for
PWM3 is cleared. As a result, the software and
hardware PWMs have the same frequency.
The software PWM will lag by a fixed delay compared
to the hardware PWMs. To minimize the phase lag, the
Timer2 to PR2 match interrupt should be given highest
priority while checking for the interrupt flags in the ISR.
FIGURE 5:
The ISR has a fixed entry latency of 3 instruction
cycles. If the interrupt is due to the Timer2 to PR2
match then it takes 3 instruction cycles to check the flag
and branch to the code section where the Timer2 to
PR2 match task is present. Therefore, this makes a
minimum of six instruction cycles delay, or phase shift
between the hardware PWM and software PWM, as
shown in Figure 5.
The falling edge of software PWM trails the hardware
PWM by 8 instruction cycles. In the ISR, the TMR2 to
PR2 match has a higher priority than the Timer1 overflow interrupt. Thus, the control checks for TMR2 to
PR2 match interrupt first. This adds 2 instruction cycles
when the interrupt is caused by Timer1 overflow, making a total delay of 8 instruction cycles. Figure 5 shows
the hardware PWM and PWM generated by software
for the same duty cycle.
A sine table is created in the program memory, which is
transferred to the data memory upon initialization.
Three registers are used as the offset to the table. Each
of these registers will point to one of the values in the
table, such that they will have a 120 degrees phase
shift to each other as shown in the Figure 6. This forms
three sine waves, with 120 degrees phase shift to each
other.
After every Timer0 overflow interrupt, the value pointed
to by the offset registers on the sine table is read. The
value read from the table is scaled based on the motor
frequency input, by multiplying by the frequency input
value to find the ratio of PWM, with respect to the maximum DC bus. This value is loaded to the corresponding PWM duty cycle registers. Subsequently, the offset
registers are updated for next access. If the direction
key is set to the motor to reverse rotation, then PWM1
and PWM2 duty cycle values are loaded to PWM2 and
PWM1 duty cycle registers, respectively. Typical code
section of accessing and scaling of the PWM duty cycle
is as shown in Example 1.
TIMING DIAGRAM OF HARDWARE AND SOFTWARE PWMS
TMR2 to PR2 Match
Timer1 Overflow
Hardware PWM
Software PWM
6 Cycles Delay
8 Cycles Delay
DS00843A-page 6
 2002 Microchip Technology Inc.
AN843
FIGURE 6:
REALIZATION OF 3-PHASE SINE WAVEFORM FROM A SINE TABLE
Sine table+offset1
Sine table+offset2
Sine table+offset3
DC+
DC-
 2002 Microchip Technology Inc.
DS00843A-page 7
AN843
EXAMPLE 1:
SINE TABLE UPDATE
;**********************************************************************************************
;This routine updates the PWM duty cycle value according to the offset to the table by
;0-120-240 degrees.
;This routine scales the PWM value from the table based on the frequency to keep V/F constant.
;**********************************************************************************************
lfsr
FSR0,(SINE_TABLE) ;Initialization of FSR0 to point the starting location of
;Sine table
;---------------------------------------------------------------------------------------------UPDATE_PWM_DUTYCYCLES
movf
TABLE_OFFSET1,W
;Offset1 value is loaded to WREG
movf
PLUSW0,W
;Read the value from the table start location + offset1
bz
PWM1_IS_0
mulwf
FREQUENCY
;Table value X Frequency to scale the table value
movff
PRODH,CCPR1L_TEMP ;based on the frequency
bra
UPDATE_PWM2
PWM1_IS_0
clrf
CCPR1L_TEMP
;Clear the PWM1 duty cycle register
;---------------------------------------------------------------------------------------------UPDATE_PWM2
movf
TABLE_OFFSET2,W
;Offset2 value is loaded to WREG
movf
PLUSW0,W
;Read the value from the table start location + offset2
bz
PWM2_IS_0
;
mulwf
FREQUENCY
; Table value X Frequency to scale the table value
movff
PRODH,CCPR2L_TEMP ;based on the frequency
bra
UPDATE_PWM3
PWM2_IS_0
clrf
CCPR2L_TEMP
;Clear the PWM2 duty cycle register
;---------------------------------------------------------------------------------------------UPDATE_PWM3
movf
TABLE_OFFSET3,W
;Offset2 value is loaded to WREG
movf
PLUSW0,W
;Read the value from the table start location + offset3
bz
PWM3_IS_0
mulwf
FREQUENCY
;Table value X Frequency to scale the table value
comf
PRODH,PWM3_DUTYCYCLE;based on the frequency
bra
SET_PWM12
PWM3_IS_0
clrf
PWM3_DUTYCYCLE
;Clear the PWM3 duty cycle register
;--------------------------------------------------------------------------------------------SET_PWM12
btfss
FLAGS,MOTOR_DIRECTION ;Is the motor direction = Reverse?
bra
ROTATE_REVERSE
;Yes
movff
CCPR1L_TEMP,CCPR1L
;No, Forward
movff
CCPR2L_TEMP,CCPR2L
;Load PWM1 & PWM2 to duty cycle registers
bsf
PORT_LED1,LED1
;LED1-ON indicating motor running forward
return
;---------------------------------------------------------------------------------------------ROTATE_REVERSE
;Motor direction reverse
movff
CCPR2L_TEMP,CCPR1L ;Load PWM1 & PWM2 to duty cycle registers
movff
CCPR1L_TEMP,CCPR2L
bcf PORT_LED1,LED1;LED1-OFF indicating motor running reverse
return
;----------------------------------------------------------------------------------------------
DS00843A-page 8
 2002 Microchip Technology Inc.
AN843
The three PWMs are connected to the driver chip
(IR21362). These three PWMs switch the upper three
switches of the power inverter. The lower switches are
controlled by the inverted PWM signals of the corresponding upper switch. The driver chip generates
200 ns of dead time between upper and lower switches
of all phases.
quency, and the number of sine table entries. New
PWM duty cycles are loaded to the corresponding duty
cycle registers during the Timer0 overflow Interrupt
Service Routine. So, the duty cycle will remain the
same until the next Timer0 overflow interrupt occurs, as
shown in Figure 7.
A potentiometer connected to a 10-bit ADC channel on
the PICmicro microcontroller determines the motor
speed. The microcontroller uses the ADC results to calculate the duty cycle of the PWMs and thus, the motor
frequency. The ADC is checked every 2.2 milliseconds,
which provides smooth frequency transitions. Timer0 is
used for the timing of the motor frequency. The Timer0
period is based on the ADC result, the main crystal fre-
EQUATION 4:
FIGURE 7:
Timer0 Reload Value =
FFFFh –
 FOSC 
 4 
Sine samples per cycle x Timer0 Prescaler x ADC
TIMER0 OVERFLOW AND PWM
Timer2 to PR2 match Interrupt
Timer1 overflow Interrupt
Timer0 overflow Interrupt
Average voltage
Volts
Volts
Time
Time
 2002 Microchip Technology Inc.
DS00843A-page 9
AN843
System Overview
time between the respective higher and lower PWMs.
This driver needs an enable signal, which is controlled
by the microcontroller. The IGBT driver has two FAULT
monitoring circuits, one for over current and the second
for under voltage. Upon any of these FAULTS, the outputs are driven low and the FAULT pin shows that a
FAULT has occurred. If the FAULT is due to the over
current, it can be automatically reset after a fixed time
delay, based on the resistor and capacitor time
constant connected to the RCIN pin of the driver.
Figure 8 shows an overall block diagram of the power
and control circuit. A potentiometer is connected to AD
Channel 0. The PICmicro microcontroller reads this
input periodically to get the new speed or frequency reference. Based on this AD result, the firmware determines the scaling factor for the PWM duty cycle. The
Timer0 reload value is calculated based on this input to
determine the motor frequency. PWM1 and PWM2 are
the hardware PWMs (CCP1 and CCP2). PWM3 is the
PWM generated by software. The output of these three
PWMs are given to the higher and lower input pins of
the IGBT driver as shown in Figure 8. The IGBT driver
has inverters on the lower input pins and adds dead-
FIGURE 8:
The main 3-phase supply is rectified by using the
3-phase diode bridge rectifier. The DC ripple is filtered
by using an electrolytic capacitor. This DC bus is
connected to the IGBTs for inverting it to a V/f supply.
BLOCK DIAGRAM OF 3-PHASE INDUCTION MOTOR CONTROL
3-Phase AC
Input
3-Phase Diode
Bridge Rectifier
Capacitor
Potentiometer
Fwd/Rev
Run/Stop
ADC
PWM1
PWM2
PWM3
PIC18XXX
En
FAULT
HIN1
HIN2
HIN3
LIN1
LIN2
LIN3
En
HOut1
IGBTH1
HOut2
IGBTH2
HOut3
IGBTH3
LOut1
IGBTL1
IGBT
Driver LOut2
IGBTL2
LOut3
IGBTL3
FAULT
CONCLUSION
To control the speed of a 3-phase induction motor in
open loop, supply voltage and frequency need to be
varied with constant ratio to each other. A low cost solution of this control can be implemented in a PICmicro
microcontroller. This requires three PWMs to control a
3-phase inverter bridge. Many PICmicro microcontrollers have two hardware PWMs. The third PWM
is generated in software and output to a port pin.
DS00843A-page 10
3-Phase Induction
Motor
3-Phase
Inverter
TABLE 1:
MEMORY REQUIREMENTS
Memory
Bytes
Program
0.9 Kbytes
Data
36 bytes
 2002 Microchip Technology Inc.
AN843
APPENDIX A:
TABLE A-1:
TEST RESULTS
TEST RESULTS
Test #
Set Frequency (Hz)
Set Speed (RPM)
Actual Speed (RPM)
Speed Regulation (%)
1
7.75
223
208
-1.875
2
10.5
302
286
-0.89
3
13.25
381
375
-0.33
4
16.75
482
490
+0.44
5
19.0
546
548
+0.11
6
20.75
597
590
+0.39
7
24.0
690
668
-1.22
8
27.0
776
743
-1.83
9
29.0
834
834
0.0
10
33.0
949
922
-1.5
11
38.0
1092
1078
0.78
12
45.75
1315
1307
-0.44
13
55.5
1596
1579
-0.94
14
58.25
1675
1644
-1.72
15
60
1725
1712
-0.72
Above tests are conducted on the motor with the following specifications:
•
•
•
•
•
•
Terminal voltage: 208-220 Volts
Frequency: 60 Hz
Horsepower: ½ HP
Speed: 1725 RPM
Current: 2.0 Amps
Frame: 56 NEMA
 2002 Microchip Technology Inc.
DS00843A-page 11
DS00843A-page 12
C14
R8
S2
4.7K
+5V
R1
U1-32,31
4.7K
U2-7
0.1 µF
0.1 µF
0.1 µF
U1-12,12
C22
FAULT
C11
VDD
0.1 µF
1N914
D5
C10
4
3
R3
4.7K
S1
R9
MCLR
S3
4.7K
R10
10K
VSS
EN
FAULT
RB5
RB6
RB7
LED1
LED2
S2
S1
AN0
MCLR
VSS
VSS
20
19
26
25
24
23
18
17
16
15
OSC1
C13
15 pF
15 pF
OSC1
C12
20 MHz
Y1
RC3
RC2
RC1
RXD
TXD
R2
5K
OSC1
OSC2
OSC2
13
OSC2 14
PIC18F452
RA0
RA1
RA2
RA3
RA4
RA5
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
S2
2
3
4
5
6
7
33
34
35
36
37
38
39
40
1
RE2
RE1
RE0
RD7
RD6
RD5
RD4
RD3
RD2
RD1
RD0
RC7
RC6
RC5
RC4
RC3
RC2
RC1
RC0
10
9
8
30
29
28
27
22
CCW
CW
AN0
LED2
LED1
VSS
OSC2
OSC1
LED1
LED2
S2
S1
AN0
MCLR
VDD
RA0
RA1
RA2
RA3
RA4
RA5
MCLR
VDD
R5
470
470
R6
U2
RC0
RC1
RC2
RC3
RC4
RC5
RC6
RC7
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
D2
D1
PIC16C73
8
VSS
19 VSS
10 OSC2
9 OSC1
2
3
4
5
6
7
1
20
18
11
12
13
14
15
16
17
TXD
RXD
RC1
RC2
RC3
21
22
23
24
EN
25
FAULT
26
RB5
27
RB6
28
RB7
FIGURE B-1:
MCLR
VDD
U1
APPENDIX B:
VDD
1
2
S1
+5V
11
VDD
32
VDD
AN843
MOTOR CONTROL SCHEMATICS
CONTROL AND DISPLAY
 2002 Microchip Technology Inc.
 2002 Microchip Technology Inc.
10K
6.8K
R22
CN5
1
2
Optional
C23
0.1 µF
C24
100 µF
1
IN
COM
2
0.1 µF
C25
OUT 3
LM340T-5.0
VR2
R40
D6
470
+5V
VSS
VDD
Jumper
FIGURE B-2:
R7
+20V
AN843
POWER SUPPLY
DS00843A-page 13
EN
FAULT
RC2
RC1
RC3
R21
+5V
C21
R20
+20V
C26
1
3
5
7
9
11
J1
2
4
6
8
10
12
1
VCC
RCIN
FAULT
EN
ITRIP
VB1
HIN1
HIN2
HIN3
LIN1
LIN2
LIN3
HO1 27
VSS 12
COM 13
A
D14
A
K
C18
D15
LO2 15
19
HO3
LO3 14
LO1 16
HO2 23
C17
+20V
K
K D13
A
C16
11
8
10
9
28
2
3
4
5
6
7
U3
IR21362_DIP28
VS1
VB2
VS2
VB3
VS3
26
24
22
20
18
DS00843A-page 14
C20
M3
M2
M1
C19
R18
1
2
R19
CN6
1Ω, 2W
R17
C15
K A
D4 R16
K A
D8 R15
K A
D9 R14
K A
D10 R13
K A
D11 R12
K A
D12 R11
CN3
C7
AC1
AC2
AC3
P6
1
2
3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
U6
C1
AGND
P3
+20V
CPV364M4U
C31 C32
C30
P4
P5
R28 R29
R27
U5
C28 C29
C27
R23 R24 R25
C8
C9
D7
470 R41
M1
M2
M3
CN2
1
DC+
2
3
DC-
CN1
1
2
3
1
2
3
CN4
FIGURE B-3:
P1
P2
+20V
AN843
POWER SECTION
 2002 Microchip Technology Inc.
AN843
APPENDIX C:
GLOSSARY
Air Gap
Locked Rotor Torque
Starting torque of the motor.
Uniform gap between the stator and rotor.
Pull-up Torque
Angular Velocity
Torque available on the rotor at around 20% of base
speed.
Velocity in radians (2π x frequency).
Rotor
Asynchronous Motor
Rotating part of the motor.
Type of motor in which the flux generated by the stator
and rotor have different frequencies.
Slip Speed
Base Speed
Synchronous speed minus base speed.
Speed specified on the nameplate of an induction
motor.
Stator
Break Down Torque
Synchronous Motor
Maximum torque on the speed-torque characteristics
at approximately 80% of base speed.
Type of motor in which the flux generated by the stator
and rotor have the same frequencies. The phase may
be shifted.
EMF
Stationary part of the motor.
Electromotive Force. The potential generated by a current carrying conductor when it is exposed to magnetic
field. EMF is measured in volts.
Synchronous Speed
Full Load Torque
Torque
Rated torque of the motor as specified on the
nameplate.
Rotating force in Newton-Meters or Pound-Inches.
Speed of the motor corresponding to the rated
frequency.
IGBT
Insulated Gate Bipolar Transistor.
Lenz’s Law
The Electromotive force (EMF) induced in a conductor
moving perpendicular to a magnetic field tends to
oppose that motion.
 2002 Microchip Technology Inc.
DS00843A-page 15
AN843
APPENDIX D:
SOFTWARE
DISCUSSED IN THIS
TECHNICAL BRIEF
Because of its overall length, a complete source file listing is not provided. The complete source code is available as a single WinZip archive file, which may be
downloaded from the Microchip corporate web site at:
www.microchip.com
DS00843A-page 16
 2002 Microchip Technology Inc.
Note the following details of the code protection feature on PICmicro® MCUs.
•
•
•
•
•
•
The PICmicro family meets the specifications contained in the Microchip Data Sheet.
Microchip believes that its family of PICmicro microcontrollers is one of the most secure products 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 PICmicro microcontroller in a manner outside the operating specifications contained in the data sheet.
The person doing so may be 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 product.
If you have any further questions about this matter, please contact the local sales office nearest to you.
Information contained in this publication regarding device
applications and the like is intended through suggestion only
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
No representation or warranty is given and no liability is
assumed by Microchip Technology Incorporated with respect
to the accuracy or use of such information, or infringement of
patents or other intellectual property rights arising from such
use or otherwise. Use of Microchip’s products as critical components in life support systems is not authorized except with
express written approval by Microchip. No licenses are conveyed, implicitly or otherwise, under any intellectual property
rights.
Trademarks
The Microchip name and logo, the Microchip logo, FilterLab,
KEELOQ, microID, MPLAB, PIC, PICmicro, PICMASTER,
PICSTART, PRO MATE, SEEVAL and The Embedded Control
Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
dsPIC, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB,
In-Circuit Serial Programming, ICSP, ICEPIC, microPort,
Migratable Memory, MPASM, MPLIB, MPLINK, MPSIM,
MXDEV, MXLAB, PICC, PICDEM, PICDEM.net, rfPIC, Select
Mode and Total Endurance are trademarks of Microchip
Technology Incorporated in the U.S.A.
Serialized Quick Turn Programming (SQTP) is a service mark
of Microchip Technology Incorporated in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
© 2002, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
Microchip received QS-9000 quality system
certification for its worldwide headquarters,
design and wafer fabrication facilities in
Chandler and Tempe, Arizona in July 1999
and Mountain View, California in March 2002.
The Company’s quality system processes and
procedures are QS-9000 compliant for its
PICmicro® 8-bit MCUs, KEELOQ® code hopping
devices, Serial EEPROMs, microperipherals,
non-volatile memory and analog products. In
addition, Microchip’s quality system for the
design and manufacture of development
systems is ISO 9001 certified.
 2002 Microchip Technology Inc.
DS00843A - page 17
M
WORLDWIDE SALES AND SERVICE
AMERICAS
ASIA/PACIFIC
Japan
Corporate Office
Australia
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200 Fax: 480-792-7277
Technical Support: 480-792-7627
Web Address: http://www.microchip.com
Microchip Technology Australia Pty Ltd
Suite 22, 41 Rawson Street
Epping 2121, NSW
Australia
Tel: 61-2-9868-6733 Fax: 61-2-9868-6755
Microchip Technology Japan K.K.
Benex S-1 6F
3-18-20, Shinyokohama
Kohoku-Ku, Yokohama-shi
Kanagawa, 222-0033, Japan
Tel: 81-45-471- 6166 Fax: 81-45-471-6122
Rocky Mountain
China - Beijing
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7966 Fax: 480-792-4338
Microchip Technology Consulting (Shanghai)
Co., Ltd., Beijing Liaison Office
Unit 915
Bei Hai Wan Tai Bldg.
No. 6 Chaoyangmen Beidajie
Beijing, 100027, No. China
Tel: 86-10-85282100 Fax: 86-10-85282104
Atlanta
500 Sugar Mill Road, Suite 200B
Atlanta, GA 30350
Tel: 770-640-0034 Fax: 770-640-0307
Boston
2 Lan Drive, Suite 120
Westford, MA 01886
Tel: 978-692-3848 Fax: 978-692-3821
Chicago
333 Pierce Road, Suite 180
Itasca, IL 60143
Tel: 630-285-0071 Fax: 630-285-0075
Dallas
4570 Westgrove Drive, Suite 160
Addison, TX 75001
Tel: 972-818-7423 Fax: 972-818-2924
Detroit
Tri-Atria Office Building
32255 Northwestern Highway, Suite 190
Farmington Hills, MI 48334
Tel: 248-538-2250 Fax: 248-538-2260
Kokomo
2767 S. Albright Road
Kokomo, Indiana 46902
Tel: 765-864-8360 Fax: 765-864-8387
Los Angeles
18201 Von Karman, Suite 1090
Irvine, CA 92612
Tel: 949-263-1888 Fax: 949-263-1338
China - Chengdu
Microchip Technology Consulting (Shanghai)
Co., Ltd., Chengdu Liaison Office
Rm. 2401, 24th Floor,
Ming Xing Financial Tower
No. 88 TIDU Street
Chengdu 610016, China
Tel: 86-28-86766200 Fax: 86-28-86766599
China - Fuzhou
Microchip Technology Consulting (Shanghai)
Co., Ltd., Fuzhou Liaison Office
Unit 28F, World Trade Plaza
No. 71 Wusi Road
Fuzhou 350001, China
Tel: 86-591-7503506 Fax: 86-591-7503521
China - Shanghai
Microchip Technology Consulting (Shanghai)
Co., Ltd.
Room 701, Bldg. B
Far East International Plaza
No. 317 Xian Xia Road
Shanghai, 200051
Tel: 86-21-6275-5700 Fax: 86-21-6275-5060
China - Shenzhen
150 Motor Parkway, Suite 202
Hauppauge, NY 11788
Tel: 631-273-5305 Fax: 631-273-5335
Microchip Technology Consulting (Shanghai)
Co., Ltd., Shenzhen Liaison Office
Rm. 1315, 13/F, Shenzhen Kerry Centre,
Renminnan Lu
Shenzhen 518001, China
Tel: 86-755-2350361 Fax: 86-755-2366086
San Jose
China - Hong Kong SAR
Microchip Technology Inc.
2107 North First Street, Suite 590
San Jose, CA 95131
Tel: 408-436-7950 Fax: 408-436-7955
Microchip Technology Hongkong Ltd.
Unit 901-6, Tower 2, Metroplaza
223 Hing Fong Road
Kwai Fong, N.T., Hong Kong
Tel: 852-2401-1200 Fax: 852-2401-3431
New York
Toronto
6285 Northam Drive, Suite 108
Mississauga, Ontario L4V 1X5, Canada
Tel: 905-673-0699 Fax: 905-673-6509
India
Microchip Technology Inc.
India Liaison Office
Divyasree Chambers
1 Floor, Wing A (A3/A4)
No. 11, O’Shaugnessey Road
Bangalore, 560 025, India
Tel: 91-80-2290061 Fax: 91-80-2290062
Korea
Microchip Technology Korea
168-1, Youngbo Bldg. 3 Floor
Samsung-Dong, Kangnam-Ku
Seoul, Korea 135-882
Tel: 82-2-554-7200 Fax: 82-2-558-5934
Singapore
Microchip Technology Singapore Pte Ltd.
200 Middle Road
#07-02 Prime Centre
Singapore, 188980
Tel: 65-6334-8870 Fax: 65-6334-8850
Taiwan
Microchip Technology (Barbados) Inc.,
Taiwan Branch
11F-3, No. 207
Tung Hua North Road
Taipei, 105, Taiwan
Tel: 886-2-2717-7175 Fax: 886-2-2545-0139
EUROPE
Austria
Microchip Technology Austria GmbH
Durisolstrasse 2
A-4600 Wels
Austria
Tel: 43-7242-2244-399
Fax: 43-7242-2244-393
Denmark
Microchip Technology Nordic ApS
Regus Business Centre
Lautrup hoj 1-3
Ballerup DK-2750 Denmark
Tel: 45 4420 9895 Fax: 45 4420 9910
France
Microchip Technology SARL
Parc d’Activite du Moulin de Massy
43 Rue du Saule Trapu
Batiment A - ler Etage
91300 Massy, France
Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79
Germany
Microchip Technology GmbH
Gustav-Heinemann Ring 125
D-81739 Munich, Germany
Tel: 49-89-627-144 0 Fax: 49-89-627-144-44
Italy
Microchip Technology SRL
Centro Direzionale Colleoni
Palazzo Taurus 1 V. Le Colleoni 1
20041 Agrate Brianza
Milan, Italy
Tel: 39-039-65791-1 Fax: 39-039-6899883
United Kingdom
Microchip Ltd.
505 Eskdale Road
Winnersh Triangle
Wokingham
Berkshire, England RG41 5TU
Tel: 44 118 921 5869 Fax: 44-118 921-5820
05/16/02
DS00843A-page 18
 2002 Microchip Technology Inc.