IOT LabReport
IOT LabReport
Lab Report
On
Internet of Things
BACHELOR IN COMPUTER APPLICATIONS (BCA)
VIII SEMESTER
Lab 1
Implementation of Alcohol Sensor using an Arduino Uno
The objective of this lab is to implement an alcohol sensor using an Arduino Uno
microcontroller board.
Introduction:
Alcohol sensors are widely used in various applications, such as breathalyzers, safety
devices, and industrial monitoring systems. These sensors detect the presence and
concentration of alcohol vapors in the surrounding environment. In this experiment, we
used an alcohol sensor module and interfaced it with an Arduino Uno board. The Arduino
was programmed to read the sensor values and display them on the serial monitor. By
observing the sensor readings, we could determine the presence of alcohol vapor.
Required Equipment:
• MQ3 (Alcohol sensor module)
• Arduino Uno board
• Resistor
• Buzzer
• Jumper wires
• LED
Procedure:
1. Connect the alcohol sensor module to the Arduino Uno board as follows:
VCC pin of the sensor module to the 5V pin of Arduino Uno
GND pin of the sensor module to the GND pin of Arduino Uno
#define sensorDigital 2
#define LED 3
#define buzzer 4
#define sensorAnalog A1
void setup() {
pinMode(sensorDigital, INPUT);
pinMode(LED, OUTPUT);
pinMode(buzzer, OUTPUT);
Serial.begin(9600);
}
void loop() {
bool digital = digitalRead(sensorDigital);
int analog = analogRead(sensorAnalog);
if (digital == 0) {
digitalWrite(LED, HIGH);
digitalWrite(buzzer, HIGH);
} else {
digitalWrite(LED, LOW);
digitalWrite(buzzer, LOW);
}
}
Conclusion:
In this lab, we successfully implemented an alcohol sensor using an Arduino Uno
microcontroller board. By interfacing the alcohol sensor module with the Arduino and
running the program, we were able to obtain sensor readings displayed on the serial
monitor.
Lab 2
Implementation of Smoke Sensor using an Arduino Uno
This lab report presents the implementation of a smoke sensor using an Arduino Uno
microcontroller board. The objective is to detect the presence of smoke/gases and provide
an alert through an output device.
Introduction:
The detection of smoke is crucial for ensuring safety in various environments, including
homes, offices, and industrial settings. The Smoke Sensor Module is a widely used sensor
that detects the presence of Smoke based on infrared radiation. By interfacing this sensor
with an Arduino Uno microcontroller board, we can monitor the environment and
respond quickly to potential fire hazards.
Required Equipment:
• Arduino Uno microcontroller board
• Smoke sensor module
• Resistors
• Jumper wires
• Buzzer
Procedure:
• Connect the Smoke sensor module to the Arduino Uno using jumper wires.
• Connect the Buzzer to the Arduino Uno’s digital pin D3 and GND.
• Upload the provided Arduino code to the board to detect the presence of smoke.
• Open the serial monitor to observe the output.
Then Upload the code for Buzzer after detecting the presence of smoke.
void setup()
pinMode(BUZZER_PIN, OUTPUT);
//Serial.begin(9600);
}
void loop()
//Serial.println(sensorValue);
analogWrite(BUZZER_PIN, 50);
else
analogWrite(BUZZER_PIN, 0);
delay(1000);
void setup()
{
pinMode(BUZZER_PIN, OUTPUT);
}
void loop()
{
int sensorValue = digitalRead(2);
if (sensorValue == LOW)
{
analogWrite(BUZZER_PIN, 50);
}
else
{
analogWrite(BUZZER_PIN, 0);
}
delay(1000);
}
Conclusion:
The implementation of the smoke sensor using an Arduino Uno and a Smoke sensor
module is successful. The system effectively detects the presence of smoke and provides
real-time alerts. It can be further improved by integrating additional features such as a
Led Bulb or wireless communication for remote monitoring.
Lab 3
Arduino Light Sensor Experiment using LDR
Introduction:
The Arduino light sensor is a simple circuit that utilizes a Light Dependent Resistor
(LDR) to measure the intensity of light. The LDR’s resistance decreases as the amount of
light falling on it increases. By connecting the LDR to an analog input pin of the Arduino,
the voltage across the LDR can be measured and converted into a digital value.
Required Equipment:
• Arduino board
• Light Dependent Resistor(LDR)
• Resistor
• Breadboard and jumper wires
• Light source
• Multimeter
Procedure:
1. Set up circuit on the breadboard as follows:
• Connect the 5V pin of the Arduino to one end of the LDR.
• Connect one leg of the 10kΩ resistor to the other end of the LDR.
• Connect the junction between the LDR and the resistor to an analog input
pin(A0) of the Arduino.
• Connect the GND pin of the Arduino to the other leg of the 10kΩ resistor.
2. Upload the following Arduino code to the board:
void setup(){
Serial.begin(9600);
}
void loop(){
int sensorValue=analogRead(A0);
Serial.println(sensorValue);
delay(500);
}
Conclusion:
The Arduino light sensor using an LDR successfully measured the intensity of light in its
environment.