User login

Powered by Drupal, an open source content management system

Theory and Practice of Tangible User Interfaces

Lab 06: Low-Tech Persuasive Technology

Submitted by andy on Wed, 10/15/2008 - 13:59

Assignment: DC Motor: Actuation Assignment 1

Collaborators:

Assignment: DC Motor: Actuation Assignment 1
Collaborators:

Description

The DC motor lab taught us how to control a small motor with code on our Arduino board, focusing on using a potentiometer to control the motor's speed. For my lab homework assignment I looked at controlling a motor with the force-sensitive resistor.

The idea was inspired by the hands-free hand dryers often found in bathrooms, where you wave your hand in front of a sensor to unspool the paper or start the heater's blower motor. Since I didn't have a proximity sensor, I used the FSR to detect pressure. My idea was inspired by seeing people wait to use a restroom, and looking at ways to speed up the process. Sitting on the toilet activates the FSR, and after a period of time the toilet paper slowly starts to unroll. The longer you sit, the more paper unrolls. Call it low-tech persuasive technology.

For my setup I found that the DC motor didn't put out enough torque to reliably spin the toilet paper on its side, though it did work if you stood the roll on end.

Components

  • (1) 220 ohm resistor
  • (1) 1k ohm resistor
  • (1) diode
  • (2) transistor
  • (1) force sensitive resistor
  • (1) Arduino board
  • (1) generic solderless breadboard
  • Miscellaneous connecting wires
  • (2) corks
  • (1) roll of toilet paper
  • (1) picture hanging nail (as an axle)


Arduino Code

/*
* Tube Roller
* iSchool TUI Lab 06
* modified by Andy Brooks
*
* modified version of AnalogInput
* by DojoDave <http://www.0j0.org>
* http://www.arduino.cc/en/Tutorial/AnalogInput
* Modified again by dave
*/

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

if (val > 500) {
delay(5000);
analogWrite(motorPin, 250); // analogWrite can be between 0-255
delay(1000);
analogWrite(motorPin, 0);
} else if (val <= 500) {
analogWrite(motorPin, 0);
delay(250);
}
}


Photographs

Lab 06: Circuit Board
Lab 06: DC motor spins the cork
Lab 06: DC motor spins the tube
Lab 06: (Cork + DC Motor) + (Cork + Nail) = Axle
Lab 06: Setup

 

Video

[to be added]