Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to properly use the digital output as a switch?

I'm trying to drive a 12V inkjet valve (specs)with a 5V digital output from a PCI-7334. I'm have a Radio Shack 13.8VDC 3A power supply to power the inkjet head. I'm supposed to use an NPN transistor for high-speed switching. What circuit would I need to properly configure the transistor to act like a switch? I know the emitter would go to the negative part of the powersupply, the collector to the ground connection for the inkjet valve (with a diode in parallel), the positive end of the valve/diode to the positive lead of the powersupply, and the base to the 5V DIO (with a resistor in series).

I have a feeling I chose the wrong components and/or used an incorrect layout, because once I powered on the power supply, the inkjet valve began dispensing ink. What should I be using given the equipment I have, and what do I need to change with my layout?
0 Kudos
Message 1 of 4
(3,765 Views)

Your connection scheme appears correct. Did you connect DGND from the DAQ card to the transistor emitter/common of 12V supply? You might also need a few Kohm pullup from the base resistor to 5V, I can't really say for sure. What are the specs for the transistor?

The specs on the valve are a bit confusing. 4100 ohms at 5V (for continous operation) is hardly any current draw (5/4100=1.2mA) But then again I have no experience with such devices. It appears you can pulse the valve with a 12V source. The 51V zener causes me concern, for safety I would add a 1N4004 in parallel with the valve. 

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 2 of 4
(3,760 Views)
Thank you for the response AnalogKid2DigitalMan.

I did not connect the digital ground to the emitter and the common of the power supply. Others have pointed that out to me as well, so perhaps there may be a difference in potential enough to switch the transistor.

I was using a 100 ohm resistor between the digital out and base of the transistor. I will try a 1k resistor instead.

This is the transistor I am using: http://www.radioshack.com/product/index.jsp?&productId=2062609&tab=techSpecs
Someone pointed out that this transistor is not rated high enough for the voltage source I am using. Could this also be the cause of my problem?

I am already using a 1N4005 diode in parallel with the valve to protect the circuit.

Message Edited by jozaeta on 02-03-2006 05:41 PM

0 Kudos
Message 3 of 4
(3,760 Views)
Although your circuit will work I would not recommend using a simple transistor as interface between a logic board and a circuit with voltage(s) higher than 5V. In case the transistor burns out due to excessive current 12V will be fed into the output of the driver circuit.

In these cases I would recommend using a PhotoMOS relay such as the AQV212 by Matsushita. Driving the input LED is very simple, just use a series resistor and connect it to the output of the card. The output of the relay has a resistance of less than 0.1 ohms and can carry up to 200mA of current. Even if something fails the galvanic barrier will protect your board.
0 Kudos
Message 4 of 4
(3,746 Views)