top of page

Wheelchair Sensor System

  • Han Dang
  • Jun 1, 2016
  • 7 min read

Wheelchair users’ safety has been a big concern since the wheelchair was invented. In the US, there are over 3 million wheelchair users, of which almost 30 thousand users faced serious accidents every year. Most of these accidents occurs while patients transferring from and to their wheelchair. In this lab, we used an arduino board, ping sensor, LED, and keypad to measure the height of the toilet bowl. Our code take in user’s estimate distance from the back of the toilet to the edge of the rim, measure the distance from the ping sensor to the toilet seat, and subtract that distant from the servo mounted height. For testing, we indicated the given toilet seat height was 50 cm. The code need to be more refined, and we can also develop the project by adding stepper motor, extra ping sensor to cancel noise.

Wheel and chair was invented in Mediterranean basin around 4000 B.C. Inventors around the world such as Geeks, Spain, China… also have evidences of attaching wheels to their furniture. In 1655, a paraplegic watchmaker, Stephen Farfler built himself a self-propelled chair when he was 22.

Some source suggested that the development of wheelchair led to the development of bicycle. Since the wheelchair was invented, people concerned about the comfort for the disabled people. They added features such as reclining back, adjustable foot rests, pushrims, motor,... Along with the development of material, lighter materials are incorporated in wheelchairs to help reduce the weight, and users use less energy to drive the vehicle. [1]

a) Accidents related to wheelchairs

In the US, an estimate of 3.3% of a million wheelchair users have a serious wheelchair-related accident. Most of which experienced falling from their chairs or tipped over, some caused by stairs, environment factors,... Wheelchair-related accidental deaths rarely occur. However, most of these reasons are preventable [2]. According to lawyer Robert Kreisman, causes of wheelchair accidents are often by transferring a patient from or to their wheelchairs without any assistance.

b) Prevent tipping and falling wheelchair technology

Nowadays, a wheelchair can weight as low as 20 - 25 lbs (9-11 kg) which prevent users from hurting or injuring their wrists; however, it is easier to tip over the wheelchair that causes serious problem. There are many solutions out there to falling and tipping over problem.

II. METHODOLOGY AND EXPERIMENTAL METHODS

  1. Apparatus:

In this lab, we are working with electrical components and the following list is used in the final product:

  • Arduino Uno board

  • Keypad: to receive input from users

  • 330 Ohm resistors

  • LEDs: to indicate the distance between the user and the toilet bowl

  • Ping sensor: using ultrasound to measure time travels and use time to convert into distance.

Our main focus for the wheelchair design is to create a sensor system using proximity sensors. To create this system, we are using an Arduino Uno microcontroller board; Arduino is an open source physical computing platform. For our system, our proximity sensors will detect the distance and height of the toilet. In order to determine a feasible solution, we proceeded to brainstorm and visualize potential ideas.

  1. Brainstorm:

For our initial design for this solution is to incrementally raise one Ping Ultrasonic Distance Sensor to determine the height of the toilet. The Ping initially would be pointed horizontal to measure distance. Assuming the distance from the lid to the sensor attached to the wheelchair is 10 cm, as the Ping raises, the Ping will read 10 cm constantly until there will be a great increase. This is when the sensor will reach the back of the toilet. Once the Ping has cleared the top of the lid, the Ping sensor will rotate 90 degrees downward to determine the height.

In order to raise and lower the Ping sensor incrementally, our plan was to attach a gear to a 9V motor. The motor and gear would be stationary as it raised a gear rack with our Ping sensor attached. In order to reduce vibrations that could potentially skew our proximity data, we constructed a track at which our gear rack would travel.

To rotate our Ping sensor to a desired angle, we utilized a SG90 Micro Servo with a weight of 9 grams. We used an attachment to connect our Ping and Servo to ensure to proper rotation. Given that we have an unorthodox method, we were forced to 3D print PLA parts such as: the gear, the gear rack, and the Ping/Servo attachment.

We encounter an obstacle on this.

Another method our team developed is a similar idea but to raise our Ping sensor using the Servo; this allowed us to not worry about complications of the motor. The SG90 Micro Servo has limited rotation of 180 degrees. In order to raise our sensors to a maximum of 10 cm, we attached the Servo to a rod on one side and a wire attached to the Ping on the other side of the rod. We were limited to only one Servo, therefore, we used an additional Ping sensor to determine height; initially using the Servo to rotate our Ping 90 degrees.

To determine the length of our rod, we used basic trigonometry to determine the minimum length required to move our sensors 10 cm would have to be no less than 14.14 cm (given a 180 degree restriction for the Servo). To ensure that the weight of the two Ping sensors (and breadboard /wires) would not be too great for our Servo to rotate, we used counterweights on the opposing side creating a crane mechanism.

2) Final decision:

Our final brainstorm design is a simplification of the prior designs. This design uses our Ping and Servo mechanism, however, instead of raising and lowering, it is stationary on the wheelchair. This allows the user to input a desired “Target Distance” and once that distance is met, the Servo will rotate 90 degrees, allowing the Ping to measure the height. This allows us to have a more compact system which can be installed on the wheelchair with minimal complications.

3) Code Flow:

Our code contains functions such as startPing() which will activate the Ping sensor to get distance as an output, getTarget() - activate keypad and take in 2 digits integer from user.

First, the program can only be activated until the user press the asterisk “*” key; otherwise. Then, it asks for the distance in centimeters from the back of the toilet to the user that they want to measure the height at. Once the wheelchair reach to the input distance, the servo will be activated and turn the ping sensor face down to read the height. Because the servo is mounted at the constant height, the toilet seat height is going to be indicated by taking the height from the ping sensor off the servo mounted height (60cm in this case).

4) Testing:

Our code requires user to estimate the toilet bowl’s depth which is 40- 60 cm based on the toilet size. However, if the user type in 50, it will work almost with every toilet based on our research on toilet bowl dimension. Professor have asked us to tested 2 measurements: at 50 cm, we provided the toilet height is 60cm which we later realized that one of the connection wire was disconnected to the breadboard, so this number was not correct; at 45 cm, we indicated the toilet height was 50 cm.

I. REFERENCES

[1] Dr. Bonita Sawatzky. “Wheeling in the New Millennium: The history of the wheelchair and the driving forces in the wheelchair design today.” Dept of Orthopaedics. BC’s Children’s Hospital. Wheelchairnet.org. Web. 4 Jun 2016

[2] Calder CJ, Kirby RL. “Fatal wheelchair-related accidents in United States.” Department of Medicine, Dalhousie University, Halifax, Nova Scotia, Canada. Pubmed.gov. Web. 4 Jun 2016

[3] Ronald P. Gaal, BSME, PE; Nancy Rebholtz, BSME; Ralf D. Hotchkiss, ScD; Peter F. Pfaelzer, PhD, PE. “Wheelchair rider injuries: Causes and consequences for wheelchair design and selection.” Journal of Rehabilitation Research and Development Vol. 34 No. 1, January 1997.58-71. Pdf. 6 Jun 2016

J. APPENDICES

  1. Our code:

// Mechatronic Project: Parking Assist

// Presenters: Stephen Ton, Han Dang, Ryan O'Connor

// BME 493

// Dr. Woon Jong Yoon

#include <Keypad.h>

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

#include <Servo.h>

#include <math.h>

int pingPin = 10;

int pingEcho = 11;

int pos = 0;

byte red = 13;

byte yellow = 12;

char escKey = '#';

const byte ROWS = 4; //four rows

const byte COLS = 3; //three columns

char keys[ROWS][COLS] = {

{'1', '2', '3'},

{'4', '5', '6'},

{'7', '8', '9'},

{'*', '0', '#'}

};

// if not correctly working? modify here!!

byte rowPins[ROWS] = {7, 2, 3, 5 }; //connect to the row pinouts of the keypad (digital)

byte colPins[COLS] = {6, 8, 4}; //connect to the column pinouts of the keypad

//create a new Keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

// this constant won't change. It's the pin number

// of the sensor's output:

const byte ledPins[] = {yellow,red};

Servo myservo;

int getTarget()

{

int inputNum;

int inputLength = 2;

char inputString[265];

int count = 0;

// Acquires the user's TARGET input via the keypad

while (count < inputLength) {

char key = keypad.getKey();

if (key) {

inputString[count] = key;

Serial.print(key);

count++;

}

}

// Converts the string input of the keypad to an integer

inputNum = atoi(inputString);

// Prints the user's TARGET distance on the screen

Serial.println("\n********************************");

Serial.print("Your TARGET distance is: ");

Serial.println(inputNum);

Serial.println("********************************");

return inputNum;

}

long startPing (){

// This function is to start the Ultrasonic device, and return a distance in cm

long duration, cm;

// The PING))) is triggered by a HIGH pulse of 2 or more microseconds.

// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:

pinMode(pingPin, OUTPUT);

digitalWrite(pingPin, LOW);

delayMicroseconds(2);

digitalWrite(pingPin, HIGH);

delayMicroseconds(5);

digitalWrite(pingPin, LOW);

// The Echo pin is used to read the signal from the PING))): a HIGH

// pulse whose duration is the time (in microseconds) from the sending

// of the ping to the reception of its echo off of an object.

pinMode(pingEcho, INPUT);

duration = pulseIn(pingEcho, HIGH);

// convert the time into a distance

cm = microsecondsToCentimeters(duration);

delay(200);

return cm;

}

// function that converts time to distance

long microsecondsToCentimeters(long microseconds) {

// The speed of sound is 340 m/s or 29 microseconds per centimeter.

// The ping travels out and back, so to find the distance of the

// object we take half of the distance travelled.

return microseconds / 29 / 2;

}

void setup() {

// initialize serial communication:

Serial.begin(9600);

Serial.println("******************");

Serial.println("Welcome to Lab #3 Group Batman A\n Press *: Start of measurement \n Red LED: Outside Target Distance, Yellow LED: Target Distance Reached");

Serial.println("******************");

myservo.attach(9);

size_t i;

for (i = 0 ; i < sizeof(ledPins); i++) {

pinMode(ledPins[i], OUTPUT);

digitalWrite(ledPins[i], LOW);

}

}

void loop() {

// establish variables for duration of the ping,

// and the distance result in inches and centimeters:

char key = keypad.getKey();

Serial.print(key);

if (key == '*') {

Serial.println("Please enter your target range");

int target = getTarget();

long cm = startPing();

Serial.print(cm);

while ((cm <= (target - 1)) || (cm > (target + 1))) {

cm = startPing();

Serial.print(cm);

Serial.print("cm");

Serial.println();

digitalWrite (yellow, HIGH);

delay (100);

}

if ( (cm <= (target + 1)) && (cm > (target - 1)) ) {

Serial.print("Target distance reached: ");

Serial.print(cm);

Serial.print("cm");

Serial.println();

digitalWrite(yellow, LOW);

digitalWrite(red, HIGH);

for(pos = 0; pos < 90; pos++) {

myservo.write(pos);

delay (1000);

int height = startPing();

int toiletHeight = 60 - height;

Serial.print("Toilet Height: ");

Serial.print(toiletHeight);

Serial.print("cm");

Serial.println();

break;

}

}

}

else {

Serial.print(“Please press * to start measuring.”);

}


 
 
 

Comments


bottom of page