Professional Documents
Culture Documents
Design Team #2
Brad Johnson
Karl Kerstetter
David Nikkel
Steven Stone
Michael Walsh
Faculty Advisor
Dr. Iqbal Husain
Submitted on
November 23, 2004
Table of contents
List of figures .................................................................................................................... iii
List of Tables ..................................................................................................................... iv
Table of Code Listings ........................................................................................................v
Abstract............................................................................................................................... 1
1. Introduction.................................................................................................................... 2
1.1 Statement of Need................................................................................................................ 2
1.2 Problem Definition .............................................................................................................. 2
1.2.1 Goals .............................................................................................................................................2
1.2.2 Objectives .....................................................................................................................................2
1.2.3 Constraints ....................................................................................................................................2
5. Testing Procedures....................................................................................................... 24
5.1 Initial System Checks/No Load Testing........................................................................... 24
5.1.1 Input Power Phase-Rectifier/DC-DC converter..........................................................................24
5.1.2 PWM signals from the DSP........................................................................................................24
5.1.3 Inverter switching outputs...........................................................................................................24
5.1.4 No load testing ............................................................................................................................24
6. Financial Budget.......................................................................................................... 27
7. Project Schedule........................................................................................................... 28
8. Design Team Information ........................................................................................... 29
9. Conclusions and Recommendations ........................................................................... 30
10. References .................................................................................................................. 31
Appendix A Parts List ................................................................................................... 32
Appendix B Relevant Data Sheet Portions................................................................... 35
ii
List of figures
Figure 1: Hardware block diagram ................................................................................................................8
Figure 2: Power Supply and Power Factor Correction Circuit......................................................................8
Figure 3: Inrush current into the inductor of the boost converter. ...............................................................10
Figure 4: IRAMX16UP60B - Integrated Current Shunt Configuration .......................................................11
Figure 5: Steady-state ripple of the boost Power Factor Correction output ................................................12
Figure 6: Controller Circuit..........................................................................................................................13
Figure 7: RS-232 Circuit...............................................................................................................................14
Figure 8: Software Functional Block Diagram.............................................................................................15
Figure 9: Motor Control State Diagram .......................................................................................................17
Figure 10: PC Application Main Panel ........................................................................................................23
Figure 11: PC Application Graphing Panel .................................................................................................23
Figure 12: Project Gantt Chart.....................................................................................................................28
Figure 13: dsPIC overview ...........................................................................................................................36
Figure 14: dsPIC block diagram...................................................................................................................37
Figure 15: Power Module Data Sheet...........................................................................................................38
Figure 16: Development Board for Power Module.......................................................................................39
Figure 17: LM317 Voltage Regulator (U1, U2)............................................................................................40
Figure 18: Power Factor Correction IC (U3)...............................................................................................41
Figure 19: Reset IC (U3)...............................................................................................................................42
Figure 20: DRC01 Input isolated, output-regulated DC/DC converter (U7) ..............................................43
Figure 21: RS232 Driver IC..........................................................................................................................44
Figure 22: Rectifier Bridge Data Sheet.........................................................................................................45
Figure 23: Bridge Rectifier Data Sheet.........................................................................................................46
Figure 24: Transistor (Q1)............................................................................................................................47
Figure 25: Capacitors (C1, C2, C5, C35-C43).............................................................................................48
Figure 26: Diode (D6, D7 use 1N4002-T) ....................................................................................................49
Figure 27: Resistors (R2-R8, R13, R14, R22, R30-R39 USE THIS TYPE OF RESISTOR - 1/2W)..............50
Figure 28: Power Switch...............................................................................................................................51
Figure 29: AC input plug with built-in fuse holder .......................................................................................52
Figure 30: BNC speed input connector.........................................................................................................53
Figure 31: Used to connect controller board to RS232 board......................................................................54
Figure 32: DB9 connector to interface with PC ...........................................................................................55
Figure 33: Connector for In-Circuit Debugger ............................................................................................56
Figure 34: Terminal strip to connect motor to controller board ..................................................................57
Figure 35: Encoder connection.....................................................................................................................58
iii
List of Tables
Table 1: Labor costs......................................................................................................................................27
Table 2: Funding Sources .............................................................................................................................27
Table 3: Complete Parts list..........................................................................................................................32
iv
Declarations ..........................................................................................................................19
State: Stop..............................................................................................................................20
State: Start.............................................................................................................................20
State: Normal Operation .......................................................................................................20
State: Fault ............................................................................................................................21
Low Priority Interrupts..........................................................................................................21
High Priority Interrupts ........................................................................................................21
Functions ...............................................................................................................................22
Abstract
Many applications exist today for variable speed drives. Both industrial and residential applications
utilize these types of drives for heating and ventilation, automation, and many other applications.
However, the universal motor brush machines currently in widespread use in home appliances are
inefficient, wasting power and resources. The 2005 Future Energy Challenge (FEC) set forth ambitious
goals for a motor drive system to improve on the efficiency and cost for these applications. The following
design intends to meet the requirements of the FEC with a novel, low cost solution to these problems.
The design is based on the permanent magnet brushless DC motor, a technology proven reliable in
industry and ideal for this application due to its efficiency, cost, and power/torque capabilities. The motor
drive is powered from a standard wall socket and controlled by a digital signal processor utilizing pulse
width modulation to control the speed of the motor.
Key Design Features:
Permanent Magnet Brushless DC Motor (PM BLDC)
Digital Signal Processor (DSP) to control inverter
AC/DC rectifier for AC input from wall socket
DC/DC boost converter to attain necessary motor voltage
6-Switch inverter to control motor speed
Power factor pre-regulator
1. Introduction
1.1 Statement of Need
From their introduction into the consumer appliance and recreation market, brushed based electrical
motors have dominated with their ease of control, price/performance ratio, and reliability. The brushless
motor, as a more recent newcomer, has been too expensive to implement for consumer appliance and
recreational applications. However, with the falling prices of power electronic devices and digital control
systems, these motors are now on the verge of becoming a viable, economic replacement for the
antiquated brush based motor. Brushless motors exhibit similar torque and power properties when
compared to similar sized brushed motors. However, brushless motors require more power electronics
and a more complex control system than similar brushed motors. This drawback is easily made up by the
reliability of brushless motors. Brushless motors have no electrical contact points to the rotor, which is a
common failure point for brushed motors. This also leads to less friction and corresponds to higher
efficiency of the drive. With the motor bearings as the only physical failure point, brushless motors are
the king in reliability, especially in todays warranty and price driven consumer market.
1.2.2 Objectives
Produce an efficient, reliable brushless motor that runs off of a standard 120 volt, 60 hertz power
source.
Meet all the FEC competition requirements.
Contain a self-protection system that will react to continuous stall, over temp, and loss of input
without damage to any system.
Be packaged in a way that is easily implemented and serviceable.
1.2.3 Constraints
2. Design Requirements
2.1 Requirement Specifications
Produce an efficient, reliable brushless motor that runs off of a standard 120 volt, 60 hertz power source.
Many applications such as home heating and ventilation require a 120VAC 60Hz motor. This project will
cater to these applications. The motor will be capable of maintaining speeds from 150 to 5000 RPM and
produce 3.18 N-m of torque from 150 to 1500 RPM.
Meet all the FEC competition requirements. This project is being submitted to the 2005 Future Energy
Challenge. The requirements are listed in section 1.2.3, Constraints. It is the hope of this design team
to produce a successful design while representing the University of Akron during this project.
Contain a self-protection system that will react to continuous stall, over temp, and loss of input without
damage to any system. To increase cost efficiency, every effort has been taken to reduce the possibility of
any system failure which would require unit replacement or maintenance. Component failure will likely
require unit replacement, as well as downtime while a replacement unit is located and installed. This is
both an inconvenience and unnecessary cost to the end user.
Be packaged in a way that is easily implemented and serviceable. The unit should conform to a
maximum frame size of NEMA #48 and weigh less than 8 kilograms. This will allow the unit to be
installed in a variety of locations and allow for easy installation and if necessary, replacement.
3.1 Motors:
Motor selection is arguably the single most important decision made in this project. Two different styles
of motors exist that meet the requirements, and are discussed in detail below.
Switched-Reluctance motors (SRM) were some of the first electric motors to be used. They have very
low manufacturing costs and produce a high starting torque. Coupled with modern power electronics and
sensor-less designs, they exhibit an astonishing efficiency that can easily go over ninety percent. Also
important is the fact that it is a brushless motor. There are no contact points between the stator and rotor,
except for the bearings, leading to high mean-time-to-failure operation. The lack of permanent magnets
on its rotor also allows ultra high speed operation (>100,000 RPM), and high temperature applications.
However, no design is without drawbacks. SRMs exhibit a high torque ripple during each revolution.
This ripple is coupled with moderate to high vibrations and noise caused by the excitation of each pair of
poles on the stator. Newer designs have tacked these two drawbacks by adding more poles and stiffening
the stator structure, but this comes at higher manufacturing costs. SRMs also require an expensive and
complex control scheme. Sensors are often used to determine the rotor position, which is required
knowledge in order to turn on the proper switches. Sensors add higher costs to control systems along with
reliability issues. Even though SRMs were one of the first electric motors, they are still very uncommon.
Most applications, until recent, were cost prohibitive.
The Permanent-Magnet Brush-Less Direct Current motor (PMBLDC) is a more common motor that has
proven itself over the last twenty years. It is much quieter than the SRMs and has a relatively easy
control algorithm. It is suitable for many applications where moderate torque ripple is acceptable and
efficiency is not the primary concern. High speed and high temperature operations also pose a problem
for this style of motor due to the permanent magnets on the rotors. However, the slightly elevated
manufacturing cost of the PMBLDC, when compared to the SRM, poses only a small obstacle. Often the
development of an algorithm for a SRM poses a more significant engineering cost than the relatively
simple PMBLDC. As more engineers are educated on the workings and control of SRMs, this cost will
decrease.
Either motor would be suitable for this application. Only minor changes need to be made to switching
and power supply topologies to swap between the two. Both are low cost enough to use, but SRMs do
have the cost advantage if their complex algorithms can be dealt with. Unfortunately, the group was
unable to find a commercially available SRM motor that would fit the bill. This pretty much determined
the motor selection.
Dollars1. Since an ADC is not onboard, another IC would be needed which also adds to the cost for this
solution.
The final solution to consider is the ASIC approach. The biggest advantage to this solution is everything
has already been designed and no algorithms need to be written, just drop in the IC and it works. The
disadvantages to this approach are the cost and the inability to change any aspects to how the controller
functions. The cost of ASICs range from just under $2 to $18 US. Of course, the $2 ASIC MC33035 has
very few features, and the $18 MC73110 for example has all of the desired features built in, but the cost
takes up almost half of the target budget of $40.
The controller of choice that appears to meet the necessary requirements is a combination of a DSP and a
microcontroller. It is the dsPIC manufactured by Microchip Inc. It gives us both the computational
power of a DSP but also has the peripherals built in that are need, like a UART. The cost of a dsPIC
ranges from $5 to $8 US depending on the size of memory and options needed.
3.4 Communication:
For providing user feedback and the ability to change the operating parameters of the motor, we have
decided to add some type of communication between the control system and a user interface module. The
interface module could be a laptop or possibly an LCD Display, but what ever the case may be there
needs to be some sort of communication protocol between them. The 2 protocols being considered are
RS-232 and USB.
The RS-232 has been the long running standard for serial type communication, and is very easy to
implement. The disadvantage is it is relatively slow when compared to todays speeds of serial
communication. This shouldnt be a very big issue since only a small amount of data will be transmitted
at any given time. The cost to implement is less than $2 US.
USB on the other hand, is both newer and faster than RS-232. It also has better noise immunity built into
the protocol than RS-232. The big advantage USB has over RS-232 is its a Plug-N-Play type
architecture. Also, Manufactures of PCs and Laptops are starting to replace serial ports with USB ports.
The disadvantages of using USB are the cost to implement and the complexity associated with this
protocol. The cost of Silicon Laboratories CP2101 (a USB to UART IC) is $5.70 US.
Arrow Electronics www.arrow.com Stratix part is most expensive and Cyclone part is the least expensive
7
Inverter
w/ Gate
Driver
DC/DC
Gate
Driver
Source
Power
Factor
Prereg.
Digital
Signal
Processor
DSP
Source
The preceding block diagram, while very general, provides the basic overall design of the electric motor
drive. Each block will be discussed in depth in the discussion to follow. The complete hardware design
is shown in Figure 2, at the end of this section.
1
VBUS
+22V
3
1
+22V
D1
20ETF06
VSENSE
R10
D2
4
.25 35W
3
VAC
R11
V+
AC
R12
R18
910k
0.1uF
+
C10
100uF
C12
0.1uF
C7
10uF
C
D4
1N5817
R15
3.9k
Iac
J1
PLUG AC MALE
SW1
20A SPST
R19
VRMS
+5V REGULATOR
VBUS
91k
C14
0.1uF
R20
20k
C24
0.560uF
Q1
IRF460
R22
+22V
3
1
U2
IN OUT
ADJ
LM317T(3)
10
2
D7
1N4002
R23
1k
D9
1N5820
C9
C11
62pF
620pF
PK_LIMIT
D10
1N5343
MUL_OUT
Iac
VRMS
1
2
3
4
5
6
7
8
GND
PK LMT
C/A OUT
I SENS
MUL OUT
I AC
V/A OUT
V RMS
GT DRV
VCC
CT
SS
R SET
V SENS
ENA
V REF
16
15
14
13
12
11
10
9
+22V
C26 .0012uF
C6
VSENSE
R26
84.5k
C2
1uF
B
C8
10uF
0.51uF
10k 1/4W
PK_LIMIT
10k
R27
150k
C25
0.164uF
C5
1uF
D5
1N5817
C27
100pF
R29
1.82k
A
PC INTERFACE
Controller
PC INTERFACE.Sch
Controller.Sch
Iac
VSENSE
R28
R3
UC3854
R25
1.91k
R24
2.49k
U3
R21
20k
620k
GBPB2506W
C13
+22V
D8
1N4748
C1
1uF
+22V
30k 5W
1
R17
4.12k
MUL_OUT
KBPC801
1uF
.25 35W
D3
100
R9
D6
1N4002
R16
392
R13
+22V
C4
470uF
R2
10k
LM317T(3)
R14
8.2M
T1
C3
C45
470uF
IN OUT
ADJ
R1
511k
U1
V DC =
2VRMS
2 2 * VMAX
In order to achieve the AC/DC conversion, a single phase full wave rectifier IC, IR25XB04H,
manufactured by International Rectifier, was utilized based upon the diode blocking voltage capabilities,
cost, and current handling capabilities. The peak forward diode voltage is 0.975V, providing little power
loss. A 450F capacitor is placed across the output to filter the AC components in the output and improve
the DC quality of the output.
This rectified voltage supplies the remainder of the drive. It directly feeds to the DC/DC converter
supplying the motor, as well as a step down transformer that supplies the lower voltage level required by
the remaining components.
With Vin = 108 V and a desired Vo = 400 V, the required duty ratio is D = 0.73. The period (T) of
switching will be controlled by the power factor preregulator, discussed later.
Immediately following the DC/DC converter is a simple voltage divider network parallel to the output
capacitor. The network consists of two large resistors in series, 511 k on the high side and 9.76 K on
the low side. This results in a voltage of 7.497 V at the node between the two, which will provide the
required 7.5 V reference output voltage for the power factor preregulator.
Because of the high inrush current when the converter is first powered up, an additional divider network is
placed parallel with the output capacitor. This network will supply the required 5V signal to the enable
pin of the power factor preregulator. However, this signal will only reach 5V when the capacitor voltage
reaches 100V. This effectively turns on different stages at different times to minimize the inrush current
due to charging capacitors. Figure 3 shows the inrush current resulting from a simulation run of the
circuit.
9
4.1.3 Inverter
The inverter consists of six Insulated Gate Bipolar Transistors in a high/low configuration. The IGBTs
are arranged such that the phases of the motor can be turned on and off with the correct polarity based
upon inputs from the Digital Signal Processor. They utilize a three high/three low configuration, as
shown below in Figure 4.
The DSP itself can not source sufficient current to control the IGBTs. This issue is resolved by utilizing
six gate drivers. These gate drivers provide the necessary voltage and current to drive the IGBTs.
An integrated power module, manufactured by International Rectifier, was selected as the inverter for this
application. It integrates six IGBTs with bootstrap diodes and a driver IC capable of utilizing the output
signal from the DSP. It also has the capability for temperature monitoring and overcurrent protection.
The IGBTs are rated for a maximum blocking voltage of 600 V and RMS phase current of 6 A at 25 oC.
The only drawback is that an additional power supply is required to provide the 15 V necessary for the
gate driver IC. This will be provided via linear regulator, discussed later.
10
4.1.4 Motor
For the intended application, a Permanent Magnet BrushLess DC motor is ideal. It is a quiet motor based
on proven technology. It is also relatively easy to control when compared to other motors suitable for this
application. Furthermore, the fact that it is brushless decreases the required maintenance and increases
the longevity of the motor.
The motor expected to be used is manufactured by Pacific Scientific, model PMA42N. It is a six pole PM
BLDC motor. It provides a rated power of 1441 watts and maximum speed of 5450 RPM at an operating
voltage of 400 V. The maximum rated winding voltage is 480 V. The back EMF constant is 67 VRMS/kRPM. The DC line-to-line resistance is 5.1 and the line-to-line inductance is 14.5 mH. It meets
the size requirements set forth for the FEC Electric Motor Drive competition.
4.1.5 Transformer
The transformer mentioned earlier is a linear transformer with a turns ratio of 55:13. This provides 22 V
to supply the remaining components of the circuit. The output of the low side of this transformer is
rectified due to the switching current on the high side. This is achieved utilizing a full bridge rectifier IC.
The IC chosen for this application is a KBPC3 series rectifier bridge manufactured by International
Rectifier. The output of this rectifier feeds the remaining components in the circuit. It directly powers the
power factor preregulator as well as two linear regulators.
frequency of the switching to maximize the power factor. This is achieved by adjusting the switching
period so that the current drawn by the DC/DC converter resembles is a half-sinusoidal waveform. This
will minimize the current distortion and maximize the power factor. Figure 5 is a simulation output of the
steady-state ripple of the boost power factor correction output.
For this application, the UC3854 manufactured by Unitrode was chosen. It is supplied with a 22 V power
supply from the step down transformer and a 7.5 V reference, as discussed in the DC/DC converter
portion of this report. It also provides the gate driver for the MOSFet used in the DC/DC converter.
12
Note that there is an additional current coming from ADJ of approximately 50 to 100 A. However, this
has a minimal impact on the output (<2% in the case of the 15V supply).
In the case of the 15 V supply, R1 and R2 were found to be 392 and 4.12 k, respectively. For the 5 V
supplying the DSP, R1 and R2 were chosen to be 1k and 2.49 k, respectively.
QUADRATUREENCODER INTERFACE
+5V
R4
10k
Vdd
RST
+5V
1
CURRENT 2
3
SPEED
4
TEMP
5
INDEX
6
QEI A
7
QEI B
8
9
10
TX
11
12
RX
13
14
Y1
+5V
14.7456MHz
C28
16pF
R31
28
27
26
25
24
23
22
21
20
19
18
17
16
15
AVdd
AVss
PWM1L
PWM1H
PWM2L
PWM2H
PWM3L
PWM3H
Vdd
Vss
PGC
PGD
FLTA
INT1/RD0
L PWM1
H PWM1
L PWM2
H PWM2
L PWM3
H PWM3
R32
QEI B
470
0.1uF
R33
33k
R34
33k
C30
R35
33k
0.1uF
C31
0.1uF
C32
0.1uF
+5V
C17
0.1uF
C
EMUC
R36 470
FAULT
DSPIC30F2010
C16
0.1uF
C29
16pF
MCLR
AN0
AN1
AN2
INDEX
QEA
QEB
Vss
OSC1
OSC2
UTX
URX
Vdd
INT2/RD1
QEI A
470
C15
QIB
U5
INDEX
470
QIA
Vss
R30
INDEX INPUT
DSP CONTROLLER
U4
MCP100
R37
470
EMUD
2
1
B
+15V
C33
10uF
VBUS
C18
0.1uF
H PWM1
L PWM1
14
H PWM2
L PWM2
16
19
H PWM3
L PWM3
17
20
FAULT
CURRENT
TEMP
21
22
13
15
18
23
U6
Vdd
H INPUT1
L INPUT1
H INPUT2
L INPUT2
H INPUT3
L INPUT3
FAULT
ITRIP/SENSE
VTH_TEMP
Vss
IRAMS10UP60B
V+ BUS
V- BUS
VB1
U VS1
VB2
V VS2
VB3
W VS3
10
12
2
3
C35
22uF
C19
0.1uF
4
+
C36
22uF
M1
C20
0.1uF
4
5
6
7
8
PHASE A
SPEED
PHASE B
PHASE C
R6
10k
+5V
INDEX INPUT
QIA
QIB
R5
10k
BANANA PLUGS
+5V
INDEX
Q ENCDR A
Q ENCDR B
GND
PM BLDC
1
2
A
+
C37
22uF
C21
0.1uF
Critical to the success of this design is the generation of PWM signals to control the current feeding into
the motor. The dsPIC30F provides hardware support for up to six signals, with three duty cycle generators
and six output pins. Three 16-bit special function registers are used to specify the duty cycle values for the
PWM module. All the software will have to do is fill these registers with the appropriate values.
13
Position and speed feedback from the motor is being implemented using an encoder mounted on the
motor. This will produce 1024 signal transitions per revolution. The dsPIC has a Quadrature Encoder
Interface, or QEI, that will take care of much of the logic involved here. The encoder provides three
signals: phase A, phase B, and an index pulse. The index pulse is triggered once every revolution,
providing absolute position information from which to reference the encoder count. The QEI will
determine the direction of the motor by analyzing the order in which the phase changes come in. A 16-bit
counter then contains the actual count of signal transitions on the phase lines. This counter can be set to
reset every time an index pulse is received, and so transforming the counter into an absolute position
reference.
For monitoring fault conditions, the dsPIC provides an Input Change Notification Module. The
International Rectifier inverter chip being used has an overcurrent/ overtemperature signal. The processor
can be configured to generate an interrupt in response to a change on these pins. This removes the need to
constantly poll the fault input.
Also integrated on-chip is a 10-bit high speed analog-to-digital converter, with a maximum sampling rate
of 500ksps. The converter has 16 inputs multiplexed into 4 sample and hold registers. The current design
calls for two A/D conversions, which is well within the capacity of this processor.
The motor driver will be communicating with a PC for diagnostics and troubleshooting. To take care of
this, the dsPIC30F is equipped with a Universal Asynchronous Receiver Transmitter (UART) module.
This capability will be used to establish communication using the RS-232 protocol. Figure 7 shows a
complete block diagram for the dsPIC.
1
J6
J4
+5V
4
3
2
1
TX
RX
6
5
4
3
2
1
1
2
3
4
RX
TX
+5V
CON4
CON4
EMUC
EMUD
+5V
Vpp
RJ11
RS232 DRIVER
ISO +5V
C38
1uF
C39
1uF
C22
0.1uF
C40
1uF
2
6
16
18
V OUT
INPUT GND
ERROR
V REC
SYNC
ENABLE
OUTPUT GND
ISO +5V
9
12
R7
C23
0.1uF
10k
PC TX
TX
C34
10uF
7
11
R8
10k
C42
1uF
13
8
11
10
1
3
R1 IN
R2 IN
T1 IN
T2 IN
C1+
C1 -
GND
V INPUT
R1 OUT
R2 OUT
T1 OUT
T2 OUT
C2+
C2 -
MAX232ACPE(16)
12
9
14
7
4
5
RX
PC RX
B
+
C43
1uF
15
C44
2.2uF 17
U7
V+
VVCC
U8
1
C41
1uF
TO PC COM PORT
DCR01
J5
PC RX
PC TX
1
6
2
7
3
8
4
9
5
A
DB9
14
imeasured
A
D
C
command
A
D
C
iactual
error
Speed
Controller
idesired
ierror
Current
Controller
ioutput
PWM
Generator
Rotor
position
actual
Temperature
Overcurrent
Speed / Position
Module
Encoder
input
Fault
monitoring
15
16
Initialize
Stop
FAULT_CLEARED
FAULT_DETECTED
Startup
Fault
speedCmd <
STOP LIMIT
FAULT_DETECTED
FAULT_DETECTED
Normal
Operation
actualSpeed >
NORMAL_OP_LIMIT
4.3.2 Initialize
In the initialization state, all of the relevant registers and ports on the processor will be set to a known,
stable state. Interrupts and timers will also get configured in this state. There is a RESET command (not
shown on the diagram to avoid clutter) that will send the processor to this state from any other state.
When the initialization code is done, the state will change to STOP.
17
4.3.3 Stop
The processor will await a starting command in the STOP state. Inside this state, it will convert the
command input into a digital representation (speedCmd). As long as this does not rise above a preset limit
(START_LIMIT), the controller will remain in the STOP state. When this condition is met, the
STARTUP state will be reached. As mentioned previously, a RESET command will send the machine to
the INITIALIZE state, and a FAULT_DETECTED will send it to the FAULT state.
4.3.4 Startup
Starting operation of the motor will require a different algorithm than that of normal operation. When the
actual speed of the motor, calculated from the motor encoder, reaches NORMAL_OP_LIMIT, the
processor will enter its NORMAL OPERATION state, and implement the primary speed control
algorithm. If the motor fails to attain the required threshold, control will go to the FAULT state.
4.3.6 Fault
The FAULT state is accessed when an error condition is detected. In this state the processor will attempt
to recover from the fault, and if it is possible, then return to the STOP state. By always going to the STOP
state, unexpected startups of the motor are avoided. It will take a new command to get the motor going
again.
18
speedCmd = 0;
actualSpeed = 0;
actualCurrent = 0;
recoveryAttempts;
desiredCurrent = 0;
19
Listing 2:
State: Stop
Listing 3:
State: Start
Listing 4:
Listing 5:
State: Fault
Listing 6:
if (interrupt == currentTimer)
{
//Fault check
CheckForFaults(&faultCond); //verify everything is working properly
if ( (faultCond & 0x0f) != fOk)
dState = sFault;
//go to fault state
EnableInterrupts();
//allow other interrupts
DoCurrentADC(actualCurrent);
//Get measured current
//run current controller loop
outCurrent = CurrentController(actualCurrent, desiredCurrent);
PWMController (outCurrent); //update PWM signal
}
else if (interrupt == EncoderTransition)
{
int elapsedTime = timer value;
reset timer;
//get value of up/down counter in QEI, indicating distance from
//index pulse
GetEncoderCount(presentEncoderCount);
//convert position into speed and switches command
SpeedPosition(presentEncoderCount, &actualSpeed, &switchesOn, elapsedTime);
//run speed controller with external speed command and measured speed
GetSpeedCmd(speedCmd)
if (speedCmd < STOP_LIMIT)
dState = sStop;
//go to stopped state
else
desiredCurrent = SpeedController(actualSpeed, speedCmd);
//Diagnostic message to PC
SendMessage(actualSpeed, actualCurrent, faultCond);
}
Listing 7:
if (interrupt == RESET)
21
{
StopMotor();
//stop motor before resetting
dState = sInit;
}
Listing 8:
Functions
CheckForFaults(faultCondition* faultCond)
{
faultCond = fOk;
if (temperature)
faultCond |= fOverTemp;
if (overCurrent)
faultCond |= fOverCurrent;
// Stall condition
if ( actual speed is much smaller than speedCmd)
{
if ( faultCond & fPossibleStall)
faultCond |= fStallCond;
else
faultCond |= fPossibleStall;
}
};
SpeedPosition (short int presentEncoderCount, int* actualSpeed, int *switchesOn, int
elapsedCount)
{
//set switchesOn parameter to match the encoder count range
switchesOn = encoderCountRange(presentEncoderCount);//lookup table
elapsedTime = elapsedCount/COUNTS_PER_SECOND;
actualSpeed = (ENCODER_DISTANCE/elapsedTime);
};
4.5 PC Diagnostics
A PC application is being written to provide user feedback of how the motor is performing. The
application is developed in National Instruments LabWindows to provide an easy to use windows based
application. The information that will be displayed to the user is speed, temperature, and a graphical
representation of phase current over time. The user will also be able to change the desired speed of the
motor. The motor will still be able to run independently, by providing a DC voltage from 0 to 10 volts.
Figure 10 shows the main panel with temperature and current speed, and the dial to change the desired
speed. Figure 11 shows what the graphical representation of the phase current over time will look like.
22
23
5. Testing Procedures
5.1 Initial System Checks/No Load Testing
Since the motor drive and motor system involves moving parts at high speeds, it is critical for safety to
inspect key sections of the drive individually before implementing them in the designed system. This will
involve several steps which will verify the successful operation of:
5.3.2 Torque
Torque will be determined from the test stand and external motor load. Using this system the output
torque of the motor will be measured. The speed of the motor will be varied from 150-1500 RPM as
specified in the FEC requirements, and if the system provides a continuous output torque of 3.18N-m then
the specification is met.
5.3.3 Efficiency
Efficiency of the system can be measured by the following relation
= Pout / Pin
Therefore, by measuring input power from the 120Vrms/60Hz/ 1-phase supply,
i.e. the current and voltage and comparing with the power used by the motor, efficiency can be
determined. The system will meet the specifications if its efficiency is measured to be at least 70% over
the specified range of shaft loads and speeds.
25
5.3.7 EMI
EMI emitted by the motor over the required speed range will be measured with a spectrum analyzer probe
and measurement equipment. If the average of the radiated EMI is less than 60dBV over the distance
specified in the FCC class A industrial standard, then the specification is met.
26
6. Financial Budget
The budget for this project is made up of labor and parts costs. Labor costs, as shown in Table 1, were
calculated at $10.00 per hour for each team member.
Table 1: Labor costs
Team Member
Johnson, Brad
Kerstetter, Karl
Nikkel, David
Stone, Stone
Walsh, Michael
Hours/Wk
10
10
10
10
10
Weeks
30
30
30
30
30
Hourly Rate
$
10.00
$
10.00
$
10.00
$
10.00
$
10.00
Total:
Estimated Cost
$
3,000.00
$
3,000.00
$
3,000.00
$
3,000.00
$
3,000.00
$
15,000.00
Looking at the projected parts cost, per Table 3 in Appendix A, yields a project cost of $2,939.02. This is
not including the team labor costs, which are being donated. This is well above the standard $75.00
available per team member provided by for the Senior Design. The remaining funds are being provided by
the College of Engineering. Table 2 shows the total funds available to the FEC Motor Drive group. This
shows that the project is within its operating budget.
Table 2: Funding Sources
Source
27
Amount
$375.00
$1500.00
$1500.00
$3375.00
7. Project Schedule
The Gantt chart below in Figure 12 shows the project schedule for the spring semester. The schedule
extends beyond the end of the semester to fulfill the FEC requirements.
28
29
30
10. References
dsPIC30F Datasheet, Motor Control and Power Conversion Family. (2004). Microchip Technology, Inc.
Shiyoung Lee, Effects of Input Power Factor Correction on Variable Speed Drive Systems, Dissertation
submitted to the Faculty of the Virginia Polytechnic Institute, Feb. 17th, 1999.
John Bottrill, AC Requirement for Power Factor Correction Circuits, Texas Instruments, SLUA263,
Copyright 2002.
Philip C. Todd, UC3854 Controlled Power Factor Correction Circuit Design, Texas Instruments,
Unitrode U-134, Copyright 1999.
Unitrode, High Power Factor Preregulator, Texas Instruments, UC3854 Properties Page, Copyright
1999.
31
Refdes
Part Num.
Description
??
??
10
C?
08052R471K9B20D
10
ECE-A1HKA010
C10
ECA-1HM101
10
C11
GRM1885C2A620JA01D
20
08052R104K9B20D
C13
B81141C1104M
C14
C24
C25
C26
10
C27
GRM2165C1H101JA01D
10
C28, C29
GRM1885C1H160JA01D
C3, C45
EET-ED2W471EA
C35 - C37
ECE-A1VKA220
C4
UVR2W010MPD
10
C44
GRM219R61E225KA12D
10
C6
ECA-1EM100
10
C9
GRM2165C1H621JA01D
D1
20ETF06FP
D10
1N5343B
D2
GBPB2506W
D3
8GBU01
D4, D5
1N5817-T
D6, D7
1N4002-T
32
Cost
Total
Cost
$
$
0.06
$
0.14
$
0.29
$
0.06
$
$
0.64
$
1.40
$
0.87
$
0.59
$
0.09
$
1.82
$
1.77
$
0.65
$
1.13
$
0.61
$
0.30
$
0.07
$
0.07
$
9.34
$
0.15
$
0.31
$
0.50
$
0.80
$
0.15
$
0.17
$
1.69
$
1.20
$
4.50
$
1.79
$
0.68
$
0.26
$
1.77
$
0.65
$
1.13
$
0.61
$
0.30
$
0.74
$
0.72
$
18.68
$
0.45
$
0.31
$
4.99
$
8.00
$
0.45
$
1.73
$
1.69
$
1.20
$
4.50
$
1.79
$
1.36
$
0.52
D8
1N4748ADO41
D9
1N5820-T
Development
Board
DM300020
Development
Board
IRADK10
J1
719W-00/02
J2
226978-3
J3, J4
TM2REA-0604
J5
747844-5
J6
RJ11-6N-B
M1
PMA42N-00112-00
M1
38720-6205
M1
38660-7803
Q1
IRF460
R?
5063JD9K760F12AF5BC
R?
B0207C20K00F5TBC
R?, R?
15FR025
R1
5063JD511K0F12AF5BC
R11
286-30K
10
R12
ERO-S2PHF6203
R13
CFR-50JB-100R
R14
CFR-50JB-8M2
R15
5073NW3K900J12AFXBC
R16
MFR-25FBF-392R
R17
MFR-25FBF-4K12
R18
5043ED910K0F12AF5BC
R19
5063JD91K00F12AF5BC
10
R2 - R8
CFR-50JB-10K
R20, R21
5043ED20K00F12AF5BC
R22
CFR-50JB-10R
R23
MFR-25FBF-1K00
33
$
0.25
$
0.68
$
300.00
$
0.75
$
0.68
$
300.00
$
349.00
$
2.42
$
7.10
$
3.12
$
1.40
$
2.87
$
349.00
$
2.42
$
7.10
$
6.24
$
1.40
$
2.87
$1,200.00
$
3.48
$
7.55
$
13.80
$
0.39
$
0.33
$
1.79
$
0.39
$
0.49
$
0.17
$
0.05
$
0.05
$
0.16
$
0.11
$
0.11
$
0.19
$
0.39
$
0.05
$
0.19
$
0.05
$
0.11
$1,200.00
$
3.48
$
7.55
$
13.80
$
1.95
$
1.66
$
3.58
$
1.95
$
1.47
$
1.71
$
0.27
$
0.27
$
0.80
$
0.54
$
0.54
$
0.95
$
1.95
$
0.54
$
0.95
$
0.27
$
0.54
R24
MFR-25FBF-2K49
R25
B0207C1K910F5TBC
R26
B0207C84K50F5TBC
R27
B0207C150K0F5TBC
R28
MFR-25FBF-10K0
R29
B0207C1K820F5TBC
R30 - R32,
R36, R37
CFR-50JB-470R
R33 - R35
CFR-50JB-33K
R9, R10
TDH35PR250J
SW1
CRE22F2FBRNE
T1
U1, U2
LM317KCS
U3
UC3854N
U4
MCP100-450HI/TO
U5
DSPIC30F2010-30I/SPG
U6
IRAMS10UP60B
U7
DCR010505P
U8
MAX232N
Y1
HC49US14.7456MABJ
Software
SW006012
$
0.11
$
0.33
$
0.33
$
0.33
$
0.05
$
0.11
$
0.05
$
0.05
$
8.17
$
0.95
$
$
1.36
$
2.45
$
0.33
$
11.35
$
19.30
$
9.91
$
0.78
$
0.88
$
895.00
Total
34
$
0.54
$
1.66
$
1.66
$
1.66
$
0.27
$
0.54
$
0.27
$
0.27
$
16.34
$
0.95
$
$
2.72
$
2.45
$
0.33
$
11.35
$
19.30
$
9.91
$
0.78
$
0.88
$
895.00
$2,939.02
35
Figure 27: Resistors (R2-R8, R13, R14, R22, R30-R39 USE THIS TYPE OF RESISTOR - 1/2W)
50
53
54
55