RBT Automatic Plant Watering IoT Project Using Blynk IoT

RBT Automatic Plant Watering IoT Project Using Blynk IoT

Do you wish to control and monitor your Auto Plant Watering System using your smartphone?

Let's try it out by pairing your RBT Auto Plant Watering Project with Grove 8266 WiFi and using the Blynk IoT app.

 

 

Hardware Preparation

You will need to own a complete set of RBT Auto Plant Watering Kit. But if you haven’t tried the RBT Auto Plant Watering Kit, select one of the options below to find out more!

  • Auto Plant Watering Kit IoT version (with micro:bit V2)
  • Auto Plant Watering Kit IoT version (without micro:bit)

Note: We highly recommend that you go through the lessons in the booklet before proceeding with this tutorial.

 

Hardware Setup

1. Using the same connections and setup in the booklet, connect the grove soil moisture, water pump, and servo to your REKA:BIT.

2. Then, connect the Grove WiFi module to the P15:P16 port of your REKA:BIT.

 

 

Software Requirements

  • Microsoft Makecode
  • Blynk IoT Apps
  • Blynk IoT Website


Adding Extension for Cytron Grove WiFi Module in Microsoft MakeCode

Just like how you add the “REKA:BIT” extension while you are going through the lessons in the booklet, click the Settings icon > Extensions. Then, search for "esp8266" and select the red color board to add the extensions.

 

 

What does the code do?

  • Able to send the soil moisture level and surrounding temperature readings through the internet. 
  • Notify the user through Blynk apps if the plant needs water.
  • Able to control the water pump remotely through the internet.

 

You may either continue with the tutorial or alternatively, you can refer to the full video tutorial available here.

 

 

Blynk IoT Widget Setup

1. Download the Blynk IoT app on your smartphone or go to https://blynk.io/, and register a new account for yourself. 

 

Note: The steps shown are based on the Mobile App version to set up the datastream virtual pins and widgets. The web browser version will be very similar to what is being shown here.

 

2. Create a New Template and give it a special name (for example, APW system).

 


3. Within the new template, create new Datastreams or edit from existing datastreams for the following virtual pins.

  • V1: Water Pump Switch
  • V2: Moisture Level
  • V3: LED
  • V4: LCD first line
  • V5: Temperature

 

 

 

4. Add new widgets to your template and set up the new widget by selecting the correct datastream virtual pin that you have created. Select each of them and set up all the widgets.

  • Button (V1)
  • Gauge (V2)
  • LED (V3)
  • LCD (V4)
  • Labeled Value (V5)

 

 

 

5. On the Blynk IoT app, add a new device to create a new Blynk IoT project.

 

 

6. In the end you will get something like this:

 

Let’s Start Coding!

Now, open the MakeCode and create a New Project. 


1. Firstly, create several variables as shown below:

 

2. We will do the code by part so it is easier for you to follow. You can find those coding blocks in the category drawer according to their respective colors.

 

3. First part of the code is for WiFi connections. 

 

4. In the same "on start" block, continue the code with the variables declaration. You need to drag "string" under the Text category to the variables block so that you can type in the Blynk Auth Token and virtual pin for each variable.

 

Notes: To get your Blynk Auth Token, follow Step 2 mentioned here.

 

5. Create a function block to control the Water Pump.

 

6. In the same function block, continue with the following code.

 

7. Lastly, create the forever block.

 

8. This is the final code. You can also refer to it in MakeCode.

 

3. Flash your code to your REKA:BIT.

 

4. Turn on your REKA:BIT and wait for the internet connection to complete.

 

5. Open your Blynk IoT "APW system" device and try to control and monitor your plant watering system through your smartphone.

 

Upgrade Your IoT Project with Automation!

Automation in Blynk IoT is used to alert the user with notifications or to control the project at a specific time. It's very useful when doing IoT projects since we don't need to always monitor our projects. Let's put some automation in our Auto Plant Watering System!

 

1. Open the settings for the APW System that you already created.

 

2. Edit the virtual pin for Moisture Level (V2) in the Datastreams and enable automation. Repeat the steps for Temperature (V5).

 

3. Close the Blynk IoT app and open it again. You will see the "Automations" option on the main page.

There are 4 types of automation that you can choose. For this Auto Plant Watering System, the most suitable option is to use the "Device state" automation.

 

4. Insert the threshold value for the Moisture Level. You can put the same value as in the coding

 

5. Click "Send in-app notification". Then, insert the title and message that you like to receive.

    Lastly, put the automation name and choose its cover. Click "Done".

 

6. Repeat the same steps for Temperature then you are good to go! You will receive notifications once the sensor readings across the threshold value.

 

 

Hope you learned how to use Grove WiFi 8266 module with the micro:bit and MakeCode.

You are encouraged to further improve the code for higher efficiency and more advanced applications.

 

 

 

Hardware Components


Related Posts

Smart Plant Monitor Using Microbit and Soil Moisture Sensor

Smart Plant Monitor Using Microbit and Soil Moisture Sensor

Water is necessary for the life and survival of all plants, it is essential for the transportation of nutrients and sugars from the soil to the plants. In order to keep your plants alive and well you ..
RBT Automatic Plant Watering Project - Automatic Pet Feeder

RBT Automatic Plant Watering Project - Automatic Pet Feeder

Do you know that by using the same component from the Auto Plant Watering Project Kit can be turned into an automatic pet feeder?....
RBT Auto Plant Watering Kit Project - Not Enough Water!

RBT Auto Plant Watering Kit Project - Not Enough Water!

Nooooo, my plant is dying because I didn't refill the cup of water eventhough I turned on the auto plant watering system for days! What should I do?....
Monitoring Soil Moisture Using Blynk and micro:bit

Monitoring Soil Moisture Using Blynk and micro:bit

With this IoT system, you can monitor the soil moisture of your plants using micro:bit and soil moisture sensor...