|Sensor inside crawl space|
This is a project idea for monitoring the crawl space under a house for water ingress.
This things monitors the crawl space with the following sensors:
- water level (in case it is flooded), using a VL53L0X lidar sensor
- humidity and temperature using a DHT11 or DHT22
Measurement data is uploaded once an hour over WiFi to an MQTT server.
Since there is likely no mains power easily available in a crawl space, so it is battery operated.
The plan is to use an ESP8266 to read the sensors, connect to the house WiFi and upload the measurement data once an hour. When not measuring, the ESP8266 is in deep-sleep mode (something like 80 uA current). Time-of-day is retrieved using (S)NTP.
- ESP8266 in a Wemos D1 mini board, because they're so easy to use
- LiFePO4 battery, because they have about the right voltage for direct drive and are safe to use
- VL53L0X LIDAR module to accurately measure the water level
- DHT11 or DHT22 to measure humidity and temperature
Software tasks are: (estimated time)
- wake up from deep sleep (1.0s)
- connect and authenticate to the WiFi (3.0s)
- perform an SNTP request to get the current date/time (1.0s)
- perform a distance measurement using the LIDAR (3.0s)
- perform temperature/humidity measurement (1.0s)
- publish measurements to MQTT (1.0s)
- calculate sleep time until next wakeup and enter deep-sleep (0.0s)
Total about 10 seconds per measurement cycle.
A typical LiFePO4 "AA" type battery has 700 mAh capacity.
When awake, current consumption is assumed to take 100 mA on average for 10 seconds. So each measurement takes about 0.28 mAh, allowing about 2500 measurements in total. Doing one measurement per hour, one LiFePO4 battery charge should last for about 100 days.
Deep-sleep current is ignored in this calculation.