hirochiamaru said:
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.
http://www.radioshack.com/product/i...&sr=1&origkw=relay&kw=relay&parentPage=search
# 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.
Radio Shack said:
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.