ialex87 / Portable-temperature-sensor

Tiny, portable and low power temperature sensor based on DS18B20.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tiny, low power temperature sensor based on DS18B20.

The main scope of this project was to have dirt cheap, wireless, tiny and portable temperature sensor powered by batteries for at least 4+ months.

Requirements:

(Hardware)

  • ESP8266 (ESP01) + Low power mod
  • 4.7k resistor
  • 2x1.5 AAA/AA batteries
  • Battery holder
  • Working MQTT Server
  • Graphana (optional)

(Software)

  • Temperature values will be sent to an MQTT broker
  • Store the data into a database
  • Plot nice graphs :)

Let's build it!

  1. Deep sleep mod.There is a way to make ESP-01 work for months* using something called deep sleep mode. When in deep sleep, ESP8266 disables almost all of its functions and reboots after specified period of time. There is one catch: ESP-01 is capable to enter deep sleep, but unable to restart and resume operation. XPD_DCDC MCU pin in not connected to RESET pin. To fix it, you would have to solder thin wire between XPD_DCDC and RESET pin. There is a good article explaining in details how do to this. I also have removed the red power led from the ESP01 board what saved 10mA more.

  2. Wiring see the image below: alt text

  3. Upload the sketch

Restults

Power consumption: Active: 133.2mA Idle: 18.6uA

alt text alt text alt text

Updates

After running on 2AA batteries for less then 4month (less then expected) I have decided to replace 2AA with one CR123 Lithium battery. This battery, in theory should last for about 2y.

About

Tiny, portable and low power temperature sensor based on DS18B20.


Languages

Language:C++ 84.4%Language:C 15.6%