0% found this document useful (0 votes)
3 views

Practical Embedded (AutoRecovered)

This document certifies that Meghana Balkrishna Bhopi has completed practicals in Embedded Systems as part of her B.Sc. in Information Technology at St. Wilfred’s College. It details various practicals conducted using Arduino, including working with sensors and controlling devices, along with corresponding codes and outputs. The practicals cover topics such as light sensors, temperature sensors, humidity sensors, ultrasonic sensors, servo motors, infrared motion detection, and gas detection.

Uploaded by

mh46harry
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)
3 views

Practical Embedded (AutoRecovered)

This document certifies that Meghana Balkrishna Bhopi has completed practicals in Embedded Systems as part of her B.Sc. in Information Technology at St. Wilfred’s College. It details various practicals conducted using Arduino, including working with sensors and controlling devices, along with corresponding codes and outputs. The practicals cover topics such as light sensors, temperature sensors, humidity sensors, ultrasonic sensors, servo motors, infrared motion detection, and gas detection.

Uploaded by

mh46harry
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/ 20

St.

Wilfred’s College of Arts, Commerce & Science, Shedung

CERTIFICATE

Department of Information Technol

This is to certify that Shri/Kumari.Meghana Balkrishna Bhopi


Student of Class SY IT Semester II has completed his/ her
Practical’s in the subject of Embedded System and Submitted a
satisfactory report partial fulfillment of B.Sc.(Information
technology)Course of University of Mumbai in Academic Year
2023-224

Subject in-charge External Examiner

Head of Deparment
Principal
Sr. Name of Practical /Titel Date Signature
No
1. Aim:-Introduction to Ardunio 09/01/2025
2. Aim:-To study the working of 13/01/2025
light sensor using Ardunio
3. Aim:-To study the working of 20/01/2025
Tempetrature sensor using
Ardunio
4. Aim:-To study the working of 23/01/2025
Humidity sensor using Ardunio
5. Aim:-To studty working of 01/02/2025
Ultrasonic sensor using Ardunio

6. Aim:-To control the motion of a 06/02/2025


Servo motor using Ardunio
7. Aim:-To detect the motion of an 10/02/2025
object using Infrared motion
sensor
8. Aim:-To detect smoke/fire using 13/02/2025
Gas sensor
Practical 1: Introduction to ardunio
Aim: -
1. To study the basics of Arduino circuits and bread-boarding
2. Blinking of LEDs

Simulation Environment:TinkerCAD (Free online simulator)


Part A: Basics of Arduino Circuits
Theory:

Arduino is an open-source electronics platform that has gained immense


popularity for its ease of use and versatility. It was created in 2005 by a
group of Italian engineers and is now maintained and developed by the
Arduino community.
The heart of the Arduino platform is a microcontroller, which is a small,
programmable computer on a single integrated circuit (IC) chip.
Arduino boards, which house these microcontrollers, provide a user-
friendly environment for
creating interactive electronic projects, prototypes, and various
applications.

Key Components of Arduino:


1. Microcontroller: The core of an Arduino board is the microcontroller.
The most commonly used microcontroller in Arduino is the ATmega series
from Atmel (now a part of Microchip Technology). These microcontrollers
come in different variations and are the brains behind your Arduino
projects.
2. Input/output Pins: Arduino boards have a set of digital and analog pins
that can be used to read data (inputs) or send data (outputs). Digital pins
work with binary signals (0 or 1), while analog pins can read a range of
values. The number and types of pins vary among different Arduino
board models.
3. Power Supply: Arduino boards can be powered via USB, an external
power supply, or a battery. Some boards have built-in voltage regulators,
which make them compatible with a range of power sources.
4. USB Port: Arduino boards often feature a USB port for programming
and power supply. This allows you to connect the board to your computer
and upload code.
5. Reset Button: A reset button is provided to restart the Arduino,
allowing you to upload new code or reset the program.
6. LED Indicator: Many Arduino boards include a built-in LED (Light
Emitting Diode) on pin 13, which can be used for testing and basic visual
feedback.

Arduino Software:
The Arduino platform comes with its integrated development
environment (IDE). The Arduino IDE is a software tool that allows you to
write, compile, and upload code to the Arduino board.Key features of the
IDE include:
- Programming Language: Arduino uses a simplified version of the C/C++
programming language. It provides a set of libraries and functions
tailored for easy interaction with the hardware.
- Code Library: Arduino has a vast library of pre-written code and
functions that simplify common tasks, making it accessible to
beginners.
- Serial Monitor: The IDE includes a serial monitor that allows you to
communicate with the Arduino board and view debugging information.
- Community Support: The Arduino community is large and active,
offering forums, tutorials, and extensive documentation to help users

Part B: Blinking of LEDs


Components Used:
1. Arduino UNO
2. Breadboard
3. LED
4. Resistor (330 Ω)

The Following is the Circuit diagram we need to implement using the


TinkerCAD simulationenvironment,
Arduino UNO is used to blink the LED continuously, we connect the pin 13
to the anode of the
LED and cathode of the LED is connected to a resistor (330 Ω) ro limit the
current passing
through the LED. If large current flows through the LED then it may
damage the LED (in real
world environment).
The other end of the LED is terminated to the ground connection of the
Arduino to complete the circuit.

Circuit Digragm:-
Code: The following C++ code is used in the given case
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
digitalWrite(LED_BUILTIN, HIGH);
delay(1000); // Wait for 1000 millisecond(s)
digitalWrite(LED_BUILTIN, LOW);
delay(1000); // Wait for 1000 millisecond(s)
}
PRACTICAL :- 2
Aim :- To study the working of light sensor using Ardunio
Code :
int sensorValue = 0;
void setup ()
{
pinMode(A0,INPUT);
pinMode(9,OUTPUT);
Serial.begin(9600);
}
void loop()
{
sensorValue = analogRead(A0);
Serial.println('sensorValue');
analogWrite(9,map(sensorValue,0,1023,255,0));
delay(100);
}
Output :-
PRACTICAL :- 3
Aim :- To study working of Temperature sensor using Ardunio
Code :
char degree = 176;
const int sensor = A1;

void setup() {
pinMode(sensor, INPUT);
Serial.begin(9600);
}

void loop() {
int tmp = analogRead(sensor);
float voltage = (tmp * 5.0) / 1024;

float tmpCel = (voltage - 0.5) * 100.0;

Serial.print("Celsius: ");
Serial.print(tmpCel);
Serial.println(degree);
delay(1000);
}

Output:-
PRACTICAL :-4
Code:-
const int analogIn = A1;
int humiditySensorOutput = 0;

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

void loop() {
humiditySensorOutput = analogRead(analogIn);
int humidityPercentage = map(humiditySensorOutput, 0,
1023, 10, 70);

Serial.print("Humidity: ");
Serial.print(humidityPercentage);
Serial.println("%");
delay(5000);
}
Output:-
PRACTICAL :- 5
Aim :- To study the working of Ultrasonic sensor using
Ardunio
Code :-
const int trigPin = 9;
const int echoPin = 1;

long duration;
int distance;

void setup() {
Serial.begin(9600);

pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}

void loop() {
digitalWrite(trigPin,LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

distance = duration * 0.034 / 2;


Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");

delay(1000);
}

Output :
PRACTICAL :-6
Aim :- To control the motion of a Servo motor using Ardunio
Code :-
#include <Servo.h>
Servo servoBase;
void setup() {
servoBase.attach(A1);
}
void loop() {
for (int i = 0; i <= 180; i += 10) {
servoBase.write(i);
delay(2000);
}
}
Ouput :-
PRACTICAL :-7
Aim:- To detect the motion of an object using Infrared
motion sensor
Code :-
int sensorState = 0;
void setup()
{
pinMode(2, INPUT);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
sensorState = digitalRead(2);
if (sensorState == HIGH) {
digitalWrite(LED_BUILTIN, HIGH);
} else {
digitalWrite(LED_BUILTIN, LOW);
}
delay(10);
}
Output :-
PRACTICAL :-8
Aim :- To detect smoke/fire using Gas sensor
Code :-
int LED = A1;
const int gas = 0;
int MQ2pin = A0;
void setup() {
Serial.begin(9600);
}
void loop() {
float sensorValue,MQ2pin;
sensorValue = analogRead(MQ2pin);
if(sensorValue>= 470){
digitalWrite(LED,LOW);
Serial.print(sensorValue);
Serial.println(" |SMOKE DETECTED");
}
else{
digitalWrite(LED,HIGH);
Serial.println("Sensor Value: ");
Serial.println(sensorValue);
}
delay(1000);
}
Output :-

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy