Thursday, March 28, 2024

PC Based DC Motor Speed Controller

This is a circuit for interfacing a motor with PC. The software generates signals from the PC that are modulated by PWM method by circuit and the motor speed is controlled. -- R. KARTHICK

This PC based DC motor speed controller circuit allows you to control the speed of a DC motor (in eight levels) from your PC’s parallel port. The PC uses a software program to control the speed of the motor.

PC based DC Motor Speed Controller
PC based DC Motor Speed Controller Circuit

PC based DC motor speed controller circuit operation

The motor is connected to the PC through an interface circuit. The interface circuit consists of 1-of-8 decoder IC 74LS138 (IC1), hex inverter ICs 74LS04 (IC2 and IC3), resistor networks, timer IC 555 (IC4) and motor driver transistor SL100 (T1). The decoder IC accepts binary weighted inputs A0, A1 and A2 at pins 1, 2 and 3, respectively. With active-low enable input pins 4 and 5 of the decoder grounded, it provides eight mutually exclusive active-low outputs (Q0 through Q7). These outputs are inverted by hex inverters IC2 and IC3.

The resistor network comprising presets VR1 through VR8, resistors R1 and R2 and capacitor C1 are the timing components of timer IC 555 (IC4), which is configured in astable mode. The output of IC4 is a square wave, which is fed to the base of transistor T1 via current-limiting resistor R3. Transistor T1 is used to drive the motor.

The pulse-width modulation (PWM) method is used for efficient control of the motor. The output of the PC is decoded to select a particular preset (VR1 through VR8). The value of the selected preset, along with resistors R1 and R2 and capacitor C1, changes the output pulse width at pin 3 of IC4. Thus the motor speed can be increased/decreased by choosing a particular resistance. For high-power motors, the transistor can be replaced by an IGBT or a power MOSFET.

Software involved

The software (speed.c) is written in ‘C’ language and compiled using Turbo C compiler. Initially, when the motor is ‘off,’ the program prompts you to press ‘Enter’ key to start the motor. Once you press the key, the motor starts running at full speed. After a few seconds, the program asks you to press any key from the keyboard to go to the next screen for controlling the speed of the motor. This screen has options for increasing and decreasing the motor speed and also for exiting from the program. For increasing the speed enter choice 1 and press ‘Enter’ key, and for decreasing the speed enter choice 2 and press ‘Enter’ key. This action changes the speed by one step at-a-time and the message “Speed decreased” or “Speed increased” is displayed on the screen. To go to the main menu, again press ‘Enter’ key.

- Advertisement -

PC based DC motor speed controller source code

 For reading other exciting DIY articles: click here


1 COMMENT

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Calculators