Some notes how to build a sensor that can be driven by 3 AA rechargeable battries for up to 1 year.
Table of Contents
Overview
The web is full of examples how to build a temperature sensor. I want a sensor that is connected to my Wifi, can be driven by batteries for months and has an adequate resolution and precision.
This leads me to the following parts:
- ESP-01
- DHT 22
- MCP1700
- 3 AA rechargeable batteries, should be ‘ready-to-use’ (see below why)
There are many ESP 8266 modules but the ESP-01 has the lowest power consumption. Especially the chinese Wemos D1 clones have bad voltage regulators. However, the ESP-01 must be modified to be able to wake up from deep sleep, i.e. soldering a wire from XPD_DCDC to RESET of the board. Also the status LED should be removed. As there are many websites describing this I don’t give further details here, just use your favorite search engine.
I decided for the DHT 22 because it has a higher resolution and temperature range than the DHT 11.
Voltage Regulator
So why do I write another blog entry about it? I made a design decision that most people do not. The voltage regulator is a critical part regarding power consumption and so I decided to use the MCP1700. Many do not as during startup of the ESP-01 its power consumption is outside the specifications of the MCP1700. However, I’ve build 6 of these modules described here and they all work for over 1 year now without a single problem.
Why a voltage regulator at all? I found that the ESP-01 needs at leats 3 V for stable operation. We could use normal batteries giving 2 * 1.5 V = 3 V or more but as I have 5 sensor modules working I would waste 10 – 20 batteries per year, absolutely not acceptable. So using 3 AA rechargeables can lead to over 4 V (using fully charged ones) I need a regulator with very low power consumption. The MCP1700 consumes 1.7μA, that’s great.
Circuit Diagram
Ok, now let’s check the curcuit diagram.
Pretty simple. Power is connected to J1. It should be >3 V with plus on pin 2 and minus on pin 1.
If you want to try it out on a breadboard, here’s a picture.
Rechargeable Batteries
Last import point are the rechargeable battries. As the module should run more than half a year we cannot use normal NiMH batteries as their self-discharge would be higher than the power consumption of the module. Usually these results in only 50% charge after 6 months and they are empty after 12 monts.
However, you can find batteries called “ready-to-use” or “pre-charged” that have a very low self-discharge, retaining about 85% of their charge for a year after charging. You can find more details on this german Wikipedia page. There is also an english page but only for the batteries by Eneloop. Note that there much more brands offering this battery type.
Download
You can download the images above and the file for Fritzing to order your PCB.