Journal of Network Communications and Emerging Technologies (JNCET) Volume 7, Issue 3, March (2017)
www.jncet.org
Speed Control of DC Motor Using Microcontroller Prathmesh A. Askar EE Department, PCE Nagpur, India. Piyush P. Naphade EE Department, PCE Nagpur, India. Ajaykumar R. Jupaka EE Department, PCE Nagpur, India. Rahul V. Adle EE Department, Assistant Professor, PCE Nagpur, India. Abstract – This paper presents speed control of DC motor using an 8051 series microcontroller. The speed of DC motor is directly proportional to the voltage applied across its terminals. Hence, if voltage across motor terminal is varied, then speed can also be varied. This paper uses the above principle to control the speed of the motor by varying the duty cycle of the pulse applied to it. The paper uses two input buttons interfaced to the microcontroller, which are used to control the speed of motor. PWM (Pulse Width Modulation) is generated at the output by the microcontroller as per the program. The program can be written in assembly language or in embedded C. The average voltage given or the average current flowing through the motor will change depending on the duty cycle (ON and OFF time of the pulses), so the speed of the motor will change. A motor driver IC is interfaced to the microcontroller for receiving PWM signals and delivering desired output for speed control of a small DC motor.
microcontroller is as shown in Figure 1. The MAX 232 which is used to insert the program in the microcontroller 89C51 by using computer.
Index Terms – DC motor, 16×2 LCD, microcontroller, motor driver IC L293D.
1. INTRODUCTION Direct current (DC) motors have variable characteristics and are used extensively in variable-speed drives. DC motor can provide a high starting torque and it is also possible to obtain speed control over wide range. It is important to make a controller to control the speed of DC motor in desired speed. DC motor plays a significant role in modern industrial. These are several types of applications where the load on the DC motor varies over a speed range. These applications may demand high-speed control accuracy and good dynamic responses. DC motors are suitable for belt-driven applications and the applications where great amount of torque is required. In train and automotive traction, fuel pump control, electronic steering control, engine control and electric vehicle control are good examples of these. In aerospace, there are a number of applications, like centrifuges, pumps, robotic arm controls, gyroscope controls and so on. For precise speed control of servo system, closed-loop control is normally used. Basically, the block diagram of the speed control of DC motor using
ISSN: 2395-5317
Fig.1: Block diagram of the speed control.
©EverScience Publications
12
Journal of Network Communications and Emerging Technologies (JNCET) Volume 7, Issue 3, March (2017)
www.jncet.org
2. METHODOLOGY Following sub topics are covered in methodology:
Pulse Width Modulation
power supply
motor driver
Microcontroller
LCD display
2.1 Pulse Width Modulation: Pulse width modulation (PWM) is a method for binary signals generation, which has two signal periods (high and low). The width of each pulse varies between 0 and the period (T). The main principle is control of power by varying the duty cycle. Here the conduction time to the load is control of power by varying the duty cycle. Here the conduction time to the load is controlled. Let for a time t1, the input voltage appears across the load i.e. ON state and for t2 time the voltage across the load is zero. The duty cycle can be varied from 0 to 1 by varying t 1, T or f. Therefore, the output voltage V0 can be varied from 0 to Vs by controlling k, and the power flow can be controlled. As the time t1 changes the width of pulse is varied and this type of control is called pulse width modulation (PWM) control.
Fig.2. Wave form at different duty cycles 2.2 power supply: Power supply is the main part of the system. The electronic system requires DC supply for operation. Here step down transformer which is used for step down 230V AC supply into 12V DC supply. After that full wave bridge rectifier is used to convert from AC to DC. Figure 3 is circuit diagram conversion process of power supply. During the positive halfcycle of voltage, diodes D2 and D4 are conducting and diodes D1 and D3 are reverse bias. Therefore, current flows through the winding, diode D2, load and diode D4. During negative half-cycles of voltage, diodes D1 and D3 conduct, and diodes D2 and D4 are reverse bias, therefore current flow through diode D3, D1 and load. In each condition the current flow in the same direction.
For better understanding of PWM these diagrammatic representations can be use. Figure 2 represent the waveforms obtained as output at different voltage requirements. High speed signal (90%): The shaded part of the signal represents the ON time and the part of it represents time when it is not receiving any voltage.
Fig.3. Circuit diagram of power supply 2.3 Motor driver: L293D is a dual H-bridge motor driver integrated circuit (IC). In its common mode of operation, two DC motors can be driven simultaneously, both in forward and reverse direction. L293D has two set of arrangements where one set has input 1, input 2, output 1 and output 2 and other set has input 3, input 4, output 3 and output 4, according to above figure 4.
ISSN: 2395-5317
©EverScience Publications
13
Journal of Network Communications and Emerging Technologies (JNCET) Volume 7, Issue 3, March (2017)
If pin no 2 and 7 are high then pin no 3 and 6 are also high. If enable 1 and pin number 2 are high leaving pin number 7 as low then the motor rotates in forward direction.
www.jncet.org
Pin No. 20 is grounded
Pin No. 40 connected to 5V supply
Features of 89C51
4k ROM (EPROM)
128 byte RAM
Universal asynchronous receive-transmit (UART)
32 input-output port lines
Two, 16-bit timer/counters
Six interrupt sources and
On-chip clock oscillator and power on reset circuitry.
Fig.4.Schematic diagram of motor driver IC L293D 2.4 Microcontroller: The 89C51 has been specifically developed for control applications. As mentioned earlier, out of the 128 bytes of internal RAM, 16 bytes have been organized in such a way that all the 128 bits associated with this group may be accessed bit wise to facilitate their use for bit set/reset/test applications. These are therefore extremely useful for programs involving individual logical operations. One can easily give example of lift for one such application where each one of the floors, door condition, etc may be depicted by a single hit. The 89C51 has instructions for bit manipulation and testing. Apart from these, it has 8-bit multiply and divide instructions, which may be used with advantage. The pins of 89C51 are wired as:
Pins from port 2 i.e., P2.0 (21) to P2.7 (28) to LCD data pins.
Pins from port 3 i.e., P3.0 (10) to P3.2 (12) to LCD control pins.
XTAL 1 (19) and XTAL 2 (18) to crystal
Pins from port 3 i.e., P3.3 (13) to P3.5 (15) to Keyboard
Pins from port 3 i.e., P3.6 (16) to Motor Driver IC L293d
Pins No.9 is reset pin
ISSN: 2395-5317
Fig.5.Schematic diagram of 89C51 2.5 LCD Display: A general purpose alphanumeric LCD, with two lines of 16 characters. LCDs with a small number of segments, such as those used in digital watches and pocket calculators, have a single electrical contact for each segment. An external dedicated circuit supplies an electric charge to control each segment. This display structure is unwieldy for more than a few display elements. The "R/S" bit is used to select whether data or an instruction is being transferred between the microcontroller and the LCD. If the Bit is set, then the byte at the current LCD "Cursor" Position can be read or written. When the Bit is reset, either an instruction is being sent to the LCD or the execution status of the last instruction is read back.
©EverScience Publications
14
Journal of Network Communications and Emerging Technologies (JNCET) Volume 7, Issue 3, March (2017)
www.jncet.org
We will discuss how a 16×2 LCD is interface with AT89C51. LCD 16×2 is used as output by the controller to display data to user. The 16×2 LCD display have 16 number of data can be written on 2 lines. The pins are wired as: Pins
Pin description of LCD
1
Ground
2
Vcc
3
Contrast Voltage
4
"R/S" _Instruction/Register Select
5
"R/W" _Read/Write LCD Registers
6
"E" Clock
7 - 14
Data I/O Pins
Fig.8.Final schematic circuit with motor and all component combination In figure no. 8 bimetallic type thermostat is used with combination of relay only for protect motor from overheating. Separate step down transformer 230/18 volt which is used here for driving the motor. 4. RESULTS AND DISCUSSIONS In fig 9 as the PWM changes the speed of the DC motor is changes. Hence speed of the DC motor is controlled by PWM technique.
speed (RPM)
3000 2000 1000
Fig.6.Schematic diagram of LCD interface with 89C51
10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
0
PWM
3. HARDWARE Below figure 7 shows the connection of power supply in which diode bridge rectifier with filter is used. Power supply converts the AC supply into the pure form of DC supply with the help of filter.
Fig.9. PWM in % vs. speed 5. CONCLUSION It is quite clear from the above discussion that Speed Control of DC motor using microcontroller by using PWM may be a comprehensive system that controls the speed of a motor by giving instructions to the microcontroller to reduce the manual work. The technology saves money too and gives a return on investment. Finally we conclude that this method is one of the best methods for controlling the speed of the DC motor. 6. FUTURE SCOPE
Fig.7.Connection of power supply on PCB Above figure 6 shows the LCD interface with microcontroller 89C51.
ISSN: 2395-5317
1. Speed control of DC motor by using microcontroller can deal with robotics while moving their arms and joints. We can move their arms in whatever directions we want to move it. By just
©EverScience Publications
15
Journal of Network Communications and Emerging Technologies (JNCET) Volume 7, Issue 3, March (2017)
changing the power supply connections in the circuit we can move the arms of a robot in any direction. This will become the more important technique used in robotics and plays a prominent role in their movement. 2. Within no time this will shows their importance in the industrial area by using this technique with changes in the circuit diagram. 3. DC motors are widely used in industry because of its low cost, wide range of speed and torque, less complex control structure so better future of this project.
[2]
[3]
Remya Ravindran, Arun Kumar,” A DC Motor Speed Controller using LABVIEW and Visual Basic”, IJECT Vol. 3, Issue 1, Jan. - March 2012. N. Milivojevic, Mahesh Krishnamurthy and Yusuf Gurkaynak, Stability Analysis of FPGA- Based Control of Brushless DC Motors and Generators Using Digital PWM Technique”, IEEE Transactions on Industrial Electronics, Vol. 59, no. 1, January 2012. Rohit Gupta, Ruchika Lamba and Subhransu Padhee, ”Thyristor Based Speed Control Techniques of DC Motor: A Comparative Analysis”,
ISSN: 2395-5317
[5] [6] [7]
[8] [9]
REFERENCES [1]
[4]
[10]
[11] [12]
www.jncet.org
International Journal of Scientific and Research Publications, Volume 2, Issue 6, June 2012. Ajay P. Thakare,Member IEEE,Member ISTE2 Department of Instrumentation and control, SCET, Surat1, Department of Electronics Engineering, SIPNA, Amravati, Vol. 1 Issue 9, November- 2012. Muhammad H. Rashid, ‘‘Power Electronics Circuits, Devices, and Applications,” Prentice Hall, 3rd edition, 2003. Muhammad H. Rashid Power Electronics Circuits, Devices and Applications 3rd edition. United States of America: Prentice Hall 2004. Christopher A. Adkins and Michael A. Marra, modeling of a PhaseLocked Loop Servo Controller with Encoder Feedback. IEEE Spectrum, August 1999. Moore, A.W. Phase-Locked Loops for Motor-Speed Control, IEEE Spectrum, 1993, pp.61-67. P. C. Sen and M. L. MacDonald. Thyristorized DC Drives with regenerative braking and Speed Reversal. IEEE Transactions on energy conversion, 1978, Vol. IECI - 25, no. 4:347-354. Abu Zaharin Ahmad and Mohd Nasir Taib. A study on the DC Motor speed control by using back-EMF voltage asia SENSE SENSOR, 2003.,359-364. Iovine John. PIC Microcontroller Project Book. 2nd edition. Singapore: McGraw-Hill. Sjhinskey, FG.Process control systems. 2ndEdition, Singapore: McGraw-Hill Book Company, 2003.
©EverScience Publications
16