Project showcase
Automatic Humidifier

Automatic Humidifier © GPL3+

Automatically turn on the humidifier when the environment humidity is below 50%.

  • 4,388 views
  • 2 comments
  • 7 respects

Components and supplies

Necessary tools and machines

About this project

This is my second Arduino Project. I'm studying in Boston and found that the air is so dry especially in the evening. So that I came up with this idea. What if the humidifier can turn on and off automatically to maintain a specific and comfortable humidity of the air. So I spent a whole day in designing the circuits and programming.

Here's a video.

Video:

Code

Untitled fileArduino
#include "DHT.h"
#include "LiquidCrystal.h"

#define DHTPIN 10
#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup()
{
  dht.begin();
  lcd.begin(16, 2);
  lcd.print("TEMP: ");
  lcd.setCursor(0, 1);
  float c = dht.readTemperature(true);
  float h = dht.readHumidity(true);
  lcd.setCursor(6, 0);
  lcd.print((c - 35) * 0.5556);
  lcd.print((char)223);
  lcd.print("C");
  lcd.setCursor(0, 1);
  lcd.print("HUMI: ");
  lcd.setCursor(6, 1);
  lcd.print(h);
  lcd.print(" %");
  pinMode(9, OUTPUT);
  pinMode(6, OUTPUT);
// init------------------------------------
}

void loop() {
  int a = 1;
  float c = dht.readTemperature(true);
  float h = dht.readHumidity(true);
  lcd.setCursor(6, 0);
  lcd.print((c - 35) * 0.5556);
  lcd.print((char)223);
  lcd.print("C");
  lcd.setCursor(0, 1);
  lcd.print("HUMI: ");
  lcd.setCursor(6, 1);
  lcd.print(h);
  lcd.print(" %");
//--------------------------------------------  
  if (h < 50){
  digitalWrite(9, HIGH);
  digitalWrite(6, HIGH);
  delay (250);
  digitalWrite(6, LOW);
  delay (250);
  digitalWrite(6, HIGH);
  delay (250);
  digitalWrite(6, LOW);
 // send pulse 2X-----------------------------
  while (a = 1){
  delay(1000);
  float c = dht.readTemperature(true);
  float h = dht.readHumidity(true);
  lcd.setCursor(6, 0);
  lcd.print((c - 35) * 0.5556);
  lcd.print((char)223);
  lcd.print("C");
  lcd.setCursor(0, 1);
  lcd.print("HUMI: ");
  lcd.setCursor(6, 1);
  lcd.print(h);
  lcd.print(" %");
  // LCD--------------------------------------
  if (h >= 55){
  digitalWrite(6, HIGH);
  delay (250);
  digitalWrite(6, LOW);
  digitalWrite(9, LOW);
  break;}
  }
  }
}

Schematics

Circuit
20180121 201136573 ios 6vm7ddfyot

Comments

Similar projects you might like

Arduino Temperature - Humidity - Rain Sensor

Project showcase by Rick_Findus

  • 13,445 views
  • 6 comments
  • 18 respects

Arduino Burglar

Project showcase by paolo_cravero

  • 3,971 views
  • 2 comments
  • 8 respects

RFID Based Automatic Door System

Project showcase by Robodia Technology

  • 50,008 views
  • 24 comments
  • 128 respects

Automatic Room Light Controller with Bidirectional Visitor

Project showcase by Team Amrendra Sahni

  • 7,172 views
  • 3 comments
  • 10 respects

Electronic Piano Keyboard With Preset Songs

Project tutorial by Lindsay Fox

  • 88,484 views
  • 67 comments
  • 176 respects

How to make Arduino based Automatic Door Opening

Project tutorial by vijendra kumar

  • 29,931 views
  • 6 comments
  • 22 respects
Add projectSign up / Login