Project tutorial
Arduino Humidifier Control

Arduino Humidifier Control © GPL3+

Instead of having to increase the humidity manually, why not let your humidifier turn itself on when necessary?

  • 9,713 views
  • 6 comments
  • 9 respects

Components and supplies

Apps and online services

About this project

DANGER! This project uses high voltage and amperage. Any misuse or mistakes could end in serious injury or death. I am not responsible for any of your actions or choices. Enjoy and be safe!

Has your house ever been too dry, but you don't want to go through the trouble of maintaining a perfect humidity? Now you can! You will need to attach the dht11 temp/humidity sensor to the Arduino. Next, get your humidifier's plug and cut the "hot" end, the one with power. You can find it by locating the narrow end of the plug, and follow the wire up about a foot. Here is a picture you can use for finding the correct wire:

Now, strip off the wire from the cut WIRE, about 1 to 1.5 cm, and then unscrew the COM terminal on the relay module. Put the plug-attached wire into the COM terminal, and put the other end into the NO, or Normally Open, terminal. Be careful now, whenever you plug in the wire, and contact with the exposed wires or relay board soldering will result in electrocution.

Leave it unplugged for now. Next for the Arduino! Open your IDE and install the dht11 library. If you need further instructions on using the dht11 use my tutorial: tweeting thermostat. Now, copy and paste the Arduino code and upload it. Make sure the dht11 data pin is connected to pin 2, and the relay control pin is attached to pin 7. Go ahead and power the Arduino, and then plug in the power cord into a wall outlet. Now your humidifier should turn on whenever the humidity gets below 30%! It also has a "cool down" period to avoid turning the humidifier on and off too much. Have fun and feel free to adapt this project!

Code

The Arduino CodeC/C++
Copy and paste
#include "DHT.h"
#define DHTPIN 8
#define DHTTYPE DHT11
DHT dht(DHTPIN,DHTTYPE);
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
Serial.println("ready.");
pinMode(7,OUTPUT);
dht.begin();
digitalWrite(7,HIGH);
}

void loop() {
  // put your main code here, to run repeatedly:
delay(5000);
float h = dht.readHumidity();
Serial.println(h);
if (h < 30){
  while(h < 40){
    h = dht.readHumidity();
    digitalWrite(7,LOW);
  delay(1000 * 60 * 10);
  }
}
else if (h > 30){
  digitalWrite(7,HIGH);
  delay(1000 * 60 * 10);
}
}

Schematics

Schematic
Just connect as-is
Humidifier bb

Comments

Similar projects you might like

Servo Control with TV Remote Control

Project showcase by eldo85

  • 11,455 views
  • 5 comments
  • 32 respects

Arduino Control AC Water Heater temperature

Project tutorial by Mohannad Rawashdeh

  • 13,510 views
  • 0 comments
  • 9 respects

Automatic Temperature Based Fan Control (for Media Cabinets)

Project tutorial by Vess Bakalov

  • 6,459 views
  • 4 comments
  • 29 respects
Add projectSign up / Login