You are on page 1of 68

THE SMART CANE PROJECT

Knee above Obstacle Detection and Warning System for the Visually Impaired

ANKUSH GARG

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING INDIAN INSTITUTE OF TECHNOLOGY DELHI MAY 2007

The Smart Cane Project


Knee above Obstacle Detection and Warning System for the Visually Impaired

A dissertation submitted in fulllment of the requirements for the degree of Bachelor of Technology in Computer Science and Engineering

by Ankush Garg (2003CS10155)

under the guidance of

Prof. M. Balakrishnan Prof. Kolin Paul

Department of Computer Science and Engineering Indian Institute of Technology Delhi May 2007

Certicate
This is to certify that the dissertation titled The Smart Cane Project - Knee above Obstacle Detection and Warning System for the Visually Impaired being submitted by Ankush Garg to the Indian Institute of Technology Delhi, for the award of the degree of Bachelor of Technology in Computer Science and Engineering, is a record of bona de research work carried out by him under our guidance and supervision at the Department of Computer Science and Engineering, Indian Institute of Technology, Delhi. The work presented in this thesis has not been submitted elsewhere, either in part or full, for the award of any other degree or diploma.

Prof. M. Balakrishnan Department of Computer Science and Engineering Indian Institute of Technology Delhi New Delhi 110 016

Prof. Kolin Paul Department of Computer Science and Engineering Indian Institute of Technology Delhi New Delhi 110 016

iii

Dedicated to the 10 million visually challenged individuals in India and agencies working for their welfare

Acknowledgements
I would like to express my heartfelt gratitude to my supervisors, Prof. Balakrishnan and Prof. Kolin Paul for guiding this work wit h utmost interest, patience, care and scientic rigor. I am grateful to them for setting high standards and giving me the freedom to explore many things. I am most grateful to Mr. Dipendra Manocha for his constant support and insightful advice. I am very thankful to Prof. P.V.M. Rao for his guidance towards the mechanical aspects of the project. I would like to thank my colleagues Rohan Paul, Dheeraj Mehra and Vaibhav Singh for the assistance and constant support provided by them. I am also thankful for the work done by Debraj Chatterjee and Vishwas Goel towards the design and fabrication of the RP Models of the device. I am grateful to Mr. Tarun Gupta and Mr. Jatin for their valuable guidance in the charging circuit design and fabrication. This work would not have been a reality without the support of Sharma Ji, Digital Hardware Design Laboratory Incharge. He helped us tremendously in our day to day work in the Lab. I am thankful to my family for bearing with me during this endeavor and providing the strength to persist. Finally, a special mention for my friends in the department, whose support and suggestions went along way in making this work a reality. May 2007 Ankush Garg

vii

Synopsis
One of the most important difculties faced by the visually challenged persons is constraints in independent mobility and navigation. They primarily use the white cane as a mobility aid allowing them to detect close by obstacles on the ground. The detection of objects above knee height is almost impossible and is a major hindrance for them. Developments in embedded systems have opened up a vast area of research and development for affordable and portable assistive devices for the physically challenged. This project aimed at the design and implementation of a detachable unit which acts to augment the functionality of the existing white cane, to allow knee-above obstacle detection. This unit consists of an ultrasonic ranger and a vibrator controlled by a microcontroller to offer an increased detection range of three meters. The distance information is conveyed to the user through non-interfering multi-frequency vibratory stimuli, the frequency of vibration indicating the proximity of obstacles. This unit is also capable of detecting fast moving obstacles. A lot of effort has been put in the electromechanical design of this unit conveying the vibrations effectively and ensuring that it is easily attachable on the existing white canes without sighted assistance. A crucial design optimization goal was cost the unit has been developed as a low cost device which is affordable by the poor in developing countries.

ix

Contents
1 Motivation 2 Methodology 2.1 Functional Description . . . . . . . . . . . . . 2.2 Ultrasound Ranging . . . . . . . . . . . . . . 2.3 Vibratory Feedback . . . . . . . . . . . . . . . 2.4 Microcontroller Unit . . . . . . . . . . . . . . 2.5 Charging Circuit . . . . . . . . . . . . . . . . . 2.5.1 Charging Circuit based on TPS65014 2.5.2 Charging Circuit based on MAX8606 . 3 Cane Module Design 4 Results 4.1 Variation of Vibrator Current . . . . . . . . . 4.2 Average and Maximum Power Consumption 4.3 Ranger Cone Testing . . . . . . . . . . . . . . 4.4 Average Angle of the Cane . . . . . . . . . . . 1 3 . 3 . 5 . 6 . 8 . 8 . 9 . 11 14 17 17 18 19 19 20 20 22 22 24 26 30

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

5 Experimentation and User Validation 5.1 Detection of Knee-above Obstacles . . . . . . . . . . . . . . 5.2 Negotiating Common Obstacles . . . . . . . . . . . . . . . . 5.3 Other Observations . . . . . . . . . . . . . . . . . . . . . . . 6 Conclusion A Charging Circuit Schematics B RP Models of the Cane Module

C Graphs of the Current Required by the Vibrator in Various Modes 32

xi

D Code (written in C) 35 D.1 Implementation of the I2C Communication Protocol . . . . 35 D.2 Code for the Cane Module . . . . . . . . . . . . . . . . . . . 39

xii

List of Figures
2.1 2.2 2.3 2.4 Ultrasound based Ranging combined with Vibratory Output Top Level Block Diagram . . . . . . . . . . . . . . . . . . . . Ultra-sound Ranger SRF04 . . . . . . . . . . . . . . . . . . Top view showing the horizontal and angular coverage of the Detection Zone (colored) for Long Range Mode (left) and Short Range Mode (right) . . . . . . . . . . . . . . . . . Pictorial representation of Vibratory Patterns . . . . . . . Vibrator interface with the Micro-controller . . . . . . . . . Typical Charging Prole . . . . . . . . . . . . . . . . . . . . Typical Voltage Prole . . . . . . . . . . . . . . . . . . . . . Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . Charging Sub-system Circuit . . . . . . . . . . . . . . . . . System State Diagram . . . . . . . . . . . . . . . . . . . . . Final Voltage Drop . . . . . . . . . . . . . . . . . . . . . . . 4 4 5

2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13

6 7 7 9 9 10 11 12 12 13

3.1 Different Grips for holding the White Cane . . . . . . . . . 14 4.1 Variation of Vibrator Current with Time in Mode 1 . . . . 18 4.2 Side view illustrating the horizontal and vertical coverage of the detection zone at a distance of 2m from the user . . 19 5.1 5.2 5.3 5.4 A.1 A.2 A.3 A.4 A.5 A.6 Detection of Raised Side of a Truck . . . . . . . Detection of Raised Horizontal Bar . . . . . . . Path Finding Experiment . . . . . . . . . . . . User with Various Grips Testing the Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 21 22 22 27 27 28 28 29 29

Circuitry for TPS65014 (Power Management IC) Circuitry for TPS61032 (Voltage Regulator IC) . Other Circuitry . . . . . . . . . . . . . . . . . . . Circuitry for MAX8606 (Power Management IC) Circuitry for TPS61032 (Voltage Regulator IC) . Circuitry for ATMEL8051 (Micro-controller) . .

B.1 Side View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 xiii

B.2 Front View . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 C.1 C.2 C.3 C.4 Current Prole for Mode 1 Current Prole for Mode 2 Current Prole for Mode 3 Current Prole for Mode 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 33 34 34

xiv

List of Tables
1.1 Features of the already existing Ultrasound based Detection Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Division of Detection Range into Sub-ranges and Corresponding Patterns . . . . . . . . . . . . . . . . . . . . . . . . 2 6

4.1 Current Consumption of the Vibrator for various Vibratory Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

xv

Chapter 1

Motivation
Among the many challenges faced by the visually challenged persons are the constraints of independent mobility and navigation which stem from hazards in an unfamiliar environment. The white cane is the most popular navigation aid used by the visually challenged. It enables them to effectively scan the area in front and detect obstacles on the ground such as uneven surfaces, holes, steps, walls etc. Its low cost, portability and ease of operation make it an extremely popular navigation aid. However, the cane has two major shortcomings: In a practical setting, it can only be used to detect obstacles up to knee-level. Hence, potentially hazardous obstacles like protruding window panes, raised platforms and horizontal bars go undetected. The detection range of the cane is restricted to about 0.5m from the user. Certain obstacles (e.g. a moving vehicle) cannot be detected till they are dangerously close to the person. There have been efforts to augment the white cane. An obstacle detection system, the K-Sonar [1] provides distance information through tone-complex sounds which act as sound signatures to detect obstacles. But sonic output produced by the device masks other important auditory cues necessary for safety and orientation, e.g., sound emanating from an approaching vehicle. The augmented cane by Elchinger [2] also has the same drawback. Another mobility aid, the Ultracane [3] uses ultrasound based echolocation for obstacle detection. Distance information is conveyed to the user through two vibrating buttons (5x7 mm). It is imperative to place the thumb across the top of the handle to cover both the buttons at the same time.

Table 1.1: Features of the already existing Ultrasound based Detection Systems Mobility aids available in the international market are expensive. e.g., the K-Sonar is priced at 1069 USD and the Ultracane costs 770 USD. Out of the 150 million visually impaired people worldwide, 75% reside in the less developed countries of Africa and Asia where the per capita income is below 635 USD [4].

Chapter 2

Methodology
This section discusses the approach for tackling the above problems. Firstly, a broad overview of the whole design will be given. This is followed by detailed description of individual sub-systems.

2.1

Functional Description

A detachable unit has been developed that can be mounted on the top fold of the white cane. The device employs directional ultrasound based ranging to detect obstacles in front or above knee height within a range of 3m. The user obtains distance information through vibratory stimuli which supplement the auditory cues emanating from the environment and those produced by tapping the cane. The device vibrates in distinct patterns that vary with changing obstacle distance. The vibration frequency increases incrementally according to changing obstacle distances. The ranging algorithm has been optimized which allows detection of fast approaching obstacles within 3m. In this situation the user is warned by a buzzer tone. The system has been designed as an independent detachable unit so that the existing white cane does not have to be re-modeled. An attachment mechanism has been developed so that the user can attach the device on the cane without sighted assistance. The unit can also be used as a general purpose distance estimation device. The module runs on a standard Li-ion rechargeable battery. For charging the user connects an AC or USB adapter (similar to charging a cell phone). This eliminates the inconvenience of opening the battery pack to replace batteries. Figure 2.2 shows the top level block diagram. An ultrasonic ranger, SRF04 [7] is used for obstacle detection and vibrations are produced us3

Figure 2.1: Ultrasound based Ranging combined with Vibratory Output

Figure 2.2: Top Level Block Diagram

(a) Timing Diagram

(b) Detection Cone

Figure 2.3: Ultra-sound Ranger SRF04 ing a small DC motor. The unit runs on rechargeable Li-ion battery for which a charging circuit has been developed. The control unit consists of an 8051 micro-controller [8]. The system states are conveyed to the user through short duration tones produced through a buzzer.

2.2

Ultrasound Ranging

A dual-transducer ultrasonic ranger (SRF04) with a range of 0.03 - 3m is used for obstacle detection. Once triggered by the micro-controller (through a 10usec TTL level pulse) the ranger produces an 8-cycle sonic burst at 40 KHz frequency (see Figure 2.3(a)). Immediately, the echo pulse output line is raised high which is lowered upon reception of the reected waves. The echo pulse output is typically between 100usec18msec and 36msec incase of timeout. A blanking interval of 100usec is needed to avoid noise from the initial ping. A gap of 10msec is required between end of echo and the next trigger pulse. The microcontroller computes the obstacle distance by measuring the width of the echo pulse. Depending upon this computed distance, an appropriate vibratory pattern is selected. The system operates in two modes which are selectable through the mode select button on the device. Short Range Mode (< 1m): Useful while navigating within a room Long Range Mode (< 3m): Used outdoors e.g. roads, parks etc. Figure 2.3(b) shows the detection cone of the ranger projected on a two dimensional plane. The angular width of the detection cone is typically 45 . The sensor can detect a 3cm thick object at a distance of 2m. As the distance increases the detection zone boundary becomes uneven. 5

Table 2.1: Division of Detection Range into Sub-ranges and Corresponding Patterns

Figure 2.4: Top view showing the horizontal and angular coverage of the Detection Zone (colored) for Long Range Mode (left) and Short Range Mode (right)

2.3

Vibratory Feedback

Vibrations are produced using an asymmetric DC motor (5.5x6.4x15.6mm). These small motors are typically used in mobile phones. The entire detection range is divided into four sub-ranges for the Long Range Mode and three for the Short Range Mode (Table 2.1, Figure 2.4). Each subrange is associated with a unique, easily discernable, vibratory pattern (Figure 2.5). Vibratory patterns are produced by manipulating the duration while the vibrator is running and the interval between successive vibration pulses. Thus, by recognizing the vibratory pattern the user can infer the obstacle distance. e.g., If the unit is vibrating in pattern 3 in the long range mode, the user can infer that the obstacle distance is 1-2 m. The typical current requirement of the vibrator motor is 40mA. Since the micro-controller can only provide a maximum current of 650uA, a PNP transistor with proper biasing is used to drive the motor (Figure 2.6). The transistor current gain can be changed by varying the base resistance R (0-1K) through a potentiometer knob. This allows users to adjust the intensity of vibrations according to their skin sensitivity.

Figure 2.5: Pictorial representation of Vibratory Patterns

Figure 2.6: Vibrator interface with the Micro-controller

2.4

Microcontroller Unit

The control sub-system consists of an 8051 micro-controller AT89C55WD (clock rate: 1.84 MHz). The controller triggers the ultrasonic ranger for ranging, computes the obstacle distance and triggers the vibrator subsystem to output the desired pattern. It also monitors the battery status and gives indication to the user through buzzer tones. The ranging algorithm has been optimized so that the ultrasonic ranger can be triggered typically every 60ms (15 Hz). Hence the device shows high responsiveness to varying obstacle distance. Apart from computing the distance, the instantaneous relative velocity of the nearest obstacle is also computed. Incase, this velocity is consistently above a predened threshold then, the vibrations are ceased and the buzzer is sounded to warn the user. This gives the user some time for a reex action instead of being hit unwarned. Within the detection range, an obstacles moving at a maximum speed of 7 m/s can be detected. This feature has been incorporated bearing in mind that the detection range of ultrasound rangers is increasing rapidly. This increased range would allow early detection of fast approaching obstacles and give the user to time to move out of the way.

2.5

Charging Circuit

For charging a Li-ion battery a specic charging sequence is required (shown in Figure 2.7). The gure illustrates the four main stages for charging a Li-ion battery: 1. Initially the current is kept constant while the voltage provided is increased slowly. 2. When the input voltage exceeds the minimum charge voltage, the input current is kept constant at regulation current level. In this phase, the voltage continues to rise. 3. In the third phase, the voltage is kept constant at regulation voltage level and the current falls exponentially. 4. The charging process is completed once the current falls below the taper detect value. Incase the battery is deeply discharged prior to the charging sequence then the charging process begins with a small value of input current, called the preconditioning current. This ensures that the battery does not get damaged during the process.

Figure 2.7: Typical Charging Prole

Figure 2.8: Typical Voltage Prole The battery voltage level varies between 3.0V to 4.2V, with a nominal value of 3.7V (Figure 2.8). The important point to notice is that at the end the voltage drops very drastically in a short amount of time. This leaves very little time to inform the user that the battery is about to go low.

2.5.1

Charging Circuit based on TPS65014

As explained earlier in Li-ion batteries need a predened sequence of currents and voltages to charge them. To attain such a sequence special chips are used. It was decided to implement the charging mechanism used by the Kritikal Solutions in the Daisy Reader Project. The circuit design is based on Texas Instruments chip (TPS65014). The top level block diagram can be seen in Figure 2.9. The power management chip provides up to four output voltages. But all these volt-

Figure 2.9: Block Diagram ages are below 5V. As the circuit requires 5V supply, a voltage regulator (TPS61032) was needed to boost up the voltage provided by TPS65014. The voltage regulator also contains an op-amp. An important aspect of this design is the fact that it is possible to shut down the charge management IC using control signals from the micro-controller. TPS65014 provides facility for I2C protocol and data can be clocked into the chip from the micro-controller. The C implementation of I2C protocol for controlling TPS65014 was developed which also incorporates the shut down sequence. The nal schematics of the circuit can be found in Appendix A (Figures A.1 , A.2 and A.3) and the code for I2C in Appendix D.1. The basic problem that was encountered was that the circuit size was too large. The power management chip (TPS65014) was very advanced and provided a lot of features which were not required for our application. Considerable external circuitry was required for this chip was even larger than the actual size of the circuit without the charging circuit. Secondly, Mr. Tarun from Kritikal Solutions pointed out that the circuit they were using had developed some problem. And that it would take some time before the problem can be tackled. He advised us not to use circuit till the problem is solved. Keeping these issues in view, it was decided that a different power management chip should be used. The alternative was found in the MAX8606 chip manufactured by the Maxim Dallas Instruments.

10

Figure 2.10: Block Diagram

2.5.2

Charging Circuit based on MAX8606

The cane module is powered by a rechargeable Li-ion battery (900 mAh, 3.0- 4.2V output). MAX8606 [9] has been used as the battery chargemanagement IC to produce the predened sequence of current and voltage proles necessary for charging the battery. As shown in Figure 2.10, the output voltage produced by MAX8606 is variable. This is stabilized using TPS61032 [10] voltage regulator providing a constant 5V system supply (Figure 2.10). The MAX8606 chip provides the following status bits to indicate battery status: POK: Presence of a valid power source for charging (4V-5.8V, exceeding the battery voltage by 250mV) CHG: Proper charging of the battery BOH: Battery over-heating conditions Voltage regulator TPS61032 generates the low battery signal (BL) once the battery voltage falls below 3.5V. To enhance battery life, pullups are created using a low-dropout linear regulator, MAX8880, supplying an ultra-low current (3.5uA). Battery conditions are indicated to the user through short beep sequences using a buzzer embedded in the circuit. For the complete circuit including the micro controller refer to Appendix A (Figures A.4 , A.5 and A.6). Figure 2.12 shows the system state diagram and the associated beep patterns. The normal functioning state indicates continues ranging and production of correlated vibratory patterns. To indicate low battery power, beep3 is sounded every 2 min while normal functioning is retained. The device must be turned off to prevent deep discharge of the

11

(a) Battery charge-management IC (b) Voltage Regulator (TPS61032) (MAX8606) and Low-dropout Regulator (MAX8880)

Figure 2.11: Charging Sub-system Circuit

Figure 2.12: System State Diagram Li-ion battery. For charging the user connects an AC or USB adaptor. If the charging source is valid the charging sequence is initiated and Beep1 is produced periodically. Once the battery is fully charged Beep 2 is produced (state: Charging Over). The transition to normal functioning state occurs once the charging power source is removed from the unit. In a rare case of battery overheating, both charging and ranging are immediately stopped and the user is warned through an emergency signal (Beep 4). The voltage characteristics of the Li-ion battery were studied using the MAX8606 development kit as shown in the Figure 2.13. The low power signal is given when the battery voltage drops to 3.5V. So, from the gure it can be seen that the user will have more than 15 minutes of battery left before the Li-ion battery is deeply discharged. 12

Figure 2.13: Final Voltage Drop During this time the system will function normally.

13

Chapter 3

Cane Module Design


This section deals with structural design and signal-structure interaction of the proposed system. Several important design parameters were identied through interaction with potential users at the National Association for the Blind, New Delhi. For implementing these aspects in successive prototypes we collaborated with Vishwas Goel and Debraj Chatterjee from the mechanical engineering department under the supervision of Prof. P.V.M. Rao. The team from Mechanical Engineering developed the CAD model and produced the prototypes using Rapid Prototyping facility. The following are the major design constraints for the cane module: Usability with Varied Grips Despite recommendations by mobility experts, the visually impaired cane users show considerable variations in the grips used to hold the cane (Figure 3.1). The same user might use the inclined grip while moving in an open space and a straighter conservative grip in a crowded area.

(a)

(b)

(c)

Figure 3.1: Different Grips for holding the White Cane 14

As mentioned earlier, the navigational aids available abroad are customized for one specic grip. This involves relearning, which is difcult since the visually challenged are accustomed to using the cane in a particular manner with a personalized grip. The unit should be such that it has exibility to be used by users having different styles of holding and gripping. Detachable Unit The new navigation unit should work as a supplementary unit and not as replacement of white cane presently used for navigation. The unit should be usable as an independent navigation tool without the need of the cane. This would also ensure that the user can use the cane without the unit for places that are familiar to him. Light Weight Design The unit should be light in weight without adding extra weight to the existing cane and at the same time without compromising in terms of strength, particularly impact strength. The user should be able to use the unit at length without getting fatigued. Attachment Mechanism The main aim of the project is to make the users independent and free from the need of anyone else. For this purpose, the unit should be mounted and detached on the existing white cane easily without any sighted assistance. This would enhance the independence of the user giving him condence. Variable Transducer Angle Different users have different gripping styles leading to a variation in the angle of inclination of the cane from user to user. The users having a conservative grip hold the cane close to the body making the ultrasound ranger almost horizontal. The unit should have exibility that would allow it to be used with a wide range of inclination angles. Raised Centre of Gravity If the center of gravity (COG) of the whole system is not close to the hand then there would be a downward torque on the forearm of the user. This would make it difcult for the user to handle the device for a long period of time. The user should be able to use existing white cane mounted with new navigational attachment without application of any additional force or torque. Transducer Angle Indicator It is very difcult for the users to know the direction of the ultrasound ranger. The navigational unit needs to be mounted on the 15

white cane in such a manner that the ultrasound ranger always points out in the intended direction without any undesirable rotations leading to missing of signal. The grip should be such that while holding the user knows the direction of the sensor. Vibrator Placement Whenever an obstacle is sensed, the feedback as a vibratory signal needs to be conveyed to user with an optimum intensity. The unit should be placed at an anti-node of the cane closest to the users hand. This would ensure that oscillations are maximized and minimal vibration dampening occurs. Vibrator Frequency The vibrator frequency should be close to the natural resonant frequency of the structure so that maximum amplitude oscillations occur. High Transmittivity Feedback signal in terms of vibrations should be local and its transmittivity to entire cane and other unintended portions of the navigation unit should be minimized. This would allow minimal use of power making the battery last a longer period of time. Other Design Features All buttons on the module should be non-protruding type and should possess Braille markings for easy identication. Also all the above requirements have to be met within an affordable cost target. Keeping all the above points in consideration, in collaboration with mechanical engineering students developed working prototypes of the system. Regular feedback sessions with the users at the National Association for the Blind were held. The limitations pointed out during these sessions were incorporated in the next prototype. The nal prototype designed can be referred to in Appendix B.

16

Chapter 4

Results
4.1 Variation of Vibrator Current

As described in Section 2.3 the microcontroller cannot provide the current required to drive the vibrator. So, a PNP transistor has been used to boost the current provided by the micro controller. Figure 4.1 shows the prole of the current provided by the transistor to the vibrator in mode 1. This was recorded by inserting an ammeter in the circuit and recording the variations. It can be seen from the diagram that there is a specic rise time for the current to reach its peak value. Similarly, the current does not fall down to minimum value instantaneously but after a specic fall time. The rise time has been found out to be 100ms and the fall time to be 150ms for mode1. The graph for mode 2 is similar in nature. In modes 3 and 4, as the signal to the vibrator is of very short duration, short duration peaks are observed. The results are summarized in Table 4.1. Since mode 1 corresponds to the obstacle being closest, the frequency of vibration is the highest. Consequently, maximum current is required for mode 1. The detailed graphs for all the four modes can be seen in Vibratory Mode 1 2 3 4 Detection Range (cm) 0-50 50-100 100-200 200-300 Average Current Consumption (mA) 28.9 20.7 1.08 0.30

Table 4.1: Current Consumption of the Vibrator for various Vibratory Patterns 17

Figure 4.1: Variation of Vibrator Current with Time in Mode 1 Appendix C.

4.2

Average and Maximum Power Consumption

Vibrator being a mechanical system consumes maximum power in the device. For computing the average current consumption the time average is taken. The average current required by the vibrator by all the four modes has been summarized in Table 4.1. Assuming uniform distribution for all the modes the expected current requirement has been found out to be 12.745 mA. As the circuit is run at 5V, the expected power needed to derive the vibrator is 63.7 mW. The vibrator was removed from the circuit and the amount of current consumed by the remaining circuit was found of to be 29.8mA. Thus, the power required to run the circuit, excluding vibrator, is 149 mW. Hence, it can be concluded that the expected current requirement for the whole circuit is 42.545 mA and the expected power needed is 212.7mA. In section 2.5 it was mentioned that the battery being used is rated at 900mAh implying that it can last for an hour if the load current is 900mA. In the worse case, the average current consumed by the circuit in mode 1 is 58.9mA. Thus theoretically the battery can last for 15.3 Hrs. An experiment was conducted to test how long the battery 18

Figure 4.2: Side view illustrating the horizontal and vertical coverage of the detection zone at a distance of 2m from the user can last constant usage before it gets deeply discharged. It was found out that it lasted for 10.5 Hrs of constant use in mode 1. This means that the device can be used for about a week as on an average a user would use the cane for 1.5 Hrs [11].

4.3

Ranger Cone Testing

It was veried that the detection zone boundary is non-uniform at the periphery. Hence for stable detection the ranging algorithm had to be modied (code attached as Appendix D.2). The mode is changed only when the output of the ranger gets stabilized. This reduces the responsiveness of the unit but makes it more accurate. The measurements for the detection cone have been shown in Figure 4.2. It can be seen that at a distance of 2m from the user the cone covers the area above the waist of the user and below his head.

4.4

Average Angle of the Cane

Preliminary data collected from users at the National Association for the Blind (NAB), Delhi indicates that on an average the cane makes an acute angle of 55 degrees with the ground. While walking, this angle varies between 50 to 60 degrees. Since this deviation is small, the detection zone is mostly stable.

19

Chapter 5

Experimentation and User Validation


This section discusses the experimentation conducted at the National Association for the Blind, New Delhi. Ten adult visually impaired cane users were randomly selected for testing the applicability of the device in natural settings.

5.1

Detection of Knee-above Obstacles

An experiment was conducted in an unfamiliar environment possessing knee-above obstacles like a raised railing, side of a truck and the edge of a table. Volunteers did not have any prior knowledge about the identity or location of these obstacles. After initial familiarization with the vibratory patterns, users were instructed to walk till they detected the presence of an obstacle in their path. Two sets of observations were taken: rst, with the system mounted on the cane and then only with the white cane. The starting position of the subject was changed before the second set of observations. Figure 5.1(a) illustrates that the user was able to detect the raised side of a stationary truck from a distance of 2.5m. Without the unit, the obstacle could not be detected until the user collided with it. Figure 5.1(b) shows that the major portion of the cane went underneath the side of the truck and hence failed to warn the user. Figure 5.2(a) shows a similar result where the user could detect a horizontal bar (7cm diameter, raised 1m form the ground) from a distance of about 2 m. Without the unit, the bar was detected only when the upper portion of the cane came in contact with it (Figure 5.2(b)).

20

(a) With the unit mounted on the cane (b) Without the unit the user colthe user detects the obstacle 2.5m lides with the obstacle away

Figure 5.1: Detection of Raised Side of a Truck

(a) With the unit the user detects a (b) Collides with it without the unit bar 2m away

Figure 5.2: Detection of Raised Horizontal Bar

21

Figure 5.3: Path Finding Experiment

(a)

(b)

(c)

Figure 5.4: User with Various Grips Testing the Prototype

5.2

Negotiating Common Obstacles

Users were able to detect obstacles like walls, people and tables much before coming in contact with them. This information could be used to negotiate obstacles. Figure 5.3 shows a path nding experiment where the user is able to nd a clear path without coming in contact with arbitrarily positioned observers.

5.3

Other Observations

Users demonstrated quick responsiveness to changing vibratory patterns and reported that distance perception through vibrations becomes innate without interfering with the normal exible usage of the cane. Volunteers mentioned that the mounted unit cane was easier to lift and tap compared to the original cane, which can be viewed as a consequence of raising the centre of gravity of the system towards the palm of the user. The system could be used effectively by users with both the inclined and the straight grips (Figure 5.4).

22

Since an ultrasound beam is used for ranging, obstacles like a glass or a liquid surface can also be detected. A fully charged battery lasts about 10 hours of constant usage before recharging.

23

Chapter 6

Conclusion
Navigation for the visually impaired is often described as walking in a mineeld where the person discovers obstacles only by unexpectedly coming in contact with them. The knee-above obstacle detection and warning system increases the detection range of the white cane and warns the user of knee above obstacles much before colliding with them. This unit consists of an ultrasonic ranger and a vibrator controlled by an eight bit microcontroller to offer an increased detection range of three meters. The distance information is conveyed to the user through non-interfering multi-frequency vibratory stimuli, the frequency of vibration indicating the proximity of obstacles. This unit is also capable of detecting fast moving obstacles. The system provides a much wider feel of the surroundings, improves safety and hence gives condence to the user. Detailed study was carried out to determine the power dissipation by the circuit which was found to be 212.7mW. The battery life was found to be 10.5 Hrs. Experimental verication of the ultrasonic detection zone was also carried out. The detection of fast approaching obstacles was also veried in the lab. Another aspect of the project was to develop an electromechanical design of the system. The structural design of the cane module tries to optimize the signal-structure interaction aimed towards effective vibration transfer and minimal power consumption by the vibrator. An attachment mechanism was also developed that allows the user to mount the device to the cane without sighted assistance. The system was developed in close association with potential users. Feedback was taken during the problem formulation, concept design

24

and prototype evaluation stages which was critical for achieving our objectives. Initial experiments with the target group demonstrated their utility in real life scenarios. Users were able to detect raised obstacles like side of a truck, horizontal bar and the edge of a table much before coming in contact with them. The projected cost of the device is under 50 USD which would place it within affordable range for users in developing countries. The cost would decline substantially once these devices are mass produced. This system reduces dependence on sighted assistance thereby empowering the visually challenged.

25

Appendix A

Charging Circuit Schematics

26

Figure A.1: Circuitry for TPS65014 (Power Management IC)

Figure A.2: Circuitry for TPS61032 (Voltage Regulator IC)

27

Figure A.3: Other Circuitry

Figure A.4: Circuitry for MAX8606 (Power Management IC)

28

Figure A.5: Circuitry for TPS61032 (Voltage Regulator IC)

Figure A.6: Circuitry for ATMEL8051 (Micro-controller)

29

Appendix B

RP Models of the Cane Module

30

Figure B.1: Side View

Figure B.2: Front View

31

Appendix C

Graphs of the Current Required by the Vibrator in Various Modes

32

Figure C.1: Current Prole for Mode 1

Figure C.2: Current Prole for Mode 2 33

Figure C.3: Current Prole for Mode 3

Figure C.4: Current Prole for Mode 4 34

Appendix D

Code (written in C)
D.1 Implementation of the I2C Communication Protocol

//----------------------------// I2C Functions //----------------------------// Routine: i2c_start // Inputs: none // Outputs: none // Purpose: Sends I2C Start Trasfer - State "B" //----------------------------void i2c_start (void) { SDATA = HIGH; // Set data line high delay_SCLK(); SCLK = HIGH; // Set clock line high delay_SCLK(); SDATA = LOW; // Set data line low (START SIGNAL) delay_SCLK(); SCLK = LOW; // Set clock line low delay_SCLK(); } //----------------------------// Routine:i2c_stop // Inputs: none // Outputs:none // Purpose:Sends I2C Stop Trasfer - State "C" //----------------------------void i2c_stop (void) 35

{ unsigned char input_var; SCLK = LOW; // Set clock line low delay_SCLK(); SDATA = LOW; // Set data line low delay_SCLK(); SCLK = HIGH; // Set clock line high delay_SCLK(); SDATA = HIGH; // Set data line high (STOP SIGNAL) delay_SCLK(); input_var = SDATA; // Put port pin into HiZ } //----------------------------// Routine:i2c_write // Inputs: output byte // Outputs:none // Purpose:Writes data over the I2C bus //----------------------------void i2c_write (unsigned char output_data) { unsigned char index; // Send 8 bits to the I2C Bus for(index = 0; index < 8; index++) { // Output the data bit to the I2C Bus SDATA = ((output_data & 0x80) ? 1 : 0); output_data <<= 1; // Shift the byte by one bit SCLK = HIGH; // Clock the data into the I2C Bus delay_SCLK(); SCLK = LOW; delay_SCLK(); } SDATA = HIGH; index = SDATA; // Put data pin into read mode delay_SCLK(); SCLK = HIGH; // Clock the ACK from the I2C Bus delay_SCLK(); SCLK = LOW; delay_SCLK(); }

36

//----------------------------// Routine:i2c_read // Inputs: none // Outputs:input byte // Purpose:Reads data from the I2C bus //----------------------------unsigned char i2c_read (void) { unsigned char index, input_data; index = SDATA; // Put data pin into read mode input_data = 0x00; for(index = 0; index < 8; index++) { input_data <<= 1;// Shift the byte by one bit SCLK = HIGH; // Clock the data into the I2C Bus delay_SCLK(); input_data |= SDATA;// Input the data from the I2C Bus delay_SCLK(); SCLK = LOW; delay_SCLK(); } return input_data; } void shutdown_TI() { unsigned char Addr=0x90; // 7 bit 100100 unsigned char VDCDC1=0x0C; // 0000 1100 unsigned char CHCONFIG=0x07;// 0000 0111 unsigned char VREGS1=0x0E; // 0000 1110 printf("shutting down..."); i2c_start(); // Send I2C Start Transfer i2c_write(Addr); // Send identifier I2C address - Write i2c_write(0x0E); // Send control byte to device i2c_write(0x00); // Send voltage to DAC i2c_stop(); // Send I2C Stop Transfer } //----------------------------// MAIN FUNCTION void main (void) 37

{ unsigned char index,index1=253; initialize_system(); printf("\n\rSmart cane, Inc.\n\r");// Display starup message printf("MCU I"); printf("%c",index1); printf("C Example Test Program\n\r"); printf("Version 4.0.0\n\r"); printf("All rights reserved.\n\n\r"); while (1) { for(index=0;index<250;index++) for(index1=0;index1<250;index1++); for(vd = 1;vd <= 4;vd++) { printf("\n vd = %c",vd+48); printf("\n VREGS1 "); read_reg(0x0E); write_reg(0x0E,0xCC); read_reg(0x0E); printf("\n VDCDC1 "); read_reg(0x0C); write_reg(0x0C,0x00); printf("\n VDCDC1 "); read_reg(0x0C); write_reg(0x0C,0x3B); printf("\n VDCDC1 "); read_reg(0x0C); write_reg(0x0C,0x2B); read_reg(0x0C); break; } for(index=0;index<213;index++); read_reg(0x0C); while(1); } }

38

D.2

Code for the Cane Module

#include <reg52.h> #include <stdio.h> /*--------------------------------Timer 0 Overflow Interrupt ---------------------------------*/ unsigned int T0_ISR_count = 0; /* *********** ATMEL *************** P2_2 pin 23 Mode select P2_1 pin 22 SRF_OUT P2_0 pin 21 SRF_IN P1_0 pin 1 To Vibrator P1_1 pin 2 To Beeper ********************************** */ sbit P1_0 = P10; sbit P1_1 = P11; sbit P2_0 = P20; sbit P2_1 = P21; sbit P2_2 = P22; sbit P1_2 = P12; sbit P2_7 = P27; sbit P2_6 = P26; sbit P2_5 = P25; /* ****************************************** Other Global Variables ***************************************** */ #define POK_NOT P2_7 #define CHG_NOT P2_6 #define POWER_LOW_NOT P2_5 #define #define #define #define #define #define ln printf("\n") MAX_VELOCITY_ARRAY 4 MAX_MODE_ARRAY 7 THRESHOLD 6 MAX_REP_TIME_CHG 100000 MAX_REP_TIME_POWER 1000

39

unsigned long idata width; unsigned long idata width_old; unsigned long idata time_bet_widths; int current_mode; int running_mode; unsigned int numb_equal_modes; int mode_has_changed; int emergency; int emergency_code_running; int fifo_front; int get_width_from_pattern; unsigned long int pok_chg_time; unsigned long int power_time; signed long time_left; void get_width(); /* ****************************************** Global Arrays for FIFO ***************************************** */ int idata ABOVE_THRESHOLD_ARRAY [MAX_VELOCITY_ARRAY]; /* ****************************************** Timer Function ***************************************** */ void T0_ISR (void) interrupt 1 { T0_ISR_count++; TF0 = 0; // Reset the interrupt request } /* ****************************************** FIFO and WIDTH and other Functions ***************************************** */ void fifo_insert(int vel) { if (fifo_front == MAX_VELOCITY_ARRAY - 1) fifo_front = 0; else fifo_front++; if (vel >= THRESHOLD) ABOVE_THRESHOLD_ARRAY[fifo_front] = 1; else ABOVE_THRESHOLD_ARRAY[fifo_front] = 0; } 40

void initialize() { unsigned long start; unsigned long finish; int i; T0_ISR_count = 0; // Reset Timer TH0 = 0; TL0 = 0; TR0 = 1; P2_0 = 0; // srf input initiallly zero ... current_mode = 5;// default mode is out of range. running_mode = 5; mode_has_changed = 0; P1_0 = 1; P1_1 = 1; emergency = 0; // initializing charging parameters pok_chg_time = MAX_REP_TIME_CHG; power_time = MAX_REP_TIME_POWER; // initializing fifo fifo_front = 0; for (i = 0; i < MAX_VELOCITY_ARRAY; i++) ABOVE_THRESHOLD_ARRAY[i] = 0; printf ("\nStart a pulse.\n"); while (!P2_1) //Input Trigger for SRF { P2_0 = 1; for (i = 0; i < 5; i++) { } P2_0 = 0; } start = (unsigned long)((TH0 << 8) | TL0 | ((unsigned long)T0_ISR_count << 16)); while (P2_1); //Waiting for the SRF line to go down for pulse measurement finish = (unsigned long)((TH0 << 8) | TL0 | ((unsigned long)T0_ISR_count << 16)); 41

width_old = 0; width = finish - start ; T0_ISR_count = 0; // Reset Timer TH0 = 0; TL0 = 0; TR0 = 1; get_width_from_pattern = 0; get_width(); } void beep_chg(unsigned int duration) { unsigned int i; for(i=0; i<duration; i++) P1_1 = 0; P1_1 = 1; } void beep_chg_not(unsigned int duration) { unsigned int i,j; for(i=0; i < 5; i++) { for(j=0; j < duration; j++) P1_1 = 0; } P1_1 = 1; } void beep_power_low(unsigned int duration) { unsigned int i; for(i=0; i<duration; i++) P1_1 = 0; P1_1 = 1; } void f_chg() { while (CHG_NOT == 0) { if (pok_chg_time == MAX_REP_TIME_CHG) beep_chg(10000); 42

pok_chg_time --; if (pok_chg_time == 0) pok_chg_time = MAX_REP_TIME_CHG; } } void f_chg_not() { // while chord connected and charging over while (POK_NOT == 0) { if (pok_chg_time == MAX_REP_TIME_CHG) beep_chg_not(20000); pok_chg_time --; if (pok_chg_time == 0) pok_chg_time = MAX_REP_TIME_CHG; } initialize(); } void f_power_low() { if (power_time == MAX_REP_TIME_POWER) beep_power_low(10000); power_time --; if (power_time == 0) power_time = MAX_REP_TIME_POWER; } void get_width() { unsigned long T0 = (unsigned long)((TH0 << 8) | TL0 | ((unsigned long)T0_ISR_count << 16)); unsigned long T1,T2 = 0; int previous_mode = current_mode; int velocity = 0; int sum = 0; int i; width_old = width; if (POWER_LOW_NOT == 0) f_power_low(); if (POK_NOT == 0) 43

mode_has_changed = 1; while (!P2_1) //Input Trigger for SRF { P2_0 = 1; for (i = 0; i < 5; i++) { } P2_0 = 0; } T1 = (unsigned long)((TH0 << 8) | TL0 | ((unsigned long)T0_ISR_count << 16)); time_left = time_left - (T1 - T0); if ((time_left <= 0) && (get_width_from_pattern == 1)) return; while (P2_1); //Waiting for the SRF line to go down for pulse measurement time_bet_widths = (unsigned long)((TH0 << 8) | TL0 | ((unsigned long)T0_ISR_count << 16)); width = time_bet_widths - T1 ; P1_2 = 1; T0_ISR_count = 0; TH0 = 0; TL0 = 0; TR0 = 1; P1_2 = 0;

// Reset Timer

time_left = time_left - (time_bet_widths - T1); if ((time_left <= 0) && (get_width_from_pattern == 1)) return; //printf ("The width pulse is: %ld uSec\n",width ); velocity = (int) (((int)(width_old - width)) / ((int)(time_bet_widths >> 10))) ; //printf ("\nThe velocity is: %i \n\n",velocity); fifo_insert(velocity); for (i = 0; i < MAX_VELOCITY_ARRAY; i++) sum = sum + ABOVE_THRESHOLD_ARRAY[i]; // Emergency Check code 44

if (sum == MAX_VELOCITY_ARRAY) { P1_1 = 0; P1_0 = 1; emergency = 1; mode_has_changed = 1; running_mode = 6; emergency_code_running = 1; } else emergency = 0; // VIB Set Mode Code if(P2_2 == 1) //**********SHORT RANGE ********* { if ((width <= 6385) & (width > 3725)) {current_mode = 4;} // 70 - 120cm else if ((width <= 3725) & (width > 1613)) {current_mode = 2;} // 30 - 70cm else if ((width <= 1613) & (width > 0)) {current_mode = 1;} // 0 - 30cm else {current_mode = 5;} // 5 => not in range } else //**********LONG RANGE ********* { if ((width <= 15759) & (width > 10567)) {current_mode = 4;} // 200 - 300cm else if ((width <= 10567) & (width > 5869)) {current_mode = 3;} // 110 - 200cm else if ((width <= 5869) & (width > 2727)) {current_mode = 2;} // 50 - 110cm else if ((width <= 2727) & (width > 0)) {current_mode = 1;} // 0 - 50cm else {current_mode = 5;} // 5 => not in range } // This print is very important as it provides delay for the next srf input pulse. printf ("\n\nCurrent Mode is: %i Running Mode is: %i\n",current_mode,running_mode); if (previous_mode == current_mode) numb_equal_modes++; else numb_equal_modes = 0; 45

//if ((running_mode != current_mode) && (numb_equal_modes >= MAX_MODE_ARRAY - 1) && (emergency_code_running == 0)) if ((running_mode != current_mode) && (numb_equal_modes >= MAX_MODE_ARRAY - 1) && (emergency_code_running == 0)) { mode_has_changed = 1; running_mode = current_mode; } T2 = (unsigned long)((TH0 << 8) | TL0 | ((unsigned long)T0_ISR_count << 16)); time_left = time_left - (T2); }

void buzzer_high (unsigned long duration) { mode_has_changed = 0; while (emergency == 1) { time_left = duration; while (time_left > 0) { get_width(); } } emergency_code_running = 0; running_mode = current_mode; P1_1 = 1; } void pulse_high (unsigned long duration) { mode_has_changed = 0; time_left = duration; P1_0 = 0; while ((time_left > 0) && (mode_has_changed == 0)) { get_width(); } } void pulse_low (unsigned long duration) 46

{ mode_has_changed = 0; time_left = duration; P1_0 = 1; while ((time_left > 0) && (mode_has_changed == 0)) { get_width(); } } void nokia_pulse(unsigned long count_high, unsigned long count_low) { get_width_from_pattern = 1; mode_has_changed = 0; while (mode_has_changed == 0) { pulse_high(count_high); if (mode_has_changed == 0) pulse_low(count_low); } } void samsung_pulse (int n, unsigned long count_high, unsigned long count_low, unsigned long interval) { int i = 0; get_width_from_pattern = 1; mode_has_changed = 0; while (mode_has_changed == 0) { while ( (i < n) && (mode_has_changed == 0)) { pulse_high(count_high); if (mode_has_changed == 0) pulse_low(count_low); i++; } if (mode_has_changed == 0) pulse_low(interval); i = 0; } } 47

/*------------------------------MAIN C function -----------------------------*/ void main (void) { int i; /*-------------------------------------Set serial port for 9600 baud at 11.0592 MHz. Note that we use Timer 1 for the baud rate generator. --------------------------------------*/ SCON = 0x50; TMOD |= 0x20; TH1 = 0xFA; TR1 = 1; TI = 1; PCON |= 0x80; printf ("\nPulse Width Example Program\n\n"); /*-------------------------------------Enable interrupts for timer 0. --------------------------------------*/ ET0 = 1; EA = 1; /*-------------------------------------Set Timer0 for 16-bit interval timer mode. --------------------------------------*/ TMOD = (TMOD & 0xF0) | 0x09; // buzzer while starting of the device for(i=0; i<20000; i++) P1_1 = 0; for(i=0; i<20000; i++) P1_1 = 1; for(i=0; i<20000; i++) P1_1 = 0; P1_1 = 1; initialize();

48

while ( 1 ) { if (POK_NOT == 0) { if (CHG_NOT == 0) f_chg(); else f_chg_not(); } //else if (POWER_LOW_NOT == 0) // f_power_low(); else { switch (running_mode) { case 1: nokia_pulse(20000,150000); break; case 2: nokia_pulse(50000,250000); break; case 3: samsung_pulse(2,20000,150000,650000); break; case 4: samsung_pulse(1,20000,150000,750000); break; case 5: P1_0 = 1; get_width_from_pattern = 0; get_width(); break; case 6: buzzer_high(350000); break; } } // end else } // end while }

49

References
[1] The BAT K-Sonar, Bay Advanced Technologies, 2006. Available at: www.batforblind.co.nz [2] Elchinger G.M., 1981, US Patent Number 4,280,204 [3] UltraCane by Hoyle B, Withington D, Waters D, 2006. Available at: http://www.soundforesight.co.uk/index.html [4] Ho V.H., and Schwab I. R, 2001, Social economic development in the prevention of global blindness, Br. J. Ophtalmol. 2001; 85:pp.653-657. [5] Palmtip and PalmSonar, Bay Advanced Technologies, 2006. Available at: http://www.palmsonar.com/ [6] Miniguide, GDP Research, Australia. Available at: http://www.gdp-research.com.au/ [7] Devantech 2003, SRF04 Ultrasonic Ranger. Available at: http://www.acroname.com/robotics/parts/R93-SRF04.html [8] Atmel Corporation, 2005, 8051 Architecture. Available at: http://www.atmel.com/products/8051 [9] Maxim Dallas Semiconductors. Available at: http://www.maxim-ic.com/quick view2.cfm/qv pk/4882 [10] Texas Instruments. Available at: http://focus.ti.com/docs/prod/folders/print/tps61032.html [11] National Survey of Electronic Travel Aid Use by BB Blasch, RG Long, N Grifn-Shirley Pub: Nov89 Journal of Visual Impairment and Blindness

50

You might also like