Microcontroller - Auto adjust temp, humidity etc (help me with project)

imanoob

Well-Known Member
Alright folks,

Ok, here is the situation. Due to where I live, my grow room temp can rise (92+ degrees) and fall (50 degrees). At the moment, flaps in the tent are left open to help with cooling (around 75-80 mark) which is ok for now since they are in veg...but i need this sorted for when they are flowering.

I have some large robust server fans, ducting and im now looking into connecting these up via a PIC Microcontroller. I have no previous PIC MC experience...but it cant be too hard. There is a guy in my work who is a PIC guru...but he doesnt know about my erm...secret garden haha. I can however ask him questions if i get stuck...just wont be able to tell him exactly what im building.

For the people that dont know, I suggest you look into PIC MC...its basically a computer on a chip. You give it a job (turn on fan(s) at different speeds for different temps) and it does it. Awesome!


At the moment my priority is to get one made up for the air cooling.

2 pc fans
temp sensor
pic microcontroller

But eventually I would like to include
Humidity
PH
CO2

This project looks amazing, the author has put in some amount of work. Measures and adjusts lights, exhaust fan, water and also gives you stats and live webcam feeds. But you need to connect it to a laptop...which I dont want to do. I just want a microcontroller of some sort.



http://www.cheapvegetablegardener.com/2009/01/fully-automated-computerized-grow-box.html

Can anybody help me write up shopping list so I can start getting this built?

Thanks in advance, once im finished I will post up a step-by-step guide for everybody that wants it!

:joint:
 

BigBudBalls

Well-Known Member
The MPLAB IDE is a free download. You should also buy the PICkit 2 or 3. You can make up a quick ICP cable and use on nearly *any* PIC that supports ICP (think they all do)

Programing them is a different story. The PICs are RISC, so not many instruction to learn. (hell, they don't even have a mnemonic for multiply or divide, so your math and ASM skills will be tested) There are various high level compilers out there but at a price. Don't forget to config the chip correctly (TRISx registers, ADCON/ADSEL, etc)

Shopping list:

PICKit2 (or 3) ~$50 (the small pin count comes with a 16F690
a logic level N channel MOSFET for each fan 'channel' you want to control. ~$1 to 5
A ST1x temp/humidity sensor ~$20
Power supply (and old wallwart works nice)
the variety pack of resistors from radio shack
some LEDs

and a TON of time


Though I say, just get one of these:
http://www.bb-elec.com/product_multi_family.asp?MultiFamilyId=39&Trail=32&TrailType=Top


But will need the programing cable.
 

imanoob

Well-Known Member
Hi BigBudBalls

Thanks for replying to my post mate.

A guy in my work has the PIC Programmer kit I can borrow. I said I will be making a cooling system for my home theatre (PC). I just cant allow him to know what its really for haha! he said that he would help, which is good of him. So if i can get the parts needed he will help make it. Once its done I will write up a idiot guide for anybody else on the rollitup forum. I can see me making other devices for my room once this is done...they sound pretty awesome!

Since my original post, I found two other methods...what you reckon?

Method 1;
http://www.heatsink.info/content.php?content=control.shtml

Method 2;
http://www.electronics-lab.com/projects/test/023/index.html


The following pic is what im wanting to make, excuse the rubbish diagram...its the best I could do in 5mins haha

 

imanoob

Well-Known Member
I have noticed a few other post regarding automated designs...I will be following them to see if i can pick any tips up. BUT, in the meantime I will be building a quick n simple solution to my heat problem.


Once this is working, I think I will tackle the microcontroller stuff...as it seems like it will take some time and my plants are wilting a little. This is the finished product (not mine, im going to my the parts today)

Doesnt look like much, but it should work quite well...I will post up my results if anybody is intrested
 

dregs

Member
I am currently working on a similar project using http://www.phidgets.com/index.php .. nice python API and the already built USB interface is nice. Just thought I would through that out there.

Its more money, but wicked extensible and does not require an masters in EE to figure out. :)
 

imanoob

Well-Known Member
hey dregs,

nice one, sounds pretty good! have you studied or tried something like this before?

if not, i would really love to hear how you get on and what is involved.

I will be making mine tomorrow, but the PIC Microcontroller method looks quite hard for a novice...maybe your method would be easier?

Has anybody else got any suggestions?
 

imanoob

Well-Known Member
The first project (using the thermistor and PC power supply) works really really well.

BUT i got my parts for the microcontroller...incase anybody is intrested;

1)
Microchip PIC 16F877A-20/P

2)
DS18S20 - Temp sensor

3)
LCD Panel, with buttons

4)
DB001 Kit (dwarf board)

Once i get it started, i will post up my step by step.
 

BigBudBalls

Well-Known Member
The first project (using the thermistor and PC power supply) works really really well.

BUT i got my parts for the microcontroller...incase anybody is intrested;

1)
Microchip PIC 16F877A-20/P

2)
DS18S20 - Temp sensor

3)
LCD Panel, with buttons

4)
DB001 Kit (dwarf board)

Once i get it started, i will post up my step by step.
Ditch the DS18S20 for a 18B20. Even Maxim's site says the 'B' is a lot easier to deal with then the 'S'

(could also use a SHT1x, temp/humidity Its a synchronous interface kinda like SPI/I2C but not quite. I just got one rolling with a PIC16F690 and an Xbee for wireless comms to the host PC)
 

imanoob

Well-Known Member
duuuuuuuude...seriously!??!?
Do tell :mrgreen:

Fancy getting some pics or a quick guide posted up? I would be really intrested to see it.

So, is it a "similar" design to mine? What you think of the performance...does it do the job well?

Cheers man
 

BigBudBalls

Well-Known Member
Well about to toss the new system (singl temp/RH) into the works. (old system was a 18b20 on a Insteon device into a Mac; got a lot of bad readings during the day)


Its a LOT of roll-your-own. I got 8-12 Xbee modules, so the protocol for what each is doing, and how the host deals with it takes a LOT of fore-thought. If only one way (back to host) its easy, but 2-way coms adds a ton of complexity.
 

imanoob

Well-Known Member
:dunce:

I should have said...I have never tried this stuff before. I work with computers...so hope it doesnt take me too long to figure out. Famous last words eh

The guy i ordered the parts from didnt send my temp chip...now he is ignoring my emails. Fucker. So its being help up at the moment.

Can you take some pics so I can get an idea of how yours is setup? Good to know this idea does work...the more automate stuff in my grow room the better

Cheers again, sorry for all the questions dude
 

BigBudBalls

Well-Known Member
:dunce:

I should have said...I have never tried this stuff before. I work with computers...so hope it doesnt take me too long to figure out. Famous last words eh

The guy i ordered the parts from didnt send my temp chip...now he is ignoring my emails. Fucker. So its being help up at the moment.

Can you take some pics so I can get an idea of how yours is setup? Good to know this idea does work...the more automate stuff in my grow room the better

Cheers again, sorry for all the questions dude
pictures won't do you any good. what are you doing for code? asm? high level? (C, basic?)

What kind of LCD? serial or parallel? I'm guessing the standard 44780 controller chip? They are easy to work with.

You have plenty to play with without the temp sensor.
Just the obligatory "Hello Word" part should keep you busy for a while.

get them data sheets and absorb them.
 

imanoob

Well-Known Member
Hey man,

Yeah, im sure im gonna have my work cut out for me...but i think this would be the best solution. What you make of your gadget...so far so good?


Well I have the following;







My sensor is been re-sent...should arrive tomorrow or saturday.

As for the code I was going to modify the "1 wire dallas" method over at

www.mikroe.com.

I was also going to use one of their compliers?

http://www.mikroe.com/en/compilers/

Im sure mr google would help me with that.

What you think? Am i on the right track?
 
Top