WiFi thermometer - ESP8266

18/07/2020

Today I will briefly present the wifi thermometer project. The thermometer uses the ESP8266 wifi chip on the NodeMCU v3 Lolin development board. In addition to recording data, the wifi chip is also held by a web server, where it displays the measured data. The data is measured every time the page is loaded. Data is not recorded when idle. The web server allows you to run HTML + CSS code, which allows to some extent to make a nice graphical interface for plotting temperatures to the user, for example in a table. Using Javascript, it is also possible to update the data automatically on the site, but I did not use this option, it was not necessary.

There are two versions of this project, and the functionality of the website as such is the same. In both cases, the ESP8266 runs a web server that plots the temperatures in a table. Connectivity is differentiated between versions. In one case, it is possible to use an existing LAN network to which the board connects and holds a web server on a static or dynamic IP address. After entering the IP into the browser window, the user will receive a page from ESP with temperatures on request.

In the second case, the board transmits its own SSID in AP mode as an access point. The user accesses the board by entering the password to the network (it is included in the ESP8266 program). The board sends an SSID with WPA / WPA2 PSK encryption, or it is possible to broadcast an open wifi network. Data is accessible only within range of this wifi network outside the home LAN. The ESP also runs a DHCP server, which assigns an IP address from the range after successful user authentication. The website is located at the IP address of the gateway - ESP.

Temperature data is recorded from a pair of DS18B20 temperature sensors, which are connected to the OneWire bus, which allows data collection by one conductor with the possibility of pulling the conductor to tens to hundreds of meters. DS18B20 are produced in two main versions - the so-called interior sensor in the transistor package, or in a waterproof - exterior version in an aluminum tube.

The OneWire bus is suitable for interference environments and can connect up to 256 sensors. The individual sensors are divided by their factory address - serial number. There are 2 main options for connecting sensors. Normal connection and parasitic, both can be powered to 3.3 - 5.5V.

The differences are evident from the schemes:

More about the project can be found on the web: https://arduino.php5.sk/wifi-teplomer.php?lang=en and learn more interesting info about the project.

Wiring diagram:

© 2021 Martin Chlebovec - Arduino Blog - . All rights reserved
Powered by Webnode Cookies
Create your website for free! This website was made with Webnode. Create your own for free today! Get started