Skip to content

amadeuspzs/esp8266-temperature-humidity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esp8266-temperature-humidity

Problem statement:

As a home-owner/renter I need to control multiple heating systems with room-by-room thermostats that I can move around for optimum measurements.

Solution statement:

Hardware (ESP12F with Si7021 sensor) and software (Arduino) implementation of a WiFi MQTT temperature/humidity sensor with battery voltage monitoring and 9+ months rechargeable battery life. Designed for integration with Home Assistant.

See the product website for a summary.

Example output via Home Assistant

Example energy usage over startup and 4 measurements

Prerequisites

  1. An ESP8266 implementation like ESP-01, ESP-12F or NodeMCU
  2. A DHT22 or Si7021 sensor
  3. An MQTT server like Mosquitto
  4. 2.4GHz WiFi network with the ability to assign static IP addresses
  5. Arduino IDE for flashing

Tested on:

  1. ESP-01 lacks easy GPIO16 access for deep sleep
  2. ESP-12F current preferred module
  3. NodeMCU has power-hungry onboard components

Tested with:

  1. DHT22 inefficient and low precision
  2. Si7021 current preferred sensor

Tested with:

  1. 2xAA batteries fine but unsustainable
  2. Generic JST Li-Ion battery current preferred battery

Tested with:

  1. MCP1700 current preferred regulator
  2. TPS62203 high frequency switching too fiddly to implement stably

End goal is to print the smallest PCB + battery package and 3D print a case for discrete deployment.

Goal is to make the device last as long as possible on batteries.

Energy performance

Current best energy usage is using the Si7021 sensor, measured using a currentRanger.

Startup: 0.0789mAh

Startup

This includes initial connection to WiFi, sensor reading, publication, writing to RTC memory.

Reading (no change): 0.0012mAh

No change

This shows the initial reading of RTC memory, sensor measurement, sleep and wake up to publish result.

Reading (change): 0.0285mAh

Change

This shows the initial reading of RTC memory, sensor measurement, sleep and wake up to publish result.

Energy estimates

  • Worst case (a reading every 10 minutes): 4.75mAh/day this should last ~9 months on a 1200mAh battery.
  • Better case (heuristically 50 readings a day): 2.19mAh/day this should last over a year on a 1200mAh battery.

Credits

  • Many thanks to Andy Bennett for all the support and assistance throughout the projet
  • Thanks to the OpenEnergyMonitor Project for the tip on Si7021 sensor and low power inspirations.
  • Thanks to the LowPowerLab team for making the CurrentRanger and low power inspirations.