Making Furniture Interactive

December 17, 2007

Final Project

Filed under: Alastair Firth, Final Project — afirth @ 8:27 pm

Final Projectaafront-copy.jpgaaback.jpg

Description: The final product is an array of 256 LEDs which could be used to display a multitude of information. It is also able to control, in a limited way, an iPod or other audio device. The design uses a clock module, temperature sensor, LED controllers, and a stereo volume control to provide the time, temperature, and audio entertainment which the user desires. Through the iPod, it is also possible to use it as an alarm clock.
Unfortunately I was not able to get everything fully functional at the same time, however individually everything worked.

Diagram of the Arduino-connected components

Diagram

Materials Used:
Temperature sensor (thermistor)
DS1307 clock module (sparkfun breakout)
4 LED matrices
4 LED controllers (max7219)
1 Arduino
Power source (6A @ 5V)
2 grid style PCBs
1 double audio taper potentiometer (volume control)
2 audio jacks
1 power jack
connectors and wire
5 lbs solder

Case:
Masonite
Plexi
asst hardware

due to my mixed up wiring, i had to modify tomeks ledcontroller lib a little.
here are some code excerpts for showing temperature with two of the matrices connected.
note that this only lets you write 1 led/column, basically to do more than 1 you have to keep a buffer and add to it, then update each row later. this is what the LEDMatrix lib included with the arduino distro does.
anyway, the code below makes a little mountain which is taller the warmer the temperature

void loop () {
  int temp = analogRead(tpin);

  //what you write goes here mat(row,col); maxx is literal, mat translates

  if (temp  0){
    kh(1);
  }
  if (temp  294){
    kh(2);
  }
  if (temp  339){
    kh(3);
  }
  if (temp  384){
    kh(4);
  }
  if (temp  429){
    kh(5);
  }
  if (temp  474){
    kh(6);
  }
  if (temp  521){
    kh(7);
  }
  if (temp  564){
    kh(8);
  }
  else{
    kh(9); //light them all
  }
}

void kh(int minn){//build a mountain
  for (e=minn; e= minn
    maxx(d[e],0);
    maxx(d[minn],0); //pushes the last clear through to the second matrix
 }
  for (e=1; e<minn; e++){ //turn on the rows <min
    mat(e,e);
    mat(e, 17-e);
  }
}

heres my code for writing to two matrices:

void mat(int reg, int col){ //can address row 1-8, col 1-16
  digitalWrite(load, LOW);
  if (col <= 8){//this writes the lower rows to the second matrix
    putByte(d[reg]);
    putByte(c[col]);
    putByte(0x00);
    putByte(0x00);
  }
  else{//this subtracts 8 and writes the higher rows to the first matrix
    putByte(d[reg]);
    putByte(c[col-8]);
  }
  digitalWrite(load, HIGH);
}

I managed to lose the .ai of the poster I made for the final presentation, but it was just name, title, and abstract

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.