User login

Powered by Drupal, an open source content management system

Theory and Practice of Tangible User Interfaces

Assignment 7: Buzzing Container

Submitted by michael_lee on Thu, 10/16/2008 - 00:42

Assignment: DC Motor: Actuation Assignment 1

Collaborators:

Description

For this lab, I started off doing one thing, but ended up changing direction because of physical limitations of the DC motor. At first, I wanted to make a rolling container that changed speed depending on the light input from a light sensor. Although I had the code working, all the components in the container (all the batteries I used) proved to be too heavy for the wee DC motor to move.

For this project, I wanted to have everything contained in the container without the need of a PC. I used an external, standalone USB power source to power the aduino in addition to the battery pack for the additional power used to run the DC motor. I used a smaller breadboard to fit into the smaller container, and "piggy-backed" the arduino to it.

Instead of my original idea of having the DC motor try to move the container, I had it vibrate depending on the lighting conditions. And thus, the buzzing container. If the container was closed (i.e. no light), it would be still. Once the lid was open, the container vibrates vigorously, moreso depending on the intensity of light. If all these components were miniaturized even more, it could help foods from being spoiled. For example, if a easily spoiled product container was open and left on the counter, it would begin to shake and vibrate, reminding the owner to put it away.

 

Components Used

  • x1 DC motor
  • x1 Off-center circular cork
  • x1 TIP 120 transistor
  • x1 Diode (1N4004)
  • x1 Photosensor
  • x1 1k resistor (brn, blk, red)
  • x1 10k resistor (brn, blk, yllw)
  • x1 Battery pack (x2 AA = 3v out)
  • x1 USB battery pack (5v out)
  • Wires
  • 1 Arduino NG board
  • 1 Breadboard

Images

Here are the inner components of the container. Starting from the top and going clockwise: 3v battery pack, 5v USB battery pack, arduino ng attached to breadboard, dc motor.

 

Here is a closeup of the breadboard side of the arduino/breadboard combo. As you can see, the input sensor is a photosensor on towards the far-side of the breadboard, and the output is a dc motor with an off-center piece of cork that makes it vibrate.

 

Here is everything inside the container. It is a very snug fit, but everything is in there! The original idea was to make the DC motor roll the container if it was placed on its side. Unfortunately, with the ardunio, breadboard, and battery packs, it was much too heavy for the dc motor to create enough torque to get the container moving!

 


Here is a closer shot of everything.

 

Here is an even closer shot of everything. Notice the photosensor towards the bottom of the photo.

 

Everything closed up! When the lid is closed, nothing happens. When the lid is opened, the container starts to shake! The brighter it is, the more violently the container shakes! If miniaturized, this could be used as a reminder to put away items promptly.

 

Further Work

It would be nice to go with my original idea and have the container move on its own. Since the DC motor is too small, maybe I could expand on what I already have. I can use the knock sensor code I submitted in my last assignment so that if someone tapped/hit the container, it would show its irritation by letting out a beep.

 

Ardunio Source Code

int lightPin = 5;   // select the input pin for the light sensor
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(lightPin); // get light sensor input
Serial.println(val); // print value to the monitor
analogWrite(motorPin, val/4); // spin the motor accordingly
}