There are several systems https://www.instructables.com/howto/watering+system/ for watering plants. Almost all of them are big, consist of more than one unit and rather complex. This inspired us to make our standalone battery powered plant watering controller which is simple, small enough to be inserted to almost any flower pot and has LED indicator to show current soil moisture.
- 2 x AA battery powered (about 2 months of continuous work)
- normal level of moisture can be set
- sensitivity to daylight can be set
- device turns off at preset daylight level
- delay before turning off can be set
- moisture is indicated according to the preset normal level, indicator zones are recomputed automatically
- additional MCU pin is provided that can be used for connecting buzzer
- additional MCU pin is provided for automatic watering
Step 1: Parts and Soldering
You will need:
2) 1 x ATtiny24A-SSU – microcontroller
3) 2 x 0,1 uF cap, ceramic disc
4) 3 x 47 Ohm resistor, through hole
5) 6 x 10 kOhm resistor, through hole
6) 2 x SL-30V1-A10K, slide potentiometer, 10 kOhm linear taper
7) 1 x BSS138 – n-channel transistor, sot-23
8) 1 x BL-FL7600UGC, Green LED
9) 1 x BL-FL7600URC, Red LED
10) 1 x BL-FL7600UYC, Yellow LED
11) 1 x L-3DP3C, phototransistor
12) 1 x PLD-6, 2x3 header
13) 1 x PLS-3R, 1x3 header, right angle
14) 1 x TC-0120, tact switch
15) 1 x BH321, 2xAA battery holder
16) 2 x AA battery
17) 1 x moisture sensor, like this
18) Programmer to program the MCU. You can use Arduino Nano or Uno programmed with “ArduinoISP” sketch or avr programmer.
Step 2: Programming
We will program the device using ISP connector on the board. Download sketch. As in this project not-Arduino-native MCU is used you need to install it. Install new configuration and choose “ATtiny24 @ 1 MHz (internal crystal; BOD disabled)”. Now you have everything to program your device. Connect programmer to it. Open downloaded sketch. In Arduino IDE choose “Tools – Programmer - ArduinoAsISP”. Then choose “Tools –Burn Bootloader”. Wait for completion. Choose “File – Upload Using Programmer”. Wait for completion. That’s all! Test your device!
Step 3: Settings
It's time to set up normal moisture and daylight levels.
Press key SW1 and hold it until all LEDS start blinking. This means the device is in settings mode. Release the key. Choose normal moisture and daylight levels by means of slide potentiometers R10 and R11. R10 (the right one) regulates normal moisture level and R11 (the left one) – daylight level. Then press key SW1 without holding it. All LEDs blink ones, which means the device is in normal work mode. So, the device measures daylight level constantly. If it is more that chosen one, soil moisture is measured and indicated. But if it is less than set one, the device continues measuring daylight but stops measuring and indicating soil moisture after preprogrammed delay which is set in code, default value corresponds to 1 hour: #define WORK_AFTER_DAYLIGHT ((long) 14400).
If daylight becomes more than set value measuring and indicating soil moisture is started again and so on.
For automatic watering uncomment this line //#define AUTO_POLIV.
For using buzzer uncomment this line //#define BUZZER.