Skip to content

Battery powered ESP8266 based sensor using the BME280 and MQTT communication

License

Notifications You must be signed in to change notification settings

jaycollett/ESPBatterySense

Repository files navigation

ESPBatterySense

This project was inspired by my desire to track the humidity, and to a much lesser degree, the temperature inside the storage solution for my 3D printing filament. To goal was to have a device that is battery operated, lasts several months (if not longer) before needing to recharge or replace batteries, and capable of transmitting to my MQTT broker for display and graphing in HASS.IO. I've been working a lot with ESP-based projects and love the the simplicity of the ESP. In this project, which is a varition of the the original that made use of a BME280 sensor, I've moved to a SI7021-A20 IC that is not a seprate daughter-board which I like better. The SI7021-A20 is a great solution for me as it's easily and affordably sourced, well documented, easy to reflow solder in my homemade solution, and has great accuracy.

The firmware is designed to put the ESP in deep sleep for 1 hour and upon reset, take a sample of humidity, temperature, voltage of battery, and then transmit that to my MQTT broker (which happens to be part of my HASS.IO setup). I originally had been using a LiPo battery from Adafruit, and while it worked, it was providing > 3.6V to the board directly. I never saw any negative issues with such a high voltage from the BME280 sensor or the ESP, but it's not a good design practice and it did cause the ESP to consume far more power in deep sleep than voltages closer to 3.3V. For these reasons, I've switched to (2) AA alkaline batteries and have had great longevity thus far with them. Running the prototype design for well over 3 weeks with a tenth of a volt drop on the batteries.

Unfortunately, this design requires a reflow solution as the SI7021 is not something I would classify as easily hand soldered.

BOM

  1. ESP-12S
  2. SI7021-A20 (with protective cover and A20 version not A10)
  3. 10K OHM 0805 Resistor (QTY: 5)
  4. 0.1UF Ceramic Capacitor X7R 16V 0805 (QTY: 1)
  5. Custom PCB from OSHPark.com
  6. JST connector for battery
  7. Battery (any ~3.3V battery source, I'm using 2 alkaline AA batteries)
  8. Optional header for programming and debug pins
  9. Enclosure of some sort (my very basic design is here

Travis license

Releases

No releases published

Packages

No packages published

Languages