Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
1
Mobility Aid for the Visually Impaired
Ross Stephens
Project Advisor: Dr.Mitchell
April 2018
Evansville, Indiana
2
Table of Contents
Introduction……………………………………………………………….......……... 3
Problem Description………………………………………………………………… 3
Client Requirements..……………………………………………...………... 4
Solution...............…………………………………………………………...………. 4
Hardware……………………………………………………………...……... 5
Software………………………………………………………………...…… 8
Constraints……………………………………………………………...….... 9
Testing…………………………………………………………………..…... 10
Costs…………………………………………………………………………..…….. 10
Results…………………………………………………………....................……… 11
References……………………………………………………………………….…. 12
Appendix.....................................................................................................................13
List of Figures
Figure 1: Hardware Schematic……………………………………………..... 5
Figure 2: Ultrasonic Sensor ………………………………………………..…5
Figure 3: STM32F446 …………………………………………………….….6
Figure 4: Final Design …………………………………………………….….7
Figure 5: Software Flow Chart …...……………………………………….….8
List of Tables
Table 1: Cost………………………………………………………………………. 10
3
Introduction:
Visual impairments affect many citizens and the effects may vary from minor vision
impairments to complete blindness. Those individuals with minor impairments have many
medical options to aid them, but for those with more severe or total blindness there is little
medically that can be done. Treatment for these individuals becomes about providing a quality of
life, or more accurately allowing the individual to have as much independence as possible. That
is the intent of this project, to provide a visually impaired citizen with the independence to move
freely by use of a mobility aid. There are many mobility aids on the market today such as
ultrasonic canes, ultrasonic gloves, or just the seeing-eye dog. These mentioned aids can restore
a level of independence, but they keep the user’s hands occupied and come at a high financial
cost. This project aims to create a mobility aid that is worn as a belt, provides a sufficient level of
independence and is available at a low cost.
Problem Description:
The current mobility and most common aids for visually impaired people are the walking
cane and seeing-eye dog. These have both allowed for a certain amount of mobility and
independence, but they both have downsides. Walking canes require constant searching by the
individual and only allow them to sense what is right in front of them. This is an inconvenience
as it slows individuals down and keeps their hands occupied. Seeing-eye dogs do allow for the
user to move about freely without concern as the dogs are very well trained. Yet, these guides
4
come with a large price and still require the user to constantly hold onto the dog for guidance.
Despite this high cost, guide dogs are still very popular because they are one of the most, if not
most, effective mobility aids on the market. Thus, a solution is needed to provide a visually
impaired person with the safety and comfort of moving about independently, while being cost
effective. This device needs to be able to sense upcoming obstacles and alert the wearer of the
general direction and distance with ample time. This design needs to also allow for hands free
operation to allow for as much freedom as possible.
Client Requirements –
This project, at minimum, should be able to:
1.) Detect objects at a distance up to 15 feet.
2.) Alert the user of the upcoming object via feedback
3.) Give the user a sense of direction and distance to the object.
4.) Allow for hands-free use
Solution –
Hardware – Figure 1 shows a block diagram of the current design. The hardware
needed for this project was minimal, but each part was carefully selected to be able to achieve
the desired goal in a way that addressed all client requirements and kept the costs low.
5
Figure 1: Hardware Block Diagram
The first piece of hardware is the sensors. For this design, the selected sensors must be
able to accurately detect objects up to 15 feet, as the requirements stated. They also needed to
have a high resolution to accurately give the user a sense of distance. The LV-MaxSonar®-
EZ™ Series [1] were selected. They have a resolution of 1 inch and can accurately detect object
from 6 inches to 255 inches. These qualities successfully addressed the client’s needs. The
sensors can send data in the form of pulse width modulation (PWM), analog, or serial. Analog
data is used to in order to work with the soon to be discussed chaining method. The sensor can be
seen in Figure 2.
Figure 2: Ultrasonic sensor [1]
6
The project was designed on the Cortex M4 platform. I specifically chose the STMF446
board. It is pictured in figure 3. I chose this board out of familiarity, but the project could be used
on a smaller M4 microcontroller to reduce the size of the project. The processor speed is plenty
fast for the needs of the project and there were plenty of ADC pins for the sensors to be read in
properly. It is easily powered by an external 5 Volt battery and supplies the amount of current
needed to run the project.
An adjustable exercise belt [5] was used because it easily fits a wide range of sizes and
has ample space for the components. The belt also allows for the position of sensors to be easily
adjusted. The sensors must be arranged properly for each user, based on their size, such that the
best detection field is found.
Figure 3: STM32F446-ARM Nucleo Board[2].
An alert must be sent to the user via haptic feedback. Vibration motors [3] were used to
provide the feedback. The motors properly satisfied requirements of alerting the user of the
7
presence of an object, giving them a sense of direction, and providing a sense of distance. Each
sensor has a motor attached to it. Once an object is detected by the sensor, a signal is sent to
activate the corresponding motor and provides the user with a sense of direction to the object.
The motor pulses lightly for far objects, but increases in intensity as the objects gets closer.
An LCD is used to check that the sensors are reading in correct distances to objects. It
does serve the purpose of helping the user, but only for verification of proper functionality. The
LCD is detached for normal use. The belt used in the final design can be seen in figure 5.
Figure 4: Adjustable Belt used in Final Design
All components are powered by 5 volts. An external rechargeable [5] battery is used to
directly power the Nucleo board and then the sensors and motors are powered from the on board
+5 volt pins. A cable with an on/off switch [6] is used to connect to the board.
8
Software – The software uses the microcontroller get the data from the sensors by
performing ADC. This data is used to determine location and distance. The information is then
passed on to the proper vibration motor. Figure 4 is a flow chart of my program.
Figure 5: Software Flowchart
The complication of the software was the need to scan for objects as quickly as possible,
but to do it in a way that minimized interference. Ultrasonic sensors will interfere with each
other if they are operated close together. The solution to this problem was to collect data from
each sensor individually. This means that each sensor only senses for a short amount of time
before the next one started. The chosen sensors made this implementation simple by use of the
manufacturer’s provided sensor chaining solution. The first sensor’s Rx pin is brought high for a
time greater than 20 s. This begins the ranging process. The pin is then brought low and a
transmit burst is sent to the next sensors Rx pin. Each sensing period is approximately 50 ms
which keeps the delay unnoticeable by the user.
The result of each search is stored into an integer variable. This continues until the last
sensor has been activated. The variables are then checked for their distance and the
corresponding vibration motor is then vibrated for an amount of time dependent upon distance.
9
With the use of the LCD for setup, there is additional code after the motors are vibrated.
The values are printed to the LCD to check functionality. This code is to be removed after setup
by being reprogrammed.
Constraints – Safety for the user is an obvious concern here. This design is intended to
grant the user the highest level of independence, but it is not recommended to solely rely on this
design for safety. High risk areas (such as traffic crossings or other potentially hazardous areas)
are above the level that this prototype is on. The current level of design will allow the user
mobility in low risk areas with sufficient levels of independence.
The project is powered by an external battery. The battery selected is rechargeable. This
reduces the associated environmental risk of using disposable batteries.
Cost for this design is low and is very economical, especially when compared to other
options on the market. This low cost and simplistic design also lends itself to being easily
manufactured. Through the manufacturing process, total cost could be lowered through further
refinement.
Visual aids will always be necessary and that would lead to this design being sustainable.
Not only is the design sustainable, but it could be coupled with other technologies to develop an
even more advanced product.
This product uses external ultrasonic sensors which subjects the design to the IEEE
C95.7-2014 - IEEE Recommended Practice for Radio Frequency Safety Programs, 3 kHz to 300
GHz [5].
Testing – Testing was a large part of this project. The exact placement of the sensors
needs to be determined for each individual through testing. A course with objects at various
10
distances was used. The belt was walked through the course while notes were taken to check for
proper function and if the feedback is proper for that point in the course. This allows for
placement of sensors to be optimized to each user.
Specifications – The above discussed solution successfully addressed the client
requirements. The sensors detect accurately up to fifteen feet. The use vibration motors gives
both distance and location to the user. The belt grants the user hands-free use.
Costs –
Part Unit cost ($) Quantity Total($)
Nucleo Board 29.99 1 29.99
Sensors 25.95 2 51.9
Vibration Motors 4.95 1(pack of 8) 4.95
Belt 30 1 30
LCD 3.90 1 3.90
Rechargeable Battery 30 1 30
Charger w/ on/off switch 5.99 1 5.99
$156.73
Table 1: Costs
Table 1 details the actual costs. This is the ideal reproducible cost. This cost is very low
and increases its availability. This will also allow the product to be expanded without sacrificing
the benefit of a low price.
11
Results –
This project did successfully satisfy the minimum client requirements. The belt does have
limitations. The sensors only detect straightforward, but more could be added to detect a larger
area. Still, the belt is limited in that the ground is never checked and that leave’s users vulnerable
to trips and falls.
Still, this mobility aid serves as a strong base to build upon and create a versatile mobility
aid. Different types of sensors could be added to expand upon the current functionality. Future
work would include reducing the size of the microcontroller and adding different sensors to
increase obstacle detection ability. The low cost makes this easily accessible to all those in need,
regardless of available income. Additionally, the low cost allows the design to be expanded on in
the ways I just described such that the total cost is kept at a minimum.
12
References –
[1] Sparkfun. “Ultrasonic Range Finder - LV-MaxSonar-EZ1”. [Online]. Available: https://www.sparkfun.com/products/639
[2] Amazon. “STM4446re Nucleo Board”. [Online]. Available:
https://www.amazon.com/gp/product/B014IXUB1M/ref=oh_aui_detailpage_o09_s00?ie=UTF8&psc=1
[3] Sparkfun. ‘Vibration Motors”. [Online]. Available: https://www.sparkfun.com/products/8449
[4] Amazon. “Anker PowerCore 10000”. [Online].Available: https://www.amazon.com/Anker-
PowerCore-Ultra-Compact-High-speed-
Technology/dp/B0194WDVHI/ref=sr_1_3?ie=UTF8&qid=1524766576&sr=8-
3&keywords=external+battery
[5] Academy. “Nike Expandable Waist Pack” [Online]. Available: https://www.academy.com/shop/pdp/nike-expandable-waist-pack#repChildCatid=5232569
[6] Amazon. “MakerSpot 5ft - 1.5m Long USB 2.0 to Micro USB Extension Cable with Click
Button Power On Off”. [Online]: https://www.amazon.com/gp/product/B01JLGAN5A/ref=oh_aui_detailpage_o02_s00?ie=UTF8
&psc=1
[7] IEEE. IEEE C95.7-2014 - IEEE Recommended Practice for Radio Frequency Safety
Programs, 3 kHz to 300 GHz. [Online]. Available: http://standards.ieee.org/findstds/standard/C95.7-2014.html
13
Appendix –
Software –
/Ross Stephens
//Mobility aid #include "stm32f446.h"
#include "stdio.h"
//This program controls the mobility aid. A series of sensors detect objects sequentially. Each
//sensors data is stored into a variable that is used to check for distance. Output is //sent to the corresponding vibration motor and values are printed to an LCD to verify
//proper operation. The clock is set to 16 Mhz.
//LCD Functions
void delay(int x);
void ConfigureUART(unsigned int baudDivisor); void UARTPutChar(char ch);
void SendMsg(const char msg[]);
unsigned int time;
int main()
{int i,x, j, x2; RCC_AHB1ENR |= 0xF; //port clocks for ABCD
// RCC_APB1ENR |= (1 << 4); //Enable peripheral timer for timer 6
RCC_APB2ENR |= (1 << 5);
//Enable USART6 clock GPIOC_AFRL = 0x88000000;
//Alternate Func PC 6-7 to USART6 GPIOC_MODER |= 0x0A000;
//Bits 15-12 = 1010 for Alt Func on PC6, PC7
GPIOC_OSPEEDER |= 0x3000; //Bits 7-6 = 11 for high speed on PC6
//GPIOC_MODER &= 0; RCC_APB2ENR |= 0x300; //Bit 8 is ADC 1,2,3 clock enable bit
//I/O bits GPIOA_MODER |= 0x54005; //Bits 15-14 = 01 for digital output on PA7,PA8,PA9
14
//OTYPER register resets to 0 so it is push/pull by default
GPIOA_OSPEEDER |= 0xC000; //Bits 15-14 = 11 for high speed on PA7 //PUPDR defaults to no pull up no pull down
GPIOA_MODER |= 0xF00; //PA4-PA5 are analog GPIOA_PUPDR &= 0xFFFFF0FF;//Pins PA4 PA5 are no pull up and no pull down
//ADC bits ADC1_CR2 |= 1; //Bit 0 turn ADC on
ADC1_CR2 |= 0x400; //Bit 10 allows EOC to be set after conversion ADC_CCR |= 0x30000; //Bits 16 and 17 = 11 so clock divided by 8
ADC1_SQR3 |= 0x5; //Bits 4:0 are channel number for first conversion
// Channel is set to 5 which corresponds to PA5 ADC2_CR2 |= 1; //Bit 0 turn ADC on
ADC2_CR2 |= 0x400; //Bit 10 allows EOC to be set after conversion ADC_CCR |= 0x30000; //Bits 16 and 17 = 11 so clock divided by 8
ADC2_SQR3 |= 0x4; //Bits 4:0 are channel number for first conversion. PA 4
char msg[30];
ConfigureUART(3328);
while(1)
{ GPIOA_ODR &= 0x0000;
GPIOA_ODR |= (1<<7); //RX high, begins ranging for first sensor for(i=0;i<42000;i++)
{for(j=0;j<2;j++);}
GPIOA_ODR &= (0<<7);//RX brought low, sends transmit burst to next sensor ADC1_CR2 |= 0x40000000; //Bit 30 does software start of A/D conversion
while((ADC1_SR & 0x2) == 0); //Bit 1 is End of Conversion x = ADC1_DR; //store distance
for(i=0;i<60000;i++);//wait until ranging has started 2ndsensor
ADC2_CR2 |= 0x40000000; //Bit 30 does software start of A/D conversion while((ADC2_SR & 0x2) == 0); //Bit 1 is End of Conversion
x2 = ADC2_DR; //store distance //This section checks the distance and vibrates motor accordingly
if(x < 1450 && x > 975) // Approx 15 to 10 feet. Everything beyond is ignored
{GPIOA_ODR |= (1<<8); //output to vibtaion motor for(i=0;i<60000;i++)
{for(j=0;j<10;j++);} // j is used to control the length of the vibration. GPIOA_ODR &= (0<<8);}
else if(x < 950 && x > 725) //~9.5 to 7.5 feet
{GPIOA_ODR |= (1<<8); for(i=0;i<60000;i++)
{for(j=0;j<35;j++);} // j is used to control the length of the vibration. GPIOA_ODR &= (0<<8);}
else if (x < 700 && x > 510) //~ 7 to 5 feet
15
{GPIOA_ODR |= (1<<8);
for(i=0;i<60000;i++) {for(j=0;j<60;j++);} // j is used to control the length of the vibration.
GPIOA_ODR &= (0<<8);} else if(x < 500 && x > 310) //~5 to 3 feet
{GPIOA_ODR |= (1<<8);
for(i=0;i<60000;i++) {for(j=0;j<125;j++);} // j is used to control the length of the vibration.
GPIOA_ODR &= (0<<8);} else if(x < 299) //3 feet
{GPIOA_ODR |= (1<<8);
for(i=0;i<60000;i++) {for(j=0;j<150;j++);} // j is used to control the length of the vibration.
GPIOA_ODR &= (0<<8);} else
{for(i=0;i<500;i++);}
//This section checks the distance and vibrates motor accordingly
if(x2 < 1450 && x2 > 975) // Approx 15 to 10 feet. Everything beyond is ignored {GPIOA_ODR |= (1<<9);
for(i=0;i<60000;i++)
{for(j=0;j<10;j++);} GPIOA_ODR &= (0<<9);}
else if(x2 < 950 && x2 > 725) //~9.5 to 7.5 feet {GPIOA_ODR |= (1<<9);
for(i=0;i<60000;i++)
{for(j=0;j<35;j++);} GPIOA_ODR &= (0<<9);}
else if (x2 < 700 && x2 > 510) //~ 7 to 5 feet {GPIOA_ODR |= (1<<9);
for(i=0;i<60000;i++)
{for(j=0;j<60;j++);} GPIOA_ODR &= (0<<9);}
else if(x2 < 500 && x2 > 310) //~5 to 3 feet {GPIOA_ODR |= (1<<9);
for(i=0;i<60000;i++)
{for(j=0;j<125;j++);} GPIOA_ODR &= (0<<9);}
else if(x2 < 299) //3 feet {GPIOA_ODR |= (1<<9);
for(i=0;i<60000;i++)
{for(j=0;j<100;j++);} GPIOA_ODR &= (0<<9);}
else {for(i=0;i<500;i++);}
float voltage = ((((x/4095.0)*5)/.0098)/12)*.72; //convert integer value to float
16
float voltage2 =
((((x2/4095.0)*5)/.0098)/12)*.72;//scaling equation to decimal value SendMsg( " Distance: ");
sprintf(msg," %1.2f Distance: %1.2f ",voltage ,voltage2 );// print value to LCD. Both displayed on LCD at same time on two different lines
SendMsg(msg); //Sends message to the LCD
delay(x); // holds values until cleared UARTPutChar('/'); //Clears
}
}
void UARTPutChar(char ch) {
//Wait for empty flag while((USART6_SR & 0x80) == 0);
USART6_DR = ch;
} //
void SendMsg(const char msg[]) {
int i = 0;
while(msg[i] != 0) {
UARTPutChar(msg[i]); i++;
}
}
void delay(int x) //delay variable used before screen is cleared {
x = 250;
int i,j; for(i=0;i<10000;i++)
for(j=0;j<x;j++); }
void ConfigureUART(unsigned int baudDivisor)
{ USART6_CR1 = 0;
//Disable during set up. Wd len = 8, Parity = off USART6_BRR = baudDivisor;
//Set up baud rate
USART6_CR2 = 0; //1 stop bit
USART6_CR1 = 0x200C; USART6_CR3 = 0;
//Disable interrupts and DMA
17
}