Making Things Interactive

May 11, 2008

Pouring Light Bowl

Filed under: Assignments,Christopher Bridgman,Final Project — cbridgma @ 9:22 pm

This is a project that explores the idea of light transfer. This shows the process of 2 attempts at creating the pouring light table. The first exploration shows my first stab at the project, and the second shows some of the improvements. The idea behind this is to allow the user to create a mood that he/she wants. I envisioned this going into, say a night club table. This would allow the people to use the table to set their mood lighting. The bowl allows the user to vary the amount of light that they want within the bowl. You use the light cup, which has an infinite source of light to pour the light into the bowl until the desired light level is reached. Once you are done, or if you want to drain the light, you use the draining mechanisms to drain the bowl.

Version 1 Process photos:

1)LEDs soldered in Parallel Series2)Bread Board and Light Cup

3)Infinite Light Cup4)Final Effect of Table and Cup

5)Final Set Up6)Final Look

 

Captions:

1) Process photo showing how the LEDs are soldered together in parallel series, which reduces power drop off when the LEDs are lit.

2) A photo showing the final bread board set ups for the power transistors and the light cup.

3) A close up of the bread board set up of the light cup with the “infinite light source.”

4) A photo of the final effect for this first stab at the project.

5) A photo of the final set up of the LEDs and how the bread board fits within the box.

6) A photo of the final product of the first version of this product.

A Video of how this version of the Final Project Works:

Code For this Version:

int statusPin = 13;                // LED connected to digital pin 13
int ledRing1 = 11;                      // Ring 1 connected to analog 5
int ledRing2 = 10;                     // Ring 2 connected to analog 4
int ledRing3 = 6;                     // Ring 3  Connected to analog 3
int ledRing4 = 5;                    // Ring 4 Connected to analog 2
int tiltPin = 3;                 // tilt switch connected to 7
int switchPin = 2;                   // push switch connected to 6
int tiltval;
int switchval;
int Ring1val = 0;
int Ring2val = 0;
int Ring3val = 0;
int Ring4val = 0;

void setup()                    // run once, when the sketch starts
{
  pinMode(statusPin, OUTPUT);      // sets the digital pin as output
  pinMode(ledRing1, OUTPUT);         // sets the digital pin as output
  pinMode(ledRing2, OUTPUT);      // sets the digital pin as output
  pinMode(ledRing3,OUTPUT);         // sets the digital pin as output
  pinMode(ledRing4,OUTPUT);        // sets the digital pin as output
  pinMode(tiltPin, INPUT);            // sets the pin as input
  pinMode(switchPin, INPUT);            // sets the pin as input
  Serial.begin(9600); 
}

void loop()                     // run over and over again
{
  tiltval = digitalRead(tiltPin);        // set tiltval egual to the tiltPin reading
  switchval = digitalRead(switchPin);        // set switchval equal to the switchPin reading

  Serial.print("Tilt Value: ");
  Serial.println(tiltval);    

  Serial.print("Switch Value: ");
  Serial.println(switchval);   

  digitalWrite(statusPin, HIGH);

  if ( tiltval == 0)
  {
    if ( Ring1val < 255)
    {
      analogWrite ( ledRing1, Ring1val++);    }
    if ( Ring1val == 255 && Ring2val < 255)
    {
      analogWrite (ledRing2, Ring2val++);    }
    if ( Ring1val == 255 && Ring2val == 255 && Ring3val < 255)
    {
      analogWrite (ledRing3, Ring3val++);    }
    if ( Ring1val == 255 && Ring2val == 255 && Ring3val == 255 && Ring4val < 255)
    {
      analogWrite (ledRing4, Ring4val++);    }
  }
 
  if ( switchval == 1)
  {
    if ( Ring4val > 0)
    {
      analogWrite ( ledRing4, Ring4val--);    }
    if ( Ring3val > 0 && Ring4val == 0)
    {
      analogWrite (ledRing3, Ring3val--);    }
    if ( Ring2val > 0 && Ring3val == 0 && Ring4val == 0)
    {
      analogWrite (ledRing2, Ring2val--);    }
    if ( Ring1val > 0 && Ring2val == 0 && Ring3val == 0 && Ring4val == 0)
    {
      analogWrite (ledRing1, Ring1val--);    }
  }

} 

 

Final Version Photos:

1)Light Bowl2)LED detail

3)Final Bread Board4)Final Soldering

5)Cup Bread Board6)Light Tap

 

Captions:

1) A Final photo of the bowl which shows how the bowl is shaped and connected as well as the LEDs.

2) A detail shot showing how the LEDs fit into holes cut within the plexi-glass bowl.

3) A photo of the final bread board set up; what a mess of wires!

4) A photo of the final hardware set up of the soldering showing how it is set up in parallel series. This is done so the LEDs do not get dimmer due to power drop off.

5) The final set up for the cup bread board with the infinite red light source and the gravity/tilt switch.

6) A photo of the light tap from which the light pours out of the bowl.

A circuit diagram for the final product: final-mti-project-schematic

Video of the Final Product:

Code for the Final Product:


int tiltPin = 15;                 // tilt switch connected to 7
int tiltval;
int ledRing1R = 12;                // LED ring connected to digital pin 12
int ledRing2R = 9;                 // LED ring connected to digital pin 9
int ledRing3R = 10;                 // LED ring connected to digital pin 10
int ledRing4R = 11;                 // LED ring connected to digital pin 11
int redTap = 13;                    //Red Light for the tap
int Rswitch = 8;                    //tap switch for drainging red light
int switchRval;
int Rsource = 14;                    //endless sourse of red light for cup
int ledRing1Rval = 0;                // starting the value of LEDs at zero
int ledRing2Rval = 0;                 // starting the value of LEDs at zero
int ledRing3Rval = 0;                 // starting the value of LEDs at zero
int ledRing4Rval = 0;                   // starting the value of LEDs at zero

void setup()                    // run once, when the sketch starts
{
  pinMode(Rsource, OUTPUT);      // sets the digital pin as output
  pinMode(ledRing1R, OUTPUT);         // sets the digital pin as output
  pinMode(ledRing2R, OUTPUT);      // sets the digital pin as output
  pinMode(ledRing3R,OUTPUT);         // sets the digital pin as output
  pinMode(ledRing4R,OUTPUT);        // sets the digital pin as output
  pinMode(redTap, OUTPUT);           // sets the digital pin as output
  pinMode(tiltPin, INPUT);            // sets the pin as input
  pinMode(Rswitch, INPUT);            // sets the pin as input
  Serial.begin(9600); 
}

void loop()                     // run over and over again
{
  tiltval = digitalRead(tiltPin);        // set tiltval egual to the tiltPin reading
  switchRval = digitalRead(Rswitch);        // set switchval equal to the switchPin reading

  Serial.print("Tilt Value: ");
  Serial.println(tiltval);    

  Serial.print("Switch Value: ");
  Serial.println(switchRval);   

  digitalWrite(Rsource, HIGH);

  if ( tiltval == 0)                           // logic for the actual lighting for the project
  {                                            // basically, this logic states that if the cup is tilted,
    if ( ledRing1Rval < 255)                   // then to light up the rings in a progression starting lowest to highest.
    {                                          // the arduino looks to see which ring needs be lit up and then will light up the correct LED.
      digitalWrite ( ledRing1R, HIGH);
      delay(5);
      ledRing1Rval = ledRing1Rval +5;   }
    if ( ledRing1Rval >= 255 && ledRing2Rval < 255)
    {
      analogWrite (ledRing2R, ledRing2Rval);
      delay(5);
      ledRing2Rval = ledRing2Rval +5;   }
    if ( ledRing1Rval == 255 && ledRing2Rval == 255 && ledRing3Rval < 255)
    {
      analogWrite (ledRing3R, ledRing3Rval);
      delay(5);
      ledRing3Rval = ledRing3Rval +5;   }
    if ( ledRing1Rval == 255 && ledRing2Rval == 255 && ledRing3Rval == 255 && ledRing4Rval < 255)
    {
      analogWrite (ledRing4R, ledRing4Rval);
      delay(5);
      ledRing4Rval = ledRing4Rval +5;    }
  }
 
  if ( switchRval == 1)               // this line of logic does the opposite of the the tilt switch logic.
  {                                    // It looks at Tap switch and will draing the bowl when the tap is down, draining the bowl of the light.
    digitalWrite(redTap,HIGH);
   
    if ( ledRing4Rval > 0)
    {
      analogWrite ( ledRing4R, ledRing4Rval--);
      delay(5);    }
    if ( ledRing3Rval > 0 && ledRing4Rval == 0)
    {
      analogWrite (ledRing3R, ledRing3Rval);
      delay(5);
      ledRing3Rval = ledRing3Rval -5;    }
    if ( ledRing2Rval > 0 && ledRing3Rval == 0 && ledRing4Rval == 0)
    {
      analogWrite (ledRing2R, ledRing2Rval);
      delay(5);
      ledRing2Rval = ledRing2Rval -5;    }
    if ( ledRing1Rval > 0 && ledRing2Rval == 0 && ledRing3Rval == 0 && ledRing4Rval == 0)
    {
      digitalWrite (ledRing1R, LOW);
      delay(5);
      ledRing1Rval = ledRing1Rval -5;    }
  }
 if (switchRval == 0)           // Tells the arduino to light up the light below the tap to simulate the light pouring out of the tap.
 {digitalWrite(redTap,LOW);
 }
}
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: