+ All Categories
Home > Documents > High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

Date post: 26-Oct-2014
Category:
Upload: manxx
View: 110 times
Download: 2 times
Share this document with a friend
Popular Tags:
27
ECE 445, SENIOR DESIGN PROJECT SPRING 2007 HIGH-QUALITY, LOW-LOSS, LOW-COST DC MOTOR SPEED CONTROL By Leonor Linares Joseph Puzey
Transcript
Page 1: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

ECE 445, SENIOR DESIGN PROJECT

SPRING 2007

HIGH-QUALITY, LOW-LOSS, LOW-COST DC MOTOR SPEED CONTROL

By

Leonor LinaresJoseph Puzey

TA: Brian Raczkowski

5/1/07

Project No. 8

Page 2: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

ABSTRACT

This report documents the design and building process of a dc motor control drive for a senior design student project. The drive is comprised of a buck converter, in combination with an encoder or tachometer, and current feedback control, to produce a motor system that runs at an adjustable current and torque. This control may be used for a small electric vehicle application. Extensive testing and results are also presented in this paper that proves the system to be functional and efficient.

2

Page 3: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

TABLE OF CONTENTS

HIGH-QUALITY, LOW-LOSS, LOW-COST DC MOTOR SPEED CONTROL............1ABSTRACT........................................................................................................................21. INTRODUCTION.......................................................................................................4

1.1 Specifications.............................................................................................................41.2 Subprojects................................................................................................................4

1.2.1 Buck Converter...................................................................................................41.2.2 Control Unit........................................................................................................51.2.2 Overload Controller............................................................................................51.2.3 Tachometer.........................................................................................................5

2. DESIGN PROCEDURE..............................................................................................62.1 Buck Converter Design Decisions.............................................................................62.2 Control Unit Design Decisions..................................................................................72.3 Overload Controller Design Decisions......................................................................82.4 Tachometer Design Decisions...................................................................................9

3. DESIGN DETAILS...................................................................................................103.1 Components.............................................................................................................10

3.1.1 Buck Converter Design.....................................................................................103.1.2 Control Unit Design..........................................................................................103.1.3 Overload Control Unit Design..........................................................................113.1.4 Tachometer Design...........................................................................................12

3.2 Diagrams..................................................................................................................134. DESIGN VERIFICATION........................................................................................15

4.1 Stability Test............................................................................................................154.2 Efficiency Test.........................................................................................................154.3 Overload Test...........................................................................................................164.4 Tachometer Test......................................................................................................16

5. COST.........................................................................................................................175.1 Parts.........................................................................................................................175.2 Labor........................................................................................................................18

6. CONCLUSIONS AND FUTURE WORK................................................................197. APPENDICES...........................................................................................................20

7.1 Overload Control Code............................................................................................207.2 Tachometer Code.....................................................................................................207.3 DC Motor Specs [2].................................................................................................207.4 Efficiency Test Results............................................................................................207.5 Figures.....................................................................................................................20

8. REFERENCES..........................................................................................................21

3

Page 4: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

1. INTRODUCTION

This semester, we intended to design a control drive for dc motor applications. DC motors are widely used in household items like fans and refrigerators; they are also used for electric vehicles like golf carts, wheel chairs and segways. The JL-0001 controller is the marketing title given to our project. Accurate speed and torque control is an imperative feature of electric motor control drives today. DC motors are very popular in small electric vehicles applications, therefore we have decided to design and construct a high quality, efficient and low cost dc motor control drive. This project will allow us to apply our knowledge of electrical engineering in the areas of power electronics, power management and control theory. We feel that the cost and performance goals of our product create a unique and exciting challenge.

1.1 Specifications

The control drive will be a buck converter in combination with a rotary encoder and microcontroller unit. The goal is to design a system that is efficient, inexpensive and easy to use.

12V buck converter Draws current from 0-16A Goal efficiency: 90% for motor loads of 10-50W Must be able to deliver 50W continuously Must be able to deliver100 W for at least one minute Must be able to deliver 16A at 10V (or more) for at least 5 seconds without

damage If the motor draws 16A for over 5 seconds, the control drive will automatically

shut itself off and require a manual reset Cost target: $12 or less

1.2 Subprojects

The design is divided into several modules to allow flexibility, ease of use and to simplify the debugging process.

1.2.1 Buck Converter

The buck converter is a dc-dc step down converter. Current semiconductor technology allows for fast high-power switching devices that make dc-dc converters remarkably efficient. The converter draws power from a 12V dc source and converts it to an output of virtually anywhere between 0V and 12V dc. Since we are trying to design a torque controlled drive, and the torque is linearly proportional to the armature current, the control circuitry will focus on monitoring and responding to the current through the converter [3].

4

Page 5: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

1.2.2 Control Unit

This module will monitor how much current is injected into the motor and respond to user commands to change this value of current. This unit can control current flow by adjusting the duty cycle and frequency of the MOSFET switch.

1.2.2 Overload Controller

The overload control module determines if the output current from the buck converter meets overload conditions (16 Amps or more). If the motor remains overloaded for more than 5 seconds, the connection between the battery and the buck converter is severed. This connection will remain disconnected until the user presses the reset button.

1.2.3 Tachometer

The tachometer simply determines the rotational speed of the dc motor. We wanted to implement this component of the motor drive in order to provide a platform for future engineers to build on this project. For example, to implement proportional integral (PI) control on both torque and speed.

5

Page 6: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

2. DESIGN PROCEDURE

2.1 Buck Converter Design Decisions

Figure 1 shows operation of buck converter [7]. During the “On” cycle, the power supply will charge the inductor and during the “Off” cycle the same inductor will transfer energy to the load. The voltage and current levels at the output depend on the frequency and duration of each cycle.

Figure 1 Buck Converter Operation

The most important design parameters when implementing a buck converter are the operating frequency and device ratings. We wanted to have a very fast switching converter that would require small inductor and capacitors [4]. The switching frequency cannot be too fast either because the devices involved in the converter and control unit have physical limitations as to how fast they can change states. Ultimately, a switching frequency of 10KHz was chosen semi-randomly.

According to Equations 1 and 2 this operating frequency yields necessary inductor and capacitor values of 370µH and 36mF respectively [5].

(1)

(2)

Now, these values are too large to be realistic for two reasons. By implementing the design on a breadboard we are adding much of the inductance needed, therefore the inductor can be somewhat smaller and a value of 170µH was chosen. The output capacitor must not be larger than a few hundred microfarads, otherwise it will cause a current surge during the turn on transition of several hundred Amps which would

6

Page 7: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

ultimately melt something in the circuit. We tried several sizes for output capacitors until it finally settled at 200µF.

2.2 Control Unit Design Decisions

The control unit underwent a lot of changes from the original conception. Initially, the control unit was to be implemented using the microcontroller to drive the MOSFET. The microcontroller would have used the ADC (analog-to-digital converter) to read the user input voltage and current sensor voltage. The microcontroller would then use the PWM (pulse width modulator) to output a 10 KHz signal of variable duty cycle. If the user input voltage was higher than the current sensor input voltage, the microcontroller would increase the duty cycle. If the two inputs were the same, the microcontroller would maintain the output duty cycle. Otherwise, the output duty cycle would decrease. Figure2 shows the design of the control unit and buck converter as we had originally intended. Note: junction JP2 goes to the photodiode that makes up the encoder.

Figure 2 Original Control Unit with Buck Converter Design

There were a lot of problems with implementing this sort of control. The main problem associated with the design was instabilities in the microcontroller output. For signals that were meant to have lower duty cycles, the microcontroller output was unstable (see Figure 3). In other words, when the output was supposed to have a small duty cycle, the actual duty cycle would have a large amount of variation. It was suspected that this problem was caused not only by inconsistencies in the ADC, but also the frequency range we were operating in. To confirm our suspicions, two tests were conducted.

7

Page 8: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

Figure 3 Duty Cycle Instabilities with Microcontroller

First, the microcontroller’s ability to function at lower output frequencies was tested. At a frequency of 1 KHz, the microcontroller was capable of accurately reading the input voltage on the ADC and creating a reliable and proportional output signal for the MOSFET switch. This test confirmed that the desired operating frequency of 10KHz was too high for the microcontroller to handle.

The second test operated the microcontroller at 10 KHz, but the output signal’s duty cycle was manually assigned in the c code. As in the first test, the microcontroller gave a reliable signal output with no inconsistencies.

Eventually, we decided on using an alternative design that used a voltage comparator to control the MOSFET. This design is known as a hysteretic control. The hysteretic control does not rely on a microcontroller for instructions. Instead, the voltage input from a user designated potentiometer and a current sensor are compared by the voltage comparator. If the potentiometer voltage is higher than the current sensor voltage, the voltage comparator will output a high signal. The output of the voltage comparator is connected to the gate of the MOSFET through a gate drive IC. Thus, when the user desires to apply a higher current to the dc motor, the voltage comparator will leave the switch on until the current sensor voltage matches that of the user.

The biggest benefit of the hysteretic control design was simplicity. Without having to troubleshoot programming issues associated with the microcontroller this method of control seemed like the best option.

2.3 Overload Controller Design Decisions

The overload controller, as it was originally planned, was to be integrated with the control unit. The microcontroller in the control unit would have not only controlled the switching frequency and duty cycle, but also the overload protection. Even when it was decided that the control unit would no longer use a microcontroller, we decided to continue using a microcontroller in the overload controller. This decision was made based on two features of the microcontroller: its ADC capabilities and timing features. The ADC was used to determine the current output (as dictated by the current sensor).

8

Page 9: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

The timing features made it relatively easy to determine when 5 seconds of overloaded current had passed and it was time to take action. As opposed to using a complex system of logic gates, this solution seemed much easier and proved to be effective.

2.4 Tachometer Design Decisions

First we considered buying a tachometer circuit off the web. However, online searching quickly showed that budgeting would be an issue. Thus, we opted to design our own rotational encoder/tachometer.

Part of the difficulty of this task came from translating the movement of the motor's shaft into something recognizable by hardware or a microcontroller. Initial investigations led us to use a photodiode switch (H21A1). This device acts like a normal optical switch: if it is free from obstruction it outputs a high and if it is blocked it outputs a low.

By implementing a thin gear like fixture for the motor's shaft, the photodiode can be used to detect the motion of the shaft. This motion results in a square-wave like output from the switch. Since we had already been familiarizing ourselves with the microcontroller's abilities, we decided that the microcontroller would be a good device to interpret the signals and translate it into RPMs. Figure 4 shows a picture of the gear shaft for the dc motor.

Figure 4 dc Motor Gear Shaft

There was also an issue with the microcontroller's ability to clearly read the signal using the ADC. The output from the photodiode switch was not a perfect square-wave. This made it more difficult for the microcontroller to recognize when a low to high or high to low had occurred. This problem was fixed by using a unity gain amplifier to rectify and condition the signal.

9

Page 10: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

3. DESIGN DETAILS

3.1 Components

3.1.1 Buck Converter Design

We kept the same values for the inductor and output capacitor because we were still trying to shoot for a 10KHz frequency. An input capacitor was added across the power supply to add some filtering and decoupling to the circuit in order to improve efficiency and reliability.

Choosing circuit components depended on voltage and current ratings, package and temperature ratings among other parameters. The chosen MOSFET is the IRF640, an n-channel FET with low on-state resistance (to minimize on-state losses) and capable of withstanding a 200V reverse voltage and 18A of current. The chosen free-wheeling diode, as it is commonly referred to is the MBRB2545 Schottky power diode with reverse blocking voltage of 45V which is almost four times the maximum output voltage; and a maximum forward current of 25A.

3.1.2 Control Unit Design

Circuit components that make up the control unit are all conventional integrated circuit devices. The voltage comparator LM311 was chosen based on availability at the ECE electronics shop. The MIC4424 gate driver is also standard and widely used as an amplifier. The current sensor ACS704ELC-015 was chosen based on the range of currents it could sense (-20 to 20A) and the linear relation it maintained with the respective output signal.

Hysteretic control was achieved by introducing a hysteresis band. By making the “dead band” wider or narrower we achieved control over the switching frequency while still ensuring that the average value of the feedback signal (orange trace) is the same as the reference signal (dashed trace). The output from the comparator was a clean square wave that was high when the current sensor output reached the band’s upper limit and low when it reached the lower limit. Refer to Figure 5 for a diagram of hysteretic control operation.

Figure 5 Principles of Hysteretic Control

10

Page 11: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

To adjust the width of the band one simply has to vary the ratio of resistors R3:R4 where R3>>R4 (see Figure 9). During testing the converter operated at frequencies between 10KHz and 15KHz.

3.1.3 Overload Control Unit Design

The intent of this design was to control the current output of the buck converter. If the current sustained a level above the motor's peak current rating (16A) for more than 5 seconds then the buck converter's power source would be switched off [2]. The overload controller design is principally made up of four components: a 16F877 microcontroller, a current sensor, a relay and a pushbutton.

The current sensor translates its current input into a corresponding voltage output. Figure6 shows current sensor response under different conditions. For our purposes, the current sensor output would operate between 2.5V (0A) and 5V (20A). This worked out really well, since 2.5 - 5V lies in the range of the microcontroller's ADC. Thus, the microcontroller was programmed to first determine if the current is overloaded. An overload current of 16A would render a 4.1V output.

Figure 6 Current Sensor Output as a Function of Current

Once an overload condition had been satisfied, the microcontroller would start a 5 second timer. If the current doesn't drop below 16A during those five seconds, the microcontroller switches a relay that will disconnect power supply from the buck converter. The only way for the microcontroller and relay to re-connect the battery and circuit is if the user pushes the reset button. See Appendix A for the C code and refer to Figure 7 for an outline of the microcontroller code for the overload control unit.

11

Page 12: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

Figure 7 Microcontroller Program for Overload Controller

3.1.4 Tachometer Design

The tachometer design utilizes a photodiode switch, microcontroller, gate drivers, BCD-to-7-segment converters and three 7-segment displays. The dc motor is affixed with a 24 tooth gear on the shaft. The photodiode switch is positioned so that the gear runs between the optical emitter and detector. As the motor runs, a square wave is produced by the optical detector.

Figure 8 is an outline of the microcontroller's code for the tachometer operation. The microcontroller counts the number of low to high signals that occur in 1 second. It should check for this change of state with a frequency of about 2.5MHz (oscillator frequency divided by 4). After 1 second, the number of low to high transitions is divided by 24 to give the revolutions per second. This number is multiplied by 60 to give the RPMs. Finally, the number is divided by 10 to give the RPM x 10. This number is then dissected into the hundreds, tens, and ones numbers. These numbers are then converted into BCD and sent as an output through 12 pins on the microcontroller. These pins are connected with BCD-to-seven segment display devices. Finally, the device output is sent directly to the triple seven segment display. The counter is reset every second to start the process all over again.

12

Page 13: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

The tachometer did not function correctly. The tachometer's readings were unstable and inconsistent. After conducting a number of tests, some likely sources of error are the microcontroller or the code. With more experience in PIC programming and more time, we would have hoped to correct the problem. The CCS Compiler manual and Alex Spektor’s PICHowTo were referred to when debugging [1,6].

Figure 8 Microcontroller Pseudo-code for Tachometer

3.2 Diagrams

Figure 9 contains the final design schematic of the entire system (excluding the tachometer). Refer to the parts list in section 5.1 to identify each component.

13

Page 14: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

Figure 9 Final Design Schematic

14

Page 15: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

4. DESIGN VERIFICATION

4.1 Stability Test

To verify stability we simply let the motor run loaded at 50W for an undefined period of time. The control drive was successful at maintaining this power output and even up to 60W for several minutes.

4.2 Efficiency Test

Efficiency was verified by running the dc motor attached to a dynamometer and testing the converter efficiency under different loads. Power into and out of the converter was measured using two separate Valhalla wattmeters in the power engineering laboratory. A dynamometer is a machine used to measure the torque and rotational speed produced by another prime mover, in our case the small dc motor. We used a Labview interface between the dynamometer and a PC in order to load the motor. Detailed results of this test are available in table format in the appendix. Figure 10 depicts the behavior of the circuit efficiency under different loads.

Figure 10 Efficiency vs Power

This is a very important figure and it is worth analyzing a bit more. Under unloaded conditions with and without the dyno, the converter is almost 90% efficient. Notice that after that the efficiency drops in an almost linear manner. This leads us to suspect that as the current through the converter increases in magnitude, the on-state losses and wire resistance losses become significant.

Some of these losses are not even related to the circuit, for example, the wires that connect the circuit to the power supply and wattmeters had a total resistance of 0.16Ω. At the maximum load under test, the output current reached 10.3A, which yields an I2R loss of 17 Watts! If we account for these 17 Watts the efficiency at this point improves from 65% to almost 80%! The small wires within the circuit, and the breadboard also

15

Page 16: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

contributed to on-state losses that were out of our control. The rest of the power was likely dissipated during the on-state of the MOSFET and diode and also during the commutation events. The inductor and capacitors are also non-ideal and most likely dissipated some power as well. Refer to the appendix for oscilloscope images of the behavior of some of these components.

4.3 Overload Test

The purpose of the overload test is to ensure the reliability of the overload controller. In this test, the overload controller will receive a signal equivalent to a current of 16A over 5 seconds. The controller should then switch off the relay after five seconds. After, if the reset button is pushed, the circuit should be reconnected. The test was successful and it proved that the circuit would be able to handle a prolonged overload current.

4.4 Tachometer Test

This test was simply meant to determine if the tachometer was functioning correctly. By affixing the dc motor to the dynamometer, we would be able to accurately gauge the rotational speed of the shaft and compare it with the readings from our tachometer. Since our tachometer did not work, we could not complete this test.

16

Page 17: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

5. COST

5.1 Parts

Table 1 contains a list of the parts used in the dc motor control and the high volume cost associated with each component. All prices and quotes are from www.digi-key.com.

Table 1 Bill of Materials

Part# Value CommentsPrice (US$)

R1 47K 0.01R2 5K 0.01R3 1M POT 0.49R4 10K 0.01R5 5K POT 0.49R6 5K 0.01R7 680 0.01R8 10K 0.01C1 10µ Electrolytic 0.05C2 200µ Electrolytic 0.2C3 1µ Monolithic 0.25C4 1µ Monolithic 0.25L1 40µ 0.49Q1 IRF640 1.08D1 MBRB2545 Power diode 0.91D2 1N5819 0.07U1 PIC16F877 Microcontroller 4.81U2 ECS100-AC Oscillator 0.94U3 MIC4424 Gate driver 0.81U4 LM311 Voltage comparator 0.14

U5ACS704ELC-015 Current sensor 1.64

U6 T7NS5D1-05 Relay 0.77S1 8531MZQE2 Push button 1.98 PCB* 1.79

TOTAL 17.22*Unit price when ordering 1000 units from PCBpro.com

17

Page 18: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

5.2 Labor

A simple estimate of the cost of labor per group member was $30/hr (this is a typical income rate for an entry level engineer). Table 2 lists the estimated cost for workers associated with this project.

Table 2 Labor ExpensesEmployee Wages Hours CostJoe Puzey $30/hr 250 $7500Leonor Linares $30/hr 250 $7500

TOTAL COST OF LABOR $15000

18

Page 19: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

6. CONCLUSIONS AND FUTURE WORK

Out of the list of goals we initially set out to achieve, we managed to design and build a functional 12V buck converter. Closed-loop control was also implemented and the converter was easily able to deliver 50W continuously. The overload control unit successfully protected the buck converter from high, damaging current. The efficiency spec was not met for the full range of loads partly due to significant loss in the measurement equipment. It was due to this gradual decrease in efficiency that we could not test the converter at outputs of 16A or 100W. We felt it would be dangerous to put the circuit under this amount of stress, fearing some components would fail at high temperatures.One of the toughest challenges was to embark on a project that involved hardware programming, a subject neither one of us knew anything about. Hardware debugging was also very difficult and mysterious at times, but it proved to be an immensely educational experience.Further development must be done in the tachometer algorithm until it is fully functional. The efficiency of the buck converter could be improved given more time for more extensive testing. This would entail finding optimal sizes of resistors for the control circuit, like the gate resistance and the hysteresis band resistors. Improvements must also be made in finding an optimal switching frequency and appropriate filtering components for this application.Lastly, we would have liked to layout a Printed Circuit Board and design an enclosure for the system to make the user interface simple and friendly.

19

Page 20: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

7. APPENDICES

7.1 Overload Control Code

This contains the C code used to program the microcontroller operating the overload controller.

7.2 Tachometer Code

This is the C code used for the microcontroller in the tachometer module.

7.3 DC Motor Specs [2]

7.4 Efficiency Test Results

7.5 Figures

20

Page 21: High-quality_ Low-loss_ Low-cost Dc Motor Speed Control

8. REFERENCES

[1] Custom Computer Services Inc., “C Compiler Reference Manual Version 4”,

Custom Computer Service Incorporated, 2007.

[2] Donenberg, Jon and Barry Horwitz, “Electronic Bench Press Spotter,” University

of Illinois at Urbana-Champaign, ECE 445. Spring 2004.

[3] Fitzgerald, A. E., Kingsley, C. and Umans, S. “Electric Machinery”. McGraw Hill.

New York City, 2003.

[4] Krein, P. T. “Elements of Power Electronics.” New York and Oxford: Oxford

University Press, 1998.

[5] Schelle, D. and Castorena, J. “Buck-Converter Design Demystified.” Power

Electronics Technology Magazine. June 1, 2006.

[6] Spektor, Alex, “PicProgramming: HOW-TO adopted from the old ECE 445 Web

site,” class notes for ECE 445, Depart.Of Electrical and Computer Engineering,

University of Illinois at Urbana-Champaign, Spring 2007.

[7] Wikipedia. “Buck Converter”. April 4, 2007 <http://en.wikipedia.org/wiki/Buck_

converter>

21


Recommended