In Rio de Janeiro, temperatures can exceed 35°C on some days. As my house gets very hot, I decided to create a project to monitor the temperature at any time, even away from home.
- ESP12 or other ESP8266 controller (ESP01/01S) with GPIO16 connected to RST. Make sure you have the ESP8266 board add-on installed.
- Temperature Sensor DS18B20 (Dallas).
- ~3.3V power supply.
- Arduino IDE and necessary libraries.
- Blynk account.
Tip
It's possible to use other microcontrollers, but code changes may be necessary. I chose ESP12 because I couldn't solder the GPIO16 pin to the RST on the ESP01S, without this it's not possible to use the ESP.deepSleep() function.
- ESP8266WiFi
- BlynkSimpleEsp8266
- OneWire
- DallasTemperature
- Install the necessary libraries and load the firmware into the ESP12 .
- Choose a power source (3.3V) to power the ESP12 and the sensor.
- Connect the ESP12 to the DS18B20 sensor according to the diagram.
- Configure the settings and make adjustments according to your preference in the
config.h
file. - Log in to your Blynk account.
- The thermostat will start working automatically.
Important
In the config.h
file it's possible to adjust some settings such as: Information for connecting to the Blynk server, network credentials for WiFi connection, the pin to which the sensor is connected and the intervals for reading and sending data.
It is important to highlight that it is not possible to view the temperature directly, requiring a previously configured WiFi connection so that the ESP8266-01S can communicate with the Blynk server. For a project with a similar objective that does not require an internet connection, I suggest using a microcontroller like the ATtiny85 and a display (TM1637).
Note
I won't provide information about Blynk configuration, but I can tell you that you should use Datastreams and Virtualpins. For example: Temperature; V0 (!!!) For information about Blynk, see Blynk Documentation.
- ESP.deepSleep function. (!!!) (gpio16 -> rst)
- WiFi manager: https://randomnerdtutorials.com/esp8266-nodemcu-wi-fi-manager-asyncwebserver/ (step 2/3)
This project is dedicated to the public domain under the CC0 License.
- Email: ---
- Reddit: ---