Thursday, December 17, 2009

Final Prototype and Installation

After a long day and night's work, we got basically everything working.. the play/record sound module, the foil sticker, conductive paint, and metal flashing capacitive sensors, some cool new super-bright LEDs. Of course it didn't quite work at the review today, but what can you do. We put together a more polished ala graffiti research lab video of the whole process... enjoy!




The review was fantastic. We got great feedback and advice and everyone had their own take on how to develop and use the prototypes we'd developed. Thanks, all!

Saturday, December 12, 2009

Starting Final Prototype and Installation

The major work today was on our prototype installation. First, the armature for the metal flashing, and secondly, testing the conductive paint.


The conductive paint turned out to be quite easy to work with. It goes on very thin (we applied 3 coats - it comes in an aerosol can) and dries quickly. We just used a scrap piece of foam core for now.

We were able to calibrate the flashing and conductive paint (about the same area of material for both) to give good results. The output is the dimming LEDs using the PWM pins on the Arduino - the recording module is in the photos but doesn't have power so it's not functioning.

Here are our components so far.







Here's a video of the working prototype. Watch the red and green LEDs in the lower-left corner change brightness based on proximity. (The recording module is wired in but doesn't have power.)





We'll be presenting our project with the Living Architecture review this Thursday, and hope to install the prototype in the school at the Visual Studies/CAD show early next semester. Stay tuned!

Monday, December 7, 2009

Prototype 9 - Flashing on the Wall

Prototyping, and armature development this week.


Prototyping:

We brought back the LEDs to indicate proximity using the PWM pins on the Arduino. There's a green one for the 'play' sensor, and a red one for the 'record' sensor. This functionality is independent of the play/record function, but it's based on the same sensed value.

Armature/Installation Development:

We're making a 'wave' of flashing (sheet metal) attached to the wall. This will be portable enough to install practically anywhere, but at 4' long it's still a substantial piece of material. This in combination with foil stickers and/or paint will show the variety of ways we can use (cheap) metals as proximity sensors.



The working prototype on the wall:

We were having trouble with grounding. With this big a piece of metal, we needed to run the Arduino off of and AC plug rather than the 9V battery. This is definitely more of an 'installed' than on-the-go solution.

Wood ribs attached to a backbone will hold the flashing in a wave shape off the wall.

Design sketch:


The ribs and nailer in the shop:

Monday, November 30, 2009

Prototype 9 - Portable Speaking Wall

After an evening of prototyping, we have some refinements to the prototype.

Here it is installed again:



Improvements:
Circuitry Enclosure

We cleaned up a lot of the wiring, and got the Arduino and other components into our plastic project enclosure.

Foil Stickers

We made foil 'play' and 'record' stickers out of contact (shelf-liner) paper and our trusted friend, aluminum foil (the contact paper costs about $4.50 per roll).

Speaker Enclosure

Like the Arduino, the speaker/mic got its own box - made out of foam core - for a much cleaner look.

Power Supply

Everything runs on 2 9V batteries so it's very portable.



And here it is in use... what a flirt!



Still to do:

Stickers/foil refinement

We need to find something that's a little stickier. We're thinking the vinyl graphics that the print shop offers will be a good place to start. We also need to work on our graphics. While we're running foil behind the sticker, it might as well also replace the wiring so that can be flat too.

Conductive paint test

We still want to see how this works with conductive paint. This is related to the next point...

System Integration/Armature Fabrication

We're thinking that whether we install this in a public place for a while, or just for our presentation, we'll make a roughly 2'x3' (or slightly bigger) panel that can hang on a wall, and provide a flush smooth surface so all you see are the graphics and the little microphone/speaker.

Amplification/Component Separation

We will try a quick feasibility check to see what it would take to amplify the range of the microphone and speaker, especially if there could be a cheap and simple swap-out for our current recording module.

Wednesday, November 25, 2009

Wall as a Boombox

We were able to get both the record and play functions of the RadioShack recording module to work, controlled by the Arduino board. We have two foil sensors - a 'play' and 'record' button - which we will refine further in the final installation, either with conductive paint or foil stickers. The Arduino board is portable and could be installed briefly with the stickers or paint - when it's removed, and the paint or stickers could potentially remain, leaving a trace of the interaction.

The speaker is used as the microphone also, and it's very quiet. We're considering whether we want to upgrade and/or separate these components.

We simplified our code a lot this week:
#include
CapSense cs_4_2 = CapSense(4,2); // PLAY FOIL CONNECTED TO PINS 4 and 2, 2 is sensor pin
CapSense cs_5_3 = CapSense(5,3); // REC FOIL CONNECTED TO PINS 5 and 3, 3 is sensor pin
int recPin = 12;
int playPin = 13;

long start, recLength = 1000;
float threshold = 0.35;
float playTotal, recTotal;


void setup()
{
// cs_4_2.set_CS_AutocaL_Millis(0xFFFFFFFF); // turn off autocalibrate on channel 1 - just as an example
Serial.begin(9600);
pinMode(recPin, OUTPUT);
pinMode(playPin, OUTPUT);
}

void loop()
{
// GET RAW SENSOR DATA; TUNE POTENTIOMETER/RESISTOR FOR 0-60 RANGE:
start = millis();
playTotal = (float)cs_4_2.capSense(30) / (float)60; // PLAY FOIL
recTotal = (float)cs_5_3.capSense(30) / (float)60; // REC FOIL


// DEBUG SCREEN
Serial.print("PLY: ");
Serial.print("\t");
Serial.print(playTotal);
Serial.print("REC: ");
Serial.print("\t");
Serial.println(recTotal);

// IF WITHIN THRESHOLD
if(playTotal >= threshold || recTotal >= threshold) {
// IF PLAY, PLAY
if(playTotal > recTotal) {
play(recLength);
}
// OTHERWISE, RECORD
else {
recLength = record();
}
}
}

long record() {
long startTime = millis();
while (recTotal > threshold) {
digitalWrite(recPin,HIGH);
recTotal = (float)cs_5_3.capSense(30) / (float)60; // REC FOIL
}
long endTime = millis();
digitalWrite(recPin,LOW);
Serial.print("REC - Length:\t");
Serial.println(endTime-startTime);
return endTime - startTime;
}

void play(long howLong) {
Serial.print("PLAY - Length:\t");
Serial.println(howLong);
digitalWrite(playPin,HIGH);
delay(10);
digitalWrite(playPin,LOW);
delay(howLong);
}

So, there is a 'record' foil and a 'play' foil. When you put your hand within the 'threshold' distance from the record foil, it starts recording and counts how long you kept your hand there. When you put your hand near (within the same threshold) the 'play' foil, it plays (and ignores input for the length of the recording).



Here it is in action. It's quiet, but it works!




Next steps:
Pick a site on campus, probably in Avery Hall
Build/Refine a housing for the Arduino board, including power (9V battery or wall-plug)
Design and test the stickers/conductive paint
Look into the speaker sensitivity/microphone power issue

Sunday, November 22, 2009

Prototype 6.1 - Recording Module Hack



We can now control the 'play' function of the RadioShack recording module. There was a simple piezo-type switch on the board, so we just traced the foil circuitry back to a point where we could solder two leads. We now have a switch that we can control with a relay from the Arduino. We tested that wiring using a simple on/off program before soldering. There's also a 'record' switch that is set up in a similar way, so we may wire into that too.

The green wires at the bottom of the photo are our new leads:


Possible input/output logic could be:
Put your hand 24-12" away, we record you.
Move your hand <12" away, we play back what we recorded.

This could be a self-contained device, run off of 9V batteries and mounted to the wall, but it could also be put on the street or in an unexpected location.

Thursday, November 19, 2009

Prototype 6 with Potentiometer and Sound Output

We made two big improvements to the prototype...

1. We added a potentiometer as a variable resistor. This allows us to 'tune' the range of input values.

You can see in the video that we want to set the resistance so that when no one (or hand) is around, the circuit is completely off, and when we put our hand close but not touching it is fully on. This potentiometer is rated 10 kOhms, with a variation +/- 20%.

2. Sound as output. The first component we tried was a simple buzzer.

We're using a simple on/off pin of the Arduino, so at this point much of our previous work with getting a range of inputs is now moot. In this version of the prototype, we just chose a threshold to turn the buzzer on.

3. More fun sound!

We picked up this little recording module for about $10 at RadioShack. It is a self-contained unit with enough memory to record up to 20s of sound, a thin little speaker, a 'record' button (it uses the speaker as a microphone too) and a 'play' button, all powered by a 9V battery. Of course our hope is to hack the trigger switch so that we can us it as output for our Arduino. Stay tuned!

Tuesday, November 17, 2009

Planning

We met with David today to discuss progress and next steps... through to final steps.

Prototyping to explore:
Input
Potentiometer as variable-resistor
Foil stickers and conductive paint as alternatives to metal architectural elements
Output
Multiple LEDs
Multiple Flexinol
Sound - changing frequency/volume by proximity/location

Scenarios/contexts to explore:
Gallery
We think that by using a combination of conductive paint and the existing metals in a space we could make an engaging installation. This would be well-suited to a circulation space in Avery.
Cafe
We're thinking of the situation at Hungarian Pastry Shop near Columbia where each table has its own little lamp. What if you got to your table and waved your hand at the wall to turn on the lamp for 5 minutes? You could also adjust the brightness by putting your hand closer or further. This is potentially very functional, but imagine how hilarious it would be if we put the metal sensors over the tables instead of next to them... people waving their hands about every 5 minutes. Fun.
NYC Construction Scaffolding
The urban context is very interesting for us. The temporary scaffolding that goes over sidewalks in New York when there is building construction are very interesting temporary spaces. They provide light at night, shade in the day and some shelter, so they are at times places where people linger, but much of the time uncomfortable places that people rush through. We're interested in using the various metal parts as conductive sensors. One scenario would be to attach to a few of the columns as sensors, and as people get very close to them, a sound is played. Each column would have its own pitch (although probably too sophisticated for us, you could imagine this as speech, a song...) and you could control the volume by your proximity to the column.
In the next week or two we'll be testing our prototypes in and around Columbia, so watch for us, and don't be surprised if the architecture around you starts to play with you!

Too Funny Conductive Paint

On the topic of conductive paint...


The girls (and floor, as if you were looking THERE) are painted with skin-safe conductive paint called Bare Conductive. Very fun.

Monday, November 16, 2009

Prototype 5 - 2 Sensors, 2 Outputs

Improvements this week:
  • 2 separate foil capacitance sensors
  • 2 variable-brightness LED responses
  • Better processing logic to normalize the currently sensed value
The setup:


Each sensor is connected to 2 pins on the Arduino board. Our CapSense functions set one pin high and measure the delay between the signal and sensor pin.

Rather than blinking (based on a 'delay' variable which actually slowed our sensing too!) the LEDs now respond in brightness (voltage, power) by using the PWM pins on the Arduino. This allows for a continuous loop without a delay.

We also found this DigitalSmooth library on the Arduino website, which we modified to get the maximum value of the most recent group of samples. That gives us much more flexibility in the metallic 'sensor' - we can normalize the range to a percentage of the (recent) maximum. This change in logic makes the system much more resilient, and able to get a useful range of values from a wide variety of physical sensors.

Here's our code this week:

/*
* CapitiveSense Library Demo Sketch
* Paul Badger 2008
*/

#include
CapSense cs_4_2 = CapSense(4,2); // 10M resistor between pins 4 & 2, pin 2 is sensor pin, add a wire and or foil if desired
CapSense cs_5_3 = CapSense(5,3); // 10M resistor between pins 4 & 6, pin 6 is sensor pin, add a wire and or foil

/* digitalSmooth
Paul Badger 2007
*/

#define filterSamples 13 // filterSamples should be an odd number, no smaller than 3
int sensSmoothArray1 [filterSamples]; // array for holding raw sensor values for sensor1
int sensSmoothArray2 [filterSamples]; // array for holding raw sensor values for sensor2

long start;
long total1, maxData1; // variables for sensor1 data
long total2, maxData2; // variables for sensor2 data
float normalTotal1, normalTotal2;


void setup()
{
Serial.begin(9600);
}

void loop()
{
// GET THE CAPACITANCE VALUE
start = millis();
total1 = cs_4_2.capSense(30);
total2 = cs_5_3.capSense(30);

// FIND THE MAX OF THE PAST FEW SAMPLES
maxData1 = getMax(total1, sensSmoothArray1); // every sensor you use with digitalSmooth needs its own array
maxData2 = getMax(total2, sensSmoothArray2); // every sensor you use with digitalSmooth needs its own array

// NORMALIZE CURRENT SAMPLES TO RECENT MAX (GET PERCENTAGE VALUE)
normalTotal1 = (float)total1 / (float)maxData1;
normalTotal2 = (float)total2 / (float)maxData2;

// DEBUG print sensor output 1
Serial.print("4_2: ");
Serial.print(total1);
Serial.print("\t");
Serial.print(maxData1);
Serial.print("\t");
Serial.println(normalTotal1);

// DEBUG print sensor output 2
Serial.print("5_3: ");
Serial.print(total2);
Serial.print("\t");
Serial.print(maxData2);
Serial.print("\t");
Serial.println(normalTotal2);


// WRITE 0-255 TO DIGITAL PIN FOR LED OUTPUT

analogWrite(9, (normalTotal1 * 255));
analogWrite(10, (normalTotal2 * 255));
// delay(1000);
}

// GETMAX FUNCTION

long getMax(int rawIn, int *sensSmoothArray){ // "int *sensSmoothArray" passes an array to the function - the asterisk indicates the array name is a pointer
int j, k, temp, top, bottom;
long total;
static int i;
static int sorted[filterSamples];
boolean done;

i = (i + 1) % filterSamples; // increment counter and roll over if necc. - % (modulo operator) rolls over variable
sensSmoothArray[i] = rawIn; // input new data into the oldest slot

for (j=0; j< (filterSamples - 1); j++){ if (sorted[j] > sorted[j + 1]){ // numbers are out of order - swap
temp = sorted[j + 1];
sorted [j+1] = sorted[j] ;
sorted [j] = temp;
done = 0;
}
}
}

top = 0;
for ( j = 0; j <> top ) {
top = sorted[j];
}
}
return top;
}

Here's the prototype in action:

You can see the LEDs getting brighter as Yuval gets closer to stealing the cash. Unfortunately, it's still not enough of a deterrent! And that was my coffee money!



Color us cheap, but we still haven't bought any new aluminum foil... the two sensors are what we had, cut in half. We had to calibrate the resistor to get a good response - 10 kOhm gave us an unpredictable 'blinky' response, with 4.7 kOhm, we had to actually touch the metal to get a response, but with a 6.4 kOhm resistor, it starts reacting 1" away, and gives a smooth corresponding response - the closer your hand, the brighter the LED. A potentiometer (variable resistor) could also be a useful component/improvement.

For our own final prototype, we are thinking of using multiple sensors and multiple outputs, so this has been a solid step toward that wiring setup as well as handling the logic. It also makes the whole system more robust for a wide variety of situations. Stay tuned...

Tuesday, November 10, 2009

Prototype 4 for Mid-Review




We presented our project to an outside panel after the Living Architecture review. We got great feedback on both the technical implementation of our project, as well as the concept of DIY Interactive Architecture.

Our prototype for this week involved using common architectural elements as our capacitive 'sensors'. We managed to use part of a chair, and a door knob. We were hoping that we could use practically any metallic architectural element, but this proved difficult - it would seem that many of the metals around us have anti-conductive coatings on them. We might need our own metallic foil stickers (or similar) to give a predictable range of input values.

Major technical advancements:
- output using one of the pulse-width modulated pins on the Arduino allows us to vary the voltage (brightness of the LED) between 0-5 volts by passing it a value 0-255.
- lots of advice we're still sorting through on how to power larger output devices such as lamps.

Here are the prototypes:


Testing a door knob - thanks Melissa for holding the board!


Testing a metal chair.


Improved Flexinol response.

Thursday, November 5, 2009

Prototype 3 with Flexinol

We had a successful day of prototyping. We made a simple prototype by attaching the foil - parallel capacitor to the end of a long strip of chip board, and attached flexinol to the ends of the chip board. Here's the basic setup:

With the sensor as an integral part of the moving armature, the distinction between input and output blurs.. we were inspired by the 'Reef' installation at Storefront for Art and Architecture by Radical Craft. While that installation used separate motion sensors to trigger the response, we are interested in using a conductive armature or skin as a sensor itself.

The prototype in action:




As your hand gets within about 2 inches of the foil, the flexinol is activated and the piece moves to meet your hand. In an array, this type of functionality could create a wall surface that is sculpt-able by simply the wave of your hands... an architecture which tries to cuddle with you... which follows you around... lets in more light and air where there are people...

Things we tackled:
- On/off based on proximity to the foil.
- Flexinol on a relay from a 9V battery.
- Armature for the flexinol with a pretty good first response.

Issues & Next Steps:
- Predictability of the response coming from the parallel capacitor. Our first prototype got us consistent values ranging from 0 (hand 12" or more away from the foil) to 60 (hand within about 1" or touching the foil). Today, the results were much less predictable. We think that with careful grounding/insulation and the right metal this can be solved.
- Integration of the metallic 'sensor' part of the armature and the non-metallic part... The metal, for one thing, would probably be better on the back side of the non-metallic 'fin' so that there is an insulating buffer between the user's hand and the capacitive sensor. Maybe this could even be a simple coating?
- Careful grounding of the Arduino board, the foil, the flexinol and all the wiring. This is essential because they interfere with each other and we want to be very specific about those interactions.
- Possible different responses based on varying proximity to the sensor. This requires both consistent input (1st issue) and variable output, which may mean we investigate a servo or other more specific output. (Flexinol, for all its beautiful organic movement, is a binary actuator.)
- We have lots of ideas for architecturally 'programming' the system, but picking one will help us design future components.

Monday, October 26, 2009

Testing Materials

We tested a whole bunch of materials with mixed results. We had some issues with Processing, so we just ran the Arduino board with our simple high/medium/low output to test the responsiveness of a variety of metal sheets and meshes. We're still trying to calibrate our system for predictable input. In the meantime, we're meeting with a professor in the Engineering Department here at Columbia to get some advice. Here are the tests:

A really long (6') piece of flashing:


A metal clip-lamp shade:



We were able to get roughly the same results (a decent hi/med/lo response) from each material by varying the resistor - the resistor matters a lot, which we think has to do with how our pre-packaged measuring function works. The size of the material doesn't seem to matter that much, nor does any insulating material over it - but we're using the same alligator-clipped lead wires so the spacing and wire length hasn't changed much among the setups.

Monday, October 19, 2009

First Working Prototype

INPUT: Aluminum foil EM resistance sensor
PROCESSING: Change the speed of the blinking LED based on how much resistance (EM) is present
OUTPUT: Led which blinks quicker as you get closer.


Our board setup, with wires leading to the aluminum foil and the LED plugged straight into the digital output pins and ground.



Our 'sensor' - a big piece of aluminum foil with current across it. The aluminum foil is folded over twice so it's four layers thick, about 9"x6". The thickness and size of the metal (and even our wiring up to it!) significantly effect the range of values we observed. Our 'resistance' values range from 0-60 (arbitrary units). We get value 60 for touching or up to about 1" away from the metal, to 0 about 10-12" away. Shifting scales with this assembly will definitely be challenging, but this works for now!

The final prototype. You can see the distance range to change the (out of focus in the background) blink rate of the LED.



This shows the blinking LED better:




Our Arduino code is a simple modification of the CapSense library from the Arduino website:

#include

/*
* CapitiveSense Library Demo Sketch
* Paul Badger 2008
* Uses a high value resistor e.g. 10M between send pin and receive pin
* Resistor effects sensitivity, experiment with values, 50K - 50M. Larger resistor values yield larger sensor values.
* Receive pin is the sensor pin -
try different amounts of foil/metal on this pin
*/


CapSense cs_4_2 = CapSense(4,2); // 10M resistor between pins 4 & 2, pin 2 is sensor pin, add a wire and or foil if desired

int ledPin = 13; // LED connected to digital pin 13
int blinkDelay = 0; // Counter to control blink

void setup()

{

cs_4_2.set_CS_AutocaL_Millis(0xFFFFFFFF); // turn off autocalibrate on channel 1 - just as an example
Serial.begin(9600);

// initialize the digital pin as an output:
pinMode(ledPin, OUTPUT);

}

void loop()
{
long start = millis();
long total1 = cs_4_2.capSense(30);

Serial.print(millis() - start); // check on performance in milliseconds
Serial.print("\t"); // tab character for debug windown spacing

Serial.println(total1); // print sensor output 1

if(total1 >= 45) { // how long to blink based on resistance
blinkDelay = 250;
}
else if(total1 >= 15) {
blinkDelay = 500;
}
else {
blinkDelay = 1000;
}

digitalWrite(ledPin, HIGH); // blink on

delay(blinkDelay); // delay

digitalWrite(ledPin, LOW); // blink off

delay(blinkDelay); // delay
}


Monday, October 12, 2009

The Simplest Sensor Ever


We discovered this project at the Arduino website.


The human body, like all objects, gives off electromagnetic radiation. The project at Arduino uses a very simple setup: a sheet of aluminum foil, and a resistor, to create at least an on/off switch that detects human presence through your magnetic radiation.

Your cell phone emits EM, and so does your body. Our next step is to explore the mix.

Testing a Cell Sensor







Breaking open the Gaussmeter




The Gaussmeter




The device!


We picked up a cheap 'Cell Sensor' which has a gauss-meter and is supposed to measure cellular (~900MHz) signal. We haven't gotten good consistent results yet... First of all, most all-digital phones operate at higher bandwidth, so we may be missing that.

Monday, October 5, 2009

More bars?



Q: What does it mean to have '4 bars?'

A: Not much.



Why? Your phone is showing you how powerful the signal from the tower is, and each provider and phone manufacturer assigns arbitrary ranges to 1-4 bars. If you look at your phone's field test settings (see earlier post) it's using the 'Rx' value from ~0-105. The *real* number that tells you whether or not your call will go through is a ratio of that strength over the strength of the 'noise floor' (interference) around you, and is called 'EC/I0', or 'Pilot Strength'. EC is more or less your 'Rx' value, 'I0' is the noise floor... and both change constantly.

Your cell phone shows you 'bars' related to Rx because it changes less frequently than EC/I0... you're near a tower, but you may not be able to make a call.

MetaFilter.com Article

FCC Cell Phone Bandwidths



The FCC divides bandwidth for cell phone communication into 2 blocks. 824MHz-849MHz is used for your mobile to broadcast signals to the tower, 867MHz-894MHz is used for the tower to broadcast to your mobile. More at the FCC.

Prototype 1



This is the plan for our first prototype.
We ordered a very basic, cheap RF sensor from Amazon and we're going to try to use its readings to measure the ambient amount of cell phone signal at our site. For now, we're going to work with LEDs as output. Further processing can isolate the handset-uplink bandwidth versus the tower-downlink bandwidth. As we show this over time, we document the cellular atmosphere of the space.

Tuesday, September 29, 2009

Skyear



SkyEar by Usman Hoque combines colorful LEDs, cell phones, EM radiation sensors, and helium balloons. Taking the ambient EM level as given, people 'called in' to interfere locally.

Explanation from Hoque Design.
Project images and videos from the event website.

Field Test Mode



You can open up your phone's technical settings (Field Test Modes), including a better gauge of your service level.

"Signal strength is a number ranging from roughly -50 to -105 (your phone may show as a positive number). Closer to zero means a better signal, i.e. - 50 (roughly full signal) is better than -105 (roughly no signal)."

Find out the code for your phone in this PDF from WPSAntennas.com.

We'll be checking out our own cell phones, a Motorola RAZR and an LG enV2 (VX9100), in the coming week.