Took me a bit of time to make this...
This project uses the Intel Edison which is no longer valid BUT it works and can be used as a good project to experiment with IoT.
For this system the following features were consider desirable and were user as a system specification to design around.
- A SMART garden watering solution for the traditional garden which is able to track the irrigation cycles and the moisture levels of the system. Since we are talking about IoT we should be able to take advantage of the facilities of the internet namely the Weather Service. The system should be SMART enough to not water the plants if the soil is already wet OR if rain is predicted in the near future.
- A solution for indoor gardening with lighting and temperature control and monitoring. We want the ability to grow off season crops that we can plant in a small greenhouse or our own kitchen and for that we need to control additional elements of lighting and temperature inside.
- A hydroponics system which can be monitored and controlled via a GUI. Instead of a traditional hydroponics timer, we use the advanced capabilities of the system to remotely measure and control the operation of a hydroponics system. We want the ability to set complicated rules for the control of our hydroponic growing system
- A data logging facility to track various parameters. We need to be able to log the system data for analysis by expert should our garden begins to fail.
- A visual data display for all measured quantities. We understand that data visualisation can help understand monitored data better hence we want the capability to see the data in a graphical way over the internet.
- A configurable alert system for events. We want the capability to set alerts for certain events such that corrective action can be taken. If possible we would like the ability to get alerts on our Android devices.
This is where things get interesting.
The diagram shows there are two sub setups which are explained as follows:
The outdoor setup.
The outdoor setup consists of a soil based configuration for growing plants. We have chosen large pots with soil and fertiliser and these are placed outside in the sun. A water reservoir has a pump that can be switch on and off using the intel Edison and we also have a moisture sensor to detect the condition of the soil.
The Indoor setup.
The indoor setup consists of a hydroponic setup with a nutrient solution tank, a flooding pump to fill the hydroponic tray, a drain pump to empty it. We also have a artificial lighting lamp with a UV light as well for indoor lighting and sensors to detect the correct operation with a light and temperature sensor. The Flood tray also as water sensors to detect incomplete filling of the tray indicating insufficient water or a defective water pump.
In addition to these, we have the Intel Edison with the SeeedStudios grove sensors which is connected to a local Intel Galileo. This Galileo hosts an existing home automation setup using OpenHAB. It is also connected to the internet via the local network and Wifi and talks directly to the Intel Analytics Cloud to log and graph data.
The Intel Edison runs a Node.js script that initialises the peripherals, drives the sensors and actuators, converts the data into human readable form and exposes an API to remotely control everything. Essentially, the Node.js script subscribes to an MQTT broker on a particular topic and waits for commands. There are some low level tasks taken care of as well such as making sure nothing overflows etc but the API is used to get and put data from the Intel Edison. In addition to this, there are dedicated sub tasks to post sensor data periodically to the Intel IoT Analytics Cloud. Hence the cloud analytics section can function independently of any control.
The sensor data is also retrieved by OpenHAB which has a set of rules that are used to control the system. The logic part as well as the GUI is created using OpenHAB running on the Intel Galileo. A local version of the data is also captured in a MongoDB for creating graphs etc.
Outdoor setup: Veggies in large pots with sensors and a water hose with cuts
SOIL MOISTURE SENSOR : ()
Hydroponics setup: Indoor hydroponics setup with some DIY stuff
Plants in a tub for hydroponic infusion with sensors
Indoor sensor : ()
The Intel Edison can be programmed via a multitude of ways including Arduino IDE, Python and Node.js. Intel XDK for Node.js can be downloaded from Intel’s website and the links are given below.
Setup guides for the Edison: https://software.intel.com/en-us/iot/library/edison-getting-started
Setup guide for the Intel Iot Cloud: https://software.intel.com/en-us/intel-iot-platforms-getting-started-cloud-analytics
Intel XDK Downloads: https://software.intel.com/en-us/iot/downloads
Static IPs on Edison: https://communities.intel.com/thread/49348
The program is written to be a service that will send and receive data via MQTT to a local MQTT Broker service. The Edison periodically sends data to the Intel IoT Analytics service as well for logging.
The code my implementation is at https://github.com/inderpreet/Edison-TheGardener
Lemme know what you think.