Archive for the ‘Prototyping+Hacking’ Category

Magic Balloons

Saturday, August 9th, 2008

At Tinker, we’ve been working on some blue glowing balloon clusters for an upcoming event. They consist of a blue LED and an ATTiny13 microcontroller and they pulse with a slow, compelling sine wave. Selecting the timing of the sine wave was an important consideration, but it was necessary to make a choice about the frequency of the wave oscillation before programming the ATTiny microprocessors and inserting them into the balloons. I wrote this little sketch in Processing to get an idea of what a cluster of glowing balloons would look like and used the same sine wave lookup table we generated for the ATTinys.

The code below produces this.

// A program to simulate balloons with LEDs inside.
// Uses a sine wave lookup table rather than
// a sin wave generated by a function.
// Brock Craft, 9 Aug 2008
// at tinker.it

int num= 60; // number of ‘balloons’
Led[] led;

void setup(){

size(300,300);
noStroke();
smooth();
colorMode(HSB);
led=new Led[num];
for (int i=0;i<num;i++){
led[i]=new Led (int(random(width)),int(random(height)),int(random(255)));
}

}

void draw(){
background(53);
for (int i=0;i<num;i++){
led[i].render();
}
}

void mousePressed(){
for (int i=0;i<num;i++){
led[i].x=int(random(width));
led[i].y=int(random(width));
}
}

class Led{

int i;
int x;
int y;
int col;

// mapping the colour intensity to a sinewave that’s in a lookup table below
int map[]={
0,0,0,0,1,1,1,2,2,3,4,5,6,6,8,9,10,11,12,14,15,17,18,20,22,23,25,27,29,
31,33,35,38,40,42,45,47,49,52,54,57,60,62,65,68,71,73,76,79,82,85,88,91,
94,97,100,103,106,109,113,116,119,122,125,128,131,135,138,141,144,147,
150,153,156,159,162,165,168,171,174,177,180,183,186,189,191,194,197,199,
202,204,207,209,212,214,216,218,221,223,225,227,229,231,232,234,236,238,
239,241,242,243,245,246,247,248,249,250,251,252,252,253,253,254,254,255,
255,255,255,255,255,255,255,254,254,253,253,252,252,251,250,249,248,247,
246,245,243,242,241,239,238,236,234,232,231,229,227,225,223,221,218,216,
214,212,209,207,204,202,199,197,194,191,189,186,183,180,177,174,171,168,
165,162,159,156,153,150,147,144,141,138,135,131,128,125,122,119,116,113,
109,106,103,100,97,94,91,88,85,82,79,76,73,71,68,65,62,60,57,54,52,49,
47,45,42,40,38,35,33,31,29,27,25,23,22,20,18,17,15,14,12,11,10,9,8,6,6,
5,4,3,2,2,1,1,1,0,0,0,0
};

Led (int myx, int myy, int mycol){

x=myx;
y=myy;
col=mycol;
i=int(random(255));
}

void render(){
i++;
if (i>=map.length){
i=0;
}
fill(180,map[i],175);
noStroke();
ellipse(x,y,30,30);
}

}

Blue LED Balloon in the dev center

Cheap fabbing for the masses

Wednesday, November 7th, 2007

Looks like Ponoko has made it easy to get access to a laser cutter. Check out http://www.ponoko.com/ where you can design objects and have them fabbed and shipped right to your door. You can even sell your designs on their website. Similar to Café Press, but for 3D objects!

More segmentation

Tuesday, November 6th, 2007

My friend Adam Sporka’s been working on some new segment designs in an effort to get the maximum number of readable characters with a minimum of segments. They are pretty novel and the inclusion of curves leads to some very attractive new letterforms:

9 segments

Check out Adam’s flickr photostream for more: http://www.flickr.com/photos/adam_sporka/1890226576/

Random Clockin’

Friday, November 2nd, 2007

I’ve been playing around with representing textual information with 7-segment displays. The nifty thing about 7-segment displays is they are ubiquitous, cheap, and easily addressable with IC chips such as the (mighty) ULN2003a.

In my immediate explorations, I find that the following letters are not possible using a 7-seg:

M, W, V, K , X, Q, Z

This is considering that it is okay to use lowercase letters to “cheat”.

For example, the word “BURNT” could be written :

|_  | |  _  _  |_
|_| |_| |  | | |_

I don’t really like the solution for “N”, but at least it works. It’s a shame about the letter “M”, as it has a somewhat high letter frequency! Here’s a chart of the letter frequencies of the 7-segment “orphans” (based on Wikipedia data):

m 2.41%
w 2.36%
v 0.98%
k 0.77%
x 0.15%
q 0.10%
z 0.07%

The next plan is to develop a display that can handle all the letters with as few segments as possible (inspiration from Josh Nimoy). In the meantime, I whomped up a little Processing program to randomly illuminate the various segments of a 7-seg display…click to view the program:

Random Seven Segments

SketchUp

Friday, October 26th, 2007

Google SketchUp offers a useful way to create 3D models and has a very simple user interface. Models can then be inserted into Google Earth. I spent some time playing around with the UI and ended up creating a model of the Arduino Extreme prototyping board. Carlyn Maw and Tom Igoe have some really nice illustrations on the Arduino website which show the connections necessary for a Shift Register output (to increase the number of outputs that can be addressed). I thought it might be nice to make something similar using SketchUp. It has additional nice features such as a style palette, whichallows you to output relly nice tidy lines (as in CAD drawings) or really appealing sketched representations:

Arduino Sketch

If you want the arduino SketchUp model, it’s here: Arduino Extreme model (820k).