Home > Industry Insights >Gear Motor
TECHNICAL SUPPORT

Product Support

DIY Smart Watering Butler: Use Arduino To Control The Servo To Water On Demand Without Root Rot

Published 2026-03-22

Friends who grow flowers and grass, do you often encounter this embarrassment: when you come back from a business trip for a few days, your beloved green plants are already "thirsty" and dying; or maybe you watered them clearly, but because you didn't control the amount, the roots were soaked to death? Traditional timed waterers are either “one size fits all” or complicated to install. In fact, with a small development board andservo, you can DIY a "thinking" smart watering steward. It can not only decide whether to water based on soil moisture, but also accurately control the amount of water, allowing your plants to enjoy the VIP treatment of "water on demand". Today let’s talk about how to turn this idea into reality.

The steering gear can also be used for watering

When many people hear about steering gear, their first reaction is remote control aircraft or robots, and they feel that it is nothing compared to watering. In fact, the steering gear is essentially a motor that can accurately control the angle. You can think of it as a "manipulator". As long as you install a small valve or lever on it, you can easily press the dropper, turn on the faucet, or even control a homemade tipping device. Compared with ordinary water pumps, the advantages of aservoare "strength" and "positional sense" - it knows where it is turning, and can realize like turning a faucet. A small flow of water will flow when it is turned a little, and a large flow of water will flow when it is turned to the end. This delicate control is exactly what plants need most for precise watering.

How to choose steering gear and drive board

When choosing aservo, we focus on two parameters: torque and type. Torque determines how tight a valve it can "pull". Generally, for watering potted plants, a 9-gram or 20-gram micro servo is enough. If you want to control a relatively tight ball valve, you have to choose a metal gear servo with a larger torque. In terms of type, ordinary analog servos are affordable and can be driven with the Servo library; if you have high requirements for noise and accuracy, you can consider digital servos. As for the driver board, most small servos can draw power directly from the 5V pin, but if you are using a high-torque servo, it is best to use a separate external power supply, such as using an old mobile phone charger to replace it. This can ensure system stability and will not cause a restart due to insufficient power supply.

Don’t connect the wrong wires when connecting hardware

For the hardware connection, we can break it down into three steps. The first step is to connect the three wires of the servo: the red wire (power supply) is connected to 5V or the positive terminal of the external power supply, the brown wire (ground wire) is connected to GND, and the orange wire (signal wire) is connected to a digital pin, such as pin 9. Note that if you use an external power supply, be sure to connect the GND of the external power supply to the GND of the external power supply so that the signal can be transmitted normally. The second step is to connect the soil moisture sensor. It generally has three wires: VCC, GND and AO (analog output), which are connected to 5V, GND and analog pin A0 respectively. The third step is the mechanical structure. Fix the servo on the edge of the flowerpot so that when it rotates, it can press the dropper or push a micro water valve.

Write code to realize automatic judgment

The logic of the code is actually very clear, that is, "read the humidity - determine whether to water - control the steering gear action". We first set a humidity threshold in the code, such as 300 (analog value 0-1023, the smaller the number, the wetter it is). When the value read by the sensor is greater than the threshold, indicating that the soil is dry, the Servo library is called to rotate the servo to a set angle, such as 90 degrees, hold it for a few seconds to let the water flow out, and then slowly turn it back to 0 degrees to turn it off. Here are a few tips: It is best to add a delay to the watering action to allow the water enough time to penetrate; in addition, you can set a limit of "no repeated watering for half an hour after watering" to prevent the sensor from being affected by the water just poured, resulting in repeated watering. You can adjust these parameters according to the preferences of your own plants.

Practical tips for installation and debugging

When it comes to actual installation, there are several details that can make your watering machine more reliable. The first is waterproofing. It is best to put the board and servo in a plastic box, especially the servo itself. If it is placed outdoors, you can apply a little waterproof glue in the gap of the shell. The second is the modification of the water valve. If you don’t want to use a ready-made solenoid valve, you can find a discarded shampoo pump head and use the servo arm to press it. This way, the liquid can be quantitatively discharged every time you press it, and the cost is almost zero. Third, when debugging, do not install it on the flowerpot first. Connect the servo and sensors. Use a cup of water to simulate wet soil, squeeze it dry with your hands to simulate dry soil, and observe whether the servo moves correctly. After confirming it is correct, fix it to the flower pot.

System expansion can also make it smarter

When the basic automatic watering is completed, you will find that the potential of this system is much more than that. You can add a real-time clock module to it to allow it to water during a specific time period, such as 8 a.m. to 6 p.m., to avoid sudden startup in the middle of the night. To be more advanced, you can connect or ESP32 module to send humidity data and watering records to your mobile phone through WiFi, so that you can check the status of the plants at any time in the office, and even manually control watering remotely. For friends with strong hands-on skills, you can also connect multiple servos in parallel and use one to manage several pots of plants at the same time to create your own smart micro-farm.

Seeing this, are you already itchy and want to try something right away? In fact, the biggest difficulty is often not the technology, but how to design the right "watering mechanism" based on the specific location of your plants and the shape of the flower pot. Do you think that in your flower gardening scenario, is the servo suitable for pushing the lever, or is it more reliable to directly turn the valve? Welcome to share your modification ideas in the comment area~

Update Time:2026-03-22

Powering The Future

Contact Kpower's product specialist to recommend suitable motor or gearbox for your product.

Mail to Kpower
Submit Inquiry
+86 0769 8399 3238
 
kpowerMap