10-15-2008 04:57 PM
I'm a little rusty with this, so bear with me.
I have a USB-6009 which I would like to drive a 2N2222A transistor with to energize the coild of a SPDT relay. The coil with draw ~ 30mA.
I believe I can accomplish this by:
Something like this:
This will result in the 30mA required by my relay coil coming from the 5V supply on the USB-6009, and not damage the DIO line. Correct?
10-16-2008 01:31 AM - edited 10-16-2008 01:32 AM
Hi Optimus,
I would suggest something like this. Don't forget the diode across the relay.
10-16-2008 07:55 AM
Thanks KC. Yes...the diode.
I'm a little confused on how the transistor is biased in this configuration. the 10k resistor is in parallel with the emitter? Would you mind elaborating?
10-16-2008 08:03 AM
Hi,
It is just a switching transistor is this case. The voltage divides over the resistor and leaves a base voltage of about 3V. That is more then enough to open the transistor. The 5k6 (or 10k or whatever) is limiting the current. The 10k is there to prevent that the transistor opens when there is nothing connected to the input.
Any other resistor value will do as long as the voltage is enough to open the resistor.
04-22-2011 11:18 PM
Sorry to bump an ancient thread but this is eaxctly what I am looking to do to drive a pair of relays.
I have a question though.
As I understand the 0v is the ground and the 0-5v is the digital output.
Where is the 5v energizing the relay coming from? An external power supply?
I was thinking of using the daqs built in 5v 200mA power supply for that.
04-23-2011 01:09 PM
Inrternal supply or external supply....either will work. The internal supply is more convenient but limited in capacity. For one relay it is fine.
04-23-2011 02:57 PM - edited 04-23-2011 02:58 PM
Thanks I will be using solid state relays so I should only need about 60mA between both.
06-03-2011 01:24 PM
Solid state relays require even less power than a mechanical relay. Look at the spec sheet for your SSR's, you may be able to drive them right off the DO line. Analog outputs have a little more juice if the DO's are borderline; I've driven SSR's right off the AO's in some of my equipment.
One thing to keep in mind when designing the system is that when the DAQ initializes, the digital lines are pulled high. If there's a combination of outputs that could be potentially hazardous or exceed the duty cycle of some device attached to it, make sure the system is designed to handle a condition where all digital lines are pulled high for an extended period of time. This may require some additional hardware logic to prevent two outputs from being driven high simultaneously.