ESP8266 and Multiple Temperature Sensors DS18b20 With HTTP Server

by adachsoft in Circuits > Arduino

47040 Views, 44 Favorites, 0 Comments

ESP8266 and Multiple Temperature Sensors DS18b20 With HTTP Server

complete.jpg

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.

Components

parts.png

  • ESP8266 12e V3
  • 3 x DS18b20
  • Resistor 4k7 ohma
  • Few wires

Connect the DS18b20 to ESP8266

schematic.png

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

Setup Your WiFi Connection

arduino_ide_1.png

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 = "";

Download source code: HTTP_DS18B20.ino

Flashing ESP8266 12e V3 With Arduino IDE

arduino_ide_select_esp8266.png
arduino_ide_select_port.png
arduino_ide_compile_and_upload.png

  1. Connect your ESP8266 to PC via USB port.
  2. Select ESP8266 board.
  3. Select COM port with your ESP8266.
  4. Press upload button in Arduino IDE

Testing HTTP Server on ESP8266

arduino_ide_open_serial_monitor.png
arduino_ide_serial_monitor.png
http_server.png

  • 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