09-23-2011 06:52 PM
How do I use a NI 9401 with a digital relay to have the relay turn on/off a 12VDC motor?
- Just starting out and need to know how the relay is connected to the 9401.
We have a test stand that needs to turn on a 12VDC motor when the "Test Start" button is used in LabView. We want the 9401 to turn the relay to "on" so that the motor will start and then off after ~5 seconds to "stop" the test.
Thanks,
Eric
09-26-2011 04:29 AM
I am not sure about your term "digital relay". However, I think you are thinking of connecting a normal electromagnetic relay to the 9401. This might be difficult since the outputs can carry 2mA only in sink mode, and this is very little even when using optoelectronic relays. In other words, you will probably need a power driver to drive a relay. The ULN2803 is a well-proven IC for this task. It also has a diode network which can be used as snubber diodes when connecting their common terminal to the power supply.
When switching motors or other inductive loads with electromagnetic relays you have to do something against arcing when the contacts switch off. Usually a resistor-capacitor combo in parallel with the relay contacts is used for this purpose. The values of the resistor and capacitor depend on the current of the motor (or other load), usually the resistor value is 50...200 ohms and the capacitor 0.1...0.5 micro-farads.
09-26-2011 10:17 AM
We are using a solid state relay. It has a minimum input current @ 5VDC of 1.6mA. Thus the 9401 should activate the relay. This is correct?
The data sheet for the relay is attached. We will use 7AD1D07 model.
09-26-2011 03:06 PM - edited 09-26-2011 03:08 PM
I've had good luck with SSR's on a digital output without needing any signal conditioning.
To toggle a mechanical relay you'll need some sort of driver, something as simple as a transistor and a handful of resistors or a relay driver (ULN2003, for example). If you want a few SSR's on one digital output, you'll need a driver to handle the loads.
Be sure to do some safety checks on the equipment - doublecheck the power up states so the equipment isn't commanded into an unsafe situation on power up or device reinitialization. If the hardware doesn't support it (like the USB-6501's) you'll need some hardware logic to do it.
09-27-2011 01:44 AM
I think your SSR should work with the 9401. With a driver current of 2mA as it is possible in sink mode the SSR should operate safely.
But you should check the specs of your SSR concerning inductive loads, maybe you will need some protection circuitry against backlash voltage.
09-29-2011 01:44 PM
Thanks. However, we can't get the LabView software to tell the 9401 to send a 5V, 2mA signal to our relay to turn the motor on/off for our test. We have tested the relay and motor circuit and it does work. The only sticking point is that we just can't figure out how to get the 9401 to send that signal to the relay using tha LabView software.
09-29-2011 05:41 PM
Just set the bool to true. You can test that from Test Panels within MAX.
The 2mA is a property of the 9401, not something soft-configurable.
09-30-2011 01:22 AM
The 9401 does not "send" a 5V/2mA level to a peripheral device. 2mA are only possible in sink mode. This means that current from a voltage source (which has common ground with the control device) flows through the load (primary side of the relay) and the output.
To do so, in your case, you have to connect the (+) relay input to a voltage source (5VDC, I do not know whether the 9401 has a 5VDC pin available) and the (-) relay input to the output line of the 9401. The voltage source GND line must be connected to the GND terminal of the 9401.
However, check the relay input specs carefully. Sometimes only the current and forward voltage drop (typically around 2V) are indicated. When using the relay input with voltage sources of more than the forward voltage drop rating, you have to use a current limiting resistor, otherwise the input circuitry of the relay may be damaged.
To activate the 9401 output with the load connected in sink mode, you have to write a 0 (low level) to the output.