Smart Garden with IoT Plant Monitoring System

cover_smart_garden

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

  • Bolt WiFi Module
  • 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
  • Bolt Cloud

Hardware Setup

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 before powering up Bolt and for any help look into the schematic.

connection1

connection3

connection4

connection5

Step 2: Schematics

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 visit boltiot.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 visit help.

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 at registering and connecting bolt to cloud.

 

Step -3 Building up the logic on Integromat

1. First make an account on Integromat using the link.

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 this link.

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 this link.

 

logic_flow

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 at cloud.boltiot.com and twilio.comrespectively. Look in the images below for further help.

mailgun

bolt_cloud_api_key

device_id

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.

 

variable_name_tools

variable_name_tools2

variable_name_tools3

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.

flow_control

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.

 setup_filter

 

setup_filter4

setup_filter3

 

setup_filter3

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 this link and 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.

 

scheduling

IoT Bolt IoT smart farming

Pranav Pai Vernekar
Co-Founder and CEO at Bolt IoT