ARDUINO WITH SOLENOID VALVE

eneiso:
Hello everyone,

I want to run my Arduino Uno with solenoid valve. But I don't want to destroy my Arduino or the valve.

The circuit:
http://wiki.bildr.org/images/thumb/0/05/SolenoidArduinoTip120.png/450px-SolenoidArduinoTip120.png

That circuit isn't very clear about the component across the solenoid winding.
Its a diode, and it has to be wired the correct way round. Here's a much better
diagram:
http://makezineblog.files.wordpress.com/2009/02/arduinorelay.jpg

When switching any inductive load you need to provide protection from
inductive voltage spike at switch-off, a diode like this is the simplest way.