Arduino 5V output - Switch a device on/off with relay

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

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

Thanks I will give it a try!

Hi,
Go for the transistor option, its cheaper.

Duane B

rcarduino.blogspot.com

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"

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

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.

Runaway Pancake,

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

Thanks,

-ren

Any 1N4000-series diode will do.