Powering 5V relay
-
- Posts: 12
- Joined: Fri Jan 29, 2010 10:30 pm
Powering 5V relay
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
edit: I just realized this should be put int he hardware category, put in the software one by mistake :S
- Chris Ruff
- Posts: 222
- Joined: Thu Apr 24, 2008 4:09 pm
- Location: topsail island, nc
- Contact:
Re: Powering 5V relay
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
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
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand
- Chris Ruff
- Posts: 222
- Joined: Thu Apr 24, 2008 4:09 pm
- Location: topsail island, nc
- Contact:
Re: Powering 5V relay
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
"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
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand
-
- Posts: 12
- Joined: Fri Jan 29, 2010 10:30 pm
Re: Powering 5V relay
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...
- Chris Ruff
- Posts: 222
- Joined: Thu Apr 24, 2008 4:09 pm
- Location: topsail island, nc
- Contact:
Re: Powering 5V relay
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
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand
Re: Powering 5V relay
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
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
That NUD3112 is a nifty little part. Thanks for sharing
Re: Powering 5V relay
Anyone know where i can get these NUD3112LT1G parts at? No one seems to have them.
Re: Powering 5V relay
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.
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.