Just another esp8266 temp logger


I know I know what your thinking, Here’s another temp logger based on the esp8266. After looking around on the internet it looks like every man and his dog are making temp loggers powered by everyone’s favourite IoT dev board, the esp8266. Ever since the esp8266 came out I wanted to do a project with it, I’m glad I delayed until now before starting to develop my temp logger. Looking back I first ordered a esp-01 way back in Nov of 2014 but back then there wasn’t really much to do with them since they didn’t have a replacement firmware they have now, You still had to use a micro to control it via AT commands.


I started home brewing my own cider/beer after getting all the kit needed for a birthday present in august of 2015, I’ve always wanted to get into it be never took the plunge to get set up. All was going well in the nice weather of the summer and I was brewing in the garage. This came to a stop when I realised that winter was drawing in and the temp was dropping below the recommended temp of 15C. Long story short I moved to another room in the house but still I was curious as to how cold it would get when it was frosty out. This is when I quickly knocked together a temp sensor/logger using my raspberry pi.

I knew the raspberry pi was over kill but it did what I needed to do in pinch. I knew I need to move over to using the esp8266 and found the Nodemcu firmware and started developing the temp logger.


Final hardware I settled on was

  • ESP-01
  • WS2812 x 1
  • DS18B20
  • AMS1117 3.3v regulator
  • CP2102 usb to serial
  • Button
  • Switch
  • 10k resisors x 2
  • Male usb port

Powered from a phone charger battery bank

Powered from a phone charger battery bank

I decided to use the esp-01 module because I only need 2 GPIO pins since I was using the DS18B20 temp sensor and the WS2812 LED. This made the hardware really cheap and easy to reproduce too. I normally use FTDI boards when it comes to the USB to serial on my projects but I couldn’t find a FTDI board with micro USB that didn’t cost the earth. That’s why I went with the CP2102 which I hadn’t used before.

I think what really made me feel good about this project was the fact that I came up with the idea to use a Full sided male USB port for power teamed with a AMS1117 3.3v voltage regulator. This would allow me to just plug this straight into a USB wall wart or a phone charger battery bank.


I added a switch so that I could switch between uploading code mode and flashing a new firmware. While I was at it I added a reset button.

My temp sensor hell

I’ve using temp sensors with the arduino platform before but didn’t give too much thought to how accurate they were this is until now. I used a BMP180 temp sensor on the raspberry pi set up and it seamed really accurate and was i2c so really easy to interface with. On moving to the esp8266 I quickly realised that with the nodemcu firmware I would be short on RAM and run into errors.

The RAM problem was because I wanted to add the ssd1306 oled screen which uses a lot of RAM its self

  • BMP180

First I tried the BMP180 which was really accurate but would run into the dreaded ‘out of memory’ error using this library. Again I believe this was to do with me using the ssd1306 OLED screen.

  • DHT11

next up I tried the DHT11 temp and humidity sensor but found it to be too inaccurate being at least 2 degrees out. Even with the suggested 10k pull up resistor It didn’t seem to make a difference. This sensor I didnt run into any memory errors because It has the library built into the nodemcu firmware.

  • DS18B20

With the DS18B20 sensor I also ran into the ‘out of memory’ error while using it with the ssd1306 OLED screen. It was as accurate as the BMP180 sensor but only need VCC, GND and a single data line. Library can be found here


I found some really cool projects that I borrowed some code from. Firstly I found this guy that made a IFTTT button what had some wi-fi configurable code in his project. Basically if it can’t find the present WiFi network it will turn its self into an access point that allows you to set new WiFi credentials from the web browser on your phone or laptop.

Also I found A great blog post about controlling LED’s via a web server. I incorporated the web server to display the current temp and to turn the WS2812 on or off.

Code download

As usual all my code is available over at Github

Lua code – https://github.com/facelessloser/temp_logger_esp8266/tree/master/final_temp_logger

Gerbers files – https://github.com/facelessloser/temp_logger_esp8266/tree/master/gerbers


Time lapse build – 

Hardware walk thought – 

5 responses to “Just another esp8266 temp logger

  1. Pingback: ESP8266 temperature logger - Electronics-Lab·

  2. Pingback: ESP8266 Temperature Logger – OSH Park·

  3. Good day! This is kind of off topic but I need some help from an established blog.
    Is it very hard to set up your own blog? I’m not very techincal but I can figure things out pretty fast.
    I’m thinking about making my own but I’m not sure where to start.
    Do you have any points or suggestions? With thanks

    • Hi a good way to start is just by documenting your next project as you go along, that way you wont forget about all the little details. Keep it short and sweat. Also if you found and good hints and tips while you made your project, High light these because they might be beneficial to someone else making something similar to your project.

      Hope this helps

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s