Help me controlling motor using PC

Discussion in 'Homework Help' started by md.nahid, Jul 14, 2008.

  1. md.nahid

    Thread Starter New Member

    Apr 26, 2008
    The assignment I was given is to control a DC motor using pc parallel port.
    Tasks should be done:
    1. Rotate anti-clockwise on press 4
    2. Rotate Clock clockwise on press 6
    3. Increase rotating speed press 8
    4. Decrease rotating speed press 2

    I'm thinking of doing task 1 and task 2 using dual 74153 Multiplexer. But How can I do Task 3 and Task 4 ?
  2. m.majid

    Well-Known Member

    May 28, 2008

    I suggest use BA6218 (reversable motor driver) for direction control, if you find it, it is not expensive, simple to use

    for controlling the speed of DC motor, the most common methode is to use PWM (Pulse Width Modulation)
    in PWM a power pulse (square waveform) with certain frequency is given to motor (for example 1KHz), the speed of rotation is depend of average value of waveform

    you will find plenty of text about PWM in web

    warning!: do not attach the dc motor directly to LPT port of PC, it damages the PC, use BA6218 or other transistor-based or mosfet-based amplifiers to convert data signal of PC to power signal.
  3. theamber

    Senior Member

    Jun 13, 2008
    The speed of a DC motor is directly proportional to the supply voltage, so if you reduce the supply voltage lets say from 12 Volts to 6 Volts, the motor will run at half the speed ot the 12V speed.
    A better way is to switch the motor's supply is doing on and off very quickly. If the switching is fast enough, the motor doesn't notice it, it only notices the average effect of the change. You can use a power mosfet for the switching.
    Keep the PWM frequency between 20Hz and 18kHz it will produce some noise but will not radiate interference.
    RF interference emitted by the circuit will be worse the higher the switching frequency is.
    You may need to wait until the motor stops to engage the reverse or you may damage the gears.
    Last edited: Jul 16, 2008
  4. md.nahid

    Thread Starter New Member

    Apr 26, 2008
    thank you for your reply. Now I'm thinking of doing it with two MUX(1 dual 4*1 74153 and 8*1 74151) by controlling the current passed.
  5. theamber

    Senior Member

    Jun 13, 2008
    I think that controlling the current will change the torque not speed of the motor.
  6. thingmaker3

    Retired Moderator

    May 16, 2005
    Torque and speed of a motor are inversely proportional. Changing the current will change both the torque and the speed together in accordance with this rule.