How to control solenoid valve from computer

Discussion in 'General Electronics Chat' started by chiron80, Mar 15, 2009.

  1. chiron80

    Thread Starter New Member

    Mar 15, 2009
    I'm trying to control a solenoid pinch valve using the digital output pins from a National Instruments DAQ card. Basically, I would like the valve to open when the digital out pin is set high (5V) and close when the digital output pin is set low (0V). The valve will be open typically less than 1 second at a time (occasionally longer, up to 10 or 20 seconds).

    The solenoid pinch valve is the valve shown on this page:

    The relevant details about the valve are:
    Power: 12VDC
    Watts: 4.0

    Now, I have this working right now using a 2IO-24 board and two ODC-5 modules from Potter & Brumfield. You can view the datasheets on those components using the links available here (look for 2IO and ODC):

    Those are solid state, optically isolated, relays. The lab I work in had them lying around unused.

    The current setup works except for three complaints:
    1) It is large and cumbersome
    2) It requires inverted logic (0V means on, 5V means off)
    3) A couple of the LEDs have burned out on the 2IO-24, meaning those channels no longer work.

    I am in the process of re-wiring my setup to add a couple new components and features. One of the things I'd like to do is record exactly when the valves are opened using a separate device I have that timestamps and records the rising edge of an incoming TTL 5V signal. My plan to do this was to just split the digital output signals and feed it in to both the 2IO-24 board and the recording device. However, to do this I would need to invert the signal so that the device records when the valves open and not when they close (remember the 2IO board uses inverted logic).

    My question is: Is there a better (simpler, smaller) way to implement this? Basically, I'd like to remove the 2IO-24 board and ODC-5 modules and replace them with a small integrated circuit that does the same thing.

    Any suggestions?
    - Ben
  2. bertus


    Apr 5, 2008

    You could try this little circuit I used some time ago.