Go Down

Topic: Arduino Resetting Itself with Relay (Read 17179 times) previous topic - next topic


I am facing the same issue with switching off aquarium water pump with relay. Thinking of buying the rc snubber from this aliexpress vendor. Is it suitable and how do I connect it to the relay?

Please help.

I have purchased one of these but haven't had luck with it solving my problem.   Did you have any luck with this?


Snubber circuits are for AC loads.
Make sure the parts are rated for YOUR mains voltage and load.
A snubber circuit with MOV for 110volt will blow apart when connected to 230volt mains.

Snubber circuits won't work for e.g. 12volt DC pumps.
In that case a diode across the pump could be needed.


Hi all, I'm having the same issue with a Fan. I'm trying to control a fan speed with an MQTT protocol and it works perfectly fine when its on.

The problem is that when the fan is off, it turns back on after some time. So, should I put the capacitor and resistor in every relay I'm using? I have tried everything except that. Thanks in advance


The capacitor needs to be rated for AC use to a voltage at least as high as your mains voltage. Also it should have a resistor in series with it. This arrangement is called a snubber. It can be connected either across the relay contacts or across the fan. It's hard to suggest values without knowing more about the fan, but for 230V mains, 0.1uF in series with 100 ohms might be a good place to start. For 110V mains I would double the capacitor value and halve the resistor.
Hello forum,

I have a mega that runs a relay - on NC it powers a 20A contactor and on NO the same. I inserted an F1013 capacitor with 100ohm resistor in series across both the NC and common contacts, and again the same across the NO and common contacts.

The relay energises fine, which means it cuts power on the NC contact but as soon as the coil releases, it resets the arduino.

I power the system using a 6V sealed lead acid battery with a small 220V to 6V charger, and the relay is powered straight from the battery through a dedicated 5V power supply (5A rated.)

From reading this thread I was sure I had it all 100%, but I'm still missing something.

Any ideas?


Hello everyone!
Im having same problem with my ESP32 and a two relay module.
I can controll lights and all with no problem, so i tried to control my motorcycle.
When I turn the main switch on (Relay ON) it works just fine, but when I manually start the engine, it idles for about a minute and then the Relay and the ESP32 restarts on his own, so the motorcycle dies and I have to restart everything, like if it´s stucked. 

Any ideas?

Esp32 is powered by the motorcycle Battery( 12V-10A Battery, wich is transformed to 5V-1A) or a (5V-1A cellphone external battery).
The relay is powered by the ESP32 (It means VCC, IO pins and GND are conected to ESP32)
The relat outputs are conected good. (GND-->Common // V-->NO).

I hope anyone can help me, i've tried the capacitor and nothing, today im tryign with the diode for DC, but im not sure if it's going to work...



Hello I am also looking for some help on this. My setup is a little different.  I'm using two relays to alter the direction of a dc motor.   I aswell get the Arduino resetting when turning off relay.  See photo for how the relays are withered up.   I am just looking for help on where to put the Diode on my set up.   Any and all help is welcome. 


Feb 17, 2019, 08:43 pm Last Edit: Feb 17, 2019, 09:41 pm by outsider
I would use a full wave bridge rectifier sized to the motor's voltage and stall current, which is?


Feb 18, 2019, 04:38 am Last Edit: Feb 18, 2019, 04:40 am by Laggylarry
Looks like the motor is 24v 5a.    Thannks for the help so far!!!


Outsider!!!   Your amazing.  I had a flat rectifier rated for 4amps.   Hooked it up and problem solved.  Thanks so much!!!!!

FYI. This is what I am building



I am facing the same issue with switching off aquarium water pump with relay. Thinking of buying the rc snubber from this aliexpress vendor. Is it suitable and how do I connect it to the relay?


Please help.

You have to connect it in parallel across the relay contacts .


Hi I have a similar relay operating a 12v pump my arduino resets when it shuts off.. I was hoping to learn how to work out which parts I need to use to create a snubber.. my relay has the 12v power source + the positive terminal of the pump I'm running in it.. so would I connect the snubber across those 2 lines?
hi.. have u solved ur problem.same problem i facing with a 12 volts pump.when relay is turned off ardunio resets.please let me know how u solved the problem in your case



Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google (who would have thunk it ! ) or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Go Up