Relay makes Arduino Uno crash

Hello, I'm trying to build an automated project with a soil moisture sensor. The goal is to activate a pump when it reaches a certain moisture level, through a relay connecting the pump and a 6V input. A screen also displays the moisture level. When the 6V input is turned off, it works perfectly, but when I turn it on, the arduino/screen/moisture sensor go mad. I'm new to arduino so maybe the problem is very simple, but I can't see it. Some topics were saying to use a snubber, but I don't think it's the problem because it's only 6V and when I try to put the pump system further away from the rest of the system, it still does the same thing. I modelized the relay with a breadboard (top one) on my circuit.
Thank you for your help !

Are they 3-5V submersible pumps?

See this topic

1 Like

Welcome to the forum!
May I ask where the relay is in your schematic?


If you have the green, orange, and black wires are all connected like you have in the schematic, the system will short out because of the GND and 5V pins being connected.
And with that connection for the motor, the motor will always remain on...

So what else could it be? If everything else is powered separately from pump and the setup works perfectly (relay included) when pump supply is disconnected, there are not much options left...

1 Like

As suggested put the diode and capacitor across the motor itself.

Secondly, Is the Uno on a separate supply, if not I suspect that the pull out torque of the motor is enough to reduce the battery Voltage and cause instability with the Uno

1 Like

yes you're probably right, I'll try thank you !

it's 6V but i'll try doing this setup, thank you for the link !

This size?

There have been dozens of people on the forum with the same problem with very similar pumps.

Glad you got it working
Have a nice day!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.