0% found this document useful (0 votes)
24 views4 pages

Iot 9

Iot worksheet for students

Uploaded by

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

Iot 9

Iot worksheet for students

Uploaded by

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

DEPARTMENT OF

COMPUTER SCIENCE & ENGINEERING

Experiment - 9
Student Name: Devesh UID: 22BCS16690
Branch: BE CSE Section/Group: 625-B
Semester: 5 Date of Performance:14/10/24
Subject Name: IOT LAB Subject Code: 22CSP-314

1. Aim: Case study of Agriculture 4.0 using IoT and to develop an IoT model for the
agriculture sector.

2. Objective:
1. To learn about the use of IoT in farming sector.
2. Learn about IoT programming

3. Input/Equipment Used:
• Arduino Uno
• Soil Moisture Sensor
• Jumper Wires
• Breadboard
• USB Cable

4. Theory:
Soil Moisture Sensor: A soil moisture sensor measures the volumetric water content in
soil. It’s commonly used in agriculture, gardening, and environmental monitoring to
ensure optimal soil conditions for plant growth. Soil moisture sensors typically measure
the soil’s electrical resistance, dielectric constant, or interaction with neutrons to
estimate moisture content. The sensor has two probes that are inserted into the soil. The
moisture level is determined based on the resistance between these probes, which
changes with the amount of water in the soil.

5. Procedure:
• Connect the Soil Moisture Sensor:

a. VCC to 5V on the Arduino


b. GND to GND on the Arduino
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

c. AOUT to A0 on the Arduino

• Optional: Connect an LED:

d. Anode (longer leg) to digital pin 13 through a resistor


e. Cathode (shorter leg) to GND

Soil moisture sensors measure the volumetric water content in soil. They typically consist of two
probes that allow the current to pass through the soil. More water in the soil results in lower resistance
and higher conductivity between the probes.

Troubleshooting:
No Sensor Readings: Check all connections and ensure the sensor is properly connected to the
Arduino. Inconsistent Readings: Ensure the sensor probes are clean and fully inserted into the soil.
Extensions: Integrate an LCD to display moisture levels.
Connect a relay module to automate an irrigation system based on moisture levels.
Use data logging to record moisture levels over time for analysis.

Analyzing the data:


Interpret Sensor Values: Higher sensor values typically indicate lower moisture levels (dry soil), while
lower sensor values indicate higher moisture levels (wet soil). Calibrate if Necessary: Based on your
observations, you might need to calibrate the sensor readings for accurate moisture level interpretation.
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

6. Code:
int sensorPin = A0; // Soil moisture sensor connected to A0
int ledPin = 13; // LED connected to digital pin 13

int buzzerPin = 8; // Buzzer connected to digital pin 8


void setup() {

Serial.begin(9600);
pinMode(ledPin, OUTPUT);
pinMode(buzzerPin, OUTPUT);

void loop() {
int sensorValue = analogRead(sensorPin); // Read the sensor value
Serial.print("Soil Moisture: ");

Serial.println(sensorValue);
if (sensorValue < 300) { // Threshold value for dry soil
digitalWrite(ledPin, HIGH); // Turn on LED

digitalWrite(buzzerPin, HIGH); // Turn on buzzer


}
else {
digitalWrite(ledPin, LOW); // Turn off LED

digitalWrite(buzzerPin, LOW); // Turn off buzzer


}
delay(1000); // Wait for 1 second before next reading}
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

7. Output:

8. Learning Outcomes:
• Learnt about the iot in farming sector.
• Learnt how to connect equipment to Iot to make smart device for
agriculture.
• Understand how it can be applied to automate irrigation systems in
agriculture.
• Learn about soil moisture sensor with an Arduino board, measured soil
moisture levels, and interpreted the sensor readings.

You might also like