Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6009 +5V port (31)

Solved!
Go to solution

I am trying to control a relay (3VDC, 73mA) with DAQ USB 6009. It seems the +5V port is the only one that can deliver that much current (200mA) to switch on/off the relay. Is there a LabView VI available for that port? I have found a good VI (attached) on the Internet but there D I/O for the +5V port is sadly missing.

 

I am willing to write a program to control the +5V port if there is no existing VI out there.

 

Any guidance is appreciated.

0 Kudos
Message 1 of 10
(5,507 Views)
Solution
Accepted by topic author USB6009

The 5V port does not switch.  Connect the 5V through a voltage drop resistor to one side of the coil. Use one of the digital ports to "ground" the other side of the relay coil.  Setting the digital port low will activate the relay. Use Ohm's law to calculate the voltage drop resistor to get 3V across the coil when activated.  Don't forget to add a diode across the coil (cathode to +3, anode to "ground") to bleed off the back EMF when the relay opens.

0 Kudos
Message 2 of 10
(5,486 Views)

Thanks, I don't have resistor or diode. I'll just use a standard Digital port as the ground. When both have the same voltage, will there a a current (the +5V port gives more current)?

0 Kudos
Message 3 of 10
(5,480 Views)

The resistor you may be able to get away without using.  UNLESS YOUR RELAY HAS A BUILT IN BACK EMF DIODE, YOU NEED TO HAVE ONE IN THE CIRCUIT. The back EMF of the relay coil releasing can destroy the USB-6009.

0 Kudos
Message 4 of 10
(5,477 Views)

I assume EMF is the electromagnetic field. My relay is going to be about 1 meter (or more) away from the DAQ, plus it is really small. Its size is about half that of an eraser. Will the EMF still matter?

0 Kudos
Message 5 of 10
(5,475 Views)

The emf is the voltage created by the colapsing magnetic field across the coil.  This voltage will be transmitted along the wires going from the coil to the 6009.  Distance does not matter.  You should also mount the diode on the relay (or very close to it) to minimize the the voltage spike noise that would travel down the wire. Google emf relay coil for all kinds of information on what emf can do.

0 Kudos
Message 6 of 10
(5,470 Views)

Do not use the DIO line as a ground for your circuit.  The USB-6009 is only spec'ed to sink 8.5mA of current, and you need to sink 73mA.  You will need external circuitry to drive the relay.

0 Kudos
Message 7 of 10
(5,460 Views)

Yep.  I was so focused on diodes and such that I didn't even think about the current draw limitations.  That's why I use PIC micros more often then not.

0 Kudos
Message 8 of 10
(5,449 Views)

Thanks for your helps. Apparently, I have some limitations on the hardware side. Can I just use the +5V port and the ground? This will eliminate the switching (on/off) capability, but is it safe?

 

Can I use a "while loop" in labview for power control in this case? So once the loop exits, the program stops running,  is the +5V power cut off by then?

0 Kudos
Message 9 of 10
(5,443 Views)

Again, the 5V does not switch (unless you unplug the USB cable from the DAQ).  Here is a simple circuit that should work.  Just the coil control is connected.  Your pin numbers are probably different so just use the diagram as reference.

 

 

0 Kudos
Message 10 of 10
(5,433 Views)