Soil Moisture Monitoring using ESP8266 and Qubitro

Soil Moisture Monitoring using ESP8266 and Qubitro

Soil moisture sensor data visualization in the Qubitro using Esp8266 and FC-28.

Inspiration

Soil moisture is a measure of soil health, the water content present in a certain area of the ground. In my previous project Self Greenery, I build a Micro: bit Automated Self Watering Plant, so in this project, we will send the real-time soil moisture sensor data to Qubitro for visualization.

What it does

For this project, we will be using a node MCU ESP8266 WiFi module and a soil moisture sensor that measures the volumetric content of water inside the soil and we will send this sensor data for visualization in the Qubitro platform.

Hardware Requirements

  1. NodeMCU ESP8266
  2. FC-28 Soil moisture sensor
  3. Breadboard, M-F Jumper wires

Let's Build

Connection Diagram

Connect the soil moisture sensor FC-28 to the ESP8266 in analog mode.

  • VCC of FC-28 to 3.3V of ESP8266
  • GND of FC-28 to GND of ESP8266
  • A0 of FC-28 to A0 of ESP8266
  • Connect the two pins from the probe to the two pins on the Amplifier circuit via jumper wires.
original image

CODE

Now, let's start to code in Arduino IDE. Firstly I wrote this basic code of getting the sensor data in the COM3 serial Monitor.

Connecting to Qubitro Platform

  • SignUp/Login on the Qubitro Portal
  • Create a new project with a description
  • Create a new device with details and a description
  • Go to the device settings and there you can see your unique device id and device token

Full Code

Add your wifi SSID, password also add your unique device ID and token in the below code. Install Qubitro MQTT client from Arduino IDE library manager if not already installed.

GitHub - akshitagupta15june/Qubitro-soil-health-monitoring: Soil moisture sensor data visualization in qubitro using esp8266 and FC-28
Soil moisture sensor data visualization in qubitro using esp8266 and FC-28 - GitHub - akshitagupta15june/Qubitro-soil-health-monitoring: Soil moisture sensor data visualization in qubitro using esp...

Compile and upload this code to your board and now you are ready to send the data to the Qubitro MQTT broker.

Here is the output which you will see in Arduino IDE serial monitor.

Go to the project dashboard and you can create an analytics chart of your real-time sensor data.

I tried using it with my garden plants and it really worked perfectly, you can also insert the sensor in the soil and see the real-time sensor data in the platform.

So this was all about this interesting project, I hope you will also try it and for more exciting blogs content involving Qubitro. Don't forget to subscribe to Qubitro Blog.

Join the conversation

Great! Next, complete checkout for full access to Qubitro.
Welcome back! You've successfully signed in.
You've successfully subscribed to Qubitro.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.