An introduction to the greenhouse project
For some time now, I’ve been working on a new project. One which combines my interests in nature and technology. Not only do I consider this a fun project but also it will expand my skills on things like Electronics, I2C, Python and SQL. I’ve done some little projects with my Raspberry Pi before but nothing serious. This project is one of the bigger ones, it’s goal is to learn about many things. Which is why my code and solutions will be far from optimal. It’s a project about automating a greenhouse. Greenhouse sounds very luxurious but in reality it’s just a plastic container. The project started as an experiment about creating time lapses with the Raspberry Pi and OpenCV. After pointing the camera at plants the idea for an automated greenhouse was born.
Here’s one of the results of the time-lapse projects(don’t mind the quality)
The idea behind this project is mostly to learn. The plan is to do this by automating the greenhouse(A.K.A. greencontainer) as much as possible. Which means multiple sensors, heating, watering, and videos of the progress!
- 1 Greencontainer(which isn’t even green)
- 1 Raspberry Pi model A
- 2 Sensorprobes with temperature and humidity sensors
- 1 Cheap Trust webcam
- 1 Solenoid
This project will be divided into the following logical parts:
- Raspberry Pi
- Time-lapse pictures
- Sensor reading
- Actuator control
- Windows server 2012
- SQL Server 2014 for sensor data
- FTP server for file storage
- Some logic for handling/processing of data
- Some way of presenting the data in a visually appealing way
I’ve done some configuration of the Windows Server 2012 and SQL Server which I will expand on later. I’ve chosen to rewrite the part that takes the pictures at an interval. The old version was a Python script using OpenCV. The new version is a Python script using <a href="http://www.pygame.org/news.html" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://www.pygame.org/news tadalafil no prescription.html’, ‘PyGame ‘);”>PyGame to take the pictures. There are multiple reasons for rewriting this script, biggest of all it’s been a while since I’ve touched Python and I wanted to refresh it. Also OpenCV is much too heavy for the intended use, PyGame is ideal(although not intended for this purpose). I also managed to lose the latest version of the old script(lesson learned: backup and git push!).
The repository which currently only contains this script can be viewed here:
The goal of an fully automated greenhouse is one I secretly hope to never achieve. The road is way more fun than the destination. Still I need something to work towards. The time-lapse script is beginning to look OK, I will write an article about the inner workings and the choices I’ve made while working on it later. Next up is the use of the two sensor probes. This will probably be in the form of another Python script using I2C to communicate with the hardware.
Next time: more info about the Python script responsible for producing the time-lapse pictures.