0% found this document useful (0 votes)
68 views12 pages

Soil Moisture Sensor Using Node Mcu

The document discusses interfacing a soil moisture sensor to an Arduino Uno. It describes the components needed, including the sensor, Arduino, jumper wires and USB cable. It provides the theory of how the sensor works and procedures to connect the sensor to the Arduino, load the IDE, write code to read the sensor values and display the soil moisture percentage.

Uploaded by

krishchitraveni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views12 pages

Soil Moisture Sensor Using Node Mcu

The document discusses interfacing a soil moisture sensor to an Arduino Uno. It describes the components needed, including the sensor, Arduino, jumper wires and USB cable. It provides the theory of how the sensor works and procedures to connect the sensor to the Arduino, load the IDE, write code to read the sensor values and display the soil moisture percentage.

Uploaded by

krishchitraveni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

SOIL MOISTURE SENSOR

USING Arduino UNO


AIM : To study about interfacing soil moisture sensor using Arduino uno
Components Required:
Hardware Components
• Arduino uno
• Moisture sensor
Jumper Wires
• Micro USB Cable
Software Components
• Arduino IDE
Theory

 This Moisture Sensor can be used for detecting the moisture of soil or judge if there is
water around the sensor, let the plant in your garden able to reach out for human’s help
when they are thirsty.
 This sensor is very easy to use, you can just simply insert in into the soil and read the
data. With this sensor, you can make a small project that can let the plant send a
message to you like ” I am thirsty now, please feed me some water.”
PROCEDURE:
Step-1:
The wiring connections are made as follows:
 Connect the two pins of the moisture sensor to
the two pins on the Amplifier circuit using
jumper wires.
 Connect the Vcc from the Amplifier to
the 3.3V pin on the NodeMCU.
 Connect the GND pin to the ground (GND) pin on
the NodeMCU.
 Connect the Analog pin to the A0 pin on the
NodeMCU.
 Connect NodeMCU to PC via a USB cable.
Step-2:Preparing the Arduino IDE
Selecting port as COM7
After downloading the Arduino IDE navigate to
1.File tab and then click on Preferences.
2.Tools - Boards - Boards Manager
In the search field type esp8266 > click the esp8266 by ESP8266
Community - Click Install
Now you have setup the Arduino IDE to work along with the NodeMCU.
Step 3: Save * Compile * Upload

Save the file with experiment name Compile the file


Upload the file
1.Goto Tools
2.Board > NodeMCU 1.0 (ESP - 12E Module)
3.Port ( Choose the right Port )
**Make sure you have your NodeMCU model selected and the correct serial port
ticked (see pics). Then just click the Upload button**
Program:
const int sensor_pin = A0; /* Connect Soil moisture
analog sensor pin to A0 of NodeMCU */
void setup()
{
Serial.begin(9600); /* Define baud rate for serial
communication */
}
void loop()
{
float moisture_percentage; moisture_percentage =
( 100.00 - ( (analogRead(sensor_pin)/1023.00) * 100.00 )
);
Serial.print("Soil Moisture(in Percentage) = ");
Serial.print(moisture_percentage);
Serial.println("%");
delay(1000);
}
OUTPUT

RESULT : Thus,To study about interfacing soil moisture sensor using node MCU is successfully
performed

You might also like