🚨 This project is no longer recommended! 🚨. Please check out the evolution of it - the b-parasite.
w-parasite is an open source, WiFi-enabled soil moisture sensor for house plants.
This repo contains all the hardware design files (schematic, printed circuit board layout) and code for customizing and making your own w-parasite.
w-parasite works by reading the soil moisture level and transmitting that information via MQTT messages via WiFi. To save battery, the board sleeps most of the time, and only wakes up every few minutes, at which point it takes a reading and ships it to the MQTT broker.
An ESP32 sits at the heart of the board, and is responsible for managing the sensors and connecting to WiFi.
The board can be powered with LiPo/Li-Ion batteries. There is a battery clip for rechargeable LIR2450 batteries, as well as a possibility for soldering a JST connector for beefier LiPo/Li-Ion batteries.
To measure the soil moisture, two PCB traces act like a disguised capacitor. These are the two large copper traces on the bottom of the board, on the part that goes into the soil. The capacitance between these two traces vary according to the amount of water around them, and we exploit that phenomenom to infer the soil moisture.
This great post on wemakethings goes into detail about the inner workings of capacitive soil moisture sensors. I also expanded a little bit on the topic it in here.
code/
: Software. It's an arduino-esp32 PlatformIO project;kicad/
: Hardware. It's a KiCad project with the electronics schematic, PCB layout & fabrication files;To estimate the battery life and discuss our choices, we can agree on a few premisses:
I have experimented with two main types of battery:
I put together this spreadsheet to estimate battery life. Here are some example scenarios:
Ideas for improvements go in the direction of battery saving by shaving off precious milliseconds during the active cycle:
Excellent question! With BLE, we can work with much lower currents, and we can power the board with even cheaper batteries like the ubiquitous CR2032. SoCs like the nRF5 family from Nordic are much better suited for ultra low power applications. They idle at less than 1uA and can transmit with ~5mA (compare with 100-200mA for the ESP32 + WiFi)! I believe they are a better fit for battery-powered, intermittent sensors like this one. Moreover, ESP32, specially with WiFi is notoriously power hungry. Even if we implement all the tricks in the book, we won't likely match the power efficiency of BLE-only chips.
With all that out of the way, if we power this with a beefier LiPo/Li-Ion battery, we can hopefuly already run for over a year on a single charge, with the added advantage of having a simpler architechure and more friendly - the sensor talks directly to your MQTT broker. Additionally, BLE devices usually have a much lower range and often require bridges for integrating with the rest of our system.
For the freshest w-parasite updates, follow @rbaron_.
The hardware and associated design files are released under the Creative Commons CC BY-SA 4.0 license. The code is released under the MIT license.