07-14-2020 05:17 PM
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
07-14-2020 08:42 PM - edited 07-14-2020 08:46 PM
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.