Arduino based room controller

When you say mesh is hard do you mean the code or the hardware? I read that you give them all the same passkey and they talk... I have no idea how you address them but I assume you use MAC address or something similar.

I would like the flexibility to put it anywhere on the property - so in the garage, basement or attic. I dont want to skimp $12 on the module and limit myself on what rooms or areas I put something in.

Getting Mesh network into an Arduino isn't easy. Though I looked around a bit more and found SquidBee. I think this is what you are looking for.
 
You think I will have problems with the powerswitch tail?? If the pin is putting out 5v (hence lighting the LED) should that now turn on the device, and turn it off if it is at 0v?

The screw shield is my final stage, I figure I can screw down the data leds and then solder in any resistors and power connects, is there any reason to expect this will not be stable?

It all depends on what is inside the powertail. If you are running an inductive load (motor or solenoid or magnetic ballast) you will need to have a snubber on the output side of the relay. I'm getting enough of a spike on "power off" of the fans to cause the arduino to reboot (back through the 120 v house mains). Just need to get some resistors and capacitors and play with it for a while.....I'm on it now. I don't think using a SSR would help. Stability (a reboot in my case) is not normally an issue, except if the lights get turned off. The latching logic returns to 0 on a reboot. Next post will discuss more.
 
The hardest part of this controller is using it for timing. Normal "logic" won't work....you can't use "greater than" type logic with time due to the fact that the clock is outputting a string value for time. You can't check "is time" greater than 800 (8 am) and less than 2000 (8 pm), since the clock is giving a value of "eight" not a number.....is my thinking flawed? I've been monitoring the clock and when the time is equal to the "setpoint" it changes a latch to "on" (or 1) to maintain the light relay on. If the arduino resets during lights on period, the latch is reset to zero until the next on setpoint is reached. Hard to explain easy to observe......I tried many other ways to get the timing part to work to no avail, so I went with a latch. Controlling anything but timed items is not a concern since they just poll the sensor to determine state, they don't care about a reset. Time functions do, unless I'm missing something.

Can you say "Lights ON if timenow is greater than 1800 and less than 0600"????
 
I fiddled with it for days and gave up, used the latch instead. I will revisit at some point. Been pretty busy here for a while.
 
The hardest part of this controller is using it for timing. Normal "logic" won't work....you can't use "greater than" type logic with time due to the fact that the clock is outputting a string value for time. You can't check "is time" greater than 800 (8 am) and less than 2000 (8 pm), since the clock is giving a value of "eight" not a number.....is my thinking flawed? I've been monitoring the clock and when the time is equal to the "setpoint" it changes a latch to "on" (or 1) to maintain the light relay on. If the arduino resets during lights on period, the latch is reset to zero until the next on setpoint is reached. Hard to explain easy to observe......I tried many other ways to get the timing part to work to no avail, so I went with a latch. Controlling anything but timed items is not a concern since they just poll the sensor to determine state, they don't care about a reset. Time functions do, unless I'm missing something.

Can you say "Lights ON if timenow is greater than 1800 and less than 0600"????

Yes, that can be a problem. You should be able to walk through the parsed string and do several IF statements to work through it. But you could also use UnixTime milliseconds. Though you will have to deal with reboots and I think it over flows around 50 days of running. Another way would be to use TimeAlarms to set your interrupts.
 
Made the snubber circuit and tested it out. Four equivalent days of accelerated testing (on for 45 seconds, off for 45 seconds, repeat for 18 hours) and no reboots. I'd say the problem is solved. Just a 150 ohm resistor and a 0.1microfarad cap in series, across the output contacts--absorbs the voltage kick on turn off.
 
Hello

Nice progress, wanted to show of my creation, hehe
Can´t wait to until february, so i begun to make the SSR driver, just need 4 more resistors and i will be set:p

ssr-driver.jpg


the two middle screws is positiv +.
 
you don´t want to se the soldering:p no shorts!!!

....all that matters.....test everything before you go on to the next step. You could add a led in to see when each circuit is ON. Makes debugging easier down the road.:welldone:
 
The hardest part of this controller is using it for timing. Normal "logic" won't work....you can't use "greater than" type logic with time due to the fact that the clock is outputting a string value for time. You can't check "is time" greater than 800 (8 am) and less than 2000 (8 pm), since the clock is giving a value of "eight" not a number.....is my thinking flawed? I've been monitoring the clock and when the time is equal to the "setpoint" it changes a latch to "on" (or 1) to maintain the light relay on. If the arduino resets during lights on period, the latch is reset to zero until the next on setpoint is reached. Hard to explain easy to observe......I tried many other ways to get the timing part to work to no avail, so I went with a latch. Controlling anything but timed items is not a concern since they just poll the sensor to determine state, they don't care about a reset. Time functions do, unless I'm missing something.

Can you say "Lights ON if timenow is greater than 1800 and less than 0600"????

I was looking into the coding of the adafruit datalogger shield and it seems to return numbers, if you hack their lib it could solve this problem for you.
 
....all that matters.....test everything before you go on to the next step. You could add a led in to see when each circuit is ON. Makes debugging easier down the road.:welldone:

Yes i know, will use the multimeter buzzer to check the connections, will add leds later on.
 
Hey guys just found this thread its f'n awesome a quick question or few....how would you get it to where the fan controller is disabled when co2 controller is enabled and vice versa and to where co2 does not enable while lights are disabled? I'm def. Goin to make one as I don't want to shell out 500 plus on a premade unit and won't be able to expand it later on. But I will probably need loads of help I apologize now for the future bugging lol
 
The logic is straight forward....if lights = Off, then C02 = Off basically. All depends on how you write the code. If you don't have any programming experience you will have some learning to do though. What is your full complement of equipment you want to control and interface with? You mentioned CO2 and lights so far..... Most room controllers take a bump in price when you want to monitor and control CO2 because the sensor is quite expensive by itself. I haven't got one yet to play with, but guessing it would add 100-150 bucks to the cost. I think ready made units reflect this fact. You can get a standalone monitor controller and interface it with the arduino simply though.
 
Preferablly co2, lights, ac to cool room temps, and inline fans to exhaust reflectors and monitor 3 res. temps., veg tent temp., and flower room temp., would a MG811 co2 sensor work? It says it's arduino compatible. Its $53 on ebay and I found a nice mega2560 clone kit 100% arduino compatible for 96$ shipped Includes sensor shield, ds1307 RTC chip, 128x64 LCD, RFID Module, IR sender and reciever, IR remote, 4x4 matrix keypad, 2n2222 transistors, diode 1n4001, 100nF capacitor, SD card module, 8x8 leds, at24c64 chip, 74hc595n chip, 32.768k hz crystal, 5v relay, rectangle tag, round tag, jumper cables, bread board, cr2032 socket, 10k rotary potentiometer, 220ohm 1kohm 10kohm resistors, 7 seg. -4digit led display, 9v power adapter, photoresistor, 5v buzzer, red green and yellow leds. Do you think that kit and co2 sensor would work and use the same temp. sensors you spoke of and the waterproof temp. sensor for res. temps?
 
the MG811 is an electronic co2 sniffer. Every co2 sensor I have seen uses the Non disruptive infra red which seems to be the industry standard.
 
The mg811 may be fine, not much info to go by. What is its lifespan, accuracy, tolerance, repeatability? That is the info you need. Good enough ("industry standard"?) is all relative....is +/- 100 ppm a big deal for growing pot--not really. Just because other companies use something different doesn't make this one "wrong". A cheaper option may be better for what we are doing, it's not life or death atmosphere monitoring......
 
Back
Top Bottom