So after burning up a couple Arduinos, I'm running out of ideas...
I am trying to power both a Solenoid valve and the Arduino(nano) with the same 12V-2amp power supply. I've tried it with both a relay breakout board, and via transistor switching, and both are giving me sporadic behavior for the Solenoid.
Early failures came from realizing that the solenoid water value was actually a coil (duh), and thus needed some kind of diode placed over its connections, so I'm assuming the back voltage spike is what fried the first two boards.
At first I added a small diode that helped but wasn't enough, so I beefed it up to a 3 amp "rectifier diode" 200PIV, which stopped the board frying.
Here is a link to the solenoid water valve. Not much to go on I'm afraid. 12V 0.02-0.8Mpa.
The behavior that I'm seeing now, is that the solenoid will engage, but it won't disengage.
Do I need to add a Capacitor for the solenoid? If so, any recommendations on sizing?
int relayPin = 2;
void setup()
{
pinMode(relayPin, OUTPUT);
Serial.begin(115200);
}
void loop()
{
Serial.println("starting");
digitalWrite(relayPin, HIGH);
delay(2000);
digitalWrite(relayPin, LOW);
delay(2000);
}



