588,657 active members*
5,646 visitors online*
Register for free
Login
Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2003
    Posts
    51

    Parallel Port / Relay Control Question

    I have been trying to learn about controlling my PC's parallel port and have run into a problem.

    I am currently trying to control a relay on an adjustable timer and the output from pins 2 -9 trigger my solid state relays no matter what state they are supposed to be in.

    When I measure the voltage between the ground pins 18 - 25 and 2 - 9 when they are supposed to be low they are at 3.68 to 3.7 volts (fluctuating) and 4.08 when high.
    I can get pin 1 to .075 low, 4.09 high - which works, but I would like to use the data pins.

    Could this be a problem with the type of parallel port that my PC has or how it is set up?

    The relays that I have are IDEC RSSD with 3 to 32 vdc control at 1 mA. Do I need to or should I use an IC between the port and the relay? I had tried a circuit with a 74LS367 but the one at http://www.southwest.com.au/~jfuller/sio.html seems far better. Is it wrong to wire a relay of this type directly between one of the data pins and the ground pins?

    I have what I would consider to be very little knowledge about electronics, programming, and computers in general.

    Any help will be appreciated.
    Thanks,
    Jason

  2. #2
    Join Date
    Jun 2003
    Posts
    866
    Parallel port pins don't like to source current. Your best bet is to pull the low side of the relay input down to ground through the data pin. The high side of the input would then be hooked to the power supply. I think it is wise to put some kind of IC to buffer the computer port.

    It's been a while since I've programmed the parallel port. You have to set it up for output. Are you using someone else's code?

  3. #3
    Join Date
    Sep 2003
    Posts
    226

  4. #4
    Join Date
    Jul 2003
    Posts
    51
    Hello and thanks for the reply

    I want to use a timer in visual basic.net along with the IO.DLL from here:http://www.geekhideout.com/iodll.shtml to operate the data pins. That seems to work because I do have control over that 4 tenths of a volt (wow!).

    Their parallel port monitor: http://www.geekhideout.com/parmon.shtml can also toggle the pins.

    I have never wired anything in the way that you described. I saw it mentioned in a parallel port faq and thought that it would be difficult for me to do - calculations and accurate testing. It certainly did seem like a better way to do it though. If I remember right you can draw more than 2x the current.

    But, even if I did this wouldn't I still not have enough difference in voltage between the two states ( High/Low) to make the relay turn off? - not sure if that is the right way to phrase it.

    Thanks Again,
    Jason

  5. #5
    Join Date
    Dec 2003
    Posts
    24222
    The 2n7000 mentioned in the link has a threshold of 0.8v to 3.0v anything below .8 is off above 3.0 is on.There is essentially no loading of the port.
    Al
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  6. #6
    Join Date
    Jun 2003
    Posts
    3312
    Verboten,
    This might be of help to you, go to my website:
    http://webpages.charter.net/pminmo/cncelectronics.htm
    Looks at the 3 or 4 axis interface board. This is the link for the document:
    http://members.tripod.com/pminmo/4axisBOBdata.pdf

    The aux1 driver is specifically for driving a relay. It will work with a ssr or mechanical relay. By connecting your relay between the x5-1 pin and x5-2 pin you would be able to switch your relay. All you really need is a npn transistor and a resistor.

    http://www.beyondlogic.org/spp/parallel.htm Is an excellent primer on the parallel port as well as http://www.hut.fi/Misc/Electronics/c.../lptpower.html

    Phil

  7. #7
    Join Date
    Jul 2003
    Posts
    51
    Thanks for the replies, they have all been helpful.

    I did get the relay to work. I switched to a pc running dos and made a simple program in qbasic. The pins on that pc operated like I wanted (low below 0.8v , high above 4v). That made the 74LS367 circuit work and then the relay.

    I will try a 2n7000 when I place another order.

    I'm still not quite sure why my windows xp pc didn't work. I think that it might be because of the type of parallel port that it has or possibly something in the io.dll file that I was using - I have no clue how or exactly what it does. I'm kind of glad that it didn't work because it seemd to be needlessly complex - maybe I should study about Linux.

    Qbasic and dos allowed me to directly address the port, the timer seems to be much better, and I really didn't need a windows form. I was really amazed how easy it was.

  8. #8
    Join Date
    Jun 2003
    Posts
    3312
    An application can't call a parallel port directly in XP. You need a driver.

    Phil

Similar Threads

  1. DNC with parallel port (Bridgeport BOSS 5)?
    By hobbymat in forum Uncategorised CAM Discussion
    Replies: 3
    Last Post: 07-20-2009, 05:16 PM
  2. Relay question
    By shortbus in forum CNC Machine Related Electronics
    Replies: 3
    Last Post: 04-26-2005, 10:14 AM
  3. Parallel port circuit
    By Kerri Ann in forum CNC Machine Related Electronics
    Replies: 12
    Last Post: 03-19-2005, 07:23 AM
  4. Parallel Port Options
    By JasonCroyle in forum CNC Machine Related Electronics
    Replies: 4
    Last Post: 01-12-2005, 02:23 PM
  5. E-Stop Hard Wire and to Software?
    By Sanghera in forum CNC Machine Related Electronics
    Replies: 20
    Last Post: 10-30-2004, 05:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •