Interface Circuit Allows Users To Control DC Motor's Speed

Oct. 1, 2009
The circuit in this Idea for Design provides three levels of speed control for a dc motor using a PC’s parallel port (LPT1). A C++ program performs the control functions by allowing the signals from the PC port to deliver three different voltages.

The circuit in the figure provides three levels of speed control for a dc motor, using a PC’s parallel port (LPT1). A C++ program performs the control functions by allowing the signals from the PC port to deliver three different voltages to the motor.

The system is an interface circuit that connects the motor to the PC using a 4-bit binary counter (a 74LS193), three current- limiting resistors, three npn transistors, three 5-V relays, and two supply resistors. Counter inputs A, B, and C receive the control signals from three of LPT1’s data pins, through a suitable cable. The counter acts as a buffer for the weak signals coming from the PC, so any other buffer IC, like a 74LS244, can be used.

Counter outputs QA, QB, and QC connect to the three transistors (2N2222s were used in this example) through the currentlimiting resistors. The transistors increase the current level of the PC signals in order to drive the relays. Depending on the control signals generated by the PC, the relays insert or take out the supply resistors. This action applies the desired voltage level from the 12-V supply to the motor to achieve the proper speed. The On/Off operation of the relays depends on the digital sequence generated by the computer program (see the table).

When the program is selected, a Start screen appears. Pressing any key brings up a screen containing a selection menu. From this menu, the user selects the desired motor speed or Exit. Once the motor is running—at any speed—the user can stop it by pressing any key, causing the selection menu to appear again.

The integer variable “choice” in the program listing stores the selection case of the user. Based on the value of this variable, the necessary digital sequence is stored at the integer variable “data.” The function “outportb()” places the suitable digital signal at the data lines of the PC’s parallel port, which is identified through its address. (The program is available at http://electronicdesign.com.)

See code

Sponsored Recommendations

TTI Transportation Resource Center

April 8, 2024
From sensors to vehicle electrification, from design to production, on-board and off-board a TTI Transportation Specialist will help you keep moving into the future. TTI has been...

Cornell Dubilier: Push EV Charging to Higher Productivity and Lower Recharge Times

April 8, 2024
Optimized for high efficiency power inverter/converter level 3 EV charging systems, CDE capacitors offer high capacitance values, low inductance (< 5 nH), high ripple current ...

TTI Hybrid & Electric Vehicles Line Card

April 8, 2024
Components for Infrastructure, Connectivity and On-board Systems TTI stocks the premier electrical components that hybrid and electric vehicle manufacturers and suppliers need...

Bourns: Automotive-Grade Components for the Rough Road Ahead

April 8, 2024
The electronics needed for transportation today is getting increasingly more demanding and sophisticated, requiring not only high quality components but those that interface well...

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!