0% found this document useful (0 votes)
28 views11 pages

IOT LabReport

Internet of things lab report

Uploaded by

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

IOT LabReport

Internet of things lab report

Uploaded by

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

GYAN DEEP COLLEGE

Tulsipur Sub-Metropolitan City-06, Dang


Affiliated to Tribhuvan University

Lab Report
On
Internet of Things
BACHELOR IN COMPUTER APPLICATIONS (BCA)
VIII SEMESTER

Submitted By: Submitted To:


Kapil Bohora Gyan Deep College
Registration No. : 6-2-1084-9-2019 Department of BCA

(Signature of Subject Teacher)


Table of Contents

Lab No. TITLE DATE SIGNATURE

Implementation of Alcohol Sensor


1
using an Arduino Uno

Implementation of Smoke Sensor


2 using an Arduino Uno

Arduino Light Sensor Experiment


3 using LDR

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

 A1 pin of the sensor module to the A1 analog input pin of Arduino


Uno

2. Open the Arduino IDE on the computer.


3. Write the following code in the Arduino IDE:

#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);

Serial.print("Analog value : ");


Serial.print(analog);
Serial.print("t");
Serial.print("Digital value :");
Serial.println(digital);

if (digital == 0) {
digitalWrite(LED, HIGH);
digitalWrite(buzzer, HIGH);
} else {
digitalWrite(LED, LOW);
digitalWrite(buzzer, LOW);
}
}

4. Upload the code to the Arduino Uno board.


5. Open the serial monitor in the Arduino IDE to observe the sensor readings.
6. Observe the sensor values and voltage displayed on the serial monitor. Higher
sensor values or voltages indicate a higher concentration of alcohol vapor in the
environment.
Fig: Circuit diagram of Alcohol sensor using Arduino Uno

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.

Arduino Code for sensor:


#define BUZZER_PIN 3

void setup()

pinMode(BUZZER_PIN, OUTPUT);

//Serial.begin(9600);

}
void loop()

int sensorValue = analogRead(A0);

//Serial.println(sensorValue);

if (sensorValue > 200)

analogWrite(BUZZER_PIN, 50);

else

analogWrite(BUZZER_PIN, 0);

delay(1000);

Arduino Code for Buzzer:


#define BUZZER_PIN 3

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);
}

Fig: Circuit diagram of Smoke sensor using an Arduino Uno

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

The purpose of this experiment is to demonstrate the functionality of an Arduino-based


light sensor using a Light Dependent Resistor (LDR). The LDR is used to measure the
intensity of light in its environment and provide corresponding analog voltage readings to
the Arduino board.

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);
}

3. Open the Serial Monitor in the Arduino IDE.


4. Power on the Arduino board.
5. Observe the serial monitor output, which will display the analog voltage readings
obtained from the LDR. The values range from 0 to 1023, with 0 representing no
light and 1023 representing maximum light intensity.
6. Place the light source at different distances and angles from the LDR and note the
corresponding analog values.

Fig: Circuit diagram of Arduino light sensor using an LDR

Conclusion:
The Arduino light sensor using an LDR successfully measured the intensity of light in its
environment.

You might also like