You are on page 1of 17

BECE351E

EXPERIMENT – 3 AND 4

Name: Riya Sharma

Reg. no. : 21BRS1149

1)SOIL MOISTURE MEASUREMENT USING SOIL MOSITURE SENSOR

2)TEMPERATURE MEASUREMENT USING TEMPERATURE SENSOR

AIM

1)To measure the soil moisture using soil moisture sensor and make different LEDs glow as
per the measured soil moisture value.

2)To measure the temperature using temperature sensor and make different LEDs glow as
per the measured value of temperature.

THEORY

SOIL MOSITURE SENSOR

Soil moisture sensors measure the volumetric water content in soil.[1] Since the direct
gravimetric measurement of free soil moisture requires removing, drying, and weighing of a
sample, soil moisture sensors measure the volumetric water content indirectly by using
some other property of the soil, such as electrical resistance, dielectric constant, or
interaction with neutrons, as a proxy for the moisture content.

The relation between the measured property and soil moisture must be calibrated and may
vary depending on environmental factors such as soil type, temperature, or electric
conductivity. Reflected microwave radiation is affected by the soil moisture and is used for
remote sensing in hydrology and agriculture. Portable probe instruments can be used by
farmers or gardeners.

Soil moisture sensors typically refer to sensors that estimate volumetric water content.
Another class of sensors measure another property of moisture in soils called water
potential; these sensors are usually referred to as soil water potential sensors and include
tensiometers and gypsum blocks.
TEMPERATURE SENSOR

Temperature sensors are devices used to measure the temperature of a medium. There are
2 kinds on temperature sensors: 1) contact sensors and 2) noncontact sensors. However, the
3 main types are thermometers, resistance temperature detectors, and thermocouples. All
three of these sensors measure a physical property (i.e. volume of a liquid, current through a
wire), which changes as a function of temperature. In addition to the 3 main types of
temperature sensors, there are numerous other temperature sensors available for use.

Contact Sensors

Contact temperature sensors measure the temperature of the object to which the sensor is in
contact by assuming or knowing that the two (sensor and the object) are in thermal
equilibrium, in other words, there is no heat flow between them.

Examples (further description of each example provide below)

• Thermocouples

• Resistance Temperature Detectors (RTDs)

• Full System Thermometers

• Bimetallic Thermometers

Components Required

1)SOIL MOISTURE SENSOR


2)TEMPERATURE SENSOR

CIRCUIT DIAGRAM

1)SOIL MOSITURE SENSOR


2)TEMPERATURE SENSOR

ARDUINO CODE

1)SOIL MOISTURE SENSOR

void setup()

// Set the serial monitor baudrate to 9600

Serial.begin(9600);

} void loop() { float level; level =

analogRead(A0);

Serial.println("MOISTURE

PERCENTAGE:");

Serial.println((level/876)*100); float

p=(level/876)*100; if(p<25){

digitalWrite(2,HIGH); delay(1000);

digitalWrite(4,LOW);
digitalWrite(6,LOW);

digitalWrite(7,LOW);

} else if(p>25 && p<50)

{ digitalWrite(4,HIGH);

delay(1000);

digitalWrite(2,LOW);

digitalWrite(6,LOW);

digitalWrite(7,LOW);

} else if(p>=50 && p<75)

{ digitalWrite(6,HIGH);

delay(1000);

digitalWrite(2,LOW);

digitalWrite(4,LOW);

digitalWrite(7,LOW); } else {

digitalWrite(7,HIGH);

delay(1000);

digitalWrite(2,LOW);

digitalWrite(4,LOW);

digitalWrite(6,LOW);

2)TEMPERATURE SENSOR

float temp;

float tempc;

void setup() {

pinMode(4,OUTPUT);
pinMode(5,OUTPUT);

pinMode(6,OUTPUT);

Serial.begin(9600);

} void loop() {

temp =

analogRead(A0);

// read analog volt from sensor and save to variable temp temp = temp * 0.48828125;

// convert the analog volt to its temperature equivalent

Serial.print("TEMPERATURE = "); tempc=temp-50.0;

Serial.print(tempc); // display temperature value

Serial.print("*C"); Serial.println();

if(tempc<=25){ digitalWrite(4,HIGH);

delay(2000); digitalWrite(4,LOW);

} else if(tempc>25 && tempc <=40){

digitalWrite(5,HIGH); delay(2000);

digitalWrite(5,LOW);

} else{ digitalWrite(6,HIGH);

delay(2000);

digitalWrite(6,LOW);

}
delay(1000); // update sensor reading each one second

INFERENCE

Thus, both the experiments were successfully executed.


EXPERIMENT – 5 HEART RATE MONITORING SYSTEM

AIM

To design a heart rate monitoring system using Arduino and KY-039


Heart rate sensor.

COMPONENTS REQUIRED
S.NO NAME QUANTITY

1 KY-039 SENSOR 1

2 ARDUINO UNO 1

3 USB CABLE 1

THEORY

KY-039 HEART RATE SENSOR

Ky-039 is a cheap Heartbeat Sensing Module. This Heartbeat module contains bright
infrared (IR) led and a photo-transistor that helps to detect the pulse of the hum finger,
There is a red LED present in the module that flashes at each pulse. The lead gets turned
ON on one side of the finger, and the phototransistor is on the other side of the finger.
These sensor modules can work to detect the heart rate of an individual. It achieves this by
an IR emitting LED on one side of a fingertip and by detecting minor changes in the
received IR using a phototransistor. The blood being pumped through the finger causes
fluctuations in the transmitted IR. A program that runs on the microcontroller cleans out the
electrical noise, reads the data, and provides the heart rate.
CIRCUIT DIAGRAM

ARDUINO CODE
void setup() {
pinMode(A0,
INPUT);
Serial.begin(9600);
} void loop() { float
pulse; int sum = 0; for
(int i = 0; i < 20; i++)
sum +=
analogRead(A0); pulse
= sum / 20.00;
Serial.println(pulse);
delay(100);
}
HARDWARE IMPLEMENTATION

INFERENCE

Thus, the experiment was successfully executed.


BECE351E

EXPERIMENT – 6 AIR QUALITY MONITORING SYSTEM

AIM

To create an Air Quality Monitoring System using Gas Sensor and Arduino.

COMPONENTS REQUIRED

THEORY

GASTRO SENSOR

Gas sensors work on the principle of transforming the gas adsorption effects on the surface
of the active material into a detectable signal in terms of its changed electrical, optical,
thermal, mechanical, magnetic (magnetization and spin), and piezoelectric properties. In
magnetic gas sensors, the change in the magnetic properties of the active materials is
measured by one of the approaches such as Hall effect, magnetization, spin orientation,
ferromagnetic resonance, magneto-optical Kerr effect, and magneto-static wave oscillation
effect.
CIRCUIT DIAGRAM

ARDUINO CODE

// include the library code:

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pin LiquidCrystal lcd(12, 11, 5, 4, 3,
2); int pin8 = 8; int analogPin = A0;
int sensorValue = 0; // store the value read void setup() {
pinMode(analogPin,
INPUT);pinMode(pin8,

OUTPUT);

//set up the LCD's number of columns and rows: lcd.begin(16, 2);


// Print a message to the LCD. lcd.print("What is
the air "); lcd.print("quality today?");
Serial.begin(9600); lcd.display();
} void loop() { delay(100); sensorValue = analogRead(analogPin); // read the
input
Serial.print("Air Quality in PPM = ");
Serial.println(sensorValue); // debug value lcd.clear();
lcd.setCursor(0,0); lcd.print ("Air Quality: "); lcd.print
(sensorValue); if (sensorValue<=500)
{

Serial.print("Fresh Air"); Serial.print ("\r\n");


lcd.setCursor(0,1); lcd.print("Fresh Air");
} else if( sensorValue>=500 && sensorValue<=650 )
{

Serial.print("Poor Air"); Serial.print("\r\n");


lcd.setCursor(0,1); lcd.print("Poor Air");
} else if (sensorValue>=650 )
{

Serial.print("Very Poor Air"); Serial.print ("\r\n");


lcd.setCursor(0,1); lcd.print("Very Poor Air");
} if (sensorValue >650)
{

// Activate digital output digitalWrite(pin8,


HIGH); } else {
// Deactivate digital output digitalWrite(pin8,
LOW);
}

SIMULATION
INFERENCE

Thus, the experiment was executed successfully.


BECE351E

EXPERIMENT – 7 - FIRE MONITORING SYSTEM

AIM

To create a fire monitoring system using Gas sensor, temperature sensor and piezo electric
buzzer.

COMPONENTS REQUIRED

THEORY

FLAME SENSOR

A flame detector is a type of sensor that can detect and respond to the presence of a flame.
These detectors have the ability to identify smokeless liquid and smoke that can create open
fire. For example, in boiler furnaces flame detectors are widely used, as a flame detector can
detect heat, smoke, and fire. These devices can also detect fire according to the air
temperature and air movement. The flame detectors use Ultraviolet (UV) or Infra-Red (IR)
technology to identify flames meaning they can alert to flames in less than a second. The
flame detector would respond to the detection of a flame according to its installation, it could
for example sound an alarm, deactivate the fuel line, or even activate a fire suppression
system.

This type of flame detector works by detecting the UV radiation at the point of ignition. Almost
entirely all fires emit UV radiations, so in case of the flame, the sensor would become aware
of it and produce a series of the pulses that are converted by detector electronics into an
alarm output.

CIRCUIT DIAGRAM

ARDUINO CODE

float temp;
float vout;
float vout1;
int LED = 13;
int gasSensor;
int piezo = 7;
void setup() {

pinMode(A0,INPUT);
pinMode(A1, INPUT);

pinMode(LED,OUTPUT);

pinMode(piezo,OUTPUT);

Serial.begin(9600); } void loop() {

vout=analogRead(A1);

vout1=(vout/1023)*5000;

temp=(vout1-500)/10;

gasSensor=analogRead(A0); if

(temp>=80) {

digitalWrite(LED,HIGH);

} else {

digitalWrite(LED,LOW);

} if (gasSensor>=100) {

digitalWrite(piezo,HIGH);

} else { digitalWrite(piezo,LOW);

Serial.print("in DegreeC= ");

Serial.print(" ");

Serial.print(temp);

Serial.print("\t");

Serial.print("GasSensor= ");

Serial.print(" ");

Serial.print(gasSensor); Serial.println();

delay(1000);

}
SIMULATION

INFERENCE

Thus, the experiment was successfully executed.

You might also like