Page 1 of 1

Powering 5V relay

Posted: Tue Feb 02, 2010 4:29 pm
by blahartinger
Hey all, I want to attach a relay that trips on 5V to my 5270 dev kit that i just bought. now obviously this board runs on 3.3V logic and i need to do something about that. What is the best way to go about doing that in this case? I was thinking of using a BJT with base connected to my 5270 on one of the io lines, the emitter connected to the coil and then the coil to 5V with a fast switching diode in parallel and then the collector to ground. Does this make sense?


edit: I just realized this should be put int he hardware category, put in the software one by mistake :S

Re: Powering 5V relay

Posted: Tue Feb 02, 2010 6:16 pm
by Chris Ruff
Your seriously serious issues:

1.Coming up with the 5 volts
2.choosing the digital line from the 5270
3.choosing the driver
4.deflashing the relay

I am a fan of ULN2003 darlington drivers myself. Assuming that you get the 5 volts from a 7805 and two caps off of the 15 volt DC supply, you would connect the 5270 D0 bit directly to pin 1 on the ULN2003, connect pin 7 to ground, pin 8 to 5 volts (the diodes are in the ULN2003 already) and pin 14 to the relay. the far side of the relay to 5 volts again.

another way to do it (similar to what you said): transistor NPN (e.g. 2n2222) base through 4.7k resistor to D0, NPN collector to relay along with 1n4148 diode anode, NPN emitter to ground. the farside of the relay and the diode cathode to 5 volts.

If you choose to use D0 one of us can send you the code to drive the pin.


You can use D0 - D15 on the 5270 for GPIO without affecting anything if you retain the 5270 16 bit design (don't add any 32 bit parts outside the module)

Chris

Re: Powering 5V relay

Posted: Tue Feb 02, 2010 6:22 pm
by Chris Ruff
Ruff Errata:

"D0 bit directly to pin 1 on the ULN2003, connect pin 7 to ground, pin 8 to 5 volts (the diodes are in the ULN2003 already) and pin 14 to the relay"

should actually read:

D0 bit directly to pin 1 on the ULN2003, connect pin *8* to ground, pin *9* to 5 volts (the diodes are in the ULN2003 already) and pin *16* to the relay

the part is 16, not 14 pin

Duh

Re: Powering 5V relay

Posted: Tue Feb 02, 2010 9:40 pm
by blahartinger
Would it be possible to get the 5 volts by t-ing off the 7.5 volt power supply contacts on the board and then bringing it down to 5? or is that just a bad idea...

Re: Powering 5V relay

Posted: Wed Feb 03, 2010 5:40 am
by Chris Ruff
7805 voltage regulator in TO-220 package pins are in-gnd-out when you are looking at the top of the part with the tab up. + terminal of the power connector to in, gnd pin to - terminal on power connector. +5 will be available up to 800ma on the out pin. You should place a 10uF (or so) capacitor on in pin to keep 7805 from oscillating. another 10uF cap on out pin as well. connect the two cap - pins to gnd

Re: Powering 5V relay

Posted: Wed Feb 03, 2010 5:56 am
by seulater
why not just use a 5v wall wart for your kit and then you can power your relay from the jack.

Re: Powering 5V relay

Posted: Wed Feb 03, 2010 12:31 pm
by rhopf1
I like little SOT23 NUD3112 from ON Semi for driving relays, open drain & diode suppression built in. Another good choice is Micrel MIC4421/4422. Both devices will operate from 3.3V outputs. Most 5V relays will operate just fine off 5-10 volts the only penalty is in extra power consumption and heat, check the data sheet. So if unreg wall-wart is 5+ you may be good to go.

Re: Powering 5V relay

Posted: Wed Feb 03, 2010 2:49 pm
by seulater
That NUD3112 is a nifty little part. Thanks for sharing :P

Re: Powering 5V relay

Posted: Thu Feb 04, 2010 9:01 am
by seulater
Anyone know where i can get these NUD3112LT1G parts at? No one seems to have them.

Re: Powering 5V relay

Posted: Thu Feb 04, 2010 11:22 am
by rhopf1
NUD3112
The LT1, SOT23, package does seem to be scarce. If it's a new design you might want to use the MT1, SC74-6, package. more-or-less same price 2 drivers.

ON semi will sell LT1 samples at $0.12 and MT1 at $0.18.