Pages: [1]   Go Down
Author Topic: First project - Greenhouse monitor  (Read 2509 times)
0 Members and 1 Guest are viewing this topic.
New Jersey
Offline Offline
Faraday Member
**
Karma: 65
Posts: 3638
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've finally got the project that started me down the Arduino path working. Last year, my Dad asked me to build him something that would allow him to monitor temperatures in his greenhouse, without actually having to go out there to look. The real requirement was to enable him to view the overnight lows to see if there was still frost. This information would be used to decide when it is safe to plant seeds.

There is power in the greenhouse so I figured I'd use an Uno and a DS18B20. Communications would be handled by an Async labs wifi shield which would send the data to my web server. Perl cgi would collect the data and push it into a mysql database. More Perl pages on the webserver would serve up graphs using google charts. Hey presto - Dad can monitor the greenhouse climate from his iTouch.

It took a few weekends (four?) to get it working at my house. Problem  was though, it would stop working after a few hours. Putting in code to detect when communications were not coming from the web server pushed that out to a few days, but it would eventually crash hard and need a manual reset.

Last weekend I found the problem: the async labs library grabs data from the wifi shield, but it does not check whether it has enough buffer space. When large packets were received (thank you Verizon), buffer overflows occurred. I'm surprised it ran as well as it did actually. I changed the library last weekend to avoid the buffer overflow and throw away large packets and it's been running ever since so I think I can declare it fixed.

Sadly, it doesn't work at my Dad's house. A combination of brick walls and distance make wi-fi communications impossible. Solution - spend more money on X-bee stuff! Attached are code and some example charts

* Greenhouse01.pde (7.97 KB - downloaded 224 times.)

* 24hr.png (10.88 KB, 540x320 - viewed 124 times.)

* 31day.png (8.08 KB, 600x300 - viewed 127 times.)
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 200
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I bet your father's glad to have this sort of data available.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 170
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I love it when you see real arduino projects like this with a real use!

Awesome work!
Logged

Pages: [1]   Go Up
Jump to: