Project tutorial
Soil Moisture Monitoring

Soil Moisture Monitoring

In This Tutorial i'm going to show you how to setup the serial communication between Arduino and NodeMCU for soil moisture monitoring.

  • 513 views
  • 2 comments
  • 2 respects

Components and supplies

Necessary tools and machines

Apps and online services

About this project

lately we've been hearing about smart irrigation, one of the things that pop up to our minds is the soil moisture detecting for that you will need a soil moisture sensor.

Then if you want to send the data to a server for example, you will need a gateway which is ESP8266 ( NodeMCU) communicating with the microcontroller ( Arduino )

Code

Soil Moisture Arduino
#define SensorPin A0 
int sensorValue = 0; 
void setup() { 
 Serial.begin(115200); 
} 
void loop() { 
 for (int i = 0; i <= 100; i++) 
 { 
   sensorValue = sensorValue + analogRead(SensorPin); 
   delay(1); 
 } 
 sensorValue = sensorValue/100.0; 
 Serial.println(sensorValue); 
 Serial.print("%");
 delay(1000); 
}
 
Serial Communication Between Arduino & Nodemcu Arduino
void setup() {
  Serial.begin(115200);
  while (!Serial) {
    ; 
  }
}

void loop() {
  if (Serial.available()) {
    Serial.write(Serial.read());
  }
}

Custom parts and enclosures

Components Required
Airbrush 20191107205408 wlxyskcrqj

Schematics

Connections
Between Arduino & LM393 :

Arduino 5V- LM393 VCC
Arduino GND - LM393 GND
Arduino A0 - LM393 A0 ( analog pins)

Between LM393 & Soil Moisture Sensor :

LM393( +) - Soil Moisture Sensor( +)
LM393 (-) - Soil Moisture (-)

Betweeen NodeMcu & Arduino :

NodeMcu Gnd - Arduino Gnd
NodeMcu TX - Arduino Rx
NodeMcu RX - Arduino TX
Airbrush 20191107212540 zftmtei3jb
Serial Monitoring of Soil Moisture Data
Serial moisture psis0mmd7t

Comments

Similar projects you might like

The Quantified Cactus: An Easy Plant Soil Moisture Sensor

Project tutorial by Jen Looper

  • 10,421 views
  • 2 comments
  • 29 respects

DIY Soil Moisture Monitor With Arduino and a Nokia 5110 D...

Project tutorial by Nick Koumaris

  • 4,067 views
  • 0 comments
  • 15 respects

XBee Arduino Interfacing

Project tutorial by Fouad_Roboticist

  • 1,237 views
  • 4 comments
  • 5 respects

Using the YL-39 + YL-69 Soil Humidity Sensor with Arduino

Project tutorial by Sorin Trimbitas

  • 32,765 views
  • 6 comments
  • 20 respects

Arduino-ESP WiFi Integration

Project in progress by Turai Botond

  • 10,885 views
  • 11 comments
  • 56 respects

Soil Moisture Sensor With LCD Display

Project tutorial by Patel Darshil

  • 35,968 views
  • 10 comments
  • 55 respects
Add projectSign up / Login