I love my home plants but (as sometimes we all do) I forgot to pay enough attention to them and water them timely. So I want to create a small moisture level display. Also, I want it to be very power efficient and durable to last for a long time from the battery.
Although parts a pretty simple for this project (Arduino + moisture sensor + servo) I have learned a lot about power management and the durability of the project.First part: Measure moisture level
I use 2 straightened clip and a voltage divider as an analog moisture sensor. Put to clips to soil and measure its resistance (more moisture mean less resistance). Simple enough. But if you will apply a constant current to this type of sensor - it will destroy itself pretty quickly. In less than a week of use with a 5v battery you will get this:
There are many solutions to the problem. But because it takes weeks for the plant to dry out I don't really need to constantly check moisture level. I will enable sensor every 3 or 4 hours, check moisture (that should take less than a millis) and than disable sensor again.
So here is a picture of my sensor:
For display I have used a SG90 Micro Servo (using standard Arduino Servo Lib) and a custom 3d printed and acrylic paint case:
Fusion files is attached.Third part: Power management
There are 2 things to think of for power: you need enough current for the servo to move and you need to be power efficient to survive on a battery long enough. Servo needs 4.7v to 6v to operate normally.
I want this project to have a small size so I have started with some small batteries. I try 4xLR54 and then 2xCR2032 but both don't give enough current to servo (~300mA needed). With 4xAA servo works just fine. So for this stage, I will stick with AA batteries and will try to shrink down project size later.
Power efficiency is simple - you need just disable everything that consumes power.
I connected moisture sensor to an atmega digital pin and turn it off once I have read data. Also, I only read data once every 3h.
Servo consumes ~0.5mA trying to hold a position. I have to disable Servo after movement using the transistor.
And last but not least you need to put atmega at deep sleep. I use Low-Power lib from rocketscream to put arduino to sleep.
In the end project consume only 0, 006 mA which should give us more than a year on a battery.
UPDATE #1: 4 ladda batteries last for only 9 weeks. A little bit less than expected. I don't test my batteries for capacity but ladda was tested in the internet and the results was really good. So it should be some errors with calculation. Probably 1 sec every 3 hours to measure moisture level and moving servo gives a more significant impact. Will check & update.The final product and next step
So currently project looks like this:
I will test it for a couple of months and 3d print a smart pot with embedded moisture display. Also, I want to try powering project from 2x CR2032 with supercapacitor to be able to provide enough current for the servo.
If you are interested please comment and I will post detailed video of the build.