Arduino Controlled Grow and PC Program - Work In Progress

AdvancedNewbie

Well-Known Member
My room has auto controls on ac, water chiller, humidifier and lights. I run my vent fan all the time which I could use a speed controller for based on when lights are on and difference of temp inside and outside the room. I would also like to have a difference in temp when the lights are on vs off (day/night) which my unit does not allow for. Water chiller is a constant.

Alerts for all system failures or out of range sensor results and remote viewing of the readings are key to what I am trying for.

Are you happy with your touch screen? What should I get to play with based on your recent experience?
I'd recommend an ITDB02... It's directly compatible with the UTFT library @ http://www.henningkarlsen.com/electronics/library.php?id=51. I had to do a little hacking to the library to get my SSD1963 up and running, but now that I know how I really do like this screen. I agree with the PID loops, I'm going for the on/off range set. I just updated the code to check the times to see if light / water(nute) pump should be on. So both timers are working and are testing to be okay. All the settings save automatically now too. I agree with the priority being the alerts and remote monitoring. I'm going to work on the Ethernet side of things next so hopefully those will be implemented soon too :)

Edit: Never thought about the difference in temps for day/night. Good point/idea.
 

Afistakis

Member
One more frivolous but possibly useful thought: when I go pro, and I want separate systems so that I can harvest every few weeks. I haven't thought much about the control logistics but what do you think of running seperate unos that control the environment and report back to a master or to a computer via xbee or even hardwire? The goal being individual system monitoring and remote control.

I can't tell how much sense I am making... I apologize that I am not sober but I wanted to put this thought down while i was thinking about it.out it...
 

AdvancedNewbie

Well-Known Member
One more frivolous but possibly useful thought: when I go pro, and I want separate systems so that I can harvest every few weeks. I haven't thought much about the control logistics but what do you think of running seperate unos that control the environment and report back to a master or to a computer via xbee or even hardwire? The goal being individual system monitoring and remote control.

I can't tell how much sense I am making... I apologize that I am not sober but I wanted to put this thought down while i was thinking about it.out it...
lol... Makes sense to me and should be possible through any protocol really, you could go xbee, or wifi but there are security risks to running wireless. Shouldn't be hard to have multiple 'nodes' either, just change the firmware to a different IP address and if you have a SQL Database running, you could just add a new table for each different unit. This should keep everything nicely organized :)
 

CocaLeaf

Member
lol... Makes sense to me and should be possible through any protocol really, you could go xbee, or wifi but there are security risks to running wireless. Shouldn't be hard to have multiple 'nodes' either, just change the firmware to a different IP address and if you have a SQL Database running, you could just add a new table for each different unit. This should keep everything nicely organized :)
I do believe using a separate table for each "site" or "node" as you put it is the best bet to result difference systems and simple PHP management/display. However, having a web server send signals to the device is where the tricky stuff comes in.
 

ricky6991

Well-Known Member
Sorry for noob questions but i see these type of things all the time for car stuff. I work on cars and do performance stuff for cars so there is always people using the adrino stuff an making posts explaining it ect... diff is cars have sensors on them already lol. To do this type of thing im ASSUMING that i would have to download software(hopefully available for normal laptop?) Then buy list of sensor and install them and wire them into their correct locations on motherboard... im more than capable of doing sodiering and computer things.

Onto my question- is there a list of sensors to be bought and where to buy or better yet just post a link of all the sensors needed and what motherboard or controller to plug whichever sensors into. Then post the newest software that you guys are using. This would be awesome to do and i know i can hook all sensors up ect just havent ever played around with programming but seems like you guys did the programming parts and have a running setup already. Anybody willing to share it lol?
 

MarioMadness

Active Member
Wish I could make something like this.. Don't know where to get all the parts for this tho. To Bad you don't sell systems lol
 

AdvancedNewbie

Well-Known Member
Sorry for noob questions but i see these type of things all the time for car stuff. I work on cars and do performance stuff for cars so there is always people using the adrino stuff an making posts explaining it ect... diff is cars have sensors on them already lol. To do this type of thing im ASSUMING that i would have to download software(hopefully available for normal laptop?) Then buy list of sensor and install them and wire them into their correct locations on motherboard... im more than capable of doing sodiering and computer things.

Onto my question- is there a list of sensors to be bought and where to buy or better yet just post a link of all the sensors needed and what motherboard or controller to plug whichever sensors into. Then post the newest software that you guys are using. This would be awesome to do and i know i can hook all sensors up ect just havent ever played around with programming but seems like you guys did the programming parts and have a running setup already. Anybody willing to share it lol?
I just made a new Source Forge Page for this.
All code postings will be updated on this page: http://sourceforge.net/projects/envirocontrol/


There's still some work to be done, but like you said, I can update it over time and a new download will be available periodically.
 

MarioMadness

Active Member
Do it up, I would love to be able to have a all computer controlled setup. I Just don't know how I Just don't know where to start
 

smigula

Well-Known Member
Awesome thread and idea!

I actually had a similar idea early last year to use my programming skills to automate a lot of the grow process, but last June I fell down 25 feet a onto concrete floor, fractured 2 vertebrae (my T9 and T12...a spinal cord injury or SCI) as well as fracturing my skull in 2 places (a traumatic brain injury or TBI) and since then I have been rehabbing like crazy. I actual have already had a lot of return, but the nerve regeneration pain is by far the worst pain I have ever felt, and because of my brain injury the medications that are normally prescribed for nerve pain my docs can not prescribe for me as they will cause me to have seizures and so far the only thing that I have found that alleviates some of my pain is weed, so unless I move to a medical marijuana state I need to grow my own as I go through a lot of it with my pain

enough about my injury and shit, I actually just got my BS in Computer Science this May from Case, so I know a lot of programming languages. I have worked as a web developer, so I am particularly familiar with all aspects of web design...managing LAMP/MAMP stacks both locally and remotely so I know a lot of bash commands, writing PHP/JavaScript/HTML5 code, all sorts of database shit including structure and SQL queries...I was a biomedical engineer my first 2 years so I familiar with MATLAB, I made my first Android app for my senior project so I know that really well now (Java) etc. so if I can help with anything just let me know I have a lot of free time

I have never written anything in C++, only C in a few of my courses so if you haven't written anything in C it sucks, my desktop and laptop are both Macs, I get a lot of software for free from my college so I downloaded pretty much everything I could before I can not any longer, so I have the newest version of MATLAB and Visual Studio, and I was wondering how hard you think it would be to implement a similar system in MATLAB?
 

smigula

Well-Known Member
btw in case you were wondering, Case is mostly nerdy people (beyond nerdy nothing like I have ever seen) so I met like 10 or 20 people from the whole university that smoke most ppl play WoW
 

ricky6991

Well-Known Member
Can you please help me out advnub... so i would download the adrinolab in your sig to a pc and how would i attach the sensors to pc? They all usb ends which plug in or do i need to buy some sort of adrino motherboard and then wire in the sensors to motherboard i specific order and then the usb goes from adrino to pc? Also how would you hook the lights into the computer to turn on and off? Is there an outlet which can handle that many watts from the audrino or does it use a seperate timer that hooks into the adrino?

These are complete noob questions but still lost as to what exact sensors to buy and what motherboard to buy then how to wire the sensor into whatever and finally which software to dowload on bboth links in your sig.

I completely understand you are doing this freeware already and put ton of effort into it but if you could just make some sort of write up on what to buy specifically and what specific to dowload and a write up on wiring the sensor then i bet a ton of people would be using this instead of all seperate sensor, bluelab meters ect... this is an awesome thing to develop. Hopefully uou can make a write up on it for us non programming educated people lol. I would love to go online as we speek an buy sensor/motherboard ect and begin using this. I bet it would be cheaper than buy 1 bluelab meter and more efficient as well.
 

Afistakis

Member
The program is coded in VB.NET 2008 - if you downloaded the code and want to change it you'll need VB.NET 2008; I have Visual Studio 2008. The zip that's available for download also includes a folder called 'Arduino Source' inside that folder is a file called, "StandardFirmata_Modified_ALL.ino" That file, you'll have to open with the Arduino Development Environment. (http://arduino.cc/hu/Main/Software). From in the Arduino IDE program, you'll have to upload the modified firmata code onto the arduino. As for all the ideas you have in mind are very much possible; I have a RFID reader right now that I haven't used in a while and I found it to be a little bit a work to get it working... But none the less, it worked. I have also seen some cheap magnetic door locks good for up to 1200lbs, and ones stronger than that even, and they require 5v to activate them. But if you know of any cheap linear actuator style locks, I think I'd be more interested in those as they don't rely on magnets. (even though when the power is off to a magnetic door lock they stay locked) The RFID reader I got was off eBay, "Arduino RFID module Kit 13.56 Mhz with Tags" I had no trouble modifying their sample code to get to work. I have not messed around with it in respect to getting it to talk through the Arduino and then to the PC, but it should be possible. The code would have to be re-written for the arduino to accomidate the reader, as (if I recall correctly) the RFID reader uses a UART style transfer method and I can't really picture that working without rewriting the arduino code... Hmm, but you got me thinking. I was thinking it would be easier to use your phone to unlock as this could be code on the PC code, but it would suck to be locked out of your room because your phone's not charged, or the Internet > PC > Arduino > Lock 'hops' didn't work out somewhere along the way... If I knew the mega's were that cheap on eBay I probably would have waited for on of those to arrive to play with it instead. Please let me know if you're able to get up and running. I'd like to support all Arduinos. I might also incorporate shift registers to get more outputs, but this would take some rewriting of arduino code too.

Edit: If you want to try out the compiled binary, you'll have to dig deep... In the zip: ArduinoFirmataVBExtended > bin > Release > ArduinoFirmataVBLab.exe
Pleas read the thread and then do some more reading and experimenting. It isn't so simple as drawing a pic at this point and say plug this here and that there. Simple programming is required. This is not currently commercially ready and is still in the DIY stage.
 

AdvancedNewbie

Well-Known Member
Pleas read the thread and then do some more reading and experimenting. It isn't so simple as drawing a pic at this point and say plug this here and that there. Simple programming is required. This is not currently commercially ready and is still in the DIY stage.
Well said. Hopefully we'll be there in a couple months. :) Experimenting with my ethernet shield right now. Not much luck :|
 

Afistakis

Member
After reading your sketch, I realize that I may have under stated the simplicity of the programming. My apologies. That interface looks like it was ridiculous to get working. I hope the ethernet shield isn't so difficult.

+Rep for tons of amazing work!
 
Top