Smart Plant Watering System Using Arduino, 3 Soil Sensors, Relay, Pump, and Solenoid Valves – Need Feedback

Hi everyone! I’m a senior high school student working on a capstone project.
I made a Smart Plant Monitoring System that automatically waters plants based on soil moisture levels. I just want to ask if this setup will work and if I got the right materials.

project goal:
Monitor 3 plants using capacitive soil moisture sensors

If any plant is dry, only that plant will get watered

Water comes from 1 USB submersible pump

3 solenoid valves control which plant gets the water

Arduino decides which valve to open
Everything works automatically

Components:

Arduino Uno R3
3x Capacitive Soil Moisture Sensors v1.2 (analog)
1x 4-Channel 5V Relay
1x USB Mini Submersible Water Pump
3x 12V Normally Closed Solenoid Valves
12V Power Adapter for valves
Breadboard + jumper wires
Tubing (5.5–6mm)
T/Y hose splitters
Power bank (for Arduino and pump via USB)

Power setup:

Arduino + water pump powered via USB (from power bank)
Solenoid valves powered by 12V adapter
GND of 12V adapter is connected to Arduino GND (for common ground)
Valves connected to relay (NO + COM), each controlled by IN1–IN3
Pump is connected to relay channel IN4
Soil sensors connected to A0, A1, A2
Relay connected to D5, D6, D7 (valves), D8 (pump

how it should work:

  1. Arduino reads each soil moisture sensor
  2. If any plant is dry, it opens the valve for that plant
  3. At the same time, it turns ON the pump
  4. After a few seconds, the pump and valve turn OFF
  5. System loops and checks moisture again

My Questions:

Is this setup correct?

Will this actually work in real life?

Is there a better way to handle water flow?

Is my wiring and power supply logic safe?

wire color:
blue - gnd
red - positive
black - negative
yellow - analog signals (A0, A1, A2)
green- Digital signals (D5-D8 to relay IN1-IN4)

im concern about the wiring and my power source since this will be my first project and i dont want to mess it up, and i havent write a code yet i also dont have experience on it, i plan to study coding once my prototype project got approved. if there are code that will be share here i aprreciate it thank you.


Any suggestions or corrections are welcome! I’m still learning and I really want to make sure I’m doing this right before building the final version. Thanks a lot!

No, it doesn't! Where does your water actually come from and how do you know there is water there and your storage has not run out? You need to think about the what-if's in your design and learn how to know when one happens and then plan for that!

what i mean is i will be using 1 usb submersible pump and power it using power bank and usb and the main source of the water would be just a transparent bottle. and thats where i will put the water pump

How will you know if there is water in the bottle to pump, so you don't run the pump dry and ruin it?

1 Like

If the solenoids are controlled by the relay contact there is no need nor reason to connect the 12 volt negative to anything other than the solenoid valves.

1 Like

You should not power the relays from the 5V pin of the UNO.

The picture shows a 24V relay board, is that what you actually have, or do you have the 5V version?

Your wiring diagram for the solenoid valves is not correct. You show three relays all merging into a single line, then that single line splits off to the individual solenoids.

1 Like

You have made several choices which are making your project more complex than is needed. This will make it more expensive and less reliable.

It would be simpler to use 3x pumps. Then the valves and splitters would not be necessary, and you would not need a 12V supply.

Is that an AC (mains) to 12V DC power adapter? If you have mains power available, why are you using a power bank?

Use 5V power adapter with enough current available for the Arduino, sensors and pumps.

If you insist on using 12V valves and relays, use 12V relays. The Arduino can still use them but they will place less strain on the Arduino's on-board regulator by using power from the 12V supply to energise the relay coils.

Better still, use MOSFETs these have no coils and use almost no power to operate.

2 Likes

This should not be immediate. It takes some time for water to soak into the soil and for the new moisture level to settle. If you immediately read the sensors and actuate the watering again, you could drown the plants and cause a flood. Have the Arduino wait 10~15 minutes before reading the sensors and watering again.

If you stagger reading and watering by 5 minutes for each plant, you will ensure that no two pumps/relays/valves will operate at the same time, removing the need for a power supply capable of supplying all 3 at the same time.

2 Likes

As part of the learning experience create an annotated schematic of your project, that is the language of electronics. For software there is a great package called KiCad, it is free although they ask for a non required donation. As you do this you will learn how much more and better information is conveyed this way.

1 Like

Have you gotten enough feed back or do you need more?

2 Likes

sorry for just replying now, i actually found the exact prototype that i want on youtube and im planning to just copy that since it also have a open source code already, but im still trying if it would fit my budget though so i might try this instead. if the prototype i found in yt is too expensive to do. anyway thank you again for helping!! i appreciate the comment

this is the prototype i found on yt

yes i think i already got enough feedback! thank you for commenting, i appreciate it

1 Like

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