Introduction: Parkinson's Laser Walker
Parkinson's Disease is caused by the decrease of dopamine production in the substantia nigra. This causes symptoms that may affect gait such as freezing. During freezing, it is difficult to initiate movement in gait, so a visual cue of a laser can help some begin their first step. This laser has a motion sensor to allow for the laser to automatically turn on when the client steps into the field of the sensor.
This product includes components from an Arduino circuit board, a 3D printed holder for the breadboard, a motion sensor and line laser diode and some adhesive devises such as velcro and zip ties in order to keep the previously states components in place.
Step 1: Set Up the Ardiuno Circuit Board
Components Needed:
- (1) Distance sensor [with wire extenders]
- (3) 330 ΩResistors (orange, orange, brown)
- (1) RGB LED
- (10) Jumper Wires
- (1) Line Laser Diode (5mW 650nm Red) [with wire extenders]
Location of Components:
- Distance Sensor: A3, A4, A5, A6
- 330 Ω Resistors: E22 to F22, E23 to F23, E25 to F25
- RGB LED: A25, A24, A23, A22
- Jumper Wires: E3 to 5V Rail (+), E4 to Digital Pin 11, E5 to Digital Pin 12, E6 to GND Rail (-), 5V Rail (+) to 5V, GND Rail (-) to GND, J22 to Digital Pin 6, J23 to Digital Pin 5, J25 to Digital Pin 3, E24 to GND Rail (-)
- Line Laser Diode: 5V Rail (-), Digital Pin 13
Code:
/*
SparkFun Inventor’s Kit Circuit 3B-Distance Sensor
Control the color of an RGB LED using an ultrasonic distance sensor.
This sketch was written by SparkFun Electronics, with lots of help from the Arduino community.
This code is completely free for any use. View circuit diagram and instructions at: https://learn.sparkfun.com/tutorials/sparkfun-inv...
Download drawings and code at: https://learn.sparkfun.com/tutorials/sparkfun-inv...
*/
const int trigPin = 11; //connects to the trigger pin on the distance sensor
const int echoPin = 12; //connects to the echo pin on the distance sensor
const int laserPin = 13; //connects to the laser pin on the distance sensor
const int redPin = 3; //pin to control the red LED inside the RGB LED
const int greenPin = 5; //pin to control the green LED inside the RGB LED
const int bluePin = 6; //pin to control the blue LED inside the RGB LED
float distance = 0; //stores the distance measured by the distance sensor
void setup()
{
Serial.begin (9600); //set up a serial connection with the computer
pinMode(trigPin, OUTPUT); //the trigger pin will output pulses of electricity
pinMode(echoPin, INPUT); //the echo pin will measure the duration of pulses coming back from the distance sensor
pinMode(laserPin, OUTPUT); //the laser pin will output pulses of electricity
//set the RGB LED pins to output
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop() {
distance = getDistance(); //variable to store the distance measured by the sensor
Serial.print(distance); //print the distance that was measured
Serial.println(" in"); //print units after the distance
if(distance <= 10){ //if the object is close
//make the RGB LED red
analogWrite(redPin, 255);
analogWrite(greenPin, 0);
analogWrite(bluePin, 0);
analogWrite(laserPin, 225);
} else if(10 < distance && distance < 20){ //if the object is a medium distance
//make the RGB LED yellow
analogWrite(redPin, 255);
analogWrite(greenPin, 50);
analogWrite(bluePin, 0);
analogWrite(laserPin, 225);
} else{ //if the object is far away
//make the RGB LED green
analogWrite(redPin, 0);
analogWrite(greenPin, 255);
analogWrite(bluePin, 0);
analogWrite(laserPin, 0);
}
delay(50); //delay 50ms between each reading
}
//------------------FUNCTIONS-------------------------------
//RETURNS THE DISTANCE MEASURED BY THE HC-SR04 DISTANCE SENSOR
float getDistance()
{
float echoTime; //variable to store the time it takes for a ping to bounce off an object
float calculatedDistance; //variable to store the distance calculated from the echo time
//send out an ultrasonic pulse that's 10ms long
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
//send out an ultrasonic pulse that's 10ms long
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
echoTime = pulseIn(echoPin, HIGH); //use the pulsein command to see how long it takes for the
//pulse to bounce back to the sensor
calculatedDistance = echoTime / 148.0; //calculate the distance of the object that reflected the pulse (half the bounce time multiplied by the speed of sound)
return calculatedDistance; //send back the distance that was calculated
}
Step 2: 3D Print the Breadboard Holder
In order to attach the breadboard to the walker, a 3D printed holder is made so the breadboard can stay within the area of the laser and motion sensor. The holder is made for the Arduino breadboard to slide in and be held upside-down with the wired components to hang free of obstruction.
The 3D printed holder then should be fastened to the underside of the seat cushion of walker via Velcro strips.
Attachments
Step 3: Placement of the Sensor and Laser
The wires should be long enough so that it can extend to the end of the walker. The sensor should be placed on the walker so that the front of the sensor faces inward. The front of the sensor should be in a location that the client's leg will pass in front of in order to turn on the laser light. The laser should also face inward but at an angle so that the laser light shines perpendicularly to tip of the client's feet. The laser light should be a few inches in front of the sensor and feet of the client so that they have a distinct line to walk towards. The wires should be fastened securely onto the legs of the walker with zip-ties.
Step 4: How to Use the Final Product
The instructions to use the product are simple. The client should start off with one foot/leg within the range of the sensor and as the light turns on, they can start walking towards or on the laser light. This should help them initiate their step and gait cycle with the visual cue of the laser light. Since the laser is motion activated through the sensor, the client does not need to remember to turn on or off the device as it automatically does that through the sensor.