WiFi? base Temperature Logger - collates notes on using a blue board with DS18B20, ESP01 and MicroPython?
Similar information is posted on:
possibly collated to this page:-
ESP01 DS18B20 - This page
These nodeMCU with display are logging temperatures
They are using about 60mA.
The nodeMCU came with headers, but a connector with long pins can be bent over.
The header pins hold the 4k7 ohm resistor and the waterproof DS18B20 leads are soldered onto this
It is programmed to log the temperatures every 15 minutes and is using a Python list to remember the last 300 values, 150 samples or a day and a half.
A cron job on a Raspberry Pi Zero requests the temperature every 15 minutes as well and I can use webpages to plot the values as graphs.
This page can be used to plot readings.
http://www.dougrice.plus.com/dev/graphs/graph1sampleX2.htm
Early in 2026, I brought some little boards with the DS18B20 chips to measure temperature. They came with ESP01S
The ESP01S is just under the ESP01S and the little blue board provides a voltage regulator.
The DS18B20 is connected to IO 2
I can power the blue board with a USB cable plugged into a mains adaptor with a 5V USB-A socket.
I used an IR Infrared Thermometer to measure the temperature of the ESP01 and the board.
The ESP01S gets quite warm at about 30 degree C
If you leave the ESP01 unplugged, and power up the blue board, it seems to be a 1 degree hotter than the red card.
I brought some waterproof DS18B20 with 1m of cable, which could be soldered onto the back of the blue board. This seems to be reading a realistic temperature.
http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20used.py is a later version that works enough.
http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20_2.py is a mash up from the links below.
https://docs.micropython.org/en/latest/esp8266/tutorial/onewire.html has an example.
I brought some little boards with the DS18B20 chips to measure temperature. They came with ESP01S
The DS18B20 is connected to IO 2
I can power the blue board with a USB cable plugged into a mains adaptor with a 5V USB-A socket.
I used an IR Infrared Thermometer to measure the temperature of the ESP01 and the board.
The ESP01S gets quite warm at about 30 degree C
If you leave the ESP01 unplugged, and power up the blue board, it seems to be a 1 degree hotter than the red card.
I brought some waterproof DS18B20 with 1m of cable, which could be soldered onto the back of the blue board. This seems to be reading a realistic temperature.
They are reading about 8 to 10 degrees less.
http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20used.py is a later version that works enough.
This Thonny sketch allows me to poll the temperature using a web server.
http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20_2.py
I can poll this with a cron job and use curl and grep out what I want. The time stamp comes from the Raspberry Pi Zero.
===
2026-02-13 21:30
<h2> 2 , DS18B20 , 5.0 , 15.125 , [, 0x28,0xe8,0x42,0xc0,0x0,0x0,0x0,0xc5, ] , [, 0x28,0x20,0x4d,0xbc,0x0,0x0,0x0,0x2e, ] , </h2>
It might be better to use a client that deep sleeps the ESP01, wakes up takes the measurement, sends it to a server and deep sleeps.
http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20used.py is a later version that works enough.
http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20_2.py is a mash up from the links below.
https://docs.micropython.org/en/latest/esp8266/tutorial/onewire.html has an example.
Open Thonny and type help() and it has example code for connecting the ESP01 to the WiFi?.
https://docs.micropython.org/en/latest/esp8266/tutorial/network_tcp.html has some code for a web server.
Thonny would not let me save main.py to the ESP-01S until I flashed it with the 1MB vesion.
I needed to use the 1MB bin so I could save main.py
ESP8266_GENERIC-FLASH_1M-20251209-v1.27.0.bin found on https://micropython.org/download/ESP8266_GENERIC/
I brought a board ESP8266-D1-WeMos?-D1. This simplifies developing the code for the ESP01
Sometimes you need to upload Micro-Python to the ESP01 board.
I had to use the 1MB version: ESP8266_GENERIC-FLASH_1M-20251209-v1.27.0.bin
I found this at found on https://micropython.org/download/ESP8266_GENERIC/
I used the D1 board to tinker with the micropython example. I had to select 4MB when uploading the MicroPython?
ebay suggested the ESP01 and support to reprogram these has been added to the Arduino.
Another way to upload code onto them is to use MicroPython? and the Thonny Python IDE shipped with the Raspberry Pi.
https://micropython.org/download/esp8266/ - there are plenty of examples which can be uploaded using Thonny at the touch of the GO button.
I brought a few with the blue adaptor plate.
Later on I decided to buy the little USB programmer adaptors.
The pin out.
It is possible to reprogram them with the Arduino IDE and other tools.
I use a wire to put the ESP01 into boot mode.
Connect RST and GP0 to GND and ensure GP0 is held at GND after RST is pulled high.
RST: - -_ _ _ _ _- - - - - - GP0: - - -_ _ _ _ _ _- - - -
I brought a board ESP8266-D1-WeMos?-D1. This simplifies developing the code for the ESP01. It has a 4MB memory
You can develop the code using MicroPython? or the Arduino IDE.
Thonny is a Python IDE that is shipped with the Raspberry Pi and available for Windows.
It can be used with other Python REPL and it has the ability to upload MicroPython? onto the ESP01.
Open Thonny->options-Interpreter-Install or update firmware. You need to download the latest firmware.
See https://micropython.org/download/esp8266/
It looks like a really good way to do a bit of tinkering that does not need the full reprogram cycle.
This provides a different way to explore the WiFi? API.
See: https://docs.micropython.org/en/latest/esp8266/quickref.html
Thonny and MicroPython? can be used with the ESP32 and Raspberry Pi PICO as well.
https://micropython.org/download/esp8266/ - there are plenty of examples which can be uploaded using Thonny at the touch of the GO button.
I brought some little boards with the DS18B20 chips to measure temperature. They came with ESP01S
The DS18B20 is connected to IO 2
I used an IR Infrared Thermometer to measure the temperature of the ESP01 and the board.
The ESP01S gets quite warm at about 30 degree C , or about 10 degree C above ambient.
If you leave the ESP01 unplugged, and power up the blue board, it seems to be a 1 degree hotter than the red card.
I also brought some waterproof DS18B20 with 1M leads, so I soldered a second DS18B20 in parallel with the one on the blue board. This was mot afected by the temperature of the ESP01.
These Thonny sketches allows me to poll the temperature using a web browswer or curl. They use the web server example. They need a tidy.
It might be better to use a client that deep sleeps the ESP01, wakes up takes the measurement, sends it to a server and deep sleeps.
http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20_2.py is a mash up from the links below.
http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20used.py is a later version that works enough.
https://docs.micropython.org/en/latest/esp8266/tutorial/onewire.html has an example.
Open Thonny and type help() and it has example code for connecting the ESP01 to the WiFi?.
https://docs.micropython.org/en/latest/esp8266/tutorial/network_tcp.html has some code for a web server.
The code needs to be more robust to report hardware issues.
Thonny would not let me save main.py to the ESP-01S until I flashed it with the 1MB vesion.
I needed to use the 1MB bin so I could save main.py
ESP8266_GENERIC-FLASH_1M-20251209-v1.27.0.bin found on https://micropython.org/download/ESP8266_GENERIC/
ebay suggested the ESP01 and support to reprogram these has been added to the Arduino.
Another way to upload code onto them is to use MicroPython? and the Thonny Python IDE shipped with the Raspberry Pi.
https://micropython.org/download/esp8266/ - there are plenty of examples which can be uploaded using Thonny at the touch of the GO button.
I brought some little boards with the DS18B20 chips to measure temperature. They came with ESP01S
The DS18B20 is connected to IO 2
I can power the blue board with a USB cable plugged into a mains adaptor with a 5V USB-A socket.
I used an IR Infrared Thermometer to measure the temperature of the ESP01 and the board.
The ESP01S gets quite warm at about 30 degree C
If you leave the ESP01 unplugged, and power up the blue board, it seems to be a 1 degree hotter than the red card.
I brought some waterproof DS18B20 with 1m of cable, which could be soldered onto the back of the blue board. This seems to be reading a realistic temperature.
They are reading about 8 to 10 degrees less.
This Thonny sketch allows me to poll the temperature using a web server.
http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20_2.py
http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20used.py - a later version.
I can poll this with a cron job and use curl and grep out what I want. The time stamp comes from the Raspberry Pi Zero.
===
2026-02-13 21:30
<h2> 2 , DS18B20 , 5.0 , 15.125 , [, 0x28,0xe8,0x42,0xc0,0x0,0x0,0x0,0xc5, ] , [, 0x28,0x20,0x4d,0xbc,0x0,0x0,0x0,0x2e, ] , </h2>
It might be better to use a client that deep sleeps the ESP01, wakes up takes the measurement, sends it to a server and deep sleeps.
http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20_2.py is a mash up from the links below.
https://docs.micropython.org/en/latest/esp8266/tutorial/onewire.html has an example.
Open Thonny and type help() and it has example code for connecting the ESP01 to the WiFi?.
https://docs.micropython.org/en/latest/esp8266/tutorial/network_tcp.html has some code for a web server.
Thonny would not let me save main.py to the ESP-01S until I flashed it with the 1MB vesion.
I needed to use the 1MB bin so I could save main.py
ESP8266_GENERIC-FLASH_1M-20251209-v1.27.0.bin found on https://micropython.org/download/ESP8266_GENERIC/
I soldered two more DS18B20 to the back of the board.
I used a waterproof DS18B20 with 1m wire and the other one has a 3m lead.
I soldered a modified USB lead onto the board so it can be plugged into a 5V USB power supply.
[ 5v PSU ]---usb lead ---[ blueBoard with DS18B20 & ESP-01 ]---1m DS18B20 & 3m DS18B20 sensors
The blue LED light up the room!
http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20used.py is a later version, saved as main.py on the ESP01.
I copied it from main.py saved on the ESP01. The WiFi? SSID and KEY have been edited.
Typical ouput when you open the webpage http://192.168.1.87/ on the ESP-01
ESP8266 DS18B20 3 , , DS18B20 t= ,15.5,15.5,25.5, roms: [, 0x28,0x1a,0xd2,0x34,0x0,0x0,0x0,0x11, ] , [, 0x28,0xe8,0x42,0xc0,0x0,0x0,0x0,0xc5, ] , [, 0x28,0x20,0x4d,0xbc,0x0,0x0,0x0,0x2e, ] ,
View Source shows:-
<!DOCTYPE html>
<html>
<head> <title>ESP8266 DS18B20 </title> </head>
<body> <h1>ESP8266 DS18B20 </h1>
<h2> 3 , , DS18B20 t= ,15.5,15.5,25.5, </h2>
<P>roms: [, 0x28,0x1a,0xd2,0x34,0x0,0x0,0x0,0x11, ] , [, 0x28,0xe8,0x42,0xc0,0x0,0x0,0x0,0xc5, ] , [, 0x28,0x20,0x4d,0xbc,0x0,0x0,0x0,0x2e, ] , </P>
</body>
</html>
On a Raspberry Pi Zerro W, I set up a cron job using "crontab -e" to run a shell script every 15 minutes.
It uses curl to fetch the web page and grep out the temperatures.
# Poll ESP01 DS18B20 Webserver in loft echo "===" > /home/pi/log18B20lastCurl.txt date -u +'%Y-%m-%d %H:%M' >> /home/pi/log18B20lastCurl.txt curl --http1.0 192.168.1.87 | grep "h2" >> /home/pi/log18B20lastCurl.txt #cat /home/pi/log18B20lastCurl.txt >> ~/www/curl.txt awk -f /home/pi/t3.awk /home/pi/log18B20lastCurl.txt >> ~/www/curl.txt
which typicallly logs:-
2026-03-16 07:00 , DS18B20 t= , 13.875 , 14.8125 , 24.75 , </h2> 2026-03-16 07:15 , DS18B20 t= , 14.4375 , 15.0625 , 25.0625 , </h2> 2026-03-16 07:30 , DS18B20 t= , 14.9375 , 15.3125 , 25.25 , </h2> 2026-03-16 07:45 , DS18B20 t= , 15.4375 , 15.5625 , 25.4375 , </h2>
The graph below shows that the DS18B20 on the blue board is affected by the ESP-01.
The blue line is a DS18B20 next to a window and the red line is the other one in the shade.
ebay suggested the ESP01 and support to reprogram these has been added to the Arduino.
ebay also suggested esp8226 modules in the nodemcu , Witty and ESP8266-Development-Board-WeMos?-D1-R1
Thonny includes a NEO PIXEL module that makes it simple to try out some ideas.
I brought some 12 LED rings and wrote some HTML CANVAS javascript, to allow some animation expriments.
http://www.dougrice.plus.com/dev/graphs/t_clock.htm has some JavaScript? and Micro-Pytho