CI 5 DC Motor
CI 5 DC Motor
R. KARTHICK The resistor network comprising pre- The software (speedM.c) is written in
sets VR1 through VR8, resistors R1 and ‘C’ language and compiled using Turbo C
T
his circuit allows you to control the R2 and capacitor C1 are the timing com- compiler.
speed of a DC motor (in eight lev- ponents of timer IC 555 (IC4), which is Initially, when the motor is ‘off,’ the
els) from your PC’s parallel port. configured in astable mode. The output of program prompts you to press ‘Enter’ key
The PC uses a software program to con- IC4 is a square wave, which is fed to the to start the motor. Once you press the
trol the speed of the motor. base of transistor T1 via current-limiting key, the motor starts running at full speed.
The motor is connected to the PC resistor R3. Transistor T1 is used to drive After a few seconds, the program asks you
through an interface circuit. The interface the motor. to press any key from the keyboard to go
circuit consists of 1-of-8 decoder IC The pulse-width modulation (PWM) to the next screen for controlling the speed
74LS138 (IC1), hex inverter ICs 74LS04 method is used for efficient control of the of the motor. This screen has options for
(IC2 and IC3), resistor networks, timer IC motor. The output of the PC is decoded to increasing and decreasing the motor speed
555 (IC4) and motor driver transistor SL100 select a particular preset (VR1 through and also for exiting from the program. For
(T1). The decoder IC accepts binary VR8). The value of the selected preset, increasing the speed enter choice 1 and
weighted inputs A0, A1 and A2 at pins 1, along with resistors R1 and R2 and ca- press ‘Enter’ key, and for decreasing the
2 and 3, respectively. With active-low en- pacitor C1, changes the output pulse width speed enter choice 2 and press ‘Enter’ key.
able input pins 4 and 5 of the decoder at pin 3 of IC4. Thus the motor speed can This action changes the speed by one step
grounded, it provides eight mutually ex- be increased/decreased by choosing a par- at-a-time and the message “Speed de-
clusive active-low outputs (Q0 through ticular resistance. For high-power motors, creased” or “Speed increased” is displayed
Q7). These outputs are inverted by hex the transistor can be replaced by an IGBT on the screen. To go to the main menu,
inverters IC2 and IC3. or a power MOSFET. again press ‘Enter’ key.
SPEEDM.C
//R.KARTHICK,III ECE,K.L.N.C.E.,MADURAI clrscr(); }
//[email protected] outportb(P,0); for(i=0;i<8;i++)
#include<stdio.h> textbackground(9); a[i]=i;
#include<conio.h> textcolor(3); gotoxy(23,11);
int a[7],i,c; for(x=0;x<=80;x++) printf("Press Enter to start the motor");
void start(void); for(j=0;j<=25;j++) getch();
void main(void) { gotoxy(28,13);
{ gotoxy(x,j); printf("WAIT STARTING MOTOR");
int P=0x0378,j,c=7,c1,x,y; cprintf(" "); start();