Automatic Watering System

Hi friends, Arduino newbie here. I've been working on getting an automatic watering system going and I've run into a couple problems. Looking for the best option for solving.

My system consists of an Arduino Uno controlling 4x 12V DC motors, 4 moisture sensors, a floating water switch and an LCD screen. The goal is for the moisture sensor to sense when the soil is dry, turn on it's motor/peristaltic pump using a N2222A transistor to pump water. The floating water switch kills the system when the water reservoir is out of water. The LCD reads Wet, Dry or Good for each sensor.

So the first issue is that when a motor turns on the sensor gets a different reading because the voltage/current in the system changes. I have gotten it working with 2 motors and 2 sensors but the sensor values start to change too much when both motors are on.

Secondly I've found that I just don't have enough voltage/current to run all four sets. When I set up the third motor with a sensor, that third motor did not want to turn on consistently and then gave the other two issues as well.

All in all I am trying to figure out how to fix this. I could remove the LCD screen and just have a multicolor LED to report status which I think would take less current to run if needed. Secondly I have seen some people using relays instead of transistors and I am wondering if this is an option that would take less power. Maybe I just need a better transistor or voltage barriers?

Please let me know what details I am missing to better describe this issue. Optimally I would like the four current readings on the four sensors to not change when the motors turn on and also be able to run four motors at once.

Thanks!

Show us a good schematic of your circuit.
Show us a good image of your wiring.
Give links to components.
Posting images:


Use CTRL T to format your code.
Attach your ‘complete’ sketch between code tags, use the </> icon in the posting menu.
[code]Paste your sketch here[/code]

"Please let me know what details I am missing to better describe this issue. "

How about describing what you are using for power since you have self identified that power is an issue.

Don't measure the moisture while a pump is running.

Don't run more than one pump at once.

It takes time for water to soak into the soil and for the new moisture level to stabilise. So only run a pump for a short time, perhaps only a few seconds at a time, then wait for a minute or two before taking a moisture reading. If it's still too dry, repeat the process. This means a pump only needs to be on for a small percentage of the time, so it's easy to stagger the times when multiple pumps operate so that only one is ever on at once.

Removing the LCD will not help, it consumes very little power compared to a pump. In fact, LCD are pretty low power and replacing with a set of LEDs could actually increase the power use.

Relays take considerably more power than transistors. In fact, you need a transistor to operate a relay. Most relay modules sold for use with Arduino have transistors built in.

Thanks for the guidance all. PaulRB your simple solution had crossed my mind and I wanted to make it difficult and see if there was a way to correct the circuit. I will fix my code to reflect your suggestions today. Thanks!