| Electronics > Beginners |
| Latching relay is causing Arduino reset |
| (1/1) |
| aurmer:
Each time I latch this 12V relay, my Arduino Uno r3 restarts. Allow me to illustrate. - Arduino with a Relay Shield - One of the 4 shield relays is switching the low side of my 12V relay. - But in testing I realize that when there is no current flowing through the 12V relay, there is 12V on NET 1 (see illustration). When the shield relay latches, for an instant, it connects 12V to GND and I think it is the cause of my restarting issue. (When I remove the 12V relay from the circuit, there is no restarting.) Can someone suggest an additional component or a redesign to help solve this? I am inexperienced with relays, so I am not sure if there is an alternate type of relay that would suit me better. |
| Fleetz:
Try putting a back EMF diode across the relay coil to supress the large back EMF generated when it is switched on and off. It is mostly causing a spike on the Arduino supply line causing the reset. Also make sure the supply feeding the relay is adequately decoupled. |
| macboy:
+1 on the back EMF diode, or an RC snubber (diode is easier). +1 on decoupling on the relay supply (add an electrolytic cap near the relay). Keep the relay's 12 V supply and return wires close together, preferably twisted together. This prevents them from becoming a big loop antenna to transmit EMF pulses during switching the relay on and off. The same goes for whatever high current load that relay is controlling. You should not need to use a small relay to drive a larger relay, even if the larger relay is driven from a higher voltage, 12 V in your case. You can create a simple open-collector relay driver with any jelly bean NPN transistor (2N2222, 2N3904, etc) and one resistor. |
| Navigation |
| Message Index |