Powering Arduino, relay and solenoid

Hi there,

I just read couple of posts and would like to ask you for advice. Pretty simple situation: Arduino controlling 5V/50mA relay (with protective diode) throught transistor; relay is controlling 12V/250mA solenoid.

1) Can I use just one power source to power Arduino, relay and solenoid? I read post discussing unexpected reseting of Arduino in this configuration and 2 power sources were suggested. I have 12V/1.25A power source which should easily drive this load.

2) If I use one power source, is it neccessary to use protective diode also for solenoid to prevent surge to come back to power suply when turning solenoid off?

Thank you.

Arduino controlling 5V/50mA relay

So you are asking an arduino output pin to provide 50mA? This is over the absolute limit where permanent damage will be done to the pin. Keep output current less than 35mA from a pin to be safe.

Why not just have a transistor control the 12V solenoid directly? Simpler is better.

That would be my next question. OK, I will get a properly rated transistor and replace relay with solenoid directly.

So you are asking an arduino output pin to provide 50mA?

No. Arduino pin is driving switching transistor.

Thank you.