Download Future Energy Challenge: Motor Controller | ECE 445 and more Study Guides, Projects, Research Electrical and Electronics Engineering in PDF only on Docsity!
Future Energy Challenge: Motor Controller
By
Brian H. Green
Nestor Castillo
ECE 445, SENIOR DESIGN PROJECT
FALL 2004
TA: Chad Carlson
December 4, 2004
ABSTRACT
This paper details the design and implementation of the control system of a single-phase,
adjustable speed motor drive for use in the Future Energy Challenge. The design uses a constant volts-
per-hertz method with integral feedback control to drive a three-phase induction machine with a PIC
microcontroller. First, the intended functions and goals of the project are described. Next, decisions
made during the design of the controller are detailed and a final design is presented including the tests
used for design verification. Finally, an estimated cost analysis is presented with overall project
conclusions.
ii
1. INTRODUCTION
1.1 Project Overview
The Future Energy Challenge (FEC) is an international student competition promoting the effective use
of electrical energy. The primary objective of FEC is to design and construct a low-cost, 500 watt,
single-phase adjustable speed motor drive resulting in a power efficiency of at least 70% for a load
range between 50 watts to 500 watts. A highly successful project could result in the replacement of
“universal motors” in residential applications such as, washing machines, refrigerators, and air
conditioning units. An overview of the project is shown in Figure 1 below.
Figure 1 FEC Project Block Diagram
Our objective for senior design was to be design and implement the control system regulating the motor
drive in accordance with the specifications given by FEC.
Customers will not directly benefit from a successful controller, but they will benefit from the overall
success of the project. Some of the benefits and features are as follows:
An estimated savings of $234.70 per year in electrical consumption [2]
Greater efficiency would result in lower U.S. energy consumption
Low maintenance costs
Greater reliability
Variable speed control
1.2 Specifications
The specifications relevant to the control system were given by the FEC and are repeated below.
Speed control
Speed is to be controlled from start to the full 5000 RPM with a linear 0-5 V analog
signal, referenced to the unit case. Except for starting, no testing will be performed below
150 RPM.
Speed regulation and accuracy
The actual operating speed should remain within 5% or 50 rpm of the voltage
command setting (2 V/1000 RPM) from no-load to full-load.
120 VAC
Input
Rectifier PFC^
Hexbridge
Inverter Motor
Control System
Power Supply
Control
System
1.3 Subprojects
The project was divided in to hardware and software subprojects for the purpose of dividing work
among group members.
Hardware: The primary components of the hardware design for the motor controller include a
DC bus voltage measurement circuit, a DC bus current measurement circuit, a serial port
interface, and a printed circuit board (PCB) layout.
Software: The primary components of the software design include the proper implementation of
a volt per hertz control algorithm through the use of an integral feedback controller. Also, an
over-current function was implemented in software as well.
2.2 Voltage Measuring Circuit
The voltage on the DC bus is measured to protect the components of the design from harmfully high
voltages. To measure the voltage, a voltage divider is used from the high to low side of the DC bus as
shown in Figure 2 below.
Ra Rb Voltage Sense +Vdc -Vdc
Figure 2 Voltage Measuring Circuit Preliminary Design
The values of the resistors are chosen so that the nominal voltage (200V) corresponds to a 3V input on
the microcontroller, according to a simple voltage divider equation shown in equation (1). The 3V value
is used so that the maximum resolution can be used on the 0-5V input signal to the microcontroller.
2 1 1 2
R
R
V
V
R R
R
Equation (1) constrains the ratio of the resistors, but their values are not constrained. A lower value of
resistance would result in more current flow, and so more loss in these sense resistors. Raising the
resistance values, on the other hand, causes the error due to the current drawn at the signal to increase.
Resistance values must be chosen so that they do not dissipate an unreasonable amount of energy, but so
that the signal they provide is reasonably accurate. We chose resistance values of 680k Ω and 10k Ω
2.3 Current Measuring Circuit
The first decision to be made in designing the current measuring circuit is the value of the current
sensing resistor. A larger value will correspond to a larger signal and so less gain required on the op-
amp circuit that gains the signal into the readable range for the microcontroller. A larger value will also
correspond to larger power consumption in the sense resistor. A balance must be struck therefore
between too large a gain and too large a power consumption.
The small signal provided by the current sensing resistor must be processed so that it is readable for the
microcontroller. An op-amp circuit is used to provide this gain as shown in Figure 3 below.
10k -Vdc
0.1uF -Vdc R 1 R 2 -Vdc Current Sense
Figure 3 Current Sensing Circuit Preliminary Design
The non-inverting configuration obeys equation (2) as described in [1]. The resistor values were chosen
to put the nominal value at 3V for the microcontroller. We chose 150k Ω and 2k Ω for the final design.
1
R
R
G (2)
The resistor and capacitor shown after the gain and rectifying stages of the circuit serves as a peak
detect. This is necessary to filter out the high frequency switching noise present from the inverter shown
in Figure 4. Effectively, the top of the curve is traced out by the peak detect for use by the
microcontroller.
Figure 4 Simulated Current in Rsense
2.4 Serial Port Interface
The serial port interface required two basic steps in processing the signals. First, the TTL logic levels of
the microcontroller had to be converted to the logic levels of the RS232 computer serial port. Secondly,
the signals had to be isolated. To change the logic levels, a standard chip was purchased, the MAX232.
Causing the timer overflow to occur more frequently would cause the output PWM voltage to trace out a
sine wave faster. This method of controlling the output voltage frequency was used to control the speed
of the motor.
Because induction machines run slower than synchronous speed by a load-dependent value called slip, a
feedback control was necessary to keep the speed regulation within the required 5%. This was
accomplished by using a photo-interrupter and an 8-toothed gear shaped feedback device mounted on
the shaft and shown in Figure 7. This feedback device provides a square wave with frequency
proportional to shaft speed.
Figure 7 Speed Feedback Device
After the feedback device was decided, a method of feedback control in software needed to be designed.
Proportional-Integral (P-I) control was considered. The microcontroller manufacturer provided example
code for a P-I feedback control, but the complexity of integrating this example code into the motor
control software made it an unattractive option. Instead, a new quasi-integral control method was
written which was simpler to integrate into the existing code.
The control software written compared the speed of the feedback device to the commanded speed to
generate an error signal. A control variable was then incremented or decremented based on this error
signal. This control variable was added to the timer reload value to cause a faster or slower overflow,
and so a higher or lower frequency output voltage. This method of integral control provided a sluggish
response, but was accurate in the steady state. Because the requirements for the FEC were only for the
steady state, this was deemed an adequate control method.
3. DESIGN VERIFICATION
The hardware designs were tested separately from the motor control software. Each hardware sub-
circuit was tested and the results are described below.
3.1 Hardware Testing
A power supply was used to provide a current signal through the current sensing resistor. The current
put out by the power supply was compared to the signal voltage put out by the circuit. The results are
shown in Figure 8 below. The circuit provided a signal which corresponded linearly to the input current
as expected. A small offset voltage was unexpectedly observed, but was accounted for in software.
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 Current (Amps) Signal (Volts)
Figure 8 Current Measuring Circuit Test Results
A voltage input to the voltage measuring circuit was provided by a power supply. Again, the signal
voltage was observed. The results are shown in Figure 9 below. The signal was linear to the input
voltage as expected, and the proper gain was observed from the voltage divider network.
0 10 20 30 40 50 60 0 10 20 30 40 50 60 Voltage (Volts) Signal (Volts)
Figure 9 Voltage Measuring Circuit Test Results
4. COST
The overall cost of the project is a combination of the cost of the parts and the cost of the labor. A
detailed breakdown for the cost of parts and labor is shown below.
4.1 Parts
A listing of the parts in the final design and their costs are shown below in Table 1.
Table 1 : Overall Cost of Parts
Part Name/Description Price Each Quantity Cost
9 PIN D-SUBMIN PLUG $0.34 1 $0.
TL082CP JFET OP AMP $0.54 2 $1.
34C3833 DRIVER RECEIVER $3.32 1 $3.
13F9751 OPTO COUPLER $1.21 2 $2.
89H0651 MICROCHIP 40 PIN I/P $11.86 1 $11.
18C7143 LINEAR REGULATOR 5V $0.51 1 $0.
ICE-163-S-TG 16-PIN SOLDER SOCKET $0.50 1 $0.
ICE-083-S-TG 8-PIN SOLDER SOCKET $0.26 5 $1.
540-AG10D 40-PIN SOLDER SOCKET $7.58 1 $7.
EP11SD1CBE MOMENTARY PC
PUSHBUTTON $3.34 1 $3.
520-HCA2000-20 20 MHZ CRYSTAL $2.50 1 $2.
MFR Series 1%,1/4W, 1k resistor $0.10 4 $0.
MFR Series 10 ohm resistor $0.10 1 $0.
MFR Series 10k resistor $0.10 3 $0.
MFR Series 470 ohm resistor $0.10 5 $0.
MFR Series 150k resistor $0.10 2 $0.
MFR Series 680k resistor $0.10 1 $0.
SR-10 .01 ohm resistor $4.02 1 $4.
75-5GAQ33 33PF ceramic capacitor $0.32 2 $0.
C322C104K5R5CA .1uF ceramic capacitor $0.20 4 $0.
2C25Z5U105M050B 1uF ceramic capacitor $0.31 5 $1.
1N4733A 5.1V 1W ZENER DIODE $0.13 4 $0.
HLMP3301 LED RED T-1 3/4 (5MM) $0.15 4 $0.
110KST-6CON RJ-11 modular jack $2.13 1 $2.
Total
Cost $46.
4.2 Overall Cost
Overall cost of the project includes the cost of labor. Below is a calculation of the overall cost for this
project.
Overall Cost = salary (hourly rate) x hours spent x 2.5 x 2 partners =
$40/hr x 120hrs x 2.5 x 2 = $24,
So the total project cost was calculated to be $24,046.61.
5. CONCLUSIONS
The project described in this paper was successful. As stated in Section 3, the DC bus voltage and
current measurement circuits responded linearly, as expected. The serial port interface was correctly
isolated and interfaced correctly with the computer. A motor was made to spin with accurate speed
control over the range defined by the FEC requirements.
Although the control system was successfully designed, the FEC project is not yet complete. As the
other components of the FEC project are integrated, the resistor values and interfaces may need to be
modified to account for design differences in other functional blocks, and for total system optimization.
Other potential changes to the control system include the tuning of the software to interface with the
FEC designed motor, and implementing a debugging interface for the isolated serial port.
APPENDIX – Schematics and Layout
T i t l e S i z e D o c u m e n t N u m b e r R e v D a t e : S h e e t o f
S K 0 0 4 6 - 2
S e r i a l P o r t I n t e r f a c e A F r i d a y , D e c e m b e r 0 3 , 2 0 0 4 1 1 12
J 8
C O N 2
R 1 0
1 k
C 1
1 u F C 2 1 u F C 4 1 u F
C 3
1 u F C 5 1 u F R 3 1 k
+ 5 V D C
R 1
1 0 o h m
+ 1 2 V
+5V
Nestor Castillo & Brian Green
R 2 1 k
+ 5 V D C
T X
R X
C 6
. 1 u F
C 7
. 1 u F
R 1 1
1 k
P 1
C O N N E C T O R D B 9
1 N C 1
2 + V F
3 - V F
N C 2
V C C 8
V E 7
V o 6 G N D
O P T O I S O 1
6 N 1 3 7
1 V O U T
2 G N D
3 G N D 2
4 N C
V I N 8
G N D 4 7
G N D 3 6
N C 2 5
R E G U L A T O R 1
L M 7 8 L 0 5
1 C 1 +
2 V S +
3 C 1 -
4 C 2 +
C 2 -
V S -
T 2 O U T
R 2 I N
V C C 1 6
G N D 1 5
T 1 O U T 1 4
R 1 I N 1 3
R 1 O U T
T 1 I N
T 2 I N
R 2 O U T
D R I V E R / R E C E I V E R 1
M A X 2 3 2
1 N C 1
2 + V F
- V F
N C 2
V C C 8
V E 7
V o
G N D
O P T O I S O 2
6 N 1 3 7
I N D X
D 2 L^ E^ D
D 3 L^ E^ D
D 4 L^ E^ D
D 5 L^ E^ D
D 6 D I O D E Z E N E R 1
D 7 D I O D E Z E N E R 1
D 8 D I O D E Z E N E R 1
T i t l e S i z e D o c u m e n t N u m b e r R e v D a t e : S h e e t o f
S K 0 0 4 6 - 1 3
M i c r o C o n t r o l l e r A F r i d a y , D e c e m b e r 0 3 , 2 0 0 4 1 1 S p e e d I n p u t 1
J 5
H E A D E R 6
Nestor Castillo & Brian Green
C 8
. 1 u F
+ 5 V D C
P W M 3
P W M 5
P W M 4
P W M 1
P W M 2
P W M 0
P W M 5
T X
R X
I _ S e n s e V _ S e n s e P W M 4 P W M 3 P W M 2 P W M 1 P W M 0
J 4
C O N 2
S W 1
S W P U S H B U T T O N
R 1 2
4 7 0 o h m s
O S C 1
O s c i l l a t o r
C 9
3 3 p
+ 5 V D C
R 1 7
1 0 k C 1 1 3 3 p
- V b u s (^1) M C L R (^2) R A 0 / A N 0 (^3) R A 1 / A N 1 R A 3 / A N 3 / V r e f +
8 R E 0 / A N 6
O S C 2
R B 7 4 0
R B 6 3 9
1 5 R C 0
1 9 R D 0
2 0 R D 1
1 1 A V D D
1 2 A V S S
R D 2 2 1
R C 6 / T X
R C 7 / R X 2 6
V S S 3 1
V D D 3 2
P W M 0 3 3
P W M 1
P W M 2 3 5
P W M 3
P W M 5 3 7
P W M 4 3 8
1 3 O S C 1
4 R A 2 / A N 2 / V R E F -
P I C 1 8 F 4 4 3 1
I N S 8 6 5 2 0
R 1 3
R 1 4
R 1 5
R J _ 1
R J - 1 1 J a c k R 1 6 4 7 0
J 9
C O N 3
R 1 8
2 k
APPENDIX – Source Code
Source code available online at
https://courses.ece.uiuc.edu/ece445/projects/fall2004/project25_file1.asm