I am wiring up a light show for my pickup truck.
I have installed various high power spotlights and light bars into a dedicated relay/fuse box in the engine bay. These relays are wired into a switch panel in the dashboard and work beautifully using the manual switches.
I have subsequently set up an Arduino Uno R3 to control an 8 bank 5v relay module, each relay on the module will fire a separate light. I have set this up and programmed the Arduino to fire the relays, including strobe, which was working great on the LED's I attached while testing.
However, when I wire them up to bridge the switches on the dashboard (in turn firing the relays in the engine bay), the Arduino restarts after a couple of flashes. I realise this is the back EMF from the relay coils in the engine bay striking the relay module causing it to reset and I need a snubber.
I think the best answer is to install a flyback diode across the coil on the relay in the engine bay, but have been trying to figure out how I can wire these up within the blue box, without dismantling the relays installed in the engine bay. I thought maybe I could connect general ground to the manual switch (long route of achieving the same circuit), which helped but after a few more flashes the Arduino resets again. I also have some RC Snubber circuits from Amazon which I was going to try, maybe across the Module Relay contacts.
This is a circuit for one of the eight lights.
Please advice how I can reduce this interference using snubbers or some other modification, ideally within the blue box.
UPDATE: I also have a 4 button RF Remote Control, the receiver is in the blue box, one of the buttons fires another relay that has an interrupt input into the Arduino, and does an _Init() to reset. Seems this input (not the RF relay) is being fired when "relay for light 1" is disengaged.