Arduino uno watering system power consuption.


Ive build a watering system with arduino uno, servo, funduino soilhumidity sensor, 6leds and a 5000mA usb powerbank.

Arduino checks every 20seconds soil humidity. Then prints it to serial and led matrix. If hunidity is less that 400 servo is attached opens my water valve and after 30s closes the valve and detach servo.

My problem is that arduino and servo (both powered with own usb cable) they eat my 5000mA battery in 5hours.

Is there any trick I could use or should I take a powercable to my garden?

I assume you mean "5000 mAh USB powerbank". 5000 milliamp-hours in 5 hours means that either the Arduino and servo are drawing 1000 mA continuously, or your powerbank rating is wishful thinking on the part of the vendor. Take an old USB cable and cut away some of the insulation in the middle. Cut the red wire and connect a multimeter between the power source and the Arduino to measure the power draw. Do the same with the servo. If they don't add up to 1000 mA your powerbank is not providing 5000 mAh.

You may be able to save power by turning off LEDs as much as possible and by using 'servo.detach()' when you aren't moving the servo.

Most power banks advertise the capacity of the battery. For example, a Li-ion battery with a capacity of 5000mAh and a nominal voltage of 3.7V has an energy content of 5Ah * 3.7V = 18.5Wh.
Let's say that the boost converter of the power bank has an efficiency of 93%. You know that energy is conserved, so: 5Ah * 3.7V * 0.93 = 17.2Wh = x * 5V → x = 3.44Ah.
This means that the power bank can supply 1A of current for 3.44 hours. (Or 688mA for 5 hours.)



Checking the soil moisture every 20s is ok for testing, but once the sketch is working, checking every 15mins, or longer, is better. The water will take a few minutes to soak into the soil, so taking another reading after only 20s could lead to flooding.

This will mean you can put your Arduino to sleep for 15 mins, or 2hrs, between measurements. As mentioned above, Uno is not very low power. Is it an Uno R3? If so, you can remove the atmega chip and use its internal 8MHz clock, which will mean it will run on much lower voltage.

Get a good quality/make, protected 18650 size Li-ion battery, a usb charger, and a battery holder for it. The Atmega will run fine from the battery's fully-charged 4.2V right down to 2.8V or less. No regulator or dc-dc buck convertors needed (they all waste some battery power). If any vendor says that their 18650 battery is more than 4000mAh, do not believe them, they want to swindle you.

Put the Atmega into deep sleep between measurements and remove power from the sensor and servo while the Atmega is asleep. Removing power from the sensor will also greatly lengthen it's life. If powered all the time, it will corrode quickly.