Skip to content

Soil Moisture Monitoring System Using ESP32 and Blynk

**Devices and Technologies Used

Microcontroller Board: ESP32 Sensor: Capacitive Soil Moisture Sensor Communication Technology: Wi-Fi (via ESP32) and Blynk IoT Platform (Cloud + Mobile App) Programming Platform: Arduino IDE Online Service: Blynk App (for Android/iOS)

ESP32 Pin - Sensor Pin 3.3V - VCC GN-GND

What I Measured: I inserted the soil moisture sensor into the soil and took readings under various conditions: Completely Dry Soil: 0% moisture +10 ml water: ~25% +30 ml water: ~60% +40 ml water (fully moist): 100% moisture

**How It Works:

The soil moisture sensor reads analog values depending on the moisture level. The ESP32 reads these values, converts them into a percentage, and sends the data via Wi-Fi to the Blynk Cloud. The Blynk app on my phone displays the real-time moisture level as a digital gauge.

The system successfully monitors soil moisture in real time and sends data to a mobile app via the Blynk cloud. The app allows me to know exactly when the plant needs watering, making it ideal for home, school, or community gardening projects.

*What are some opportunities in your context to work within your local community? Who you could collaborate with? How? What should happen to succeed in the collaboration? * In my local context, I can collaborate with Biology or qemistry teachers to design projects around smart gardening or measure the moisture content of soils taken from different locations. Students in after-school clubs or eco-groups, or projects, to build and monitor their own smart plant pots.

*What are the next steps in developing further a makerspace in your school? How do you envision the maker space? *

Community gardens and greenhouses to implement low-cost IoT monitoring systems. A collaborative, creative space where students can experiment, invent, and solve real-world problems using both scientific and artistic approaches. The space will support cross-disciplinary learning, project-based activities, and community engagement.

What is the potential of physical computing and IoT for your teaching? Do you have any ideas on how you are planning to integrate those techniques in your context?

For potential of physical computing and IoT for my teaching i want to-Makes abstract science concepts tangible, Encourages hands-on, student-centered learning, Fosters creativity, critical thinking, and digital literacy.

I am planning to integrate this context by 2 examples 1.Soil moisture systems for biology lessons 2.Air quality monitoring for chemistry

The site were i took codes https://examples.blynk.cc/?board=ESP32&shield=ESP32%20WiFi&example=GettingStarted%2FPushData ``` This example shows how value can be pushed from Arduino to the Blynk App.

NOTE: BlynkTimer provides SimpleTimer functionality: http://playground.arduino.cc/Code/SimpleTimer

App dashboard setup: Value Display widget attached to Virtual Pin V5 *********/

/ Fill-in information from Blynk Device Info here /

define BLYNK_TEMPLATE_ID “TMPL679nEs7k6”

define BLYNK_TEMPLATE_NAME “ESP32c3”

define BLYNK_AUTH_TOKEN “epf-nP1myAn5zl7JonNZGlXA9sYtqYVB”

/ Comment this out to disable prints and save space /

define BLYNK_PRINT Serial

include

include

include

// Your WiFi credentials. // Set password to “” for open networks. char ssid[] = “staff”; char pass[] = “SRGB2020”;

BlynkTimer timer; int pinvalue = 2;

// This function sends Arduino’s up time every second to Virtual Pin (5). // In the app, Widget’s reading frequency should be set to PUSH. This means // that you define how often to send data to Blynk App. void myTimerEvent() { // You can send any value at any time. // Please don’t send more that 10 values per second.

int Moistur =analogRead(pinvalue); Serial.println(Moistur); Moistur = map(Moistur, 1600, 2600, 100,0); Blynk.virtualWrite(V0,Moistur ); }

void setup() { pinMode (pinvalue,INPUT); // Debug console Serial.begin(115200);

Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass); // You can also specify server: //Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, “blynk.cloud”, 80); //Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, IPAddress(192,168,1,100), 8080);

// Setup a function to be called every second timer.setInterval(1000L, myTimerEvent); }

void loop() {

Blynk.run(); timer.run(); // Initiates BlynkTimer }

sample photo

alt text

alt text