To improve the efficiency of automatic garden watering systems, I tested some methods to measure the soil moisture. Mainly I tried resistive and capacitive methods.
For connecting the sensors to a home automation system I need an adapter circuit. It should read the sensor periodically and send the data to the home automation system. All this should be possible while running on battery to be flexible where I place the system.
So, last weekend I build a little circuit with parts I already had lying around. I use an Atmel ATMega48 to read a 10 bit DAC which I connected to the battery voltage. From a DHT11 connected to the microcontroller, we read the temperature and humidity. All three values are then send to MySQL database every 30 minutes. I connected an ESP8266 via UART to the microcontroller. The ESP8266 communicates via GET methods with an PHP script. The script saves the data then to an MySQL database.
I created a quick prototype on a bread board.
You can find the firmware here: https://github.com/cronJ/GardenController