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 a brain...
- An Arduino Uno R3, programmed with 3 different light sequences;
- An 8 bank 5v relay module, driven from Digital Out Pins 6 to 12, each relay on the module fires a separate light (via the existing relays in the engine bay).
- A 4 Channel RF receiver, provides Digital In Pins 3 to 5, to select one of the three sequences, and Digital In Pin 2 Interrupt as a stop/reset button.
I have set this up to start a sequence from an RF button, 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 receives a positive signal on INPUT_PULL Pin 2 after a couple of flashes. I think this is something to do with an interference caused by the back EMF from the relay coils in the engine bay, possibly striking the relay module causing it to fire the interrupt pin 2 and causing a reset.
Looks like 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 gets a signal to reset again. I have lots of diodes and 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.
I have managed to get a working setup by removing the resistor and the 5v feed to the RF Relay. Also adding a Diode from earth to the top side of the Module Relay connector. See updated circuit below. Seems to be working, though I'll have a go at adding RC Snubbers as suggested.