From Mikesshop
Jump to: navigation, search


ESP8266 boards seem to be all the rage nowadays… so I figured I’d get into it! Saw a project by someone where they had tied a DHT11 sensor to the ESP, and there are even libraries to make reading it easy. This gave me the idea to make a bunch of temperature modules that I could spread around the house, collect data, send it to a central server and only have to change batteries out twice a year.

So I ordered up a Nodemcuv2 device. It has an integrated USB chip and a 3.3v regulator, and a ESP8266 module piggypacked making it convenient and easy to do development with. NodeMCU firmware also has an IDE called ESPlorer which makes it very easy to write LUA code using their libraries, and upload it to the chip for testing or deployment.


Got the ESP in and started fiddling with it, wrote some code to play around and got it running. There are some serious limitations to using the NodeMCU firmware, and I may switch to writing code in C for the final version.

The NodeMCU as I said before, has a 3.3v regulator and a USB chip onboard. These together make up a decent amount of current draw when the device is in sleep mode (11mA). The ESP8266 only uses something on the order of 80uA in sleep mode… so I’m definitely going to have to get a bare module for the final revision, otherwise I’m going to be replacing batteries every week.

ESP8266 Batteries 1.jpg
ESP8266 Batteries 2.jpg
ESP8266 Batteries 3.jpg

Here’s the test setup I have now. It is running off battery power, sleeping for 60 seconds, then waking up and sending the temp/humidity/voltage to the server as a http post of JSON. The server then stores this in a CSV file, and also displays it in a table. After transmitting, it goes back to sleep.

We’ll see how long the set of 3 C batteries last… that will be a good indicator of how much I need to trim things down!