Walker aide

Members:

Yifei Liu, Reema Naqvi, Olivia Ting

Components:

1 Walker

Arduino

LEDs

FSRs

Piezo speaker

DC motor

Some wireless mechanism for controlling the sensors

Idea:

For our final project, we decided to do something different from our mid term presentation while staying in the same space i.e. building something to benefit the elderly. We will build a system around a walker that through light, sound and vibration signals, enables the correct and safe use of walkers.

A large number of the elderly population uses a walker at some point, whether on a temporary basis following a fall/surgery or permanently when need be. But using a walker correctly is not easy or instinctive, and has a learning curve itself. Where to hold the handle, how fast to walk, how close it is to one’s body are all critical in avoiding falls or injuries. Having such a system is important not just to help people learn using a walker for the first time, but also so they don’t forget the fundamentals later on.

We will place pressure sensors on the handles as well as on a light mitt-like glove. These sensors will detect whether the person got up by putting their weight on the walker right away, or  by pushing themselves off the chair by using their hands against the chair. If they grasp the walker and try to use it to pull themselves up, they can potentially slip and fall. So, DC motor vibrations along with the Piezo speakers will buzz and alert the user if they are getting up incorrectly. Similarly, placing LEDs on the handle will signal the correct place to hold the handle.

We are in the process of deciding on a wireless technology so that we don’t have wires sticking out of the walker which would be aesthetically unappealing, as well as dangerous in case they get tangled around the wheels or the user.

Failed spiral

For this lab, I wanted to create an optical illusion through the movement of the DC motor. I stuck a round shaped piece of stiff paper and tried out several designs. What I wanted was an outward moving spiral and I think my design is right because I can kind of see it when the motor is turning off but otherwise, the motor spins too fast for the effect to be visible to the naked eye. I settled with a design which too demonstrates how perception works and what we see may not be what is.

Components

  • Arduino Uno
  • breadboard
  • 1 DC motor
  • 1 Transistor
  • 1 Diode
  • 1 resistors (one 1KΩ)
  • 1 potentiometer
  • battery pack
  • two AA batteries
  • jumper wires

Arduino Code

/*
* one pot fades one motor and LED
*/

int potPin = A0; // select the input pin for the potentiometer
int motorPin = 9; // select the pin for the Motor
int val; // variable to store the value coming from the sensor
void setup() {
pinMode (potPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
val = analogRead(potPin); // read the value from the sensor, between 0 – 1024
Serial.println(val);
analogWrite(motorPin, val/4); // analogWrite can be between 0-255
}

Photosensing Alarm Clock

Description

I wanted to make an alarm clock for people whose activities depend not on the 24 hr clock we use but the sunlight outside. A good example of this could be farmers who schedule taking the animals out, watering crops etc based on how sunny it is. My clock uses a photo sensor and can be programmed to play different alarms depending on the brightness outside. Pressing the off button lightly snoozes the alarm while presses it hard switches off the alarm altogether.

Component

  • Arduino
  • 1 photo sensor
  • 1 FSR
  • 2 10k ohm resistors
  • 1 piezo speaker
  • Bread board
  • Jumper cables

Arduino Code

#include "pitches.h"

int fsrPin = A0;
int pcPin = A1;
int speakerPin = 8;

int fsrVal;
int pcVal;

// alarm 1
int melody[] = {NOTE_C4, NOTE_G3, NOTE_G3, NOTE_A3, NOTE_G3, 0, NOTE_B3, NOTE_C4};
int noteDurations[] = {4, 8, 8, 4, 4, 4, 4, 4};

// alarm 2
int melody2[] = {
NOTE_GS4, NOTE_GS4, NOTE_GS3, NOTE_GS3, NOTE_DS4, NOTE_DS4, NOTE_GS3, NOTE_GS3, NOTE_GS4, NOTE_GS4, NOTE_E4, NOTE_B4, NOTE_FS4, NOTE_FS4, NOTE_FS3, NOTE_FS3};

void setup() {
pinMode(fsrPin, INPUT);
pinMode(pcPin, INPUT);
pinMode(speakerPin, OUTPUT);
Serial.begin(9600);
}

void loop() {

fsrVal = analogRead(fsrPin);
pcVal = analogRead(pcPin);

Serial.print(“FSR Value: “);
Serial.println(fsrVal);
Serial.print(“PC Value: “);
Serial.println(pcVal);

// Afternoon alarm
if (pcVal > 200 && pcVal < 500 && fsrVal < 100 ) {
for (int thisNote = 0; thisNote < 8; thisNote++) { // to calculate the note duration, take one second // divided by the note type. //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc. int noteDuration = 1000 / noteDurations[thisNote]; tone(8, melody[thisNote], noteDuration); // to distinguish the notes, set a minimum time between them. // the note’s duration + 30% seems to work well: int pauseBetweenNotes = noteDuration * 1.30; delay(pauseBetweenNotes); // stop the tone playing: noTone(8); } } // Dusk alarm if (pcVal > 500 && fsrVal < 100 ) {
for (int thisNote2 = 0; thisNote2 < 16; thisNote2++) { tone(speakerPin, melody2[thisNote2]); delay(200); noTone(speakerPin); } } // Snooze. Have to wait a while for FSR to go back to 0 if (fsrVal > 30 && fsrVal < 800) { delay(800); } // Stop alarm if (fsrVal > 800) {
exit(0);
}

}

FSR Viz

Description

I attached my FSR to a pair of tongs and through the visualization, you can see how much force you’re using to hold/pick up an object. My visualization makes use of color, size and speed to demonstrate changes in force applied. Squared move diagonally across the screen and as the pressure increases, so does their speed and they grow in size too. At maximum force, the background color  becomes a bright green and is meant to grab the user’s attention or alert her.

Components

Arduino

Bread board

1 10 kΩ resistor

Jumper cables

1 FSR

Tongs

Arduino code

int fsrAnalogPin = 0; // FSR is connected to analog 0
int LEDpin = 11; // connect Red LED to pin 11 (PWM pin)
int fsrReading; // the analog reading from the FSR resistor divider
int LEDbrightness;

void setup(void) {
Serial.begin(9600); // We’ll send debugging information via the Serial monitor
pinMode(LEDpin, OUTPUT);
}

void loop(void) {
fsrReading = analogRead(fsrAnalogPin);
// Serial.print(“Analog reading = “);
// Serial.println(fsrReading);

// we’ll need to change the range from the analog reading (0-1023) down to the range
// used by analogWrite (0-255) with map!
LEDbrightness = map(fsrReading, 0, 1023, 0, 255);
// LED gets brighter the harder you press
analogWrite(LEDpin, LEDbrightness);

delay(100);
Serial.println(fsrReading); // for processing
}

Processing code

/* PROCESSING SKETCH
* FSR Visualization – Moving squares
* Reema Naqvi
*/

import processing.serial.*;
// Change this to the portname your Arduino board
String portname = “/dev/cu.usbmodem1411”; // or “COM5″
Serial port;
String buf=””;
int cr = 13; // ASCII return == 13
int lf = 10; // ASCII linefeed == 10

int serialVal = 0;
int rgbValr;
int rgbValg;
int rgbValb;
int moveX = 0;
int moveY = 0;
void setup() {
size(1200,700);
frameRate(20);
smooth();
background(0, 10, 20);
noStroke();
port = new Serial(this, portname, 9600);
}

void draw() {
// erase the screen

rgbValr = 255-serialVal/4;
rgbValg = 255-serialVal/9;
rgbValb = 255-serialVal/4;
background(rgbValr, rgbValg, rgbValb);

fill (255,0,190);
rect(moveX, moveY, serialVal/20 , serialVal/20);
moveX = moveX+serialVal/30;
moveY = moveY+serialVal/30;
if (moveY >= height) {
moveY = 0;
moveX = 0;
}
if (moveX >= width) {
moveX = 0;
moveY = 0;
}

rect(moveX+300, moveY, serialVal/15 , serialVal/15);
moveX = moveX+serialVal/30;
moveY = moveY+serialVal/40;
if (moveY >= height) {
moveY = 0;
moveX = 0;
}
if (moveX >= width) {
moveX = 0;
moveY = 0;
}

rect(moveX+600, moveY+100, serialVal/10 , serialVal/10);
moveX = moveX+serialVal/30;
moveY = moveY+serialVal/40;
if (moveY >= height) {
moveY = 0;
moveX = 0;
}
if (moveX >= width) {
moveX = 0;
moveY = 0;
}

rect(moveX – 200, moveY+300, serialVal/40 , serialVal/40);
moveX = moveX+serialVal/30;
moveY = moveY+serialVal/40;
if (moveY >= height) {
moveY = 0;
moveX = 0;
}
if (moveX >= width) {
moveX = 0;
moveY = 0;
}

rect(moveX-100, moveY+400, serialVal/25 , serialVal/25);
moveX = moveX+serialVal/30;
moveY = moveY+serialVal/40;
if (moveY >= height) {
moveY = 0;
moveX = 0;
}
if (moveX >= width) {
moveX = 0;
moveY = 0;
}

rect(moveX+1150, moveY+400, serialVal/8 , serialVal/8);
moveX = moveX+serialVal/30;
moveY = moveY+serialVal/40;
if (moveY >= height) {
moveY = 0;
moveX = 0;
}
if (moveX >= width) {
moveX = 0;
moveY = 0;
}

rect(moveX, moveY+200, serialVal/15 , serialVal/15);
moveX = moveX+serialVal/30;
moveY = moveY+serialVal/40;
if (moveY >= height) {
moveY = 0;
moveX = 0;
}
if (moveX >= width) {
moveX = 0;
moveY = 0;
}

rect(moveX+1000, moveY, serialVal/20 , serialVal/20);
moveX = moveX+serialVal/30;
moveY = moveY+serialVal/30;
if (moveY >= 300) {
moveY = 0;
moveX = 0;
}
if (moveX >= width) {
moveX = 0;
moveY = 0;
}
rect(moveX+600, moveY+400, serialVal/8 , serialVal/8);
moveX = moveX+serialVal/30;
moveY = moveY+serialVal/40;
if (moveY >= height) {
moveY = 0;
moveX = 0;
}
if (moveX >= width) {
moveX = 0;
moveY = 0;
}

}

// called whenever serial data arrives
void serialEvent(Serial p) {
int c = port.read();
if (c != lf && c != cr) {
buf += char(c);
}
if (c == lf) {
serialVal = int(buf);
println(“val=”+serialVal);
buf = “”;
}
}

3 pots for 3 LEDs

Components

  • 1 Arduino
  • 1 breadboard
  • 3 LEDs (red, green, blue)
  • 3 potentiometers
  • 3 225-ohm resisters
  • wires

For this lab/hw, I controlled the brightness of each LED with a different potentiometer.

Code
// initialize pot pins
int potPin1 = A0;
int potPin2 = A2;
int potPin3 = A3;

// set pot values;
int potV1 = 0;
int potV2 = 0;
int potV3 = 0;

// initialize leds
int blueLed = 6;
int redLed = 9;
int greenLed = 11;

void setup() {
Serial.begin(9600);
// declare the led pin as an output:
pinMode(blueLed, OUTPUT);
pinMode(redLed, OUTPUT);
pinMode(greenLed, OUTPUT);
}

void loop() {
potV1 = analogRead(potPin1);
potV2 = analogRead(potPin1);
potV3 = analogRead(potPin1); // read the pot value
analogWrite(blueLed, potV1/4);
analogWrite(redLed, potV2/4);
analogWrite(greenLed, potV3/4);

delay(10); // wait a bit, for serial data
}

 

Human Sensing Spectrum

I was on board with Fishkin’s embodiment and metaphor axes in trying to categorize TUIs by using the two spectrums. But when I came across the example of a greeting card as a TUI, I felt a certain lacking in their model. Since TUIs are by definition meant to be handled physically by humans, wouldn’t it make sense to somehow include human perception into their model? I am suggesting a third spectrum which measures how aware humans are that the TUI they are using employs some form of computation to produce the output. This is somewhat a measure of the effect the embodiment and metaphor produces in the users.

I have never given any thought to audio greeting cards. The written message being like an audio messages…I never connected the dots there. It’s just a pleasant singing card to me. On the other hand, I am very aware of how programmed the clay sculpting mechanism is. By creating the third spectrum, we can assess how well or poorly the TUI has managed to blend into our lives, whether we are fooled into thinking it’s like a mechanical door knob or can plainly see that between our input and output lies a world of code.

Lab1

[[code]]czo4MTk6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