Controlling multiple 12v solenoids with 5v relay modules (Arduino Reset Issue) I have 4 12V(1A) solenoids running on a 12V(4.16A) power supply. 
Each solenoid circuit is controlled by a 5V relay module connected to the Arduino Uno (powered by USB). 

The solenoids actuate properly but eventually the Arduino resets, typically when multiple solenoids are turned on/off in fast succession. This is accompanied by random character artifacts on the LCD display (connected to the Uno) during operation but before the reset.

From what I've gathered there are back EMF surges occurring when the solenoids lose their charge. Here are some possible remedies I've found:


Add a flyback diode (IN4004) to each solenoid circuit. (Redirect the surge)
Add a capacitor (4700 - 10,000 uF) to the 5v supply (from the Uno) for the relays. (Filter the surge)
Provide a separate 5v power source to the relay modules instead of using power from the Uno. (Isolate the surge)


Any input on which solution(s) should be applied or other possible causes for the Uno reset and LCD distortion is appreciated.
Some of those 5V "digital" relays can be wired using a separate power supply for the relays and the Arudino. You have to move a jumper to use separate power supplies.

My guess is that you're powering both your Arudino and your relay coils from the same 5V supply, and when you energize all 4 relays at the same time you draw too much current and the Arduino doesn't get enough voltage and resets.

Read up on your relay modules, and either re-wire them using 2 different 5V supplies, or switch your 5V supply to a higher current supply. (and possibly adding a filtering capacitor to the Arduino to smooth out the power fluctuations as the relays energize and de-engergize)

I used a 4-channel relay unit in a project of mine that has optical isolation of the relay control lines, and can be wired to use separate power supplies for the Arudino and the relay power. When wired with separate power supplies, the relay's control lines just draw CMOS logic levels to control the different relay channels, and get the power for the coils independently from the microcontroller's power.