Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

ESP32-Based Smart Humidity and Temperature Controller with Wi-Fi Connectivity

View and Edit Project In Cirkit DesignerImage of ESP32-Based Smart Humidity and Temperature Controller with Wi-Fi Connectivity

Circuit Documentation

Summary

The circuit in question is designed to control a humidifier and a bulb using an ESP32 microcontroller. The system includes a DHT11 sensor for measuring temperature and humidity, a 0.96" OLED display for user interface, two pushbuttons for manual control, and a two-channel relay to switch the humidifier and bulb. The ESP32 is connected to the internet and uses Blynk for remote monitoring and control. The circuit is powered by a 220V power source, and the components are interconnected through various electrical nets to ensure proper functionality.

Component List

Humidifier

0.96" OLED

Two Channel Relay 5V

Pushbutton (x3)

Bulb

Power 220V

ESP32

DHT11

Wiring Details

Humidifier

0.96" OLED

Two Channel Relay 5V

Pushbuttons

Bulb

Power 220V

ESP32

DHT11

Documented Code

The code provided is for the ESP32 microcontroller and is responsible for controlling the circuit's functionality. It includes the Blynk library for IoT connectivity, the DHT sensor library for reading temperature and humidity, and the Adafruit SSD1306 library for the OLED display. The code handles Wi-Fi connection, Blynk server communication, sensor data reading, display updates, and relay control based on the sensor readings and user input from the pushbuttons.

// Code omitted for brevity. Please refer to the provided code input for the full source code.

The code initializes the hardware components, connects to Wi-Fi, and sets up Blynk for remote monitoring and control. It reads sensor data from the DHT11 sensor and displays it on the OLED. It also listens for button presses to toggle the mode, heater, and humidifier states, which are then synchronized with the Blynk app. The relays are controlled based on the current temperature and humidity readings compared to the setpoints, and the system can operate in either automatic or manual mode.