Go Down

Topic: Arduino 5V output - Switch a device on/off with relay (Read 2607 times) previous topic - next topic

renasis

Hello,

I am running a camera that requires 5V 80-100mA. I can use the 5V output of arduino, no problem. I tried running from a digital pin(which I believe provides ~40mA), this does not work. So I tied 3 together to get my mA requirement. I rather not use all of these pins just to provide power to camera, can I put a relay on the 5V out instead?

Thanks,

-ren

Runaway Pancake

#1
Apr 10, 2012, 05:21 am Last Edit: Apr 10, 2012, 05:29 am by Runaway Pancake Reason: 1
Paralleling pins - Gasp!
Get a 5V reed relay, the one Radio Shack sells is just right, and its contacts are rated for 1/2A.
If you don't live in America, look for one with a coil resistance of 200? or so.  And.. you need that diode, too, [though some have that integral.]
Or - get a transistor.

* * * *
http://s270.photobucket.com/albums/jj118/new_clear_days/circuits/?action=view&current=OSRRdemo-1.mp4

http://arduino.cc/forum/index.php?action=dlattach;topic=77590.0;attach=8885;image
"You gotta fight - for your right - to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"
It's "bipolar transistor" or "junction transistor" - "BJT" is just stupid.
When all else fails, check your wiring!

renasis


DuaneB

Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

Runaway Pancake

Hey, renasis,
I just wanted to note that the pic was used in answer to another's question.  He was needing to trigger a camera into an active status.
But you want to switch power, so the contacts, being an SPST switch, would be placed between the supply/battery and "camera +Vin"
"You gotta fight - for your right - to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"
It's "bipolar transistor" or "junction transistor" - "BJT" is just stupid.
When all else fails, check your wiring!

renasis

Hello,

Initially I was going to use the reed relay, but I happen to have a npn 3904 transistor, so I am going to give that a try. I will have a digital pin connected to the base. I can figure out the resistor needed to give me enough current Ib, to allow the current needed for the load(camera) Ic. I will put 5V to load(camera) to the collector of the transistor. I have seen some people online putting a diode(flyback) in parallel to the load to eliminate excess voltage. I understand that this is to protect against a voltage spike at the collector of the transistor. I probably don't need this in this case because this device will not build up a charge, but I am curious as how the value of the diode is determined if I decided to add. Also, in some instances online I have seen where a resistor placed between the load and the collector, why? If it requires too much explaining, could you point me to a reference to learn about this?

Thanks,

-ren

Runaway Pancake

The "backward" diode gets placed across the relay coil.  The coil, being it's a coil, has an inductance, it's an inductor, and inductors store a charge (hundreds of volts, for microseconds) - and they release that charge when they're de-energised.  The diode provides a low-resistance path for that charge (discharge).  That's it in a nutshell.
You don't have to sweat base resistor values for idealised collector current v. h_FE, etc. - anything 1K-5K? ought to get it good enough.
"You gotta fight - for your right - to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"
It's "bipolar transistor" or "junction transistor" - "BJT" is just stupid.
When all else fails, check your wiring!

renasis

Runaway Pancake,

Thanks for the explanation about the diode. How do you chose the proper size of diode?

Thanks,

-ren

Runaway Pancake

"You gotta fight - for your right - to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"
It's "bipolar transistor" or "junction transistor" - "BJT" is just stupid.
When all else fails, check your wiring!

Go Up