Sample Document For Hardware Project-IOT Lab-Dr. Anup Dey
Sample Document For Hardware Project-IOT Lab-Dr. Anup Dey
Sample Document For Hardware Project-IOT Lab-Dr. Anup Dey
Batch no: 2
PRESENTED BY:
CH.Sri karan 2103A51196
D.Tharun 2103A51262
R.Manideep 2103A51242
M.Surendar 2103A51061
P.Sai Deepak 2103A51284
1|Page
List of components:
Arduino uno R3
Ultrasonic Distance sensor HC-SR04
Bread board
Resistor
Potentiometer
LCD Display 16*2
Connecting wires
2|Page
1.0 pinout: added SDA and SCL pins that are near to the
AREF pin and two other new pins placed near to the RESET
pin, the IOREF that allow the shields to adapt to the voltage
provided from the board. In future, shields will be compatible
both with the board that use the AVR, which operate with 5V
and with the Arduino Due that operate with 3.3V. The second
one is a not connected pin, that is reserved for future
purposes. Stronger RESET circuit. Atmega 16U2 replace the
8U2. "Uno" means one in Italian and is named to mark the
upcoming release of Arduino 1.0. The Uno and version 1.0
will be the reference versions of Arduino, moving forward.
The Uno is the latest in a series of USB Arduino boards, and
the reference model for the Arduino platform; for a
comparison with previous versions, see the index of Arduino
boards.
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide
PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB of which 0.5 KB
used by bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
3|Page
Applications:
• Xoscillo, an open-source oscilloscope
• Arduinome, a MIDI controller device that mimics the
Monome
• OBDuino, a trip computer that uses the on-board
diagnostics interface found in most modern cars.
• Gameduino, an Arduino shield to create retro 2D video
games
• ArduinoPhone, a do-it-yourself cellphone
• Water quality testing platform
• Automatic titration system based on Arduino and stepper
motor
• Low cost data glove for virtual reality applications
• Impedance sensor system to detect bovine milk adulteration
• Homemade CNC using Arduino and DC motors with close
loop control by Homofaciens
• DC motor control using Arduino and H-Bridge
4|Page
Ultra Sonic Sensor
An ultrasonic sensor is an instrument that measures the
distance to an object using ultrasonic sound waves.
An ultrasonic sensor uses a transducer to send and receive
ultrasonic pulses that relay back information about an object’s
proximity.
High-frequency sound waves reflect from boundaries to
produce distinct echo patterns.
Ultrasonic sensors work by sending out a sound wave at a
frequency above the range of human hearing. The transducer
of the sensor acts as a microphone to receive and send the
ultrasonic sound. Our ultrasonic sensors, like many others,
use a single transducer to send a pulse and to receive the echo.
The sensor determines the distance to a target by measuring
time lapses between the sending and receiving of the
ultrasonic pulse. The working principle of this module is
simple. It sends an ultrasonic pulse out at 40kHz which
travels through the air and if there is an obstacle or object, it
will bounce back to the sensor. By calculating the travel time
and the speed of sound, the distance can be calculated.
Ultrasonic sensors are a great solution for the detection of
clear objects. For liquid level measurement, applications that
use infrared sensors, for instance, struggle with this particular
use case because of target translucence.
For presence detection, ultrasonic sensors detect objects
regardless of the colour, surface, or material (unless the
material is very soft like wool, as it would absorb sound.) To
5|Page
detect transparent and other items where optical technologies
may fail, ultrasonic sensors are a reliable choice.
Ultrasonics are so widely used, they can be reliably
implemented in grain bin sensing applications, water level
sensing, drone applications and sensing cars at your local
restaurant or bank.
Ultrasonic rangefinders are commonly used as devices to
detect a collision.
Ultrasonic Sensors are best used in the non-contact detection
of:
• Presence
• Level
• Position
• Distance
Non-contact sensors are also referred to as proximity sensors.
Ultrasonics are Independent of:
• Light
• Smoke
• Dust
• Colour
• Material (except for soft surfaces, i.e. wool, because the
surface absorbs the ultrasonic sound wave and doesn’t reflect
sound.)
6|Page
Features:
• Supply voltage: 5V (DC).
• Supply current: 15mA.
• Modulation frequency: 40Hz.
• Output: 0 – 5V (Output high when obstacle detected in
range).
• Beam Angle: Max 15 degrees.
• Distance: 2cm – 400cm.
• Accuracy: 0.3cm.
Bread board
A breadboard, solderless breadboard, or protoboard is a
construction base used to build semipermanent prototypes of
electronic circuits. Unlike a stripboard, breadboards do not
require soldering or destruction of tracks and are hence reusable.
7|Page
For this reason, breadboards are also popular with students and
in technological education.
A variety of electronic systems may be prototyped by using
breadboards, from small analog and digital circuits to complete
central processing units (CPUs).
Compared to more permanent circuit connection methods,
modern breadboards have high parasitic capacitance, relatively
high resistance, and less reliable connections, which are subject
to jostle and physical degradation. Signaling is limited to about
10 MHz, and not everything works properly even well below
that frequency.
Features:
2 Distribution Strips, 200 tie-points.
630 tie-points in IC/ circuit areas.
ABS plastic with color legend.
8|Page
Dimension: 6.5*4.4*0.3 inch.
Hole/Pitch Style: Square wire holes (2.54mm)
ABS heat Distortion Temperature: 84° C (183° F)
Rating: 300/3 to 5Amps.
Insulation Resistance : 500MΩ / DC500V.
Resistor
A resistor is a passive two-terminal electrical component that
implements electrical resistance as a
circuit element. In electronic circuits, resistors are used to
reduce current flow, adjust signal levels, to
divide voltages, bias Passive elements, and terminate
transmission lines, among other uses.
9|Page
Potentiometer
For interfacing with an ultrasonic sensor, a common choice for a
potentiometer is a rotary potentiometer. These potentiometers
come in various types and sizes, but a standard one used in
hobbyist electronics and prototyping is a 10k ohm rotary
potentiometer.
10 | P a g e
LCD Display 16*2
Using an LCD display (16x2) to interface with an ultrasonic
sensor serves several purposes:
1. Visualization: It provides a visual representation of the data
captured by the ultrasonic sensor. In this case, it displays
distance measurements in a user-friendly format (e.g., in
centimeters).
2. User Interface: LCD displays offer a simple and intuitive
way to interact with a device. Users can easily read the
displayed information without needing to interpret raw sensor
data.
3. Real-Time Feedback: Users can see distance measurements
in real-time as objects move closer or farther away from the
ultrasonic sensor. This immediate feedback can be valuable in
various applications, such as robotics, security systems, or
distance measurement devices.
4. Data Logging: If your project involves logging or recording
distance measurements over time, an LCD display can serve as a
temporary or supplementary output method before data is stored
or transmitted elsewhere.
5. Debugging and Testing: During development and testing
phases, the LCD display can be used to monitor sensor readings
and system behavior, aiding in debugging and troubleshooting.
Overall, integrating an LCD display with an ultrasonic sensor
enhances the usability and functionality of your project by
11 | P a g e
providing a clear and informative interface for users to interact
with and understand the sensor's output.
Working principle
The interfacing of an Passive buzzer with a microcontroller
board and an ultrasonic sensor involves integrating these
components to create a system capable of emitting audible alerts
based on distance measurements obtained from the ultrasonic
sensor. In this setup, the Passive buzzer is connected to one of
the GPIO pins of the microcontroller board, requiring a 5V
power supply and a ground connection. Meanwhile, the
ultrasonic sensor consists of a transmitter and a receiver, both
connected to the microcontroller. When triggered by the
microcontroller, the ultrasonic sensor emits ultrasonic pulses,
which bounce off objects and return to the receiver. By
measuring the time it takes for these pulses to travel, the
microcontroller calculates the distance to the object. Based on
this distance data, the microcontroller determines whether to
trigger the Passive buzzer to emit an audible alert. This entire
process, including triggering the sensor, receiving echoes,
calculating distances, and controlling the buzzer, is continuously
executed within a loop in the microcontroller's program,
12 | P a g e
allowing for realtime monitoring and feedback. This integrated
system finds applications in proximity detection, obstacle
avoidance, safety alarms, and interPassive interfaces, offering a
versatile solution for various practical scenarios.
13 | P a g e
Result:
The interfacing of the Passive buzzer with the microcontroller
board and the ultrasonic sensor has successfully yielded a
functional system capable of emitting audible alerts based on
distance measurements obtained from the ultrasonic sensor.
Through the integration of hardware connections and software
control, the system accurately detects objects within its detection
range and triggers the Passive buzzer to emit alerts accordingly.
The system demonstrates robustness in continuous monitoring
and feedback, enabling real-time response to changes in
proximity.
Discussion: The interfacing of these components offers several
notable advantages and implications:
Proximity Sensing: The system provides reliable proxim[ity
sensing capabilities, enabling applications such as obstacle
detection, object tracking, and proximity warning systems. This
functionality is crucial for enhancing safety in environments
where collision avoidance or spatial awareness is paramount.
Auditory Feedback: By incorporating an Passive buzzer, the
system delivers auditory feedback to users, enhancing situational
awareness and alerting individuals to detected objects or
obstacles. Auditory cues are particularly beneficial in scenarios
where visual feedback may be limited or distracting, such as in
low-light conditions or for visually impaired users.
Real-Time Control: The microcontroller's ability to
continuously monitor distance measurements and control the
Passive buzzer in real-time facilitates dynamic response to
changing environmental conditions. This responsiveness is
14 | P a g e
advantageous for applications requiring adaptive behaviour such
as autonomous navigation systems or interPassive interfaces.
Versatile Applications: The interfacing of these components
opens up a wide range of potential applications across various
domains, including robotics, home automation, IoT, security
systems, and educational projects. From smart appliances to
industrial automation, the system's flexibility enables
customization to suit diverse use cases.
Integration with IoT: The system can be integrated into IoT
networks, enabling remote monitoring and control based on
distance data. By transmitting distance measurements to cloud
platforms or centralservers, the system contributes to data-driven
decision-making and enables remote management of connected
devices.
Educational Value: The interfacing project serves as an
educational tool for learning about sensor integration,
microcontroller programming, and real-world applications of
electronics and embedded systems. It provides hands-on
experience and fosters experimentation and innovation among
students, hobbyists, and aspiring engineers.
Limitations
While the interfacing of an Passive buzzer with a
microcontroller board and an ultrasonic sensor offers many
benefits, it also has certain limitations that should be considered:
Limited Range and Accuracy: Ultrasonic sensors have a
limited detection range, and their accuracy decreases at longer
15 | P a g e
distances or in environments with obstacles or acoustic
interference. This limitation restricts the effective range of the
system and may lead to inaccuracies in distance measurements.
Detection Blind Spots: Ultrasonic sensors may have blind spots
or dead zones where objects are not detected due to the sensor's
beam pattern or reflective surfaces. These blind spots can result
in missed detections or false negatives, compromising the
reliability of the system.
Interference and Crosstalk: Ultrasonic sensors can be
susceptible to interference from ambient noise, echoes, or other
ultrasonic sources. Crosstalk between multiple sensors in close
proximity may also occur, leading to erroneous distance
measurements or triggering of the Passive buzzer.
Complexity of Implementation: Interfacing an Passive buzzer
with a microcontroller board and an ultrasonic sensor requires
technical expertise in hardware connections, sensor calibration,
and software programming. The complexity of implementation
may pose challenges for beginners or those unfamiliar with
embedded systems development.
Environmental Limitations: The performance of ultrasonic
sensors may be affected by environmental factors such as
temperature, humidity, and airflow. Extreme environmental
conditions or harsh operating environments may degrade sensor
performance and reliability.
Single-Point Detection: Ultrasonic sensors typically provide
distance measurements for a single point or direction. This
limitation restricts their suitability for applications requiring
omnidirectional or multipoint detection capabilities.
16 | P a g e
Despite these limitations, the interfacing of an Passive buzzer
with a microcontroller board and an ultrasonic sensor remains a
valuable approach for proximity sensing, obstacle detection, and
auditory feedback in various applications. Mitigating these
limitations often involves careful system design, sensor
calibration, and integration with complementary technologies
for enhanced performance .
17 | P a g e
Multi-Sensor Fusion: Integrating ultrasonic sensors with
complementary sensor technologies such as infrared sensors,
LiDAR, or radar can enable multi-modal sensing and fusion,
enhancing the system's robustness and reliability in diverse
operating conditions. Multi-sensor fusion techniques can
provide more comprehensive environmental awareness and
improve obstacle detection capabilities.
CONCLUSION
In conclusion, the interfacing of an Passive buzzer with a
microcontroller board and an ultrasonic sensor presents a
versatile platform for creating interPassive systems with
auditory feedback based on distance measurements. This
integration enables a wide range of applications spanning safety,
automation, human-machine interaction, and IoT
implementations. While the system offers numerous benefits,
including proximity sensing, real-time control, and adaptability
to various environments, it also has limitations such as limited
range and accuracy, susceptibility to interference, and
complexity of implementation. Despite these limitations, the
interfacing project serves as a valuable educational tool for
learning about sensor integration, microcontroller programming,
and practical applications of embedded systems. Moving
forward, continued research and development efforts can
address these limitations and further enhance the performance,
reliability, and versatility of Passive buzzer systems integrated
with microcontroller boards and ultrasonic sensors. Overall, the
interfacing of these components opens up exciting opportunities
18 | P a g e
for innovation and creativity in engineering, robotics, IoT, and
beyond.
Code:
/*
The readings are not accurate as we may want it to be
This is by Joey Kanyi
*/
#include <LiquidCrystal.h>
LiquidCrystal lcd(1, 2, 4, 5, 6, 7); //Interface pins of the LCD
const int trigPin=9;
const int echoPin=10;
long distance,duration;
void setup() {
lcd.begin(16,2);
lcd.setCursor(0,0); //set the cursor to column 0 and line 0
19 | P a g e
pinMode(trigPin,OUTPUT);
pinMode(echoPin,INPUT);
}
void loop() {
digitalWrite(trigPin,HIGH);
delayMicroseconds(20);
digitalWrite(trigPin,LOW);
delayMicroseconds(20);
duration = pulseIn(echoPin, HIGH); //To receive the reflected
signal.
distance= duration*0.034/2;
lcd.setCursor(0,1); //set the cursor to column 0 and line 1
lcd.print(distance);
lcd.print("cm");
delay(100);
}
20 | P a g e