Development of a Microcontroller Based DC Motor Speed Control System

Abstract

This work reports the development of a microcontroller based control system to change the speed of a DC motor. Pulse Width Modulation (PWM) technique was used to control the amount of power delivered to the load (the DC motor) without dissipating any wasted power. The components and assembly of this microcontroller circuit are highlighted in this paper, and the constructed circuit tested. This device was used to control the speed of a rotating fan attached to a DC motor. The DC motor speed variations were read from a Tachometer connected to this motor and the results obtained show good agreement with our expectations. DC Motor speed microcontroller devices find applications in many areas of life, and its applications in small scale industrial settings will no doubt enhance the quest for development in a developing nation like ours.

Share and Cite:

Adejumo, O. and Azeez, W. (2019) Development of a Microcontroller Based DC Motor Speed Control System. World Journal of Engineering and Technology, 7, 634-639. doi: 10.4236/wjet.2019.74046.

1. Introduction

Direct current (DC) motors find useful applications in many control systems [1]. DC motor speed control is about the change of the drive speed of the motor to a value required to perform a work process [2]. DC motors are made up of two basic parts namely the stator, which is the stationary part and the rotor, the inner rotating part, usually called the armature. The rotational speed of a DC motor depends on the interaction between the two magnetic fields set up by the stator’s stationary permanent magnets and the armature’s rotating electromagnets. By controlling this interaction, we can control the speed of rotation of the DC motor [3]. This speed control can be achieved in many different ways. A simple and easy method is the use of pulse width modulation, PWM technique, which can be achieved by driving the DC motor with a number of “on” and “off” pulses and varying the duty cycle of the pulses while the frequency is kept constant [4]. Changing or modulating the timing of these pulses, controls the speed of the motor, i.e., the longer the pulse is “on”, the faster the motor will rotate and the shorter the pulse is “on”, the slower the motor will rotate. Hence, the wider the pulse width, the more average voltage applied to the motor terminals, the stronger the magnetic flux inside the armature windings and the faster the motor will rotate. This way, the voltage across the terminals of the motor can be regulated, and, hence the power applied to the motor can be controlled. In cases “switching on” and “switching off” are done in quick succession, the motor rotates at a slower speed between zero and full rated speed [5]. This is what a PWM technique based controller does: it switches the motor “on” and “off” with a pulse train. When the motor is “on” for a short period and “off” for a long one, it will rotate slowly. When the motor is “on” for most of the time and “off” only for a short while, it will rotate at higher speed, say, nearly at full or maximum rated speed [6]. The aim of this work is to design and construct a circuit that will generate a pulse width modulation signal to control the motor speed. Initiating interrupt signals to the microcontroller using push switches (labelled as up- and down-buttons in this circuit) produces speed increase and decrease of the DC motor. This change in the motor’s speed was measured by a tachometer connected to the motor’s shaft, and the observations were in agreement with our expectations.

2. Materials and Methods

The circuit diagram shown in Figure 1 displays the DC motor speed controller circuit.

The whole assembly is composed of three main units namely; 1) the power source with its power-on reset switch sub-unit, 2) the main circuit (control unit) which obtains signals through the interrupt input switches, and 3) switching unit, incorporating the interrupt input switches and the switching power transistor for the DC motor.

The power supply unit of this circuit assembly is made up as: A transformer labelled TRF which steps down, the mains 230 V alternating current, AC to deliver a secondary output of 12 V, 500 mA. This output is rectified by a full-wave bridge rectifier circuit made up of four IN4001 diodes, labelled D1, D2, D3 and D4, filtered by a 1000 µF, 25 V electrolytic capacitor, labelled C1. The circuit regulator is a 7805, 5 V, integrated circuit IC, labelled IC1 in the circuit diagram. This acts as power-on reset for the ATmega 328P microcontroller. From the output terminal of IC1, a 0.1 µF capacitor labelled C2 is connected in series, which serves as a filter for the output from IC1. Across C2 is connected to a 330 Ω resistor labelled R1 which regulates the current passing to the LED1. Switch, S1 serves as the power-on-off for the circuit providing a manual control.

Figure 1. DC motor speed control circuit.

From this power supply unit, connection was made to the main circuit via switch S2. The oscillator circuit presented here to generate a pulse width modulation signal uses an 8-bit microcontroller, ATmega 328P labelled IC2, programmed by an ARDUINO C++ program. From the power supply pin, (1 of the microcontroller) connection is made to the power source using a 10 KΩ resistor, labelled R2, in series as a current limiter. Inputs to the appropriate pins of this microcontroller are made as shown in the circuit diagram. Output from the microcontroller is connected to a 16 × 2 liquid crystal display, LCD which interfaces this microcontroller, having a total of 32 characters (16 on each line). For each character there are 5 × 10 = 50 pixels, with all 50 pixels working together to display each character. The pixels are controlled by another controller (HD44780) in the display unit. As the pin numbers are defined on the microcontroller, it displays data on the LCD. Up and Down push buttons, serve as the speed increment and decrease switches. Two 10 KΩ resistors connected in series to these switches, labelled R3 and R4 regulates the current supplied to them. Two 22 pF non-electrolytic capacitors, labelled C4 and C5 are connected across the crystal oscillator, labelled XRO, and connected to pins 9 and 10 of the microcontroller.

Circuit Explanation

The PWM wave for speed control is generated using the ARDUINO UNO pre-programmed ATmega 328P microcontroller, which creates pulses of varying width (using timer 0) for PWM and thereby controls the motor speed. Up and Down push buttons are interfaced to interrupt the input to Pins 11 and 12 respectively of the microcontroller, IC2, controlling the increment and decrement respectively of the DC motor’s speed. By pressing any of these switches, an interrupt is generated to change the duty cycle of the pulse train. The Up push button is interfaced to interrupt and increase the duty cycle of the pulse train while the Down push button is interfaced to interrupt and decrease the duty cycle of the pulse train. The duty cycle of the pulse waveform is displayed on the LCD. From Pin 5 of the microcontroller, connection is made to the base of an npn TIP41C transistor, (labelled Q1), via a 1 KΩ resistor labelled R5. This transistor acts as a switch (in this case) for the 12 V D.C motor, labelled M, and from the transistor’s collector, connection is made to the motor M, and from the motor to the Power source. Diode D5 is an IN4007 rectifier diode, connected in parallel across the motor to prevent reverse current flow. A tachometer was connected to the D.C motor, M, which measures the speed of rotation of the motor. Outputs from the microcontroller (data pins 13 through 18 or data pins D7 through D12) are connected to the LCD. The LCD displays 10% of the value of the duty cycle, in other words, for a duty cycle of 10%, the LCD displays a value 1 and for a duty cycle 70%, the value displayed on the LCD is 7. The power for the LCD is sourced from the regulator of the power source. The wired components are shown in Figure 2.

After wiring the components together, the assembly is encased with switch S1, labelled as power-on-off button, the Up and Down push buttons are labelled as speed increase and speed decrease as shown on the case, the LCD and a fan connected to the shaft of the motor are also displayed on the case as shown in Figure 3.

Figure 2. Wired components assembly.

Figure 3. DC motor speed controller assemblyase.

3. Result

Pressing the speed decrease button, led to corresponding reduction in the speed of the DC motor and this is manifest in corresponding reduction of the speed of the fan. By pressing the speed increase button to increase the speed of the DC motor, corresponding increase of the speed of the fan was observed. The speed of rotation of the motor as measured by the tachometer is displayed in Table 1.

4. Discussion and Conclusion

DC Motor speed controller devices find applications in many areas of life. It finds good use in industrial automation systems, robotic motion control and in a number of household appliances [7]. Its applications in small scale industrial settings will no doubt enhance the quest for development in a developing nation like ours. This developed microcontroller based control system to change the speed of a DC motor reported in this work will definitely improve the need for automation in small and medium scale industrial settings. The circuit components for this circuit have been identified, and the constructed circuit tested. This circuit was used to control the speed of an electric fan. It can also be used to control the dimness of a lamp, movement of small toys and a number of other applications. In this circuit, power loss is minimal consequent of using the PWM technique to control the motor’s speed. The power loss in the switching transistor is small because the transistor is either fully “on” or fully “off” giving it a linear type of control which results in better speed stability. Also, the voltage amplitude of the motor is constant, and hence the motor is at full strength always, which means that the motor can be rotated much more slowly without stalling.

Table 1. Speed of rotation of motor.

Acknowledgements

This research did not receive any specific grant from funding agencies in the public, commercial or not-for-profit sectors.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Russel, Md.K. and Bhuyan, M.H. (2012) Microcontroller Based DC Motor Speed Control Using PWM Technique. Proceedings of the International Conference on Electrical, Computer and Telecommunications Engineering RUET, Rajshahi, Bangladesh, 1-2 December 2012, 519-522.
[2] Bhuyan, M.H. (2007) Wireless Control System for DC Motor to Position a Dish Antenna Using Microcomputer. Daffodil International University Journal of Science and Technology (DIUJST), 2, 44-49.
[3] Bhuyan, M.H., Rabby, M.A. and Tarik, M.M.G. (2010) Microcontroller Based Automatic Traffic Light Control System Design. Proceedings of the National Conference on Electronics and Telecommunications for Digital Bangladesh, Dhaka, 2-3 June 2010, 139-142.
[4] Siskind, C.S. (1959) Electrical Machines Direct and Alternating Current. McGraw Hill Book Co., New York, USA.
[5] Shuler, C.A. and McNamee, W.L. (1986) Industrial Electronics and Robotics. McGraw Hill Book Co., New York, USA.
[6] Rashid, M.H. (2010) Power Electronics Circuits, Devices and Applications. Prentice Hall Inc., USA.
[7] Mathur, A. (2008) Microcontroller-Based DC Motor Speed Controller. ElectronicsForYou, March 2008, 92-96.

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.