Main Content

Wi-Fi programmable room thermostat with air quality monitor

Wireless programmable via Wi-Fi room thermostat with air quality monitor and other useful features.

A commercially available wireless room thermostat works in the autonomous heating system of my apartment. The system, of course, functions without it: the thermostat was bought to save gas consumption and increase comfort.

The thing is very useful, but, in my opinion, somewhat outdated. It was decided to assemble something similar to the purchased thermostat, after adding more convenient settings and an Internet connection to the thermostat circuit.

Features and characteristics:

- Communication between the thermostat nodes is carried out over the air at radio frequency.
- During the day, the thermostat maintains three set temperature values ​​​​constant.
- Thermostat settings (work program, air boundary parameters, etc.) are set remotely via Wi-Fi from a form in the browser.
- The thermostat includes an air quality monitor that measures temperature, carbon dioxide levels and air humidity.
- The thermostat is equipped with a real time clock with clock synchronization with an exact time server via the Internet.
- The thermostat is controlled from the interface of the Blynk mobile application on a smartphone. In addition, the Blynk app receives and displays temperature, CO2 and humidity measurements on a smartphone.
- The thermostat works autonomously if Wi-Fi is not available.
- The thermostat sends messages to e-mail if the temperature, CO2 content or air humidity are outside the threshold values.
- In the thermostat, in addition to temperature, it is possible to maintain other measured air parameters within the specified limits - this is humidity and carbon dioxide content.
- The device can be used to organize automatic humidification, forced ventilation or air conditioning.
- At the end of the heating season, the thermostat does not need to be hidden: the air quality monitor will remain in operation. The clock will run, and messages about temperature, humidity and carbon dioxide content will be sent to e-mail.

The thermostat consists of two devices. The first device generates and transmits to the second device a control signal for a heating device or heating system, let’s call this device an analyzer. The second device receives the signal, decodes it and controls the heat source - let it be a contactor. The connection between the analyzer and the contactor is wireless, at radio frequency.

To assemble the device, you will need the components listed below. The estimated cost of components at the prices of the AliExpress is $50.


- Wifi board NodeMCU CP2102 ESP8266
- Temperature and humidity sensor DHT22
- CO2 sensor MH Z-19
- Clock RTC DS3231
- Screen OLED LCD blue 0.96” I2C 128x64
- RF module 433MHz, transmitter (set price: transmitter, receiver)
- 4-channel logic level converter 3.3V-5V (Logical Layer Converter)
- Voltage stabilizer LM7805 (10 pcs.)
- Adapter AC100-240V 50/60Hz DC12V 2A
- Breadboard (fiberglass), contacts, etc.


- Arduino Pro Mini 5V Module
- RF module 433MHz (receiver)
- 2-channel relay module
- AC-DC adapter HLK-PM01
- Breadboard (fiberglass), contacts, etc.

Both devices are assembled on fiberglass breadboards. Installation - hinged (volumetric). This approach has a number of advantages: the components are easily dismantled, the installation is easily changed to a new version of the sketch, and, finally, in a home-made case, it is not visible how it was made.

The antennas at the transmitter and receiver are a 17.3 cm long wire. The increased transmitter power and the simplest antennas provide reliable communication within the apartment.”

Link to article