I have a relay operated by an NPN transistor that needs some voltage applied to the base. I'm working with an arduino and if I give it a digital port, all's well. The circuit looks like this one:
Now I want to replace the arduino port with a DS2406 (the TO92 kind).
This seemed to get really complicated fast. My library for operating the 2406 is fine, but I can't figure out how to wire it.
Now that both pieces independently work, my goal is to get some current fed into the base of the transistor so it throws the relay.
I've run into the following issues:
The DS2406 closes to ground. That's the only option, so I can't map it directly to the base pin of the transistor.
The TO-92 package doesn't have a vcc pin, so I have to have a pull up resistor between vcc and the data pin. This causes stuff to get hot and smelly when I power it up hooked up to the collector of the transistor with the base wired to the relay power. I could be using the wrong kind of resistor, but I don't have a strong sense of what's right here.
I may be able to run the relay strictly off the DS2406, but I'm afraid it will have too much draw, which is why I want it to go through the transistor.
What's the easiest way to go from a switch that opens and closes ground to a transistor base that wants current?