Faculty Home - Universiti Teknologi Malaysia

Transcription

Faculty Home - Universiti Teknologi Malaysia
PSZ 19:16 (Pind. 1/07)
UNIVERSITI TEKNOLOGI MALAYSIA
DECLARATION OF THESIS / UNDERGRADUATE PROJECT PAPER AND COPYRIGHT
Author’s full name :
LIYANA BT RAMLI
Date of birth
:
2 AUGUST 1988
Title
:
DEVELOPMENT OF AN ELECTRONIC WALKING STICK
FOR THE VISUALLY IMPAIRED WITH Z-AXIS DETECTION
Academic Session:
2010/2011
I declare that this thesis is classified as :
√
CONFIDENTIAL
(Contains confidential information under the Official Secret
Act 1972)*
RESTRICTED
(Contains restricted information as specified by the
organization where research was done)*
OPEN ACCESS
I agree that my thesis to be published as online open access
(full text)
I acknowledged that Universiti Teknologi Malaysia reserves the right as follows :
1. The thesis is the property of Universiti Teknologi Malaysia.
2. The Library of Universiti Teknologi Malaysia has the right to make copies for the purpose
of research only.
3. The Library has the right to make copies of the thesis for academic exchange.
Certified by :
SIGNATURE
880802-56-5360
(NEW IC NO. /PASSPORT NO.)
nd
Date : 2
NOTES :
*
June 2011
SIGNATURE OF SUPERVISOR
Miss Mitra bt Mohd Addi
NAME OF SUPERVISOR
nd
Date : 2
June 2011
If the thesis is CONFIDENTIAL or RESTRICTED, please attach with the letter from
the organisation with period and reasons for confidentiality or restriction.
“I hereby declare that I have read this thesis and in my opinion this thesis is sufficient in
terms of scope and quality for the award of the degree of Bachelor of Electrical
Engineering (Electronic)”
Signature
: ………………………..
Name of Supervisor
: Miss Mitra bt Mohd Addi
Date
: 2nd June 2011
DEVELOPMENT OF AN ELECTRONIC WALKING STICK FOR THE VISUALLY
IMPAIRED WITH Z-AXIS DETECTION
LIYANA BT RAMLI
A thesis submitted in fulfillment of the
requirements for the award of the degree of
Bachelor of Electrical Engineering (Electronic)
Faculty of Electrical Engineering
Universiti Teknologi Malaysia
JUNE 2011
ii
I declare that this thesis entitled “Development of an Electronic Walking Stick for the
Visually Impaired with Z-axis Detection” is the result of my own research except as
cited in the references. The thesis has not been accepted for any degree and is not
concurrently submitted in candidature of any other degree.
Signature
: ……………………………..
Author‟s Name
: LIYANA BT RAMLI
Date
: 1st May 2011
iii
Specially dedicated to my beloved family and soul mate,
for their encouragement
iv
ACKNOWLEDGEMENT
First and foremost, I would like to express my heartily gratitude to my
supervisor, Miss Mitra bt Mohd Addi for the guidance and enthusiasm given throughout
the whole process of this project. In addition, I would also like to thank Dr Fauzan
Khairi bin Che Wan for lending a helping hand to provide relevant information and
guidance.
My appreciation also goes to my family members who has been tolerant and
supporting me all these months in accomplishing my final year project. Thanks for their
encouragement, loves and emotional support that they had gave to me.
Nevertheless, my great appreciation dedicated to my special friend, Noor Hanis
Izzuddin b Mat Lazim for helping me a lot in accomplishing this project especially
during my hard time of task solving. In fact, I would also like to express my gratitude to
my SEL members and all my friends who have involved directly or indirectly in my
project. Overall, thanks a lot to all of you.
v
ABSTRACT
Blindness can be generally described as the lack of visual perception. There are
many factors that contribute to the development of blindness, such as smoking, obesity,
genetic, cancer and other serious illnesses. For years, the invention of a simple „white‟
walking stick has been helpful for the blinds in assisting their movements throughout
their daily activities. Although the basic walking stick is able to protect the blinds from
danger, there are still several weaknesses that can be improved to make the design
better. One of the weaknesses on the design is that, it is only able to detect obstacles that
are within the range of the stick‟s length, when being hit by the walking stick. The main
purpose of this project is to develop an electronic walking stick for the visually impaired
with additional Z-axis detection. The additional Z-axis detection feature is essential in
helping the blinds to detect obstacles in the Z-axis (holes and stair steps). The electronic
walking stick has two similar type distance sensors to detect obstacles in the X-axis and
Z-axis. By using a microcontroller, different outputs are programmed for different range
of distances between the user and the obstacles. The walking stick will produce an alarm
sound to warn the user when facing with any obstacles in the X-axis direction.
Additional to that, the stick will vibrate when facing with any obstacles such as holes or
stair steps in the Z-axis direction.
vi
ABSTRAK
Buta, secara amnya boleh didefinasikan sebagai kurangnya persepsi visual.
Terdapat banyak faktor yang boleh menyumbang kepada kebutaan, seperti merokok,
obesiti, genetik, kanser dan penyakit serius yang lain.. Bertahun-tahun, rekaan tongkat
putih yang ringkas telah membantu pergerakan mereka yang buta dalam menjalani
aktiviti harian. Walaupun innovasi ini dapat melindungi mereka daripada bahaya, masih
terdapat beberapa kelemahan yang boleh diperbaiki untuk meningkatkan rekacipta ini.
Salah satu daripada kelemahannya ialah halangan hanya dapat dikesan oleh pengguna
apabila disentuh dengan hujung tongkat dan terhad kepada panjang tongkat sahaja.
Tujuan utama projek ini dilaksanakan adalah untuk menambah baik ciri yang terdapat
pada tongkat elektronik untuk orang buta dengan tambahan pengesanan pada paksi-Z.
Ciri-ciri pengesanan pada paksi-Z sangat penting dalam membantu orang buta untuk
mengesan halangan seperti lubang dan tangga. Tongkat elektronik ini mempunyai dua
sensor jarak yang serupa untuk mengesan sebarang halangan pada paksi-X dan paksi-Z.
Dengan menggunakan mikro pegawal, keluaran yang berbeza diprogramkan untuk julat
jarak yang berbeza antara pengguna dan halangan. Tongkat elektronik orang buta ini
akan menghasilkan penggera suara untuk memberi amaran kepada pengguna sekiranya
terdapat halangan dari arah paksi-X. Pengguna juga akan merasakan getaran sekiranya
terdapat halangan seperti lubang atau tangga dari arah paksi-Z.
vii
TABLE OF CONTENTS
CHAPTER
1
TITLE
PAGE
DECLARATION OF THESIS
ii
DEDICATION
iii
ACKNOWLEDGEMENT
iv
ABSTRACT
v
ABSTRAK
vi
TABLE OF CONTENTS
vii
LIST OF TABLES
x
LIST OF FIGURES
xi
LIST OF SYMBOLS AND ABBREVIATIONS
xiii
LIST OF APPENDICES
xiv
INTRODUCTION
1
1.1
Background of Project
1
1.2
Problem Statement
2
1.3
Objectives
3
1.4
Scope
3
1.5
Summary of Work
3
1.6
Thesis Organization
4
viii
2
THEORY AND LITERATURE REVIEW
6
2.1
An Application of Infrared Sensor
6
2.1.1
Working Principle
7
2.1.2
Characteristic of Infrared Sensor
7
2.1.3
Hardware Part
9
2.1.4
Software Part
10
2.2
An Application of Micro-magnetic Sensor
11
Guidance System
2.3
2.4
2.5
2.6
2.2.1
Basic Concept
11
2.2.2
Working Principle
12
An Application of radio frequency signal
13
2.3.1
Basic Concept
14
2.3.2
Working Principle
14
2.3.3
Indicator
15
Microcontroller
15
2.4.1
16
PIC Microcontroller
An Ultrasonic Ranging System for the Blind
16
2.5.1
17
Material and method
Application of a Blind Person Strategy for Obstacle
19
Avoidance with the use of Potential Field.
3
2.6.1 The CONTROLAB AGV architecture
19
2.6.2 Main Features
21
METHODOLOGY
22
3.1
Basic Construction
22
3.2
Project Overview
23
3.3
Electrical Design
24
3.3.1
Microcontroller Design
25
3.3.2
Motor Driver
27
3.3.3
Power Supply
29
3.3.4
Proximity Sensor
29
ix
3.3.5
3.4
Indicator
31
Software Development
33
3.4.1
33
MicroC for Peripheral Interface
Controller (PIC)
3.4.2
Declaration of the Analog Digital
34
Converter (ADC) Value for the Sensor.
4
5
Controlling the Motor Driver
34
3.4.4
Programming the Sensor
35
3.4.5
Debugger Device
36
3.4.6
The Schematic Circuit
37
RESULTS AND DISCUSSION
38
4.1
Infrared Sensor Characteristic
38
4.2
Sensor Detection Analysis
41
4.2.1
X-axis Analysis
41
4.2.2
Z-axis Analysis
43√
4.3
Logic Algorithm
45
4.4
Electronic Walking Stick
46
CONCLUSION AND RECOMMENDATIONS
49
5.1
Conclusion
49
5.2
Recommendations
50
REFERENCES
Appendices
3.4.3
A-J
52
53 – 81
x
LIST OF TABLES
TABLE NO.
TITLE
PAGE
4.1
Description of X-axis Detection
42
4.2
Description of Z-axis Detection
44
xi
LIST OF FIGURES
FIGURE NO.
TITLE
PAGE
1.1
Gantt Chart Project
4
2.1
GP2D12 sensors [1]
8
2.2
Block Diagram of the Components
9
2.3
Flowchart of the Software Component
10
2.4
Block Diagram of the Overall Operation
12
2.5
Flowchart of the Working Principle
13
2.6
Block Diagram of the Transmission
14
2.7
Digital Detection Mode Circuitry [4]
17
2.8
Circuitry Schematic of AD654 Connections
18
2.9
Basic Operation of the CONTROLAB AGV [5]
20
2.10
Block diagram of the CONTROLAB AGV [5]
20
3.1
PVC Material
23
3.2
Project Block Diagram
23
3.3
Overall View Inside the Main Box of the Project
25
3.4
Microcontroller Pin Diagram
25
3.5
Microcontroller Chip
26
3.6
ICSP PIC Programmer
27
3.7
Motor Driver
27
3.8
Motor Driver Circuit Connection
28
3.9
Battery
29
3.10
GP2Y0A02YK0F Sensor
30
xii
3.11
Characteristic Graph of the Sensor
39
3.12
Buzzer
31
3.13
Vibrator
32
3.14
Overview of MicroC Compiler
33
3.15
Complete ADC code for two sensors
34
3.16
Coding for PWM
35
3.17
Coding For Sensor
35
3.18
Overview of Debugger Device
36
4.1
Characteristic Curve (Datasheet)
39
4.2
Characteristic Curve (Experimental)
39
4.3
Offset range for both sensors
40
4.4
Analysis for X-axis range detection
41
4.5
Analysis for Z-axis range detection
43
4.6
Logic Algorithm
45
4.7
Top View
46
4.8
Bottom View
47
4.9
Full Image View
48
xiii
LIST OF SYMBOLS AND ABBREVIATIONS
PWM
-
Pulse Code Modulation
ADC
-
Analog Digital Converter
V
-
Voltage
A
-
Ampere
m
-
Meter
xiv
LIST OF APPENDICES
APPENDIX
TITLE
PAGE
A
Power Supply Circuit
53
B
Microcontroller Schematic
54
C
Sensor Interface Circuit
55
D
Connection of Debugger Circuit
56
E
Buzzer Interface Circuit
57
F
Motor Driver and Vibrator Circuit
58
G
Features of Microcontroller
59
H
Source Code
60
I
Data Sheet of Proximity Sensor
63
J
Data Sheet of Motor Driver
71
15
1
CHAPTER 1
INTRODUCTION
This chapter describes the background of the project, the problem
statement of the project, objectives of the overall project and scope which are
related to the development of an electronic walking stick for the blind.
1.1
Background of Project
The most common difficulties faced by the blind are their movement in
their daily activities. Throughout the years, many researchers have been conducted
in designing and developing tools that may protect the visually impaired from
danger. The most common tool used by the blind to aid their movement is ‘the
white’ walking stick which is used especially when they are moving around
outdoor. The development of electronic walking stick is one of the emerging
2
innovations in rehabilitation engineering that helps blind people to move around
more easily and comfortably.
There are many researches related to the development of electronic
walking sticks which uses different design implementation such as radio signal,
magnetic induction and infrared sensor detection for various applications.
1.2
Problem Statement
The current available solution to overcome difficulties in movement for
the blinds is the use of the basic ‘white’ walking stick which actually helps them to
detect obstacles around them and prevents them from danger.
The current ‘white’ walking stick is designed to be light and handy with a
length of 100cm long. The material used for the walking stick is usually made of
aluminum or wood. Despite that it is able to help the blinds to detect obstacles, the
current ‘white’ walking stick can only detect objects which are within its length
when it touches the end of the stick and this limits the function of the stick.
3
1.3
Objectives
The objective of this project is to develop an electronic walking stick for
the visually impaired with additional Z-axis detection. The walking stick will be
able to detect different distances between the user and the obstacles for up to 150cm
long. The electronic walking stick will produce a beeping alarm sound to warn the
user when facing with any obstacles in the X-axis direction and produce vibration
when there are obstacles in the Z-axis direction.
1.4
Scope
There are 2 major parts that must fulfill the design specification of the
project which involves the hardware and software part. The hardware part consists
of the electronic walking stick itself, the microcontroller, two proximity sensors, a
vibrator, a buzzer and a motor driver. The software that will be used to program the
microcontroller is Micro-C. The software part also includes the programming of the
sensor and the algorithm development of the system.
1.5
Summary of Work
The Figure 1.1 and Figure 1.2 show the summary of work of the
overall project.
4
Figure 1.1
1.6
Gantt Chart Project
Thesis Organization
The first chapter introduces about the project briefly. This chapter
describes the background of the project, the problem statement, objectives and the
5
scope of the overall project which are related to the development of the electronic
walking stick for the blind. The second chapter discusses on the researches linked to
related fields of the project which are mainly about the different design
implementation of the electronic walking stick, PIC18F452 microcontroller and the
sensor used in the projects.
Chapter 3 is explains on the methodology of the project which involves
programming of the PIC 18F452 using MicroC, the characteristic of the proximity
sensor, the function of motor driver and the overall construction of the electronic
walking stick. Chapter 4 presents the results obtained from the project and some of
the discussions of the results. Lastly, Chapter 5 concludes all of the findings and
highlights some recommendations for future developments.
6
CHAPTER 2
LITERATURE REVIEW
This chapter summarizes the researches that has been carried out
from related fields of the project which involves the study of various types of
sensors, the chosen indicator and the overall working system of the related projects.
2.1
Application of Infrared Sensor in Electronic Walking Stick
Innet and Ritnoom [1] have proposed the application of infrared sensor in
an electronic walking stick to detect the obstacles. The overall project is discussed
as below.
7
2.1.1
Working Principle
The basic concept of the project is to measure the distance between the
obstacles and the blind, in order to warn them when facing with any dangerous
circumstances. The sensor enables the user to detect obstacles within specific ranges
with a distance that is approximately equal to the length of the ‘white’ stick.
The infrared sensor works by transmitting and receiving signals that is
within the infrared wavelength. When there is an obstacle, the receiver from the
sensor returns an IR value which indicates the distance between the user and the
obstacles. The IR value will be sent to the microcontroller to be processed which
gives an output in the form of a voltage value. If the value of the output voltage is
within the range that is set to be in the ‘dangerous’ zone, it will cause the indicator
to vibrate and warn the user.
2.1.2
Characteristic of Infrared Sensor
Infrared and ultrasonic sensors are examples of sensors that are suitable to
be implemented in electronic walking sticks. However, infrared sensors are better
compared to ultrasonic sensors in terms of size, weight, and energy consumption.
The sensor model of the infrared used in this project is GP2D12 (manufactured by
SHARP). The sensor is able to track obstacles continuously within a specific range
of distance, precisely and reliably.
8
. The interface of the sensor consists of 3 components, which includes the
power terminal, the ground terminal and the output voltage terminal. The output
produces an analog voltage signal which is proportional to the distance. The current
consumption for the sensor is about 10mA and the power needed to turn it on is 5V.
In normal conditions, the sensor is able to detect obstacles frequently, once
in every 250ms. It is also able to operate at a faster frequency; 1 second
continuously. The distance range specification is 10cm - 80cm and it is very
sensitive in tracking obstacles. The sensor is very light which makes it easier to be
implemented in the circuit. Figure 2.1 shows the GP2D12 infrared distance sensor
Figure 2.1
GP2D12 Sensor [1]
9
2.1.3
Hardware Part
There are five main components in the system which includes an infrared
sensor module, an Analog to Digital (A/D) converter, a microcontroller, an IC
driver and an alarm (with motor).
Figure 2.2
Block Diagram of the Components
Referring to Figure 2.2, the signal received from the receiver of the sensor will be sent
to the A/D converter. The microcontroller will examine the propagation time of
reflected signal by the sensor and determine the distance between the sensor and the
obstacles. The IC driver is very important as it works to drive the alarm when the
microcontroller had sent the output signal, depending on the target value of the
distance range.
10
2.1.4
Software Component
The software part of the system must be set correctly in order to ensure the
overall system is working successfully. The signal received from the sensor is in the
form of an analogue and the voltage is corresponds to a specific distance. The alarm
will operate depending on the voltage value set by the user. Figure 2.3 illustrates the
flowchart of the project
Figure 2.3
Flowchart of the Software Component
11
2.2
Application of Micro-magnetic Sensor in a Guidance System
Liang Hu, Wen-zhong, Renlong Song, Chao Gao and Xin Li [2] has
proposed the application of magnetic sensor in a guidance system for the blind. The
purpose of using a walking stick is for the blind to move more comfortably.
However, it is still not able to guide them correctly especially when there are
outdoors. Based on this project, the blind people can easily know their directions
with the help of the alarm produced by the walking stick.
2.2.1
Basic Concept
Nowadays, blind pathways are made for the blinds from special floor tiling
to help and guide them walk on the right and secured direction. The important
concept of the project is the characteristic of magnetic intensity. Magnetic markers
are located along the pathway and a geomagnetic sensor which is placed inside the
walking stick is used as a detector of the magnetic signal.
One disadvantage of the project is that it is not able to be implemented
widely as not all places provide the blind pathway facility especially in
underdeveloped area. However, the main focus of the project is the strategy to
embed magnetic markers on suitable pathways for the geomagnetic sensors to easily
detect magnetic signals. The block diagram of the project is shown as in Figure 2.4
below
12
Figure 2.4
2.2.2
Block Diagram of the Overall Operation
Working Principle
The hardware design of the innovation includes a geomagnetic sensor,
magnetic markers, and a sound module. The operation of the system is determined
by the set threshold voltage which decreases as the distance between the magnetic
markers and the sensor increases. Any value that is below the threshold voltage will
cause the alarm to be activated which indicates that the user is on the wrong
direction. As the voltage value decreases, a louder alarm sound is produced. The
flowchart of the system is shown as in Figure 2.5 below:
13
Figure 2.5
2.3
Flowchart of the Working Principle
Application of radio frequency signal in Electronic Guided Walking
Stick.
The application of radio frequency signal to be implemented in an
Electronic Guided Walking Stick was proposed by Niranjan Debnath, Zul Azizi
Hailani, Sakinah Jamaludin and Syed Abdul Kader Aljunid [3].
14
2.3.1
Basic Concept
The project has been designed to be conveniently used inside closed
premises applied in especially in homes As we know, radio frequency signal
indicates various carrier frequencies. In this project, an antenna is used as a device
to detect the radio frequency signals. Each frequency determines a different area to
be taken by the blind people. In this project, an antenna is used as a device to detect
the radio frequency signals.
2.3.2
Working Principle
The block diagram of the system is described as in Figure 2.6 below. For
example, a closed area, such as a home is divided into 3 different rooms with each
room having a different carrier frequency.
Figure 2.6
Block Diagram of the Transmission
15
A transmitter will be placed at every location from the user’s room to all
the other of rooms in the closed premise. The carrier frequency in each room will be
transmitted through the antenna and the modulated signal of the carrier frequency
will be received by the receiver which is located in the walking stick. The Type of
frequency received by the receiver can be either in AM or FM. User can freely
move to their desired room comfortably by pressing the button on the walking stick.
The button indicates different carrier frequencies of each room that can be tuned by
the receiver.
2.3.3
Indicator
The output is an audio signal which guides the user to the desired
destination. Instead of using a speaker as an output, earphones are better output
options as less power is needed to implement it.
2.4
Microcontroller
Microcontroller is a small processing unit on a single integrated circuit that
consists of a processor core, memory and programmable input/output peripherals
designed for embedded system applications. An embedded system is a very
sophisticated system that requires minimal memory and program length, no
operating system and less software complexity.
16
2.4.1
PIC Microcontroller
PIC stands for Programmable Interface Controller, originally developed by
General Instrument’s Microelectronic Division. It is widely used in both industrial
and personal purposes due to its low cost, wide availability and serial programming
capability. PIC need to be programmed in order to operate the designed function.
Some of the softwares that can be used for PIC programming are MikroC, MPlab
and ICSP.
PIC microcontroller has many families that are categorized based on its
functions, abilities and features. The PIC 18 series is a popular PIC microcontroller
with many applications and manufactures. Its features include high pin count, high
density and complex applications.
2.5
An Ultrasonic Ranging System for the Blind
The main part of the implementation is the ultrasonic sensor which is used
to expand the environmental detection range for blind people [4]. The model used
for the sensor is Sona Switch 1700which consist of a solid state switch inside it and
produces a DC output voltage proportional to the distance measured.
17
Figure 2.7
2.5.1
Digital Detection Mode Circuitry [4]
Materials and Methods
The components for the project includes an ultrasonic sensor, an AD654
Monolithic Voltage-to-Frequency Converter, two small headphone speakers, a
helmet, a 15Vpower source, two plastic boxes, breadboard, resistors, capacitors, and
minor circuitry.
18
Figure 2.8
Circuitry Schematic of AD654 Connections
In order to determine the distance between the user and the obstacles, the
sensor uses a pulse of ultrasonic waves. The DC voltage output ranges
linearly
from 5V (for objects detected at 1.5feet or less) to 0V (for objects detected at 12feet
or more). The sensor is connected to the AD654 Monolithic Voltage-to-Frequency
Converter which consists of an input amplifier, a precision oscillator system, and a
high current output stage. The AD654 converts the DC voltage from the sensor into
an AC square wave frequency which is connected to two small headphone speakers.
The output of the speaker will be an audible frequency of chirps that varied
proportionally with changes in object detection distance.
19
2.6
Application of a Blind Person Strategy for Obstacle Avoidance with the
use of Potential Field.
The project proposed an obstacle avoidance algorithm for the
CONTROLAB AGV to help the blind people while walking [5]. The
implementation of the project is within an office environment which requires floor
plan and an electronic walking stick with infrared sensor. The floor plan indicates a
global potential field functions and the destination of the user will be sent to the
AGV via wireless communication connected to the internet.
The AGV starts to move according to the global planning which is referred
to the floor plan planning that the AGV uses to arrive at the desired room. Before it
starts to move, the sensor will detect the obstacles, and the potential field is
calculated and modified each time based on the sensor detection.
2.6.1
The CONTROLAB AGV architecture
The AGV is a triangle cycle with cylindrical body. The station that is
connected by the internet manages the instruction of the movement within the office
environment.
20
Figure 2.9
Basic Operation of the CONTROLAB AGV [5]
The CONTROLAB AGV consists of hardware and software such as
Autonomous Guided Vehicle, Control System, Client/Server Subsystem, Architect,
and Trajectory Planner.
Figure 2.10
Block diagram of the CONTROLAB AGV [5]
Autonomous Guided Vehicle is a moving robot which consists of radio
transceiver and infrared sensors. In order to store and process the information, it
requires hardware and software resources. In AGV movement, a control system
manages the command direction and speed. All instructions from the clients are
received by the internet and uses wireless communication, which is called
21
Client/Server Subsystem. Once upon receiving the signal from the client, the floor
plan description will automatically monitor the AGV and starts to move.
Architect is an object oriented software tool, which edits the floor plan to
be sent to the AGV. The trajectory planner is an on board software module which
establish the trajectory to be used or followed by the AGV from the initial point to
the desired point. It is divided into two parts consisting of global trajectory planner
and detailed local planner.
2.6.2
Main Features
The main features of the proposed mobile robot are as follows:
i.
Requires very low computational load.
ii.
Recommended to be used to avoid the obstacles faced by the blind.
iii.
Low sensor cost.
iv.
Free from local minima.
The robot is able to avoid collisions with obstacles while walking.
Initially, the project demonstrates the ability of the robot to detect and recognize the
position of the obstacles and not move frequently within the environment.
22
CHAPTER 3
RESEARCH METHODOLOGY
This chapter discusses about the overall project implementations
throughout two semesters. It consists of four parts, which includes the general
construction, project overview, electrical design and software development.
3.1
Basic Construction and Material Selection
The material chosen to construct the electronic walking stick is polyvinyl
chloride (PVC). The advantages of choosing PVC are due to several factors which
are durable and easy to maintain. Figure 3.1 shows the PVC material to be used in
constructing the electronic walking stick. The electronic walking stick is made to be
100cm in length which is suitable with the average human’s height.
23
Figure 3.1
3.2
PVC Material
Project Overview
Figure 3.2
Project Block Diagram
24
Figure 3.2 illustrates the block diagram of the overall system. The system
has two sensors which operate simultaneously to detect obstacles in the X-axis and
Z-axis direction. The sensors detect the obstacle and determine the distance between
the user and the obstacle. The output of the sensor’s receiver which is an analogue
signal will be sent to the microcontroller.
The microcontroller receives thesignals from the sensors through its
analog ports and processes them. If the signal is within the set distance range which
in dangerous condition to the blind, the microcontroller will activate the indicators.
There are two indicators used in this project which includes a vibrator and a buzzer.
The indicator for detecting obstacles in the X-axis is the buzzer, while the indicator
for y-axis detection is the vibrator. The function of motor driver is to provide
enough current to the vibrator for it to operate well.
3.3
Electrical Design
The electrical design of the whole system consists of six main parts which
includes the proximity sensors, power supply, the microcontroller design, the motor
driver and indicators, as shown in Figure 3.3.
25
Microcontroller
Buzzer
Vibrator
Motor Driver
Figure 3.3
3.3.1
Inside views of the Main Circuit Box
Microcontroller Design
Figure 3.4
Microcontroller Pin Diagram
26
The brain of the whole system is the microcontroller where most of the
processing is done here. The type of microcontroller used to control the electronic
walking stick is PIC16F877A, as illustrated in figure 3.5. It contains 256 bytes of
EEPROM data memory and has 33 pins of input and output ports. The detail
features of the microcontroller are as in Appendix H.
Figure 3.5
Microcontroller Chip
The microcontroller receives signals from the sensors which can either be
in analog or digital. In this project, the sensors output are analog, thus the signal
must be converted into digital using the Analog-Digital-Converter (ADC) before be
into be g processed further. The signal is used by the microcontroller to execute
instructions which are programmed in the software.
In Circuit Serial Programming (ICSP), PIC programmer is used to ‘burn’
the coding into the microcontroller. On board ICSP connector offers flexible
methods to load a program. It is very convenient as the USB port is commonly
available and widely used on laptops and PC desktops. Besides that, it offers
reliable, high speed programming and free windows interface software.
27
Figure 3.6
3.3.2
ICSP PIC Programmer
Motor Driver
The motor driver, which is a 4 Channel Push-Pull Driver (L293B) is used
to provide current isolation between the microcontroller and vibrator. The motor
driver drives the vibrator according to the amount of current supplied.
Figure 3.7
Motor driver
28
The motor driver (Figure 3.7) has an output current of 1A per channel and
a peak output current of 2A per channel. In order to have a low dissipation, a
separate supply input with 4 transistors is provided for the logic to ensure that it
may be run off a lower voltage. Figure 3.8 shows the schematic diagram of the
motor drive circuit. The output from the microcontroller is connected to the input of
the motor driver. The motor driver provides the current isolation to the vibrator to
ensure it will operate smoothly according to the voltage provided from the
microcontroller.
Figure 3.8
Motor Driver Circuit Connection
29
3.3.3
Power Supply
The battery used in this project is Lithium polymer (refer to Figure 3.9).
The whole system is powered up by a battery which is able to supply 7V with high
current supply which is 1300mA. It is essential for the current to be high enough to
power up all the components. Otherwise, the sensors will not be able to operate well
as the output signals of the sensors are not accurate. The battery is rechargeable and
requires a charger to recharge it. It can last for more than a day depending on the
usage.
Figure 3.9
3.3.4
Battery
Proximity Sensor
The proximity sensor is used to detect the distance between the user and
the obstacles in the X and Z direction. The model of the sensor is GP2Y0A02YK0F,
manufactured by Sharp Corporation. An image of the sensor is illustrated in Figure
3.10.
30
Figure 3.10
Sharp GP2Y0A02YK0F Proximity Sensor
The sensor emits infrared signal and is able to detect obstacles at ranges
between 20cm – 150cm long. The power needed for the sensor to operate is 4.5V –
5V and the consumption current is 30mA. The output voltage from the sensor is an
analog value and corresponds to the detected distance in centimeter. Figure 3.11
describes the characteristic curve of the sensor.
Figure 3.11 Characteristic Graph of the Sensor [9].
31
3.3.5
Indicator
There are two sensors used in this project and each sensor is connected to a
different indicator. For the X-axis detection, the indicator used to warn the user is a
buzzer while for the Z-axis detection, the indicator is a vibrator. The features of
both indicators are described as below:
i.
Buzzer
A buzzer as shown in figure 3.12 is a component that
produces a beeping sound according to the voltage supplied to it.
Basically, it has two terminals which are the voltage supply and
ground. The voltage required to operate the buzzer is between 0-5V.
A higher voltage supplied to the buzzer causes it to produce a
stronger beeping sound.
Figure 3.12
Buzzer
32
ii.
Vibrator
A vibrator as shown in Figure 3.13 is a component that is
able to generate vibration according to the voltage supplied. It has
two terminals which are the voltage supply and ground. The vibrator
operates within a voltage range of 0-5V and needs enough current to
operate properly.
Figure 3.13
Vibrator
33
3.4
Software Development
Software development is one of the major parts in constructing the
algorithm of the project. It includes the MicroC for the PIC, declaration of the ADC
value for the sensor, motor driver control and programming of the sensor.
3.4.1
MicroC for Peripheral Interface Controller (PIC)
MicroC is the software used to write and compile the program. The
type of language used to write the coding is C language. Figure 3.14 shows the
overview of the MicroC compiler for the microntroller.
Figure 3.14
Overview of MicroC Compiler
34
3.4.2
Declaration of the Analog Digital Converter (ADC) Value for the Sensor
The analog output from the two sensors is sent to the microcontroller and
must be first converted into digital form to be processed further. The coding for the
conversion is as shown in Figure 3.15.
Figure 3.15
3.4.3
Complete ADC code for two sensors
Motor Driver Control
In order to supply enough current to the vibrator, a motor driver
which will be connected to the PWM Pin (RC2) of the microcontroller is needed.
PWM can be used to control the motor speed. After the initialization of PWM, the
coding for PWM change duty is written as below (refer to Figure 3.16).
35
Figure 3.16
Coding for PWM
The parameter duty values ranges from 0 to 255. The higher the set duty
value produces a stronger vibration by the vibrator.
3.4.4
Programming of the Sensor
The two sensors must be declared in the coding before it can be set within
the specific ranges. The variable (mV) for the sensor represents the voltage of the
sensor’s output as shown in Figure 3.17
Figure 3.17
Coding for Sensor
36
3.4.5
Debugger Device
The debugger device, PICkit 2 Programmer is used, to emulate and
debug firmware on the target board. The software is very important to import and
export the hex files in the microcontroller. Besides that, it also checks the
compatibility between the software and hardware development before the coding is
successfully written into the microcontroller.
Figure 3.18
Overview of PICkit 2 Debugger Device
37
3.4.6
The Schematic Circuit
The schematic circuit for the project is done with Proteus (ISIS)
software. The circuit consists of a voltage regulator, two proximity sensors, a
buzzer, a vibrator, a motor driver and the microcontroller. The schematic circuit is
included in Appendix A-F.
38
CHAPTER 4
RESULTS AND DISCUSSION
This chapter discusses on the results obtained from experiments and
solutions on problems faced during the progression of this project.
4.1
Infrared Sensor Characteristic
The sensor used in this project is an infrared sensor which consists of a
transmitter and a receiver. The sensor emits infrared signal and gives an analog
value at the output. The sensor is able to detect obstacles at ranges within 20cm 150cm long. The power needed to operate the sensor is between 4.5 - 5V and the
consumption current is 30mA. Referring to Figure 4.1, the peak value of the sensor’s
characteristic curve (from the datasheet) is approximately at 15 cm with a
corresponding voltage of 2.75V. The peak value decreases as the distance between
the sensor and obstacles increases.
39
Figure 4.1
Figure 4.2
Characteristic Curve (Datasheet).
Characteristic Curve (Experimental).
40
Three sets of experiments were conducted to verify the performance of the
sensor. From the experiments, it is observed that the curve shows the same pattern
as the curve obtained from the datasheet (with small deviations). The sensor has an
offset range between 0-15cm. In this project, the offset range is not used in
determining the distance between the sensor and the obstacles.
20 cm
20 cm
Figure 4.3
Offset range for both sensors
Figure 4.2 shows a peak value of 20 cm at a corresponding voltage of 3.5
V. The peak value is used as the initial value for the sensor’s operation in this
project.
41
4.2
Sensor Detection Analysis
After analyzing the curve, the distance ranges for the two sensors were
determined by different output at the respective indicators. The analysis of both
sensors are explained as below
4.2.1
X-axis analysis
The range for the X-axis direction sensor is divided into four different parts
as illustrated in the Figure 4.4.
Figure 4.4
X-axis range detection
The offset range is set to be from 0-20 cm. The first operational range, the
set distance is from 21cm to 30cm. The distance for the second range is set from
31cm to 50cm while the third range is set to be from 51 cm to 50 cm.
\
42
Table 4.1
Description of X-axis Detection
No
Range (cm)
Output
1
0-20 (offset)
No Sound
2
21-30
Buzzer beeps continuously
3
31-50
Buzzer beeps with shorter pulse delay
4
51-150
Buzzer beeps with longer pulse delay
Each range is assigned to a different output from the buzzer. As the output at
the offset range is not used, no sound will be produced from the buzzer. The output
for the first range which is between 21cm – 30cm produces a continuous beeping
sound which indicates that user is very close to the obstacles.
For the second range, which is between 31cm – 50cm, the buzzer produces a
beeping sound with shorter pulse delay which indicates that the obstacle detected is
at a medium distance.
The furthest range which is from 51cm to 150cm indicates an obstacle which
is far from the user and causes the buzzer to produce a beeping sound with a longer
pulse delay. Table 4.1 summarizes the output produced during X-axis detection.
43
4.2.2
Z-axis analysis
Figure 4.5
Analysis for Z-axis range detection
Based on Figure 4.5, there are three different ranges of detection in the Zaxis direction. The first range which is from 20cm - 30cm is assigned to be an offset
range. For the second range, the distance is from 30cm to 45cm while the distance
for the third range is set to be from 46cm to 80cm.
44
Table 4.2
Description of Z-axis Detection
No
Range (cm)
Output
1
0-20 (offset)
No Sound
2
21-30
No vibration
3
31-45
Vibrator produce weak vibration
4
45-80
Vibrator produce strong vibration
Each range is assigned to a different output from the vibrator. The output
produced in the offset range is not used and there is no vibration produced. This
range is assumed to be the default distance taken when the user is walking.
The output for the second range which is between 31 cm – 45 cm, produces a
weak vibration which indicates that the user is close to an obstacle in the Z-axis
direction with a medium depth. Meanwhile, the output for the third range produces a
strong vibration which indicates a deeper distance between the user and the obstacle
in the Z-axis direction, which implies a more dangerous condition for the user.
45
4.3
Logic Algorithm
The flowchart in Figure 4.6 explains the flow of obstacle detection for
both sensors in the X-axis and Z-axis. Both sensors operate simultaneously and the
system repeats continuously. Each range has a different output with the X-axis
detection having three different distance ranges corresponding to three different
buzzer outputs. The Z-axis detection also has three different distance ranges which
correspond to three different outputs from the vibrator.
Figure 4.6
Logic Algorithm
46
4.4
Electronic Walking Stick
The electronic walking stick is constructed using a PVC material with a
length of 100 cm.
Figure 4.7
Top View
Figure 4.7 shows the top view of the electronic walking stick. The black
box contains the entire electrical component and the handle is attached to the box
for the blind to hold.
47
Figure 4.8
Bottom View
The bottom view as shown in Figure 4.8 shows the two sensors which are
attached to the walking stick, with aluminum sheets to hold them. The full image of
the complete walking stick is illustrated in Figure 4.9.
48
100cm
Figure 4.9
Full Image View
49
CHAPTER 5
CONCLUSION AND RECOMMENDATIONS
This chapter briefly discusses about the conclusion and recommendations
for future development to enhance the application of the project.
5.1
Conclusion
The development of electronic walking sticks for the blind can be
implemented using several methods of distance measurement detection. Infrared
and ultrasonic sensors are examples of sensors that are suitable for the system.
However, infrared sensor is more suitable for the system due to several factors.
The application of ultrasonic sensors in the project was found to be more
effective as it is small, light and consumer less power. On the other hand, ultrasonic
50
sensors are larger in size and heavier compared to infrared sensors weight. Besides
that, it consumes a lot of power, and causes the users to keep on charging the power
supply each time they need to use it.
The infrared sensors used in this project are placed in the X- axis and the
Z-axis to detect length and depth between a user and the obstacles. The approach is
very beneficial for the blind especially when they are moving around uneven
surfaces such as slopes and desert areas.
Implementing a microcontroller to the electronic walking stick has
improved the overall system by providing the user with different warning indicators
for different distance range. In conclusion, the project is successfully implemented
and the objectives of the project are achieved.
5.2
Recommendations
Despite achieving the project’s objectives, improvement is required done
to enhance the application of the project. In order to improve the current technology,
voice indicator can be used as an option for the, indicator instead of using a buzzer
and vibrator to inform the actual distance between the user and the obstacles.
Instead of maintaining the current design which is a little bulky, the
walking stick can be designed to be smaller and lighter, to make it more comfortable
to be used. On top of that, all the components for the project can be miniature using
51
the surface mounting device (SMD) components to ensure the design on the PCB
board is minimized to be integrated into the electronic walking stick.
The battery selection is also an important part of the project and it can be
improved by implementing a rechargeable battery, for the blind to use it more
conveniently without having to change with new battery frequently. Lastly, instead
of PVC, the walking stick can also be designed using aluminum rod as it is lighter
and is not easily broken compared to PVC material.
52
REFERENCES
1. S. Innet and N. Ritnoom, An Application of infrared Sensors for Electronic White
Stick. International Symposium on Intelligent Signal Processing and
Communication Systems. Bangkok, Thailand. 2008.
2. Liang Hu, Wen-zhong, Renlong Song, Chao Gao, Xin Li, A Novel Design of
Micro-Magnetic Sensor Guidance System for the Blind. National Key
Laboratory of Mechatronics Engineering and Control, Beijing, China; 1969.
3. Debnath, N. H., Z.A., Jamaludin, S., Aljunid, S.A.K. (2001). An Electronically
Guided Walking Stick for the Blind. Proceedings of the 23rd Annual EMBS
International Conference, October 25-28, 2001. Istanbul, Turkey
4. Batarseh, B. and McFadyen. An Ultrasonic Ranging System for the Blind
Mississippi State University; 1997. 411-413.
5. Lopes, E. P., Aude, E.P.L., Silveira, J.T.C., Serdeira, H. and Martins, M.F.
Application of a Blind Person Strategy for Obstacle Avoidance with the Use of
Potential Fields. Proceedings of the 2001 IEEE International Conference on
Robotics & Automation. May 21-16, 2001 Seoul, Korea.
6. Aini Fariza binti Mohd Mustafa (2009). Walking Stick for the Visually
Challenged using Infrared Distance Sensor, Bachelor Degree Universiti
Teknologi Malaysia, Skudai.
7. PIC18F452 Data Sheet. 2006, Microchip Technology Inc.
8. UIC00B USB ICSP PIC Programmer Data Sheet. 2010, Cytron Technologies.
9. GP2Y0A02YK0F Data Sheet. 2006, Sharp Corporation.
10. Push Pull Four Channel Drivers Data Sheet. 1993, SGS-Thomson
Microelectronics.
53
APPENDIX A
Power Supply Diagram
54
APPENDIX B
Microcontroller Schematic Diagram
55
APPENDIX C
Sensor Interface Schematic Diagram
X - axis Sensor
Z - axis Sensor
56
APPENDIX D
Debugger Device Schematic Diagram
57
APPENDIX E
Buzzer Interface Schematic Diagram
58
APPENDIX F
Motor Driver and Vibrator Schematic Diagram
Motor Driver
Vibrator
59
APPENDIX G
Features of Microcontroller
Features:
• High current sink/source 25 mA/25 mA
• Three external interrupt pins
• Timer0 module: 8-bit/16-bit timer/counter with 8-bit programmable prescaler
• Timer1 module: 16-bit timer/counter
• Timer2 module: 8-bit timer/counter with 8-bit period register (time-base for
PWM)
• Timer3 module: 16-bit timer/counter
• Secondary oscillator clock option - Timer1/Timer3
• Two Capture/Compare/PWM (CCP) modules. CCP pins that can be configured
as:
- Capture input: capture is 16-bit,max. resolution 6.25 ns (TCY/16)
- Compare is 16-bit, max. resolution 100 ns (TCY)
- PWM output: PWM resolution is 1- to 10-bit,
- Max. PWM freq. @: 8-bit resolution = 156 kHz 10-bit resolution =
39 kHz
• Master Synchronous Serial Port (MSSP) module. Two modes of operation:
- 3-wire SPI™ (supports all 4 SPI modes)
- I2C™ Master and Slave mode
• Addressable USART module:
- Supports RS-485 and RS-232
• Parallel Slave Port (PSP) module
Analog Features:
• Compatible 10-bit Analog-to-Digital Converter
module (A/D) with:
- Fast sampling rate
- Conversion available during SLEEP
Special Microcontroller Features:
• 100,000 erase/write cycle Enhanced FLASH program memory typical
• 1,000,000 erase/write cycle Data EEPROM memory
• FLASH/Data EEPROM Retention: > 40 years
• Self-reprogrammable under software control
• Power-on Reset (POR), Power-up Timer (PWRT) and Oscillator Start-up
Timer (OST)
• Watchdog Timer (WDT) with its own On-Chip RC. Oscillator for reliable
operation
• Programmable code protection
• Power saving SLEEP mode
• In-Circuit Debug (ICD) via two pins
60
APPENDIX H
Source Code
unsigned long Vin, Mv, Vin2, Mv2;
void InitMain()
{
TRISC = 0;
Pwm_Init(5000);
}
void main()
{
InitMain();
Pwm_Start();
TRISA.F0 = 0Xff; // PORTA is input 1
TRISA.F2 = 0Xff; // PORTA is input 2
TRISD.F0=0X00; //PORTD AS OUTPUT 1
TRISC.F2=0X00; //PORTD AS OUTPUT 2
// Configure A/D converter. AN0 is used in this project
//
ADCON1 = 0x80; // Use AN0 and Vref=+5V
//
61
// Program loop
//
for(;;) // Endless loop
{
Vin = Adc_Read(0); // Read from channel 0 (AN0)
Mv = (Vin * 5000) >> 10; // mv = Vin x 5000 / 1024
Vin2 = Adc_Read(2); // Read from channel 0 (AN0)
Mv2 = (Vin2 * 5000) >> 10; // mv = Vin x 5000 / 1024
if((mv>1000 && mv<=3000)||(mv2>1000 && mv2<=2500))
{if (mv>1000 && mv<=1500)
{PORTD.F0=0XFF; delay_ms(10); PORTD.F0=0X00; delay_ms(50);}
{
if (mv2>1000 && mv2<=1500) Pwm_Change_Duty(250);
if (mv2>1500 && mv2<=2500) Pwm_Change_Duty(150);
else Pwm_Change_Duty(0);
}
if (mv>1500 && mv<=2500)
{PORTD.F0=0XFF; delay_ms(10); PORTD.F0=0X00; delay_ms(10);}
{
if (mv2>1000 && mv2<=1500) Pwm_Change_Duty(250);
if (mv2>1500 && mv2<=2500) Pwm_Change_Duty(150);
else Pwm_Change_Duty(0);
62
}
if (mv>2500 && mv<=3000) PORTD.F0=0XFF;
{
if (mv2>1000 && mv2<=1500) Pwm_Change_Duty(250);
if (mv2>1500 && mv2<=2500) Pwm_Change_Duty(150);
else Pwm_Change_Duty(0);
}
if (mv2>1000 && mv2<=1500) Pwm_Change_Duty(250);
if (mv2>1500 && mv2<=2500) Pwm_Change_Duty(150);
}
else {PORTD.F0=0X00; Pwm_Change_Duty(0);}
}}
63
APPENDIX I
Data Sheet of Proximity Sensor
64
65
66
67
68
69
70
71
APPENDIX J
Data sheet of Motor Driver
72
73
74
75
76
77
78
79
80
81