Jump to content

StonerHaven

"Where The Stoners Grow"

Forums, Picture Gallery, How to Tutorials, Articles, Blogs, Product Reviews, Recipes, Strain Guides and much more
Join Today

Seed To Weed

We Cover It All-

Tutorials, Forums, And Articles Devoted To Marijuana
TutorialsForumsArticles

Learn to Grow

Grow To Learn

Learn and Share Advanced Marijuana Growing, Harvesting and Extraction Techniques
Advanced GrowingHarvestingExtracts

Interactive Legalization Map

Find State Laws, Marijuana Business In Your Area And Much More
MAP

Cooking With Marijuana

Tutorials, Forums, Recipes And Articles All to Help You Become A Canna-Connoisseur
TutorialsForumsRecipesArticles
Zombeek

Automate your humidifier for grows/drying

Recommended Posts

Hey guys!  I picked up a few tricks since I've been away and this one is among my favorites.  I made it to eliminate my stress during drying, but it also works well during your grow.  All you really need to set is the minimum humidity level you want to maintain.  I keep it at 60 for both grows and drying.  You can use a cheaper DHT11 sensor, but the 22 is more accurate.  Be safe, and do not attempt this if you can't protect yourself from fire and or electrocution!  I recommend painting the clear plastic tank (if your humidifier has one) white until no light shine through it.  I also add a couple drops of bleach to the tank every other time I fill it up.  Place the humidifier near/behind your fans to keep the mist from hitting the sensor and triggering the unit off.  This little mod has saved me many many many many gray hairs come dry/curing time.  THIS DOES REQUIRE SOLDERING!

 

How it works:  When your humidity drops below your desired level, it will turn the humidifier on automagically until it reaches +5% your minimum setting, at which point, it will turn off and wait for it to drop again.  Pretty straight forward.  I put a lot of comments in the code.  I've run this for a few years now, and it's rock solid and fully tested.  I should probably draw a wiring diagram, but everything is available on the 'net.

 

Parts: 

Humidifier  -- I used a vicks from walmart, about 20 bucks.

DHT22 sensor -- $5 I think?

4.7K ohm resisitor -- for the sensor.  

Arduino -- I used the smallest one I could find.  https://www.gearbest.com/boards-shields/pp_226799.html?wid=1433363  .. $7

Arduino relay -- just a single relay.  less than $2

5v regulated AC adapter -- amazon that shit.  10 bucks.

A few jumper wires

 

HOWTO:

1.  Program the arduino using the code below.

2.  Connect the power and sensor pin on the DHT22 with a 4.7K resistor (solder it)

3.  Solder your sensor wire and its power pins to the board.  Give your sensor 6" or so of wire.

4.  Solder your relay control wire and power pins to the board.

5.  Tuck it all inside the base of your humidifier.  Use some hot glue to keep it from shaking about.  Route the sensor outside the unit.

6. Splice the humidifiers AC neutral wire over to your AC adapter.

7.  Cut the AC hot wire 6" from where it ends up (usually a switch on the front of the unit) and route it over to your Normally Open terminal on the relay.  Splice the hot wire to power your adapter and connect the other to your Common terminal on the relay.

8. Enjoy.  If you've done it properly, everything but the sensor is hidden in the base.

 

/* Beekers Smart Humidifier v1 */

#include <DHT.h>  // sensor library
#define HUMIDIFIER 10 // pin number for humidifier relay
#define DHTPIN 11 // sensor pin number
#define DHTTYPE DHT22  // sensor type
#define minHumidity 60  // minimum humidity  -- set this to whatever you need.

byte humidity = 0;
byte minH = minHumidity;
byte lowHumidityState = LOW;
unsigned long previousMillisSensors = 0;
DHT dht(DHTPIN, DHTTYPE);

void setup(){
  pinMode(HUMIDIFIER, OUTPUT);
  digitalWrite(HUMIDIFIER, HIGH);
  dht.begin();
}

void loop(){
  unsigned long currentMillis = millis();
  if (currentMillis - previousMillisSensors >= 2000){  // check sensor every 2 seconds
    humidity = dht.readHumidity();  // read humidity
    previousMillisSensors = currentMillis;
  }
  if (humidity < minH){  // check recorded humidity
    lowHumidityState = HIGH;  // if it's low, trigger lowHumidityState
  }
  else{  //  if it is not below set level
    lowHumidityState = LOW; //  turn off lowHumidityState
  }
  if (lowHumidityState == HIGH){  // if lowHumidityState is true 
    digitalWrite(HUMIDIFIER, LOW); // turn on the humidfier
    minH = minHumidity + 5; // and raise the minimum humidity level 5%
  }
  else{  // if lowHumidityState is false
    digitalWrite(HUMIDIFIER, HIGH); // turn off the humidifier
    minH = minHumidity;  // and set minimum humidity to desired level
  }
}

Edited by Zombeek
  • Like 5

Share this post


Link to post
Share on other sites

Hey @Zombeek! Been awhile. Sounds cool.......rw

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

Good to see ya brother, thats some cool tech- I was looking at some kits on amazon a few days ago and wondered if anyone had designed any grow room stuff yet. 

 

Arduino
Computing platform
Arduino is an open-source hardware and software company, project and user community that designs and manufactures single-board microcontrollers and microcontroller kits for building digital devices and interactive objects that can sense and control objects in the physical and digital world. Wikipedia  https://amzn.to/2JgCFXi
 
Manufacturer: Many
CPU: Atmel AVR (8-bit), ARM Cortex-M0+ (32-bit), ARM Cortex-M3 (32-bit), Intel Quark (x86) (32-bit)
 
 
 

 

 

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

This is so cool.

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, PureGro1 said:

Good to see ya brother, thats some cool tech- I was looking at some kits on amazon a few days ago and wondered if anyone had designed any grow room stuff yet. 

 

Arduino
Computing platform
Arduino is an open-source hardware and software company, project and user community that designs and manufactures single-board microcontrollers and microcontroller kits for building digital devices and interactive objects that can sense and control objects in the physical and digital world. Wikipedia  https://amzn.to/2JgCFXi
 
Manufacturer: Many
CPU: Atmel AVR (8-bit), ARM Cortex-M0+ (32-bit), ARM Cortex-M3 (32-bit), Intel Quark (x86) (32-bit)
 
 
 

 

 

 

I also use a lamp controller.  =)  I tried controlling the exhaust fan based on temp/humidity, but it mostly just stays on so I don't bother with that one anymore.  I just toggle needed fans along with the lamps.  That one isn't the most user-friendly because I need to upload the code on it every time I change the photoperiod.  I need to add in a switch so I can just set 18 or 12 hours..

 

Good to be back!

  • Like 5

Share this post


Link to post
Share on other sites

Glad your here, this has got my gears smoking with ideas in my ol noggin. So you program this unit with a laptop. I gotta get a computer.

  • Like 3
  • Haha 1
  • Too High 1

Share this post


Link to post
Share on other sites
28 minutes ago, Mycobro said:

Glad your here, this has got my gears smoking with ideas in my ol noggin. So you program this unit with a laptop. I gotta get a computer.

 

 

There is an (unofficial?) arduino IDE for android, but I've never used it.  It would also require a special cable/adapter to interface with a phone.

 

They are super handy controllers if you can handle hacking together some code.  There is an incredibly large community so chances are somebody has code for whatever you want already, although I write all of mine.  I use 2 in the grow room and have another that controls a kiln for making telescope mirror blanks.

  • Like 5

Share this post


Link to post
Share on other sites
5 hours ago, Zombeek said:

 

 

There is an (unofficial?) arduino IDE for android, but I've never used it.  It would also require a special cable/adapter to interface with a phone.

 

They are super handy controllers if you can handle hacking together some code.  There is an incredibly large community so chances are somebody has code for whatever you want already, although I write all of mine.  I use 2 in the grow room and have another that controls a kiln for making telescope mirror blanks.

Very cool stuff, way over my head but way cool. Thanks.

  • Like 4

Share this post


Link to post
Share on other sites

@Zombeek

damn!  good to hear from ya. I think about you when I get up that way... usually to the airport, tho

 

I am familiar with the name aurduino from my time in R/C. Guys were using them to do things with drones. Prolly still are. That stuff is way over my head...

  • Like 4

Share this post


Link to post
Share on other sites
1 hour ago, DarKwon said:

@Zombeek

damn!  good to hear from ya. I think about you when I get up that way... usually to the airport, tho

 

I am familiar with the name aurduino from my time in R/C. Guys were using them to do things with drones. Prolly still are. That stuff is way over my head...

I'm still around =)

 

Don't be afraid of arduino, it's actually pretty easy.  I'll update my posts with some wiring diagrams and some pics eventually.  I know it feels intimidating, but they are just.. wonderful.

Edited by Zombeek
  • Like 4

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this service you agree to our Terms of Use and use of cookies.