Wait wait. I need 12V for the solenoid valve/pump. I need 5V for the arduino, for the relay switch, and for 4 more sensors attached to the Arduino. I didn't want to have two power suppliers for the box, so I got a 12V power supply, connect the 12V to the pump, and then buck down to 5V for everything else.
For the coils of the relais, not for the pump and valve. Your powersupply is not resilien enough to take care of that. Oh, tke care of the direction of the diodes ...
That's what I SURMISED, thanks for the confirmation. It's not a great idea. The transient response of the "buck" may be less than phenomenal.
A separate 6V battery circuit could prove that out.
Is that with an "M.R.E." - a sketch that clicks the relay (and nothing else)?
That is correct.
The WORST part is... I called my wife to show her how the thing crashed. I tried with 200ms. No crash. I lowered to 100. No crash (while shortening the lifespan of my poor solenoid valve...). Then tried with 20ms. It roared happily for a minute, till it finally stopped.
Since you were so helpful, I fished out an old schema of the circuit I created in Fritzing... and here it is, the updated version. It's only missing a sensor, but the gist is there.
Please note that I DO know that powering things with digital outputs is not great. but those things draw basically nothing, and must only be turned on while used (which made writing the software... "interesting").
Give it a try. If you do not connect the motor to the Arduino 12V on Vin would be fine. Be sure to watch the regulator temperature for a while when first starting. You could also look at a solid state relay, they work great.
The diode on that relay module would be for the relay coil, not your load.