0% found this document useful (0 votes)
14 views3 pages

Arun IoT 9

experiment 9 of IOT 5th sem in Chandigarh University

Uploaded by

kumararunlamba89
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)
14 views3 pages

Arun IoT 9

experiment 9 of IOT 5th sem in Chandigarh University

Uploaded by

kumararunlamba89
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/ 3

DEPARTMENT OF

COMPUTER SCIENCE & ENGINEERING


Experiment-9
Student Name: Arun UID: 22BET10320
Branch: IT Section/Group: 22BET_IOT_703-B
Semester: 5th Date of Performance: /10/2024
Subject Name: IOT LAB Subject Code: 22ITP-329

1. Aim: Case studies of IoT in Healthcare and propose any IoT model for the healthcare
sector.

2. Objective: The objective of this experiment is to use the MQ-135 sensor to detect and
monitor the concentration of harmful gases in the air. By analyzing the sensor's analog
output, the experiment aims to assess air quality and identify potential contamination.
This helps in determining environmental safety and necessary precautions.
3. Input/Equipment Used: Arduino Uno board, Soil moisture sensor, Breadboard, Jumper
wires, USB cable for Arduino, Computer with Arduino IDE installed

4. Procedure:
Step 1: Setup the Arduino and Sensor
• Gather Components: Ensure you have all the necessary components.
• Connect the Soil Moisture Sensor to the Arduino:
• VCC (Power): Connect the VCC pin of the soil moisture sensor to the 5V pin on the
Arduino.
• GND (Ground): Connect the GND pin of the soil moisture sensor to a GND pin on
the Arduino.
• Analog Output (A0): Connect the A0 pin of the soil moisture sensor to an analog input
pin (e.g., A0) on the Arduino.
Step 2: Write the Arduino Code
• Open the Arduino IDE: Launch the Arduino IDE on your computer.
• Write the Code: Enter the following code into the Arduino IDE:
Step 3: Testing and Observation
• Open Serial Monitor: After uploading the code, open the Serial Monitor from the
Arduino IDE (Tools > Serial Monitor) to see the sensor readings.
• Take Readings: Observe the sensor values as you place the sensor in different soil
conditions:
• Dry Soil: Note the sensor value in dry soil.
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
• Wet Soil: Note the sensor value in wet soil.
• Record Data: Record the sensor values for different soil moisture levels.
Step 4: 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.

5. Code:
// Define the pin connected to the soil moisture sensor
const int sensorPin = A0;
void setup()
{
// Initialize serial communication at 9600 bits per second
Serial.begin(9600);
}
void loop()
{
// Read the value from the soil moisture sensor
int sensorValue = analogRead(sensorPin);
// Print the sensor value to the serial monitor
Serial.print("Soil Moisture Value: ");
Serial.println(sensorValue);
// Wait for a second before taking another reading
Delay(1000);
}
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
6. Result

7. Conclusion: By completing this experiment, you have successfully interfaced a soil


moisture sensor with an Arduino board, measured soil moisture levels, and interpreted the
sensor readings. This knowledge can be applied to automate irrigation systems in
agriculture.
8. Learning Outcomes:
• Connection and integration of the Soil Moisture Sensor with Arduino UNO.
• Evaluate the role of Water content in soil monitoring in real-world scenarios.
• Understand how to interpret and analyze water content in soil’s data to assess
environmental conditions.

You might also like