Author Archives: Yan He

Internet of Things: Greenhouse Environment Station

By: Ivan Atarah, Rupsha Bagchi and Yan He

We wanted to have a log of the weather in the greenhouse in our Exactum building, with PC logging and graphs. So we made a device which measures the real-time environment variable from multiple sensors in the greenhouse, from where the results can be easily checked and understood.

The arduino UNO board receives the information from the sensors and pushes them to a database on the cloud with the help of the adafruit CC3000 wifi shield.  The data stream on the SparkFun database is then analysed and prepared as graphs using the Analog.io APIs.

This system can be used to monitor, for instance, how much sunlight a specific type of plant is getting. So basically we can use the information from the data to analyse whether the environment is conducive or detrimental to the growth of specific kinds of plants.

The source code of our project can be found here. And here is the link to our SparkFun database. Also, this is where you can see our desktop application with the graphical view of the data (on analog.io).

Components

Arduino Uno and charger
Grove-Base Shield V1.3
Adafruit CC3000 WiFi Shield
Grove-Digital Light Sensor
DHT22 Temperature-Humidity Sensor

11355382_987784461240318_444653769_n

The system and its output

11263826_986476921371072_333993720_n

The front view with the added lego accessories

data

how the data is stored in SparkFun database

graph

The graphical view from analog.io

 

weather-station-fritzing-breadboard

The wiring diagram

 

P.S. We haven’t shown Grove-Base Shield and Adafruit CC3000 WiFi Shield in the wiring diagram, due to some fritzing library issues.

Difficulties encountered

  • Adafruit CC3000 Breakout WiFi chip was faulty: We discovered it after repeatedly trying to connect to the network and failing. We had it replaced with adafruit CC3000 WiFi Shield.
  • Connecting to firebase: We tried multiple ways to send data to firebase for many days, but kept getting stuck at some point. We switched to Thingspeak and eventually to Sparkfun due to its very easy-to-integrate api.
  • We found a perfect Arduino case to 3D print on Thingiverse but could not resize the parts separately on Tinkercad, so we left a comment to the designer. The author was answered very quickly and the communication was a success, even though the model could not unfortunately be changed. So we switched to another 3D Lego mount for Arduino, here is the link.

Future Enhancements

We has originally planned to include other sensors namely carbon dioxide sensors to measure the changes in CO2 concentration around plants, toxic gas sensors and air pressure sensor to predict when it might rain. Along with that, we also wanted to be able to predict the greenhouse environment based on incremental history from our data, with the help of machine learning algorithms. We could not the due to the time constraints.

Grove_CO2_Sensor

CO2 Sensor

HCHO_Sensor_01

HCHO (formaldehyde) Sensor

Grove - Barometer Sensor

Barometer Sensor

We think being able to see the data and control the system from out smartphone is also a good idea. So we currently working with the data we have to make a mobile application.

Learnings

We had hardly any previous knowledge of hardware based projects. We took a while to pick up things from scratch, making our way through learning, debugging and testing the hardware issues. The hardest part of the project was probably writing the code to send a POST HTTP request to the database and figuring out how the various arduino libraries exactly worked. The greenhouse exactum course tutors were of great help to us, and the course gave us the motivation and the confidence to develop more arduino based projects.