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

Arduino UNO Based Automated Climate Control System

View and Edit Project In Cirkit DesignerImage of Arduino UNO Based Automated Climate Control System

Circuit Documentation

Summary

This circuit is designed to control the environmental conditions of a room by maintaining the required temperature and humidity levels. It utilizes an Arduino UNO microcontroller to read temperature and humidity data from a DHT11 sensor and displays these readings on an I2C LCD screen. Based on the sensor data, the Arduino controls a fan and a humidifier to regulate the room's climate. The fan is used to cool down the room when the temperature exceeds a certain threshold, while the humidifier is activated to increase humidity if it falls below a set point.

Component List

Arduino UNO

DHT11 Humidity and Temperature Sensor

LCD screen 16x2 I2C

Fan

Humidifier

5v Battery

Wiring Details

Arduino UNO

DHT11 Humidity and Temperature Sensor

LCD screen 16x2 I2C

Fan

Humidifier

5v Battery

Documented Code

/*
 * This Arduino Sketch controls a fan and humidifier to maintain the required
 * temperature and humidity inside a room. It uses a DHT11 sensor to measure
 * temperature and humidity, and an I2C LCD to display the readings. The fan
 * and humidifier are controlled based on the sensor readings.
 */

#include <dht.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);
dht DHT;

#define DHT11_PIN 7
#define FAN_PIN 2
#define HUMIDIFIER_PIN 3

void setup() {
  lcd.init(); // Initialize I2C LCD
  lcd.backlight(); // Turn on the backlight of the I2C LCD
  pinMode(FAN_PIN, OUTPUT);
  pinMode(HUMIDIFIER_PIN, OUTPUT);
}

void loop() {
  int chk = DHT.read11(DHT11_PIN);
  lcd.setCursor(0, 0);
  lcd.print("Temp: ");
  lcd.print(DHT.temperature);
  lcd.print((char)223);
  lcd.print("C");
  lcd.setCursor(0, 1);
  lcd.print("Humidity: ");
  lcd.print(DHT.humidity);
  lcd.print("%");

  // Control fan based on temperature
  if (DHT.temperature > 25) {
    digitalWrite(FAN_PIN, HIGH); // Turn on fan
  } else {
    digitalWrite(FAN_PIN, LOW); // Turn off fan
  }

  // Control humidifier based on humidity
  if (DHT.humidity < 40) {
    digitalWrite(HUMIDIFIER_PIN, HIGH); // Turn on humidifier
  } else {
    digitalWrite(HUMIDIFIER_PIN, LOW); // Turn off humidifier
  }

  delay(1000); // Wait for 1 second before next reading
}

This code is responsible for initializing the LCD and sensor, reading temperature and humidity data from the DHT11 sensor, displaying the readings on the LCD, and controlling the fan and humidifier based on the sensor data. The fan is turned on when the temperature exceeds 25°C, and the humidifier is activated when the humidity drops below 40%.