Building a Smart Garden with Sensors and Automation Monitoring Soil Moisture and Plant Growth
A Smart Automated Greenhouse: Soil Moisture, Temperature Monitoring and Automatic Water Supply System (Peaty, Loam and Silty)
A Smart Automated Greenhouse: Soil Moisture, Temperature Monitoring and Automatic Water Supply System (Peaty, Loam and Silty)
Abstract:An encircled building is a greenhouse that offers plant growth with a microclimate. This article introduces the design of a wireless sensor network to monitor temperature, moisture, and soil humidity of a greenhouse in real time. To optimize the parameters and use of water, an automated control system is built for handling these microclimate parameters. The advanced sensor node handles the sensor information and causes the actuators based on the programmed microcontroller's (Arduino-based) with a threshold algorithm. The gateway gets data from the sensor and controls data via Blink and sends the data to the remote monitoring Web application. Moreover, this proposed work is simulated by thinker CAD software for initial analyzation of the soil moisture level, temperature, humidity, and light intensity. The controller's codes have been written in the programming language Arduino, debugs, compiled and uploaded into the microcontroller using Arduino's IDE. The system was constructed and tested for a scaled-down prototype. Greenhouse automation provides effective microclimatic parameter acquisition and controls. The work engaged in maintaining it also considerably decreases, making it beneficial for rural farmers, gardeners, and agriculture researchers.
Smart Garden with IoT Plant Monitoring System
In today's busy world, we forget to nourish and water plants that make our home clean and soothing. Think about it what if your plants are able to tell you when they are happy and when they require proper attention. It would be awesome right! It would be really helpful if we get a notification on our phones about our plant's health and needs. Taking account of this we came up with the idea of building a smart garden with IoT plant monitoring system. It checks the moisture content of the soil and intensity of sunlight falling on plant at regular time intervals. After the data is processed and verified by a logic created using Integromat, accordingly an SMS is sent about the plant's health. It will make our life simple and easy and will also help us to take better care of our plants. So let's get started!
Things used in this project
Hardware components
- LDR
- Resistor 10k ohm
- Resistor 10k ohm
- Soil Moisture Sensor
- Male/Male Jumper Wires
- Mobile Charger
- Female Header 8 Position 1 Row (0.1")
- Female Header 8 Position 1 Row (0.1")
Software apps and online services
- Integromat
- Twilio SMS Messaging API
Hardware Setup
Step 1: Gathering all the required components
All the components required for the project are mentioned below and are easily available in market at a reasonable price.
1. Soil Sensor
2. BoltIoT
3. LDR
4. Jumper wires (Male/Male)
5. Mobile Charger
6. Header pins (Female)
Step 2: Assembling the hardware
1. Get all the required components.
2. Connect one end of the LDR to pin A0 and other with 3.3V supply of the Bolt.
3. Connect a 10k Ohm resistor between A0 and GND pins of the Bolt.
4. Now connect the soil sensor probe to its amplifier circuit using female/female jumper wires and connect the Vcc, GND and DO (Digital Output) pins of the amplifier circuit to 3.3V, GND and pin 0 of the Bolt unit respectively using the female header connectors. Remember to connect only these 3, not the analog output of amplifier circuit.
5. Place the soil sensor probe into the plant and power up the Bolt.
NOTE: Check all the connections beforepoweringupBoltandforanyhelp lookintotheschematic.
Step 2: Schematics
Software Programming
Step 1: Platform details
Bolt IoT Platform
Bolt IoT platform gives you the capability to control your devices and collect data from IoT devices safely and securely no matter where you are. Get actionable insights by deploying machine learning algorithms with just a few clicks to detect anomalies as well as predict sensor values. To know more visitboltiot.com.
Integromat
The role of Integromat is to seamlessly connect your apps/services, so you can concentrate on new tasks rather than repeating the same tasks again and again. Get back to what matters the most.
Integromat works by linking together your favorite apps/services by their corresponding modules to create a scenario that will transfer and transform your data automatically for you. All you have to do is create a scenario that will watch for new data in one app/service, set-up the proceeding modules for the desired end result and Integromat will execute the task for you.
NOTE: To learn more about Integromat visithelp.
Twilio
Twilio is a cloud communications platform as a service company based in San Francisco, California. Twilio allows software developers to programmatically make and receive phone calls and send and receive text messages using its web service APIs. Know more at twilio.com.
Step -2 Connecting Bolt to cloud
After assembling the hardware, register and connect the Bolt unit to the Bolt Cloud. Know more atregistering and connecting bolt to cloud.
Step -3Building up the logic on Integromat
1. First make an account on Integromat using thelink.
2. After setting up the account, create a new scenario using the 'Create a new scenario' button located on the top right corner in dashboard.. For any help follow thislink.
3. In the services choose BoltIIoT and Twilio.
4. Now using the services build the required logic flow as shown in the figure. For any help follow thislink.
5. After building the logic now we need to enter the credentials for the services being used. i.e Bolt device ID and the API key for the BoltIoT service and SSID, Authentication token number, sender's number for the Twilio service. You can found all these atcloud.boltiot.comandtwilio.comrespectively. Look in the images below for further help.
Also, fill the required command along with the pin no. for the Bolt IoT service and the required SMS along with recipient's number to be sent for Twilio service.
6. Get the current time and set the upper time limit and lower time limit by using the set variable tool. Fill the variable name and variable value according to your requirement. For ex.:
{formatDate(now; "HH.mm"; "Asia/Kolkata")}
This command gives the current time in 24 hour clock in decimal.
{formatDate(addHours("2016-12-08T06:00:00"; 11); "HH.mm"; "Asia/Kolkata")}
This returns the upper time limit of 17.00 (in our case) in decimal.
{formatDate(addHours("2016-12-08T00:00:00"; 6); "HH.mm"; "Asia/Kolkata")}
This returns the lower time limit of 6.00 (in our case) in decimal.
7. Attach resume error handler to both BoltIoT services in order to prevent Integromat from stopping the scenario automatically in case of any error. In the handler use any number that is to be assigned to the Bolt in case of error. For ex. 12345 (in case of our) as shown in the image below.
8. Apply time barrier and error filter to the router's input branch and moisture content and light intensity filter to each of the router's output branches as shown below.
9. For Twilio service use your SSID, authentication key and sender's number provided on the Twilio dashboard. If you don't have Twilio account please go through thislinkand make one.
10. After successfully creating the logic, run to check for any errors.
11. Finally schedule your scenario according to your requirements and save it. In our case the scenario will run after every 30 minutes.
NOTE: Please don't forget to save your work before closing it.
Step -4 Working principle
The working principle is very simple, the soil sensor measures the moisture content present in the soil and LDR measures the light intensity falling on the plant. Both the data are read by the Bolt unit and send to Integromat logic whenever a read request arrives.
In case of soil sensor, if the moisture content is less than the threshold value (set by the user), the output of the sensor is LOW otherwise it is HIGH. This digital data is read from pin 0 of the Bolt. In case of LDR analog data is read from the A0 pin of the Bolt.
NOTE - The A0 pin of the Bolt has an input range of 0-1V. Hence we used 3.3V instead of 5V to power up the device.
In the Integromat logic when the scenario is run, BoltIoT App sends a digital read and analog read request to the Bolt to get moisture content and light intensity data. After that three set variable tools are required to get the current time and to set the operation time of the scenario. A router sends different SMS to the user based on the data received. For determining which message has to be delivered, each branch connecting Twilio and router is set with a filter having certain conditions.
In case to handle any kind of error a resume error handler is attached to both of the BoltIoT services. Handler assigns a specific user ID to the Bolt IoT in case of an error so that we can filter it out later at the input branch of the router.
First the system will check whether it is daytime or not and should it run the rest of scenario or not. If it's daytime then it checks for an error (if errors are not checked the scenario will be stopped by Integromat).
The system checks for error by comparing the user id of each BoltIoT service with one set by error handler. If an error is found by the system it marks the scenario as success and retries in another interval.
If the system finds all the condition satisfied then it send an SMS to the user alerting him about the plant health.
Conclusion
With the above simple steps, you can monitor the sunlight and water content of your plants and get alerts when you need to act.
What is GardenBot?
GardenBot is an open source garden monitoring system. This site is a collection of tutorials for how to build things (like a
soil moisture sensor), software for running GardenBot, resources, links, and more.
To get started, you will want to
browse the How-To sectionto see what is requiredto build the various modules.
The ultimate goal of the GardenBot project is to be a completegarden monitoring and automationsystem. A key design consideration is to keep everything as easyas possible -- especially for users new to Arduino and DIY electronicsprojects.
GardenBot iscurrently a work in progress, and we are always looking for volunteers -- please
contact meif you'd like to help.This project is built upon open source technology, so it is free to beused and modified in any way you see fit (provided you adhere to
GardenBot's license).
Just so you know, there are several (many) other garden automationprojects out there on the web. Some commercial, some open source. Youshould definitelyexplore around (see
theselinks).
Is GardenBot a robot?
The word robot usually is used for machines that move about. But consider this... eventhough it does not move, GardenBot is a robot.Itis a robot in the same way a plant is aliving organism. It is a slow, quiet robot. It is a robot that isthreaded through your house like a plant threads its roots through thesoil. GardenBot is formed to fit its function.
Whocame up with this?
I did... er, I mean hi. My name is
AndrewFrueh. Me and
mywife, Melissa,liketo garden a lot. We're always experimenting with different methods inour garden and compost. When I started this project, we already were using a soaker hose for ourgarden. We used one of thosemechanical timersto turn the soaker on for a pre-determined amount of time.But then...
I discovered
Arduino,and immediately became engrossed. Arduino is a little computer (calledamicrocontroller) about the size of a business card. It has a bunch ofanalog and digital inputs/outputs so you can hook up various sensors,buttons, switches, audio/video devices -- it's pretty friggin' cool.See the
parts pagefor more information.
Likea lot of DIY-ers, I am entirely self-trained and learn nearlyeverything from some random site. Sometimes it's well written,sometimes it's not. One of my goalswith this project, is to have all the pieces laid out in plain language-- step by step -- to walk you through the whole process. Hopefully Ipull that off.
Anyway,feel free to start exploring. The
How-Tosection has many tutorials on how to build your own garden automationsystem. Maybe you'll want to try building yourown GardenMonitor. And if you run into any snags, you are welcome to
contact mewith question /comments.
I am very much interested in making GardenBot as flexible as possible.I don't have time to explore every option myself (a few toomany cans of worms), but if youor anyone you know would like to build optional modules using a cooltechnology, please
contact me.
- wireless modules to connect to sensors in the garden
- solar power
- Twitter / Facebook / etc. to send updates of conditions in yourgarden
Links out togarden automation projects on the web
Links to GardenBot on the web
Here is a list of other garden automation/monitoring projects out thereon theweb. This list is not comprehensive. If you have such a project, please
contact me, and I will add your name to thelist.
Andrew Frueh retains the rights to all content (i.e. graphics andtutorials) in the GardenBot project.
GardenBotby
Andrew Fruehis licensed under a
CreativeCommons Attribution-NonCommercial-ShareAlike 3.0 Unported LicenseOf course, each piece of pre-existing software / hardware (i.e.Arduino, Processing, Flash, etc.) which has been incorporated intoGardenBot retains its respective license.