Connect with us

Parallel port motor control

Discussion in 'Sensors and Actuators' started by foxmjay, May 12, 2011.

Scroll to continue with content
  1. foxmjay

    foxmjay

    5
    0
    May 12, 2011
    Hello Guys,

    Please i need some little help and suggestions. the idea is to control a DC normal motor in both 2 directions using Parallel port.

    I managed to get this working the schematic is attached. The batteries V1 and V3 are where 2 PINs from parallel port are supposed to be connected ( was just testing using the simulator) . The parallel port output is about 2V .

    The problem is even if i measure the output voltage to the motor which it's about +/-5V , the turn force of the motor is not the same as if i supply it directly with 5V . i was wondering what cause this but can't figure it out . Please if someone have any suggestion that will be great.

    Thanks
     

    Attached Files:

  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,397
    2,777
    Jan 21, 2010
    The LM324 almost certainly can't swing its output all the way to the supply rails (thus reducing the potential voltage to the motor) and it also may not be able to switch the current required for the motor (which will compound the first problem).

    Using the op amp to switch mosfets would probably be the simplest solution.
     
  3. foxmjay

    foxmjay

    5
    0
    May 12, 2011
    hmm, i've also tried with LA6324N but it seems it has the same characteristics as the LM324. do you know any one that could work better in this case ?.

    Thanks
     
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,397
    2,777
    Jan 21, 2010
    Using the op amp to switch mosfets would probably be the simplest solution.

    Alternatively, you should look for an op-amp with mosfet output and capable of driving the current required for the motor. Since you don't specify the current required, I can't be much more specific.
     
  5. foxmjay

    foxmjay

    5
    0
    May 12, 2011
    hmm Mosfet transistor where the hell i can find one , and where can i connect it XD . I'll try look for a high current op amp 1st.

    Thanks a lot for your help .
     
  6. foxmjay

    foxmjay

    5
    0
    May 12, 2011
    Finally got this working , i've used the H-bridge circuit, the schema is here : http://postimage.org/image/1kn4oi1b8/
    And a little play around with it :D

    Here is a sample Python code to use parallel port if someone need it :

    import parallel #import library
    p=parallel.Parallel() # initialize parallel

    p.setData(0x40) # send the data to the 8 parallel ports in Hexa 0x40 it's 0100 0000 , that's mean it will send the 2V (i think ) on the 7th pin and 0V to the
     
  7. Resqueline

    Resqueline

    2,848
    2
    Jul 31, 2009
    As usual with these simple bridges; be aware that if both inputs happen to be high at the same time the power supply will be short-circuited.
    So in software, make very sure you turn off one output before turning on the other. Using all four separate inputs to the bridge you can implement motor braking.
     
  8. foxmjay

    foxmjay

    5
    0
    May 12, 2011
    Oh hm, i didn't notice that it may have a short-circuit , Thanks i'll make sure to not send on both. do you have any idea how to prevent short-circuit in this bridges circuit , or is there other ways ?

    Thanks
     
  9. Resqueline

    Resqueline

    2,848
    2
    Jul 31, 2009
    I don't have a link at hand but there are circuits out there implementing such control protection in hardware, at the expense of a couple of extra transistors or digital gates.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-