LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Solenoid Valve Using myDAQ 6001 via a Relay

Hi everyone, I am trying to control a 4-valve Solenoid Valve with LabVIEW using a relay.

 

The general setup is as follows: myDAQ usb-6001 connected to a Relay, which is connected to a Power supply, and the Power Supply is connected to the Solenoid Valve. I have the Relay connected to the myDAQ at the A01 and A0 ground ports.

 

I have tried using the myDAQ assistant, creating a while loop and a control knob to change the voltage from 0-5 V. The goal was that by outputting an analog output of 5 V through the myDAQ and with power from the Output Power Supply, I would be able to control the Solenoid Valve.

 

I am hoping someone can give me some advice as to how I should structure my code on LabVIEW so that I can manually control the Solenoid Valve. Also, I am using LabVIEW on windows in case that is of importance.

 

Thank you 

0 Kudos
Message 1 of 2
(1,173 Views)

Well without knowing any of the solenoid specifications my first instinct is to tell you that it's not going to work.

 

The majority of DAQ's (USB 6001 included) can not source or sink enough current to directly drive a relay from its DIO.

 

You will have to use a transistor at the minimum or open collector driver IC.

 

Have the DAQ turn the transistor on and the transistor turn the relay on.

 

And don't forget to snub the back EMF from the relay with a diode.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 2
(1,130 Views)