Professional Documents
Culture Documents
EXPERIMENT – 3 AND 4
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 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.
• Thermocouples
• Bimetallic Thermometers
Components Required
CIRCUIT DIAGRAM
ARDUINO CODE
void setup()
Serial.begin(9600);
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);
{ digitalWrite(4,HIGH);
delay(1000);
digitalWrite(2,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
{ 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;
Serial.print("*C"); Serial.println();
if(tempc<=25){ digitalWrite(4,HIGH);
delay(2000); digitalWrite(4,LOW);
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
AIM
COMPONENTS REQUIRED
S.NO NAME QUANTITY
1 KY-039 SENSOR 1
2 ARDUINO UNO 1
3 USB CABLE 1
THEORY
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
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 <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);
SIMULATION
INFERENCE
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);
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(" ");
Serial.print(temp);
Serial.print("\t");
Serial.print("GasSensor= ");
Serial.print(" ");
Serial.print(gasSensor); Serial.println();
delay(1000);
}
SIMULATION
INFERENCE