# How do you convert 3 Volt Control signal to 5 Volt control signal

## Main Question or Discussion Point

I have a data acquisition device that outputs 3 volts if the sensor is activated. My relay only activates when a 5 volt source is put across the coil. What is the easiest way to step up the 3 volt control signal.

Related Electrical Engineering News on Phys.org
berkeman
Mentor
Welcome to the PF. The answer to your question depends a bit on the current requirement for your 5V relay. Even small 5V relays typically require more current than a simple logic gate can produce. It is common to use a relay driver IC, or to have your logic gate drive an NPN pull-down transistor that sinks current down through the relay.

Are you familiar with these two other alternatives for driving relays? The transistor version is shown here for example:

http://www.dnatechindia.com/index.php/Tutorials/8051-Tutorial/Relay-Interfacing.html

I have not tried a relay driver IC but the transistor method looks promising. I just have a couple questions.
I got the relay at radio shack.
# Maximum switching current of 0.5 A
# Maximum initial contact resistance of 150m ohms

1. My data acquisition device can't supply more than 20ma at 3.2V. Can a 2n2222 NPN transistor work for the same circuit in
http://www.dnatechindia.com/index.php/Tutorials/8051-Tutorial/Relay-Interfacing.html"
2. How do you choose what kind of pull up resistor to use? would a 10k resistor be fine instead of a 4.7k?

Last edited by a moderator:
berkeman
Mentor
I have not tried a relay driver IC but the transistor method looks promising. I just have a couple questions.
I got the relay at radio shack.
# Maximum switching current of 0.5 A
# Maximum initial contact resistance of 150m ohms

1. My data acquisition device can't supply more than 20ma at 3.2V. Can a 2n2222 NPN transistor work for the same circuit in
http://www.dnatechindia.com/index.php/Tutorials/8051-Tutorial/Relay-Interfacing.html"
2. How do you choose what kind of pull up resistor to use? would a 10k resistor be fine instead of a 4.7k?
First, be clear about the specifications of the relay. You are kind of mixing its input and output specifications, which are used for very different calculations.

Maximum switching power of 10 (watt/VA)
Maximum switching voltage of 60 VDC, 120VAC
Maximum switching current of 0.5 A
Maximum initial contact resistance of 150m ohms (150 milliOhms)
Those are output specifications, having to do with the output contacts and their ratings of max current and max initial resistance. What you need in order to figure out how to drive the input coil, is the input coil resistance, or the current that the coil draws when 5V is placed across it. Neither of these specifications seem to be listed on these Radio Shack pages (not unusual for Radio Shack, unfortunately).

So I went to www.digikey.com to look for a similar relay, did a search on 5V reed relay, and started applying filters to the results. This is one that's 0.5A rated for the output coil, but for a little higher voltage than the Radio Shack one you listed:

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=306-1107-ND

This relay's coil current is rated at 21.7mA, which it sounds like your device could drive directly, except for the 3V output part. So use the 3V output to drive an NPN transistor directly as shown in the page I linked to, and don't worry about the pullup resistor shown on the base of the NPN -- you don't need it if the drive signal is rail-to-rail 3V. You should put something like a 1kOhm resistor in series between your logic drive output and the NPN base input, to limit the base current.

You should spend a little time looking at similar relays, with better datasheets, to see what the range of coil currents look like for the various output characteristics. I don't know what you are using the relay for, so I don't know the best relay to recommend out of the selection at Digikey.

Last edited by a moderator:
Thanks, I have it working now. I used a 1k Ohm resistor between the logic drive input and the base of the NPN transistor as suggested and it works. I'm just wondering how you're supposed to choose what resistor to use on the base?(How did you know to use a 1k Ohm instead of the 4.7k Ohm.

On the back of the box of transistors i grabbed it has a section of Maximum rating:
Vce: 30V
Ic: 800mA
Power dissipation: 1.8W

How do you relate these ratings with the 1k Ohm resistor?

berkeman
Mentor
Thanks, I have it working now. I used a 1k Ohm resistor between the logic drive input and the base of the NPN transistor as suggested and it works. I'm just wondering how you're supposed to choose what resistor to use on the base?(How did you know to use a 1k Ohm instead of the 4.7k Ohm.

On the back of the box of transistors i grabbed it has a section of Maximum rating:
Vce: 30V
Ic: 800mA
Power dissipation: 1.8W

How do you relate these ratings with the 1k Ohm resistor?
The base drive resistor (between the drive source and the base of the transistor) is sized to deliver enough base current to generate the required collector current in the transistor. Look up the "Beta" specification for the transistor -- that is the current gain Ic/Ib. If you have a Beta = 100 in the range of collector current that you need (Beta varies with Ic), then you need to be sure that you supply at least 1/100 of Ic as Ib when you want the transistor on. The base voltage for a grounded emitter NPN transistor is going to be about 0.6V to 0.7V when the transistor is on, and you are driving with 3V, so that gives you about 2.3V/1kOhm = 2.3mA, which supports up to 0.23A of Ic if the Beta is 100 for that transistor for Ic=0.23A (which I don't know for sure, since I didn't look up the transistor datasheet, but you should check this).

You check the power dissipation of the transistor by finding out its saturation voltage (check the datasheet) for this Ic, and then multiplying Vsat*Ic to get the power dissipation when the transistor is on (and in saturation). Makes sense?