Today’s industries are increasingly demanding process automation in all sectors. Automation results into better quality, increased production an reduced costs. The variable speed drives, which can control the speed of A.C/D.C motors, are indispensable controlling elements in automation systems. Depending on the applications, some of them are fixed speed and some of the variable speed drives.
The variable speed drives, till a couple of decades back, had various limitations, such as poor efficiencies, larger space, lower speeds, etc., However, the advent power electronic devices such as power MOSFETs, IGBTs etc., and also with the introduction of micro -controllers with many features on the same silicon wafer, transformed the scene completely and today we have variable speed drive systems which are not only in the smaller in size but also very efficient, highly reliable and meeting all the stringent demands of various industries of modern era.
Direct current (DC) motors have been used in variable speed drives for a long time. The versatile characteristics of dc motors can provide high starting torques which is required for traction drives. Control over a wide speed range, both below and above the rated speed can be very easily achieved. The methods of DC Motor speed control are simpler and less expensive than those of alternating current motors.
In this project, speed control is attained using PWM (Pulse Width Modulation) technique and PWM generation is done using microcontroller.
PRINCIPLE
Pulse width modulation (PWM) is a method for binary signals generation, which has 2 signal periods (high and low). The width (W) 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 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 average voltage at output is given by
Va = Vmax. *
Where,
TON =Time period for Pulse ON,
TOFF =Time period for Pulse OFF
• The average load current Ia= Va/R = kVs/R where, T is the total time period =t1+t2, k = t1/T is the duty cycle.
• The duty cycle can be varied from 0 to 1 by varying t1, 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.
For better understanding of PWM these diagrammatic representations can be used. These figures represent the waveforms obtained as output at different voltage requirements.
High Speed Signal (90%):The green part of the signal represents the ON time and the white part of it represents time when it is not receiving any voltage
Fig. 1: Signal Diagram for 90 Percent Duty Cycle
Signal with half voltage (50%):
Fig. 2: Signal Diagram for 50 Percent Duty Cycle
Signal with low voltage (10%):
Fig. 3: Signal Diagram for 10 Percent Duty Cycle
In this way the average value of resultant voltage is varied. When pwm technique is used to control the speed of dc motor, the average value of voltage given to motor is varied in similar manner, hence varying the speed of the motor.
WORKING
Pulse width modulation is implemented using a microcontroller, dependent on an input value for generating variable pulse widths, for driving motor at variable speed.
Therefore, the input value used is given with the help of potentiometer.
Fig. 4: Internal Circuit Diagram of Variable Resistance
The 2 terminals of potentiometer are connected to Vcc& GND, resulting in variable voltage in range of 0-5V, in the terminal W of potentiometer. This pin serves as the input for microcontroller.
The ATmega8L has inbuilt 10 bit ADC (Analog to Digital Converter), which means it can convert any analog value between 0-5V to digital value of 10 bit resolution.
The program for generating results for pulse width is written into microcontroller’s memory using ISP (In System Programmer).
The variable output (between 0-5V) goes to the A (Analog Input) pin of the ADC (Analog to Digital Converter) of the microcontroller and gets converted into 10 bit binary value. This 10 bit binary value gets converted into corresponding decimal value of range 0-1023 (as 210=1024), which is responsible for triggering the output pin of microcontroller, for particular time duration, which further triggers the MOSFET for same duration.
Block Diagram and Implementation
BLOCK DIAGRAM
Fig. 5: Block Diagram of Avr based DC Motor Speed Controller
For example, suppose the potentiometer knob is set to deliver out 1.25V at its pin W (see fig. 46463135), which becomes input for ADC, converts it to a value corresponding to, between 0-1023.
5/1.25 = 4 1024/4 = 256
So the value comes out to be 256 !!
Now according to the program,
TON time = 256 ms& TOFF time =1024-256 = 768ms
Now, according to the formula,
Va = Vmax. *
Va = Vmax. *
Va = 25% of Vmax.
i.e. 25% duty cycle !!
In this way, duty cycle from 0% – 100% is generated. In the circuit diagram of the project, consult this:
PORT 4 – Programming Pins,
BT1 – Battery / DC Source,
Q2 – Motor Driver – MOSFET – IRF 740,
PB1 – RESET Push Button
COMPONENTS REQUIRED
i. Zeroboard
ii. Berg Strips
iii. Voltage Regulator – 7805
iv. Diode – 1N4007
v. Resistor – 330?
vi. Microcontroller – Atmega-8L
vii. Microcontroller bed
viii. RESET Tic-Tac Switch
ix. Potentiometer
x. MOSFET – IRF 740
xi. DC Motor
xii. Breadboard Wire
xiii. Jumper Wire
IMPLEMENTATION
With the help of above mentioned components and ckt. Diagram, all the components are soldered using hand solder on zero-board PCB.
Voltage regulator 7805 and diode are part of power supply module of the development board, microcontroller, RESET switch and potentiometer serve as the functional unit for input and processing/generation of PWM signals, while MOSFET acts as the motor driver IC to trigger DC motor.
The program is being burned using AVR Programmer.
Fig. 6: Image of AVR Programmer
Fig. 7: Image showing different components on AVR Programmer
Fig. 8: Prototype of AVR based DC Motor Speed Controller
APPLICATIONS
i. Variable speed drives in machines, eg. Lathe Machines.
ii. In Textile Industry.
iii. In Drives in Electric Vehicles.
iv. Can also be used as intensity reducer in DC lamps.
RESULTS
i. It fulfils all the requirements for its application.
ii. The motor responds to the average value of the pulses and not to the individual pulses as the microcontroller works at high frequency.
iii. Changing the duty-cycle of the pulse by changing the potentiometer changes the average voltage level.
Project Source Code
###
#define F_CPU 150000#include#include#define PORT_ON(port,pin) port |= (1< #define PORT_OFF(port,pin) port &= ~(1< int main(void){unsigned int adc_value;// Variable to hold ADC resultDDRD=0xff;// Set Port D for LED outputPORTD = 0x00;// Clear Portd pinsADCSRA = (1< ADMUX=0x05;//Binary equivalent of 0101// Variable to hold ADC result (adc_value)DDRD=0xff;// Set Port D for LED outputPORTD = 0x00;// Clear Portd pinsadc_value=0;while(1){ADCSRA |= (1< while (ADCSRA & (1< // wait until conversion completes; ADSC=0 means Completeadc_value = ADCW;//Store ADC result//Port D Pin triggeringPORT_ON(PORTD,6);_delay_ms(adc_value);PORT_OFF(PORTD,6);_delay_ms(1023-adc_value);}}###
Circuit Diagrams
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.