Tuesday, December 11, 2007

Final | construction - cubes

We ordered 96 pieces of plastic glasses, glued them except the top ones, contained new bits and glued top ones again. Finally there were beautiful 16 cubes! And as we tested, we attached copper tapes on one corner of the bottom of the cube like this picture. This tape was going to connect two wires - power and ground- on the tray like a switch. Actually, we expected really good connections with it but it did not work well. Because the cube's surface was so flat and hard, so if two wire, power and ground, on the tray were not even, this connector could not touch both of them in other words it could not close a switch.


We needed more cushioned or more flexable connectors. After trying many different ways, we decided to attach two wires on the copper tape as a cross. Because it was an easest way to fix this problem, but if we had more time, it might be better to look for a neater way. But it helped connections pretty well. Here is a picture of a new connector.

Final | construction - a tray

First of all, Estee cut the wood as a suit size and I started making this tray with a lot of wires. I made 256 hole on the tray, 4 holes for each switch, and inserted a wire from the backside of the tray to the frontside, banded it and pushed it from the frontside to backside. I repeated it 128 times because each switch needed 2 wires. My fingurs were almost dead. It was really painful. Fianlly, I got 64 beautiful switches like a picture.

Here is one more issue. Initially we used small crosses to divide each position for each cube looked like a below picture, but it did not help users notice where they could place cubes on the tray. In order to guide how to place cubes, we needed more certain dividers, so I got rid of all old ones and made new ones like a grid. And it worked well!


Frontside of the tray was neat but on the backside, all wires were all the mess. Even though I used different colors to distingush which wires go to which positions, it was really hard to control all wires.

Final | changing bits

Even though we kept making our bits, it was still not enough to fill all cubes and too much work. And we thought spending more time writing codes and constructions was more important in this point , so we started looking for bits that replaced original ones. Finally, Seanita got punched paper bits from the copy center, and these papers sticked each other so they were 3D bits, not a single paper and more looked like bits. And when we shaked the cube with our new bits they made an interesting sound, also they had various color on them. Above all, people really liked new bits and playing with them so we decided to use them.

These are our original white bits. It was good to project image on them, but it would take long time.



These are our new bits. More colorful and more playful.

Final | a code for a single multiplexer

We also got a code for a sing mux from Chris, and this code was wotking perfectly. Here is a code.

int val[16];

//variables in this code have been changed from their original value of Int to byte.
int a= 3; // SELECT PIN A0 GOING INTO PIN 2
int b= 4; // SELECT PIN A1 GOING INTO PIN 3
int c= 5; // SELECT PIN A2 GOING INTO PIN 4
int d= 6; // SELECT PIN A3 GOING INTO PIN 5

int analog0 = 0;

void setup() {
Serial.begin(9600);
pinMode(analog0, INPUT);
pinMode(a,OUTPUT);
pinMode(b,OUTPUT);
pinMode(c,OUTPUT);
pinMode(d,OUTPUT);
}

void loop() {
for (int channelNum = 0; channelNum < style="font-style: italic; color: rgb(51, 102, 102);">

// determine the four address pin values from the channelNum:

// mask off bit 0:
int pinOne = 1 & channelNum;
// shift value 1 bit to the right, and mask all but bit 0:
int pinTwo = 1 & (channelNum >> 1) ;
// shift value 2 bits to the right, and mask all but bit 0:
int pinThree = 1 & (channelNum >> 2);
// shift value 3 bits to the right, and mask all but bit 0:
int pinFour = 1 & (channelNum >> 3);

// set the address pins:
digitalWrite(a,pinOne);
digitalWrite(b,pinTwo);
digitalWrite(c,pinThree);
digitalWrite(d,pinFour);

// read the analog input and store it in the value array:
val[channelNum] = analogRead(analog0);

// print the values as a single tab-separated line:
Serial.print(val[channelNum], DEC);
Serial.print("\t");
}
// print a carriage return at the end of each read of the mux:
Serial.println();

}

Final | testing with single a multiplexer - building

After getting a satisfactory result from a prototype, we tried a single multiplexer(MC14067BCP MUX) instead of two arduinos with 16 input pins. Fortunately, Chris already tried a single multiplexer so he let us know how to build a circuit board and a code for it. His guide was really helpful. (Thanks Chris!) We needed 10k resistors between every input pin and every ground which were 16 . It was really cool that we used only an anolog input and 4 address pins on an arduino but a multiplexer could send 16 different values with a binary such as 0000,0001,0010, 0100, 1000, 1100, 0110, 0011, 1001, .... 1111. After building a circuit, we connected all wires from a prototype to a breadboad. We were almost ready to try a multiplexer.


Final | switch testing with a plastic cube

In order to make sure our switch system, we applied same function with a prototype to a plastic cube. We attached a copper tape on the plastic cube and used a same board with a prototype as a tray. Fortunately it was working really well so we decided to stick it. Here is a video. According to the switch's status an LED lights up or lights off!

Final | prototype with 4 wooden cubes

Before starting building, we wrote a simple code to test communication between an arduino and processing with 8 switches that presented 2 positions of the tray. In this point, we wanted to make sure that each switch could send its own value and processing could get it and trigger different images following the values it got from an arduino. It worked pretty well. So we moved to next step - making a prototype with a same condition with a completed project.

So we started making a prototype with this code and 4 wooden blocks and two arduinos instead of multiplexer. We made 16 switches on the board and connected wires and we talked about connections between blocks and a board. Initially we used coppers. It was easy to attach coppers on the wood with nails but to attach on the plastic, we should use glues and it might make uneven bottoms which was not neat. But coppers worked pretty good as a connector and that point Todd introduced copper tapes which were perfect for us. So we used it and finally these switches triggered images!