Physics-Lab-Project-Report
Physics-Lab-Project-Report
On
SUBMITTED BY:
Batch-232
Submitted To:
Department of EEE
This project describes ultrasonic blind walking stick with the use of arduino. According to the
30 million peoples whom are permanently blind and 285 million peoples with vision
impairment, if you notice them you can know about it quite well that they can’t walk without
help of the others. One has to ask guidance to reach their destination, they have to face more
struggles in their daily life. Using this blind stick, a person can walk more confidently. This
stick detects the object in front of the person and give response to the user either by vibrating
or through command. So, the person can walk without any fear. This device would be the best
1 INTRODUCTION vi
3 APPARATUS viii
4 BLOCK DIAGRAM ix
5 PROCEDURE x-xxxvii
6. CODE xxxvii-xl
7 OUTPUT xli-xliii
8 CONCLUSION xliv
INTRODUCTION
Visually impaired persons have difficulty to interact and feel their environment. They have
little contact with surroundings. Physical movement is a challenge for visually impaired
persons, because it can become tricky to distinguish obstacles appearing in front of them, and
they are not able to move from one place to another.
They depend on their families for mobility and financial support. Their mobility opposes them
from interacting with people and social activities. In the past, different systems are designed
with limitations without a solid understanding of the nonvisual perception. Researchers have
spent the decades to develop an intelligent and smart stick to assist and alert visually impaired
persons from obstacles and give information about their location. Over the last decades,
research has been conducted for new devices to design a good and reliable system for visually
impaired persons to detect obstacles and warn them at danger places.
Smart walking stick is specially designed to detect obstacles which may help the blind to
navigate care-free. The audio messages will keep the user alert and considerably reduce
accidents. A voice enabled automatic switching is also incorporated to help them in private
space as well. This system presents a concept to provide a smart electronic aid for blind people,
both in public and private space the proposed system contains the ultrasonic sensor, water
sensor, voice play back board, raspberry pi and speaker. The proposed system detects the
obstacle images which are present in outdoor and indoor with the help of a camera. The stick
measures the distance between the objects and smart walking stick by using an ultrasonic
sensor. When any objects or obstacles come in range of an ultrasonic sensor and it make buzzer
sound.
AIM
The actual aim of this project is to create a user-friendly aid for visually impaired individuals.
This stick will use Arduino to detect obstacles, provide kind of vibrational or haptic feedback,
and assist with navigation, increasing the independence and safety of the user.
APPARATUS
1. Arduino
Boarduno
2. Ultra Sonic
Sensor
3. B10 Buzzer
4. Jumper Wires
5. Led
6. Arduino
Software
7. Stick
BLOCK DIAGRAMS
PROCEDURE
Looking at the board from the top down, this is an outline of what you will see
(parts of the board you might interact with in the course of normal use are
highlighted):
Digital Pins:-
In addition to the specific functions listed below, the digital pins on an arduino board can be
usedforgeneralpurposeinputandoutputviathe pinmode(), digitalread(),and digitalwrite() comm
ands. Each pin has an internal pull-up resistor which can be turned on and off using
digitalwrite() (w/ a value of high or low, respectively) when the pin is configured as an input.
The maximum current per pin is 40 ma.
.serial: 0 (rx) and 1 (tx). Used to receive (rx) and transmit (tx) ttl serial data. On the arduino
diecimila, these pins are connected to the corresponding pins of the ftdi usb-to-ttl serial chip.
On the arduino bt, they are connected to the corresponding pins of the wt11 bluetooth module.
On the arduino mini and lilypad arduino, they are intended for use with an external ttl serial
module (e.g. The mini-usb adapter).
• External interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attachinterrupt() function for details.
• Pwm: 3, 5, 6, 9, 10, and 11. Provide 8-bit pwm output with the analogwrite() function. On
boards with an atmega8, pwm output is available only on pins 9, 10, and 11.
• Bt reset: 7. (arduino bt-only) connected to the reset line of the bluetooth module.
• Spi: 10 (ss), 11 (mosi), 12 (miso), 13 (sck). These pins support spi communication, which,
although provided by the underlying hardware, is not currently included in the arduino
language.
• Led: 13. On the diecimila and lilypad, there is a built-in led connected to digital pin 13. When
the pin is high value, the led is on, when the pin is low, it's off.
ANALOG PINS:-
In addition to the specific functions listed below, the analog input pins support 10-bit analog-
to-digital conversion (adc) using the analogread() function. Most of the analog inputs can also
be used as digital pins: analog input 0 as digital pin 14 through analog input 5 as digital pin
19. Analog inputs 6 and 7 (present on the mini and bt) cannot be used as digital pins.
• I2c: 4 (sda) and 5 (scl). Support i2c (twi) communication using the wire
library (documentation on the wiring website).
POWER PINS:-
• Vin (sometimes labelled "9v"). The input voltage to the arduino board when it's using an
external power source (as opposed to 5 volts from the usb connection or other regulated power
source). You can supply voltage through this pin, or, if supplying voltage via the power jack,
access it through this pin. Note that different boards accept different input voltages ranges,
please see the documentation for your board. Also note that the lilypad has no vin pin and
accepts only a regulated input.
• 5v. The regulated power supply used to power the microcontroller and other components on
the board. This can come either from vin via an on-board regulator, or be supplied by usb or
another regulated 5v supply.
• 3v3. (diecimila-only) a 3.3 volt supply generated by the on-board ftdi chip.
• Gnd. Ground pins.
OTHER PINS:-
• Aref. Reference voltage for the analog inputs. Not currently supported by the arduino software.
• Reset. (diecimila-only) bring this line low to reset the microcontroller. Typically used to add
areset button to shields which block the one on the board.
The text of the arduino getting started guide is licensed under a creative commons attribution-
sharealike 3.0 license. Code samples in the guide are released into the public domain.
Arduino board designs use a variety of microprocessors and controllers. The boards are
equipped with sets of digital and analog input/output (i/o) pins that may be interfaced to various
expansion boards ('shields') or breadboards (for prototyping) and other circuits. The boards
feature serial communications interfaces, including universal serial bus (usb) on some models,
which are also used for loading programs from personal computers. The microcontrollers can
be programmed using c and c++ programming languages. In addition to using traditional
compiler toolchains, the arduino project provides an integrated development environment (ide)
based on the processing language project.
The arduino project started in 2005 as a program for students at the interaction design institute
ivrea in ivrea, italy, aiming to provide a low-cost and easy way for novices and professionals
to create devices that interact with their environment using sensors and actuators. Common
examples of such devices intended for beginner hobbyists include simple
robots, thermostats and motion detectors.
The name arduino comes from a bar in ivrea, italy, where some of the founders of the project
used to meet. The bar was named after arduin of ivrea, who was the margrave of the march of
ivrea and king of italy from 1002 to 1014
APPLICATIONS:-
SOFTWARE:-
A program for arduino hardware may be written in any programming language with compilers
that produce binary machine code for the target processor. Atmel provides a development
environment for their 8-bit avr and 32-bit arm cortex-m based microcontrollers: avr studio
(older) and atmel studio (newer)
IDE:-
The arduino integrated development environment (ide) is a cross-platform application
(for windows, macos, and linux) that is written in the programming language java. It originated
from the ide for the languages processing and wiring. It includes a code editor with features
such as text cutting and pasting, searching and replacing text, automatic indenting, brace
matching, and syntax highlighting, and provides simple one- click mechanisms to
compile and upload programs to an arduino board. It also contains a message area, a text
console, a toolbar with buttons for common functions and a hierarchy of operation menus. The
source code for the ide is released under the gnu general public license, version 2.
The arduino ide supports the languages c and c++ using special rules of code structuring. The
arduino ide supplies a software library from the wiring project, which provides many common
input and output procedures. User-written code only requires two basic functions, for starting
the sketch and the main program loop, that are compiled and linked with a program stub main()
into an executable cyclic executive program with the gnu toolchain, also includedwith the ide
distribution. The arduino ide employs the program avrdude to convert the executable code into
a text file in hexadecimal encoding that is loaded into the arduino board by a loader program
in the board's firmware.
pro ide:-
The system still uses arduino cli (command line interface), but improvements include a more
professional development environment, autocompletion support, and git integration. the
application frontend is based on the eclipse theia open source ide. the main features available
in the alpharelease are:
SKETCH[EDITOR]:-
A sketch is a program written with the arduino ide sketches are saved on the development
computer as text files with the file extension .ino. Arduino software (ide) pre-1.0 saved sketches
with the extension .pde.
• Setup(): this function is called once when a sketch starts after power-up or reset. It is used
to initialize variables, input and output pin modes, and other libraries needed in the sketch.
It is analogous to the function main()
• Loop(): after setup() function exits (ends), the loop() function is executed repeatedly in the
main program. It controls the board until the board is powered off or is reset. It is analogous
to the function while(1)
blink example
power led (red) and user led (green) attached to pin 13 on an arduino compatible board
Most arduino boards contain a light-emitting diode (led) and a current limiting resistor
Connected between pin 13 and ground, which is a convenient feature for many tests and
program functions.[63] a typical program used by beginners, akin to hello, world!, is "blink",
which repeatedly blinks the on-board led integrated into the arduino board. This program uses
the functions pinmode(), digitalwrite(), and delay(), which are provided by the internal libraries
included in the ide environment. This program is usually loaded into a new arduino board by
the manufacturer.
void setup()
void loop()
LIBRARIES[EDIT]
The open-source nature of the arduino project has facilitated the publication of many free software libraries that
other developers use to augment their projects.
This is an Arduino Uno
The uno is one of the more popular boards in the arduino family and a great choice for
beginners. We'll talk about what's on it and what it can do later in the tutorial.
This is a screenshot of the Arduino IDE.
Believe it or not, those 10 lines of code are all you need to blink the on-board led on your
arduino. The code might not make perfect sense right now, but, after reading this tutorial and
the many more arduino tutorials waiting for you on our site, we'll get you up to speed in no
time!
Suggested reading
Arduino is a great tool for people of all skill levels. However, you will have a much better time
learning along side your arduino if you understand some basic fundamental electronics
beforehand. We recommend that you have at least a decent understanding of these concepts
before you dive in to the wonderful world of arduino.
Power (USB / Barrel Jack)
Every arduino board needs a way to be connected to a power source. The arduino uno can be
powered from a usb cable coming from your computer or a wall power supply (like this) that
is terminated in a barrel jack. In the picture above the usb connection is labeled (1) and the
barrel jack is labeled (2).
The usb connection is also how you will load code onto your arduino board. More on how to
program with arduino can be found in our installing and programming arduino tutorial.
Note: do not use a power supply greater than 20 volts as you will overpower (and thereby
destroy) your arduino. The recommended voltage for most arduino models is between 6 and
12 volts.
The pins on your arduino are the places where you connect wires to construct a circuit (probably
in conjuction with a breadboard and some wire. They usually have black plastic ‘headers’ that
allow you to just plug a wire right into the board. The arduino has several different kinds of
pins, each of which is labeled on the board and used for different functions.
• Gnd (3): short for ‘ground’. There are several gnd pins on the arduino, any of which
Can be used to ground your circuit.
• 5v (4) & 3.3v (5): as you might guess, the 5v pin supplies 5 volts of power, and the 3.3v
pin supplies 3.3 volts of power. Most of the simple components used with the arduino
run happily off of 5 or 3.3 volts.
• Analog (6): the area of pins under the ‘analog in’ label (a0 through a5 on the uno) are
analog in pins. These pins can read the signal from an analog sensor (like
a temperature sensor) and convert it into a digital value that we can read.
• Digital (7): across from the analog pins are the digital pins (0 through 13 on the uno).
These pins can be used for both digital input (like telling if a button is pushed) and
digital output (like powering an led).
• Pwm (8): you may have noticed the tilde (~) next to some of the digital pins (3, 5, 6,
9, 10, and 11 on the uno). These pins act as normal digital pins, but can also be used
for something called pulse-width modulation (pwm). We have a tutorial on pwm, but
for now, think of these pins as being able to simulate analog output (like fading an led
in and out).
• Aref (9): stands for analog reference. Most of the time you can leave this pin alone. It
is sometimes used to set an external reference voltage (between 0 and 5 volts) as the
upper limit for the analog input pins.
RESET BUTTON
Just like the original nintendo, the arduino has a reset button (10). Pushing it will temporarily
connect the reset pin to ground and restart any code that is loaded on the arduino. This can be
very useful if your code doesn’t repeat, but you want to test it multiple times. Unlike the original
nintendo however, blowing on the arduino doesn't usually fix any problems.
Just beneath and to the right of the word “uno” on your circuit board, there’s a tiny led next to
the word ‘on’ (11). This led should light up whenever you plug your arduino into a power
source. If this light doesn’t turn on, there’s a good chance something is wrong. Time to re-
check your circuit!
TX RX LEDS
Tx is short for transmit, rx is short for receive. These markings appear quite a bit in electronics
to indicate the pins responsible for serial communication. In our case, there are two places on
the arduino uno where tx and rx appear -- once by digital pins 0 and 1, and a second time next
to the tx and rx indicator leds (12). These leds will give us some nice visual indications
whenever our arduino is receiving or transmitting data (like when we’re loading a new program
onto the board).
MAIN IC
The black thing with all the metal legs is an ic, or integrated circuit (13). Think of it as the
brains of our arduino. The main ic on the arduino is slightly different from board type to board
type, but is usually from the atmega line of ic’s from the atmel company. This can be important,
as you may need to know the ic type (along with your board type) before loading up a new
program from the arduino software. This information can usually be found in writing on the top
side of the ic. If you want to know more about the difference between various ic's, reading the
datasheets is often a good idea.
VOLTAGE REGULATOR
The voltage regulator (14) is not actually something you can (or should) interact with on the
arduino. But it is potentially useful to know that it is there and what it’s for. The voltage
regulator does exactly what it says -- it controls the amount of voltage that is let into the arduino
board. Think of it as a kind of gatekeeper; it will turn away an extra voltage that might harm the
circuit. Of course, it has its limits, so don’t hook up your arduino to anything greater than 20
volts.
Arduino makes several different boards, each with different capabilities. In addition, part of
being open source hardware means that others can modify and produce derivatives of arduino
boards that provide even more form factors and functionality. If you’re not sure which one is
right for your project, check this guide for some helpful hints. Here are a few options that are
well-suited to someone new to the world of arduino:
The uno is a great choice for your first arduino. It's got everything you need to get started, and
nothing you don't. It has 14 digital input/output pins (of which 6 can be used as pwm outputs),
6 analog inputs, a usb connection, a power jack, a reset button and more. It contains everything
needed to support the microcontroller; simply connect it to a computer with a usb cable or
power it with a ac-to-dc adapter or battery to get started.
LILYPAD ARDUINO
This is lilypad arduino main board! Lilypad is a wearable e-textile technology developed
by leah buechley and cooperatively designed by leah and sparkfun. Each lilypad was creatively
designed with large connecting pads and a flat back to allow them to be sewn into clothing with
conductive thread. The lilypad also has its own family of input, output, power, and sensor
boards that are also built specifically for e-textiles. They're even washable!
ARDUINO MEGA (R3)
The arduino mega is like the uno's big brother. It has lots (54!) Of digital input/output pins (14
can be used as pwm outputs), 16 analog inputs, a usb connection, a power jack, and a reset
button. It contains everything needed to support the microcontroller; simply connect it to a
computer with a usb cable or power it with a ac-to-dc adapter or battery to get started. The large
number of pins make this board very handy for projects that require a bunch of digital inputs
or outputs (like lots of leds or buttons).
The extended family
While your arduino board sure is pretty, it can't do a whole lot on its own -- you've got to hook
it up to something. There are lots of tutorials here on learn as well as the links back in the 'what
does it do' section, but rarely do we talk about the general kinds of things you can easily hook
into. In this section we'll introduce basic sensors as well as arduino shields, two of the most
handy tools to use in bringing your projects to life.
sensors
With some simple code, the arduino can control and interact with awidevarietyof
sensors thingsthatcanmeasure light, temperature, degreeofflex, pressure, proxi mity,
acceleration, carbon monoxide, radioactivity, humidity, barometric pressure, you name it, you
can sense it!
HC-SR04 Ultrasonic Sensor
3 ECHO ECHO PIN IS AN OUTPUT PIN. THIS PIN GOES HIGH FOR
A PERIOD OF TIME WHICH WILL BE EQUAL TO THE TIME
TAKEN FOR THE US WAVE TO RETURN BACK TO THE
SENSOR.
Us transmitter receiver pair, ir sensor module, ir sensor pair, ir analog distance sensor,
As shown above the hc-sr04 ultrasonic (us) sensor is a 4 pin module, whose pin names are
vcc, trigger, echo and ground respectively. This sensor is a very popular sensor used in many
applications where measuring distance or sensing objects are required. The module has two
eyes like projects in the front which forms the ultrasonic transmitter and receiver. The sensor
works with the simple high school formula that
the ultrasonic transmitter transmits an ultrasonic wave, this wave travels in air and when it gets
objected by any material it gets reflected back toward the sensor this reflected wave is observed
by the ultrasonic receiver module as shown in the picture below
Now, to calculate the distance using the above formulae, we should know the speed and time.
Since we are using the ultrasonic wave we know the universal speed of us wave at room
conditions which is 330m/s. The circuitry inbuilt on the module will calculate the time taken
for the us wave to come back and turns on the echo pin high for that same particular amount of
time, this way we can also know the time taken. Now simply calculate the distance using a
microcontroller or microprocessor.
How to use the hc-sr04 ultrasonic sensor
Hc-sr04 distance sensor is commonly used with both microcontroller and microprocessor
platforms like arduino, arm, pic, raspberry pie etc. The following guide is universally since it
has to be followed irrespective of the type of computational device used.
Power the sensor using a regulated +5v through the vcc ad ground pins of the sensor. The
current consumed by the sensor is less than 15ma and hence can be directly powered by the
on board 5v pins (if available). The trigger and the echo pins are both i/o pins and hence they
can be connected to i/o pins of the microcontroller. To start the measurement, the trigger pin
has to be made high for 10us and then turned off. This action will trigger an ultrasonic wave at
frequency of 40hz from the transmitter and the receiver will wait for the wave to return. Once
the wave is returned after it getting reflected by any object the echo pin goes high for a
particular amount of time which will be equal to the time taken for the wave to return back to
the sensor.
The amount of time during which the echo pin stays high is measured by the mcu/mpu as it
gives the information about the time taken for the wave to return back to the sensor. Using this
information the distance is measured as explained in the above heading.
APPLICATIONS
• Used to avoid and detect obstacles with robots like biped robot, obstacle avoider robot,
pathfinding robot etc.
• Used to measure the distance within a wide range of 2cm to 400cm
• Can be used to map the objects surrounding the sensor by rotating it
• Depth of certain places like wells, pits etc can be measured since the waves can
penetratethrough water
2D MODEL OF THE COMPONENT
B 10 BUZZER
A small buzzer is a common feature in electronic products and can provide an effective way
of interacting with users or raising an alarm.
Depending on the type and strength of the signals available to drive the buzzer, the physical
space available, and the required audio sound pressure level (spl), a magnetic or piezoelectric
type will be the most common options for your application.
One also has the choice between an indicator or transducer design. Indicators have built-in
drive circuitry and are easy to design-in but can produce only a single, continuous tone or
pulsed output. On the other hand, transducers can produce more complex sounds but need you
to provide an excitation waveform and external components for switching and amplification.
This cui insights blog guides you through “buzzer basics”, including the different types of
buzzers, their features, and associated design challenges, to help you choose the most suitable
type for your application.
JUMPER WIRES
Jumper wires are used for making connections between items on your breadboard and your
Arduino’s header pins. Use them to wire up all your circuits!
newark.USB CABLE
9V BATTERY
Use a 9v battery with your arduino projects to provide a higher-current power supply for things
like motors. You can also feed 9v power into your arduino’s dc barrel jack using 9v battery clip
with a jack to get a regulated 5v from the internal regulator.
9V BATTERY CLIP
Buy a 9v battery clip with a barrel jack connector from amazon, adafruit or sparkfun. Buy
a 9v battery clip with leads from newark.
RED LED
An average 5mm red led has a 2v forward voltage drop, and a forward current of 20ma. Don’t
Forget to use a current-limiting resistor when you connect an led to your arduino!
// DEFINES VARIABLES
LONG DURATION;
INT DISTANCE;
INT SAFETYDISTANCE;
VOID SETUP() {
PINMODE(TRIGPIN, OUTPUT); // SETS THE TRIGPIN AS AN OUTPUT
PINMODE(ECHOPIN, INPUT); // SETS THE ECHOPIN AS AN INPUT
PINMODE(BUZZER, OUTPUT);
PINMODE(LEDPIN, OUTPUT);
SERIAL.BEGIN(9600); // STARTS THE SERIAL COMMUNICATION
VOID LOOP() {
// CLEARS THE TRIGPIN
DIGITALWRITE(TRIGPIN, LOW);
DELAYMICROSECONDS(2);
SAFETYDISTANCE = DISTANCE;
IF (SAFETYDISTANCE <= 20){
DIGITALWRITE(BUZZER, HIGH);
DIGITALWRITE(LEDPIN, HIGH);
}
ELSE{
DIGITALWRITE(BUZZER, LOW);
DIGITALWRITE(LEDPIN, LOW);
}
}
CONNECTIONS
ULTRA SONIC SENSOR CONNECTION WITH AURDINO
1. Vcc 5v pin
The smart walking stick, constructed with at most accuracy, will help the blind people to move
from one place to another without others help. This could also be considered a crude way of
giving the blind a sense of vision. This stick reduces the dependency of visually impaired
people on other family members, friends and guide dogs while walking around. The proposed
combination of various working units makes a real-time system that monitors position of the
user and provides dual. The smart stick detects objects or obstacles in front of users and feeds
warning back, in the form of voice making rather than vibration. Also the incorporation of
automatic room equipment switching in the stick will be useful while they are indoor. The
advantage of the system lies in the fact that it can prove to be a low cost solution to millions of
blind person worldwide.