Hello, as the topic states, I have a setup where my arduino is connected to a 5v relay module which is connected to a DC water pump and a 9V battery. The relay, motor, and battery all are working fine while testing individually but as soon I connect the relay with the motor, the motor starts for a few second and then stops the relay module and restarts the whole arduino sketch. I cannot understand the root cause but found out from the internet that it might be a noise coming from the motor. How can I reduce the noise, what devices can I use? Can someone help me here? I would appreciate it. I have attached the circuit diagram too for reference.
Welcome to the forum
If you really are using a PP3 battery to power your project I would suspect that it cannot provide enough current to power the pump. This will cause the battery voltage to drop and reset the Arduino
PP3 batteries are designed to provide small amounts of current to power devices like smoke alarms and TV remotes, not motors
Hello, thanks for the info but I don't think that is the issue. When I'm directly connecting the battery with the motor, the motor seems to work fine. I also tried another setup by replacing the battery with my laptop's usb cable to power the motor but got the same thing happening.
If the battery is really an issue what kind of battery would you suppose be better to power the motor?
Yes, many people have had that problem. You need to put a 0.1uF capacitor and a 1N4007 diode across the motor.
Also make sure that the pump wires are NOT near any other components.
I am surprised that that your battery can power your pump. I don't believe it will run it for more than a short time before the battery is exhausted.
But although the battery may be able to run the pump for a short time, the current pulled by the pump will reduce the battery voltage significantly, which, when connected to the rest of your circuit, will cause problems.
Another reason why your circuit may not be working is because you are attempting to use a relay to switch the pump. The relay may be pulling, or trying to pull, almost as much current as the pump itself. You could consider replacing the relay with a MOSFET. If you do that, make sure to use a "logic level" MOSFET" such as IRL44Z.
Your diagram is missing how you power the rest of the circuit.
Hi, @aakpho3n1x
Welcome to the forum.
Can you post some images of your project?
So we can see your component layout.
Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
Can you please post a link to data/specs of your pump?
Thanks.. Tom...
![]()
Hello @ledsyn, the arduino is powered by my laptop, that's it
That is fine
@aakpho3n1x
If you disconnect the motor does everything work as expected (relay clicks)?
Have you tried my recommendations?
Yes @jim-p, the relay clicks when the moisture is below the specified threshold (let's say 30%) and turns on. It turns off when the moisture crosses that threshold.
Then the problem is as you suspected, noise.
See post #4
Thanks @jim-p, I will try tomorrow and let you know
No hurry
Ok, should do it.
Since you have a 9 V battery, will you deploy this where there's no electricity avail?
Yes you could say that, it's a project so i have to showcase it with use of batteries
If it has to be cheap, then use AA alkaline batteries.
If it has to be eco-friendly then use recharables.
Hi @TomGeroge, sorry for the messy wiring, below is the physical circuit and the diagram with labeled pins.
NEVER run those pumps out of water, you will destroy them.
9V is too much. See post #4



