Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

I need to trigger a 5v relay with DIO USB-6501

I'm going to start out by saying that I know very little about electronics and circuits and parts.  I have the NI-USB-6501 that sends out 5 volt TTL digital signals.  On the pinout I have a couple grounds, some I/O channels, and +5 volt connections.  I'm trying to activate a 5 volt (DC) relay with an I/O channel, but it doesn't work.  The relay will work fine when I hook the coils directly to the +5 volt and ground pins on the device, but I can't turn that on and off via software.  How do I get that strong of a 5 volt signal from one of the I/O channels? (or: how do I feed in the provided +5 volt line so that it can pass through an I/O channel when that channel it on and not when it is off?)
Thanks,
Jon Shelley
our_leader@hotmail.com



0 Kudos
Message 1 of 9
(12,660 Views)
Do you have any data on the coil CURRENT of the relay you are using?

Probably your DIO board cannot supply - or sink - the current the relay needs. If you hook up the relay between +5V and the output, the output circuitry has to handle the current the relay needs. Also, usually the low level output voltage of such an output can be up to 0.8V so there will be only 4.2V across the relay.

Anyhow, using a power driver circuit is recommended in such cases. You can use an IC such as the ULN2803.

Do NOT forget to connect a diode in parallel with the relay coil (with the cathode connected to +5V) to cut off the backlash voltage which is generated when switching inductive loads. This backlash voltage may destroy your driver circuit.
Message 2 of 9
(12,649 Views)
Hi All-
 
I think Buechsenschuetz is on the right track in suspecting that current drive may be your problem.  According to the USB-6501 Specifications document on page 9, the DIO lines are capable of sourcing only 0.6mA in Open-Collector (i.e. default) mode.  You can switch to Active-Drive (aka Push-Pull) mode via an NI-DAQmx Channel property. 
 
In LabVIEW this is a channel property node as shown here:
 
For the C API the necessary function is "DAQmxSetDOOutputDriveType" as described in the NI-DAQmx C Reference Help (Start>>Programs>>National Instruments>>NI-DAQ).
 
Alternatively you can add an external pull-up resistor between the output pin and the +5V reference, but the aforementioned setting is recommended.

Message Edited by Tom W. on 08-15-2005 12:54 PM

Tom W
National Instruments
0 Kudos
Message 3 of 9
(12,645 Views)
Thanks so much guys.  I ended up using a transistor (as a switch) with feeds from the DIO output pin and the +5 volt pin.  Then I had the transistor go to the relay to trigger the 12 volt lights.  There's probably a way to just use a transistor, but for some reason it wouldn't work with any other power source than the feed from the DIO device.  Thanks again!
0 Kudos
Message 4 of 9
(12,628 Views)

This function (DAQmxSetDOOutputDriveType) does not appear to be available under Linux with NIDAQmxBase 1.5, which appears to be the only thing that works under Linux for the 6501.  What are my options?

I'm trying to check continuity through a device (before testing starts) by sending High, then Low, then High from one of the outputs on the 6501, and reading the results on an input on the 6501.  I see that I only get a vary brief High on the output, then it falls to low, until I disconnect the output from the input pin. 

Any thoughts?

 

 

 

0 Kudos
Message 5 of 9
(12,266 Views)
Hello Sileas,

This option can be congifured from the DAQmx Base Configuration Utitlity. Here is a document that explains the process:

http://digital.ni.com/public.nsf/websearch/A51D917F33C338B086256FE0007779B8?OpenDocument

This may clear up the issue that you are seeing.

Cheers,

Garrett H
Applications Engineer


Garrett H
National Instruments
0 Kudos
Message 6 of 9
(12,238 Views)

Unfortunately, this is part of a piece of test equipment, which is required to have no user intervention - just turn on, boot, and run - no GUI desktop or anything (just log in as root and run the program).  Is there no way to do this through C or a command line interface instead of having to use the GUI config utility?

Thanks.

 

0 Kudos
Message 7 of 9
(12,227 Views)
Sileas,

Okay, well I do see the issue now! Unfortunately, DAQmx Base has its limitations and this is one of them. The only way to do this is from the Configuration Utility. I would, however, advise you to keep checking back for the next DAQmx release for Linux. I don't know if it is planned to inlcude support for the USB devices, but it is certainly possible. Definetely fill out a product suggestion for this as our developers take these very seriously. You can submit a suggestion here:

http://digital.ni.com/applications/psc.nsf/default?openform
Garrett H
National Instruments
0 Kudos
Message 8 of 9
(12,209 Views)
0 Kudos
Message 9 of 9
(9,605 Views)