Arduino based room controller

You can add ethernet, WiFi, it connects via USB for live interface. So all the things you mention are possible.

Nice! Someone here had a good setup, think it had pH and nutrient adjustment (also a water-cooled light and electronic ballast - total silence). Hmm... I believe it might have been WheeloFortune? But his setup was pretty pricey. I like cheap. And I could use something like that - I haven't been able to visit my garden in almost three weeks and the person that I've got tending it, well... I'm a little worried. He's honest, he's just... <SIGH> The other night when I called him he was like, "Is the plant food supposed to last for the whole grow?" (It's two GALLONS! WtF? I really need to get down there. :rolleyes: )
 
Alright everybody, looks like there is some interest in this tutorial, how about a syllabus?

Lesson 1: Setup, analog temperature sensors (TMP36), IDE, sketches, serial monitor, make an analog temperature sensor monitor.

Lesson 2: Digital temperature sensors (DS18B20), one wire components, libraries, make a digital sensor temperature monitor.

Lesson 2.5: Add a LCD to lesson 2.

Lesson 3: Temperature/Humidity sensor (DHT22), storing minimum and maximum values and displaying on LCD.

Lesson 4: Adding controls based on inputs, relays, high voltage concerns. First make inputs control an output pin (LED), then actuate an output relay.

Lesson 5: Data Logger and Real Time Clock (RTC), use it to monitor temperature and humidity.

Lesson 6: Timer functions, use the RTC to control your lights.

Lesson 7: Put it all together, use a menu to display your inputs, make a room controller!

We can definitely add to this as we go along, but I want to do it in this sequence so it is easy for people to follow along bit by bit. It keeps people focused on the current lesson and makes it easier to debug if you have a problem. The code will end up being quite large by the time it's all put together, so you need to understand what each part is doing. I also know that this will all "fit"(just barely) in a basic arduino, both memory wise and input/output wise. I also believe that this would serve 90% of users just fine as is, so it is a good place to start.
 
Hello

Stumbled upon your thread:p
I have always dreamed about a arduino grow controller but i am a hardware guy and have problem with the software part, hehe Have played with servos and night riding light at most,

So i will gladly follow this tutorial and program the shit out of the arduino, hehe

Have you ever thought about Solid State Relays? they are 1usd each at ebay.
 
Hello

Stumbled upon your thread:p
I have always dreamed about a arduino grow controller but i am a hardware guy and have problem with the software part, hehe Have played with servos and night riding light at most,

So i will gladly follow this tutorial and program the shit out of the arduino, hehe

Have you ever thought about Solid State Relays? they are 1usd each at ebay.

Yeah, I was leery of the programming end, but it is pretty easy after all. Just learn piece by piece to keep it all straight, then add it together bit by bit to debug. I'll be presenting it like this and will have all the code on a public code site. All you have to do is cut and paste into a blank sketch and upload.

I plan to try some SSR's but they are more difficult to demo with. They have unusual characteristics depending on what is connected to the output. I like relays, cause they are easy to find and understand.
 
I see, sounds like you have a good plan to help us, hehe
And yes it is easier to do it piece by piece:p

Yes the SSD can be a bit tricky, i had one that i needed to use a transistor to switch on from the arduino, to low current.
but the one´s listed at ebay says 6-35mA, Maybe at 12volt. doh

I cant say much about the output but i have used it to switch 12v DC and it worked, never measured it! 240 volt working good as we speak, went tired that my cheap timers died in a while when the inductive load from the CFL/HPS peaked and killed it,

Digital timer-12v walwart--SSD--HPS,CFL
900+-watt no probs

I will maybe touch a relay in the making, hehe
 
Just made a little overview about the growing system, so people can make it in their head for now, the basic stuff at least, hope i don´t stepped at your toes OG13.
Point me out.

Peace

Arduino_grow_controller.jpg
 
Great graphic Gnarp, lots of peeps can relate to images better than words, are you already there, or is that your "dream system"? We will get there soon. I will post lesson 2 today.
 
Thank´s, I am from Sweden so my spelling is not on top and yes it´s my dream setup:p hehe
Must order some stuff from adafruit and hook the shit up, need to get a good case that can house all the stuff, maybe put the LCD in a remote enclosure and some CAT5 cable,

waiting for the lesson, haha
 
Isn't there an arduino "supplier" closer than New York? I know there are some in UK...
 
Isn't there an arduino "supplier" closer than New York? I know there are some in UK...

I would think directly from Arduino would be cheaper too. I do get most of my stuff from two china suppliers. A bit cheaper, shipping isn't too bad.
 
Can a SS relay handle the large continous loads from HID? I thought they were more for rapid cycles of large loads. I used one in a lighting controller and it fried after about 6 mos. They get real hot too. I now use a mechanical 30 amp.
 
Can a SS relay handle the large continous loads from HID? I thought they were more for rapid cycles of large loads. I used one in a lighting controller and it fried after about 6 mos. They get real hot too. I now use a mechanical 30 amp.
The relay doesn't handle the load, it relays it, or acts as a switch on a heavier circuit. (think of a starter solenoid)
 
Can a SS relay handle the large continous loads from HID? I thought they were more for rapid cycles of large loads. I used one in a lighting controller and it fried after about 6 mos. They get real hot too. I now use a mechanical 30 amp.

Yeah, they get hot, need to use a heat sink for big loads. That's what they are made for though. I use regular relays cause they are cheap and easy to find surplus. Always have a spare. Need to use some protection to help w/ the inductive kick, we will cover it later in relay lesson. We use a heavy duty intermatic (metal enclosure) to cycle 3 relays to run banks of 3x1000 W lights.
 
HD contactor?

A relay triggering a bigger relay?

There are relays and then there are relays. When I was doing the occasional bit of racing, I wired a relay off the existing fuel pump trigger that provided power straight from the alternator to the fuel pump instead of the stock wiring at the tank (where the power had to travel through skinny wire and eight different connections first) to give me consistent power and allow me to safely run a few more pounds of boost. At first I used relays that I picked up at Radio Shack. They didn't last very long which was inconvenient since it was also my daily driver. Then I got smart and bought a couple of decent-quality Bosch ones. When I sold the car a few years later, the second one was still in its unopened package in the trunk.

Also, trying to run several things through one relay is probably not wise if you don't have to. Put each device on its own relay and the load will be less. (Not to mention, if you run multiple lights and one relay fails, it won't mess up your light schedule.)
 
HD contactor?

A relay triggering a bigger relay?

Also, trying to run several things through one relay is probably not wise if you don't have to. Put each device on its own relay and the load will be less. (Not to mention, if you run multiple lights and one relay fails, it won't mess up your light schedule.)

Yeah, they are contactors (trying to keep it layman's terms). One contactor for each string of 3x1000 watt lights (3 strings). You need a tiny 5vdc relay on the arduino output, which drives a 120 vac relay to actuate the contactors. For code, you need to keep low voltage physically separate from high voltage. Presently have a heavy duty intermatic timer (metal box) driving one string of lights and the 3 extra contactors. If one goes down, the light period is not compromised.
 
LESSON 2 Digital Temperature Sensors

Now we are going to use the arduino to monitor several digital temperature sensors. I'm using the DS18B20DS18B20 Digital temperature sensor + extras ID: 374 - $4.00 : Adafruit Industries, Unique & fun DIY electronics and kitsattached to a length of Cat3 cable, commonly used for internet and phone lines. It has 3 twisted pairs inside the outer jacket. I only use this over doorbell wire or Cat5 or Cat6 because it was cheapest at the depot ($8 for 100 feet I think). You can start with the sensors on a breadboard to see how it works.

This sensor is part of a class of components termed "one wire" meaning they only require one wire to communicate and get power. They also have a huge benefit in that they can be "ganged up". Over one hundred sensors can be monitored thru only one wire. That one wire only takes up one digital pin on the arduino. Much nicer than the one analog sensor per pin in Lesson 1. They can do this because each sensor has its own identification number. The downside is that this is more difficult to control. Fortunately there is a great "library" that does the work for you. A library is a group of code that you load into your sketch to save you a bunch of work. Here's more on one wire technology-- Dallas Temperature Control Library - Miles Burton - Innovative engineering for pretty much anything
While you are there, download the latest TCL library, near the bottom of the page.

Follow the instructions for moving the TCL library into your arduino files. It needs to be done properly so the arduino can find the library later. Now you need the code that will become Lesson 2's sketch. Go to www.github.com/OG13/Lesson2. Github is a site that hosts collaborative software work. It allows me to host the code there so you all can get it anonymously. Click on Lesson2 and select all the text, copy, then paste it into a blank arduino sketch.

Now wire up your parts. Here's a picture of my setup to help you out.

DSCN2442.JPG


The green wire goes from the arduino Ground pin to pins 1 and 3 on the DS18B20 sensors (use a jumper to hook them together). The blue wire goes from the arduino 5V pin to one end of an approximate 5k ohm resistor (I used 4.7 k ohm), the pullup resistor. The other end of the resistor goes to the pin 2 on the sensors and also to arduino digital pin 3 (yellow wire). This is our "one wire" for all sensors. Compile and upload the sketch and start the serial monitor. It will first display the addresses of both sensors in hex, you should record these since you will need them later. Then the monitor will display the temperature of both sensors and update about once a second. You can turn the scrolling off at the bottom of the serial monitor. If it doesn't work the first time, try pressing the arduino reset button and make sure the baud rate of the serial monitor is 9600. You can grab a sensor to heat it up to get an idea how quickly it responds. Make note of which address goes with each sensor, although you can figure it out later.

If you are not familiar with breadboards, they usually have two parallel "busses" on each side of the board marked positive and negative (the dashes below). They are all interconnected along the length of the board. The gap (space below) in the middle of the board lets you insert multipin chips to make connections to. The rows of holes that run perpendicular to the side busses are interconnected in groups of pins (the ones).
------------------------------------
------------------------------------
1111111111111111111111111
1111111111111111111111111
1111111111111111111111111
1111111111111111111111111
1111111111111111111111111
space space space space space
1111111111111111111111111
1111111111111111111111111
1111111111111111111111111
1111111111111111111111111
1111111111111111111111111
-----------------------------------
-----------------------------------

I'm using a mini breadboard now, so it doesn't have the side busses.

If you want to wire your sensor up to use it remotely, here is how I did it.
DSCN24372.JPG

I soldered pins 1 and 3 to one lead (White/Blue, the ground) and pin 2 to the other lead(Blue, signal/power). I put small heatshrink on each and the nifty color coded tape to help identify each sensor. This one is coded black red and you can see the hex address on the tag. The other end of the cable goes to the breadboard and is wired as such:
DSCN24381.JPG

The Blue wires are connected to the resistor and arduino digital pin 3. The White/Blue wires are connected to arduino ground. Run it on the serial monitor to make sure everything is working OK.

Reps to the first to let me know if you can get the code from Github, even if you are not ready to use it yet....:thanks:
 
Have found some stores in sweden, but the lack of funds and my life i need to chill about this project, but i can do the tutorilas and play with the arduino, hehe

Nice tutorial , you should make a schematic also, it is easier for the more hardcore builder, hehe

I can just say this will be a good resource for me and other people, i will install this in my next setup:p
 
Hey Gnarp, what's your favorite free, easy schematic program?
 
Back
Top Bottom