Introduction: ESP8266 and Multiple Temperature Sensors DS18b20 With HTTP Server
I will show you how to make a remote temperature reading. You will be able to connect multiple
temperature sensors DS18B20. Temperature measurement will be the HTTP server on ESP8266 12e V3.
Source code was written in the Arduino IDE.
Step 1: Components
- ESP8266 12e V3
- 3 x DS18b20
- Resistor 4k7 ohma
- Few wires
Step 2: Connect the DS18b20 to ESP8266
1) Connect the temperature sensors DS18B20 parallel
2) Connect resistor 4k7 one pin to VCC and the second pin to the DQ
3) ESP8266 GND - GND DS18B20
ESP8266 3V3 - DS18B20 VCC
ESP8266 D3 - DS18B20 DQ
Step 3: Setup Your WiFi Connection
You can download Arduino IDE from here Dwonload Arduino IDE
In this project I am using the Arduino IDE 1.8.1
Before you upload the software to ESP8266 setup your WiFi connection.
//WIFI
const char* ssid = "";
const char* password = "";
Step 4: Flashing ESP8266 12e V3 With Arduino IDE
- Connect your ESP8266 to PC via USB port.
- Select ESP8266 board.
- Select COM port with your ESP8266.
- Press upload button in Arduino IDE
Step 5: Testing HTTP Server on ESP8266
- 1) Open serial monitor in Arduino IDE.
- 2) Get your server IP from serial monitor.
- 3) Now open WWW page in your browser.
I connect three temperature sensors to my ESP8266 12e V3.
Measuring the temperature every 5 seconds, but you can change this value.
See also:
SONOFF - ESP8266 update firmware with Aduino IDE
ESP8266 wiht DS1307 RTC, NV SRAM and Square-Wave output signal

Participated in the
Microcontroller Contest 2017

Participated in the
Sensors Contest 2017
12 Comments
10 months ago
source code: /www.hackster.io/adachsoft_com/esp8266-temperature-sensors-ds18b20-with-http-server-5509ac#code
Question 2 years ago on Introduction
Hi, I have a question bout thermal reading. If we can use as 100 thermal reading unit inside the concrete every 15 minutes or different time and take all reding, say four days to store the central unit to get full graphics and analyse complete data. Which you can help me to choose all components to build. I attach a small scenario for understanding. Kind regards
Tolga
3 years ago
Thank you! I just wanted to build this project with some modifications, but your source code is impossible to download. I only get a blank page from your server :-((
Sorry - this was my adblocker! But I still cant get the code - I am redirected to your home-page if I try to use the link you supplied. :-((
3 years ago
This is very interesting. Is it possible to get the code. The download
takes me to some other site in which there is no link to download the
code.
Thanks
4 years ago
Is there a way to send the temperature readings to an MQTT server instead of just displaying in on the webpage? It would be a lifesaver :)
Question 5 years ago on Introduction
I wonder how I would modify the code to give meaningful names to each of the sensors... this works great but I'm using it to monitor my home brew. Would be great to name the sensors so I can see which is for example ambient and which is home brew temp. Thanks
Question 5 years ago on Step 2
if I want to connect up to 9 temperature sensors is there any change to the circuit? Can someone please give a schematic?
5 years ago
Thanks Just what i needed. Is there some way to make it log the temperatures? I want to use it to monitor temp in grain bins, but i'm not to good at coding. Thanks
5 years ago
I setup the builtin led to trip on a > temp and it is definitely processing just fine.
Thank you again for posting this awesome project!
5 years ago
This is very impressive and I plan to use it to monitor the temperatures in a Gecko enclosure. I have it all hooked up and it is communicating fine with serial and www, but the data is not auto refreshing. Is it supposed to as you have it coded now? Please let me know.
5 years ago
I am excited, this is what I've been looking for! I can view my temps with my laptop anywhere?
I got to get these parts ordered.
Thank You
6 years ago
Thanks for sharing :)