sensor

Pretty Maps LA by Aaron Staup Cope © 2012 Julian. All rights reserved.

Pretty Maps – 20×200 Editions

Some of you may have noticed, mostly probably not — but the Laboratory has expanded its ranks. It’s starting to feel like a proper design collective in here. One of the lovely attributes of the people in the Lab are … Continue reading

© 2010 Julian. All rights reserved.

Design Fiction Chronicles: The Dark Knight's Ubicomp Mobile Phone Sonar

Here’s that scene from The Dark Knight where Batman has secretly installed a surveillance system that traces the legal, moral and ethical contours iconic to ubiquitous computing networked devices of this sort. What’s going on — as explained in the short … Continue reading

© 2009 Julian. All rights reserved.

Laboratories, Accelerometers And Kitchen Crockery

The Memsic 6202 Accelerometer, fresh out o’the skillet. We’ve been out of the Laboratory proper — the place where things are constructed and soldered and heated up — for a bit now, not because we don’t go in there, or we … Continue reading

© 2009 Julian. All rights reserved.

Finding The Way – HMC6352 Digital Compass

Since I was asked, and asked again, I’ll toss this technotopia solutions nugget to demonstrate that, despite the evidence demonstrated by recent public appearances and weblog postings, we here at the Laboratory are in fact still fully engaged in connecting … Continue reading

© 2008 Julian. All rights reserved.

Ubicomp is like a 5 year old wishing for a pink pony

Complete Ubicomp fail. I mean..they can’t even get this most simple of scenarios straightened out and they want to put my refrigerator and toaster oven on the network? WTF. Seriously. Anytime I hear the alpha futurist-y featurists get all excited … Continue reading

© 2008 Julian. All rights reserved.

Urbanism, Data-Driven

(Some cartogram structures and linkages Pascal created as sensor maps where the geography is an implied and driven — rather than the driving — parameter.) Fabien Girardin, MIT brainiac and a fellow Near Future Laboratory ‘naut presented his expert and insightful … Continue reading

© 2007 Julian. All rights reserved.

MobZombies Sensor Board Assembly

Wow, what a bit of a learning experience this was. That chip is an Invernsense IDG300 gyroscope. $35 a pop. And its one of these “QFN” (quad, flat, no leads) style packages which basically makes it a pain to work with. I thought I could use this technique of dabbing a bit of solder on each of the pads on the printed circuit board and then put a bit of heat to the board with hot air or an iron on each pad. It “took” but there was no electrical continuity. What I think happened is that the big center ground pad took hold, but the other leads didn’t. It seems like it should have. The alignment was good after eyeballing it. Anyway, it didn’t.

So, after taking the thing on and off a few times because of some shorts I found across a capacitor and crap, I decided to have a go with a bit of solder paste. That was something I was trying to stay away from because the paste is messy and difficult to apply to such small leads (.25mm or .01 inch). This is what you really need a stencil for, I guess.

I dabbed a bit, messed it up, dabbed some more, cleaned up, etc. I basically just put paste on the leads that are actually connected to something. There are lots of non-connects, evidently for factory calibration of the device. With the solder paste on, I placed the chip, messed with it for a bit to try to get it aligned good, which is a bit nerve wracking because I’m trying to avoid accidentally spreading the solder paste around and everything. Finally, it looks good and I put some hot-air to the area. It sort of works when I check the electricals, so I try again, finally getting something. One of the devices seems a bit out of kilter — the rates on one axis when its static seems off, but maybe that can be compensated. We’ll see.

Power, but who knows how well it works? The MCUs are fine, power is fine, the Bluetooth radios there are fine. Haven’t had the nerve to check the gyros though..Those things came on and off so many times, I toasted the board a bit.

Technorati Tags:

Continue reading

© 2007 Julian. All rights reserved.

A Gyroscope Game Input Control

I’ve been playing with a gyroscope lately as a game input control element for MobZombies. The challenge is to come up with a less cumbersome sensor rig, and less expensive. The sensor will need to communicate with a mobile phone because no one’s going to buy a $2000 tablet pc to play a game. The sensor should also be able to capture forward and backward motion.

The IDG300 gyroscope seemed decent, albeit “expensive” in the context of trying to make an under $100 sensor rig. But, you know..modern times and all.

I ran a few tests to see how well it captured tight and wide turns. I think it will require lots of moving average calculations. The graphs below are 20 sample averages which have also had a 16 point moving average calculation applied to them to smooth out the rough bits.

Tight left turn, basically a slow Whirling Dervish

Forward several steps, turn left, forward several steps, turn right

So, with lots of smoothing, the data looks clean enough to be able to translate turning motion into the equivalent of pressing the “A” or “D” keys to turn your guy left or right. An accelerometer will take care of forward or backward translational movement, I’m pretty sure.

The goal here really is to get to a point of capturing enough embodied movement sufficiently to use physical action as direct input into a game. This is different from the “offline gaming” idea, and closer to the “whoosh” style input.

Technorati Tags: ,

Continue reading

© 2007 Julian. All rights reserved.

Flavonoid v.03 Notes: Testing the QT113H proximity sensor

Here’s the v03 Flavonoid prototype pretty much all assembled, except for attaching a battery on back and the DS1340 real-time clock and its crystal — you can see the landing pad there near the center.. I’d be surprised if this all works. I mean..something must be wrong, right?

Okay, everythings on there..now what? I basically try to test each component one at a time to see if it works. Here I’m checking the QT113H, which is a touch/proximity sensor. The sensor can detect whether the Flavonoid is being held, or is near your body. Touch/proximity interface semantics are something I’m interested in experimenting with — more than just physical contact, but nearness as well.

What I’m doing is checking to see if the sensoris working. My finger is over a contact to which will be attached a flexible probe, like a super thin wire that can be run along the inside of whatever enclosure this ends up in. So, it triggered — I can tell because my multimeter went to about 3.3v.

But, then something annoying happened..it basically locked up, the sensor. And then I remembered that when I was first experimenting with the QT113H, it had to be recalibrated, basically by cycling the power. I never really fully understood when that had to be done, but regardless — this is a problem because, well..Flavonoid has no power switch so I can’t cycle the power on the thing, even for debugging. Drat..

R0012879

I threw a tri-color LED on there for debugging and diagnostics. I think I’ll probably put a surface-mount one on there in the next version.

R0012886

I put an in-system programmer jack on the board so I could program it with just about any in-system programing jig. That ribbon cable there is running to my STK500 on my Windows machine, although one of these days I guess I’ll figure out how to use the rig I got for my Mac. Anyway, I use AVRStudio’s little AVR programming interface to flash the program memory from the STK500. I comple using the WinAVR (avr-gcc) tools, which works like a charm..no problems.

R0012888

Okay, back to this snafu with the QT113H..basically it turns out that you can "power" the thing directly from an I/O pin on the microcontroller. It uses so little current to run, that one of the pins on the ATmega32 can supply it. So, that means I can connect the power pin of the QT113H directly to one of the port pins, which I did here with a little light gauge white wire wrap. I had to cut a trace on the board that had been the VCC supply for the QT113H. Easy peasy. Now i can power the thing up and down programmatically. So, every reset or whenever. Convenient.

R0012890

Here I attached a little bit of white wire as the sensor probe for the QT113H. Works like a charm. If I hold my hand near it, it triggers the sensor.

That’s it — proximity sensor works. Did a little redesign in the original schematic.

Next, I’ll check to see if the real-timeclock is working.. Continue reading

© 2007 Julian. All rights reserved.

The Ersatz Cylon Detector: A Hardware Sketch To Illuminate The Inner Workings of the MAX6953 Integrated Circuit

Cylon Detector In Operation

An on-going project that requires the display of alphabetic and numeric characters using a 5×7 LED matrix turned me towards a chip by Maxim IC — the MAX6953. The chip, while expensive (~$8), has lots of built-in features that mitigate the damage to my purse, trading such in kind for time-saved. It will directly drive up to 4 5×7 LED matrices with direct control from a microcontroller over a two-wire interface (TWI/I2C), can manage varying intensities (16 or 32 degree scales), has a built-in Arial-like font set with a reasonably full-range of characters, diacritics and symbols, and allows me to create 24 characters of my own design.

SlowMessenger_Max6953_Breakout

SlowMessenger_Max6953_Breakout_Board

My first attempt at mucking with the chip used the DIP version, which is ginormous and requires such patience and diligence with wiring the thing up — all those lines going to the pins of the LED matrix — that I pretty much gave up after it didn’t work the first time. I decided that I’d just go ahead and design a PCB for the thing and continue to hone my skills with Eagle, while also learning how to work with the MAX6953.

Some Samples

I sent a design off, it came back, I stared at it for a few minutes, looked for the MAX6953′s in my bin of samples and realized I didn’t have any. I managed to coax a bunch from Maxim’s sample guy, which is great. (Thanks whoever you are, wherever you are.) A couple of weeks later, when my plate was relatively clear, I assembled one of the boards, using a yellowish/orange 5×7 matrix LED I purchased from Digikey and manufactured by LiteOn. I wanted small, but the closest I got to small was 0.7″, which still seems big to me. (The story of it’s assembly and problems therein is instructive if you’re curious about surface-mount PCB work..and the problems therein.)

I powered the thing up and, naturally enough, it didn’t illuminate at all. I poked through the spec sheet and figured out that there’s a whole start-up ritual you’ll want to go through, such as the test mode and negating the shutdown bit, which defaults to “shutdown enabled.” After an hour or so of puzzling, I managed to get it displaying characters while hooked up to my usual Arduino test harness thing.

Lower "T"

While I was assembling the board, I realized I wasn’t sure what the proper orientation of the LED device should be. I looked for markings to indicate pin 1 and found nothing definitive. I looked at the product data sheet and they had an arrow pointing at pin 1 but nothing that clearly told me how to determine which of the pins was the first. Now, the holes I put in for the LED device in Eagle were a bit snug — too snug, really. It required a bit of jiggering to get the LED device to fit. (I went back and made the holes slightly bigger in the design.) But, I realized this could be an advantage given my current pin alignment peril — the snugness would allow the LED device’s pins to make contact with the through-holes’ platings! In other words, I could fit the device one way and not solder the pins to see if I had the thing right-way-around.

Evil Rabbit Character

Well, that worked. A consequence of it working was that some of the columns and rows didn’t illuminate quite consistently — they’d flicker and such — and a mysterious character appeared — an evil rabbit was the first thing I saw.

I ran through a few code gyrations and got characters to show, right-way-around, so I went ahead and soldered the LED device permanently to the board, easy-peasy.

Thinking of a few possible ways to make this learning project fun to share for the show-and-tell session of the weekly luncheon I have with some friends, I decided that I’d make a combination Magic 8 Ball / Cylon Detector, the idea being that one could reasonably ask the Magic 8 Ball if one were a Cylon — I mean..why not? — which would be a lot easier than what Baltar was trying to construct, and wouldn’t require blood samples or anything. You could just ask yourself, in the privacy of your own home or a public restroom, and then choose whether or not you wanted to share your result.

So, I hooked it up to an accelerometer that detects the normative shaking motion one inflicts on the Magic 8 Ball..the evil rabbit then divines the response.

Anyway, it definitely works.

The Ersatz Cylon Detector is meant for entertainment purposes only. It does not purport to factually report whether or not individuals are Cylons, except for Don Milvio. (He’s definitely a weird hybrid Franco-Italian Cylon thing.) The results are for home amusement and cannot be used for discovery or detection of actual Cylons, their friends or family. The results cannot be used for legal purposes, nor as a sanction for physical violence. The Ersatz Cylon Detector and its results are not endorsed by the producers of Battlestar Galactica, The SciFi Channel, or its affiliates and their station managers.


Arduino Code

#include <Wire.h>
#include <math.h>

// http://wiring.org.co/reference/libraries/Wire/index.html
// On the Arduino board, Analog In 4 is SDA, Analog In 5 is SCL
// These correspond to pin 27 (PC4/ADC4/SDA) and pin 28 (PC5/ADC5/SCL) on the Atmega8
// The Wire class handles the TWI transactions, abstracting the nitty-gritty to make
// prototyping easy.
// This sketch has two TWI devices connected to it — a LIS3LV02DQ tri-axis accelerometer
// and the MAX6953 5x7 matrix LED driver. The MAX6953 is at address 0×50, and the LIS3LV02DQ is
// at address 0x1D.

char mAnswer_1[19] = {‘S’,‘i’,‘g’,‘n’,‘s’,‘ ‘,‘p’,‘o’,‘i’,‘n’,‘t’,‘ ‘,‘t’,‘o’,‘ ‘,‘y’,‘e’,‘s’,0×00};
char mAnswer_2[4] = {‘Y’,‘e’,‘s’,0×00};
char mAnswer_3[12] = {‘M’,‘o’,‘s’,‘t’,‘ ‘,‘l’,‘i’,‘k’,‘e’,‘l’,‘y’,0×00};
char mAnswer_4[16] = {‘W’,‘i’,‘t’,‘h’,‘o’,‘u’,‘t’,‘ ‘,‘a’,‘ ‘,‘d’,‘o’,‘u’,‘b’,‘t’,0×00};
char mAnswer_5{16] = {‘Y’,‘e’,‘s’,‘,’,‘ ‘,‘d’,‘e’,‘f’,‘i’,‘n’,‘i’,‘t’,‘e’,‘l’,‘y’,0×00};
char mAnswer_6[17] = {‘A’,‘s’,‘ ‘,‘I’,‘ ‘,‘s’,‘e’,‘e’,‘ ‘,‘i’,‘t’,‘,’,‘ ‘,‘y’,‘e’,‘s’,0×00};
char mAnswer_7[19] = {‘Y’,‘o’,‘u’,‘ ‘,‘m’,‘a’,‘y’,‘ ‘,‘r’,‘e’,‘l’,‘y’,‘ ‘,‘o’,‘n’,‘ ‘,‘i’,‘t’,0×00};
char mAnswer_8[13] = {‘O’,‘u’,‘t’,‘l’,‘o’,‘o’,‘k’,‘ ‘,‘g’,‘o’,‘o’,‘d’,0×00};
char mAnswer_9[14] = {‘I’,‘t’,‘ ‘,‘i’,‘s’,‘ ‘,‘c’,‘e’,‘r’,‘t’,‘a’,‘i’,‘n’,0×00};
char mAnswer_10[19] = {‘I’,‘t’,‘ ‘,‘i’,‘s’,‘ ‘,‘d’,‘e’,‘c’,‘i’,‘d’,‘e’,‘d’,‘l’,‘y’,‘ ‘,‘s’,‘o’,0×00};
char mAnswer_11[22] = {‘R’,‘e’,‘p’,‘l’,‘y’,‘ ‘,‘h’,‘a’,‘z’,‘y’,‘,’,‘ ‘,‘t’,‘r’,‘y’,‘ ‘,‘a’,‘g’,‘a’,‘i’,‘n’,0×00};
char mAnswer_12[24] = {‘B’,‘e’,‘t’,‘t’,‘e’,‘r’,‘ ‘,‘n’,‘o’,‘t’,‘ ‘,‘t’,‘e’,‘l’,‘l’,‘ ‘,‘y’,‘o’,‘u’,‘ ‘,‘n’,‘o’,‘w’,0×00};
char mAnswer_13[16] = {‘A’,‘s’,‘k’,‘ ‘,‘a’,‘g’,‘a’,‘i’,‘n’,‘ ‘,‘l’,‘a’,‘t’,‘e’,‘r’,0×00};
char mAnswer_14[26] = {‘C’,‘o’,‘n’,‘c’,‘e’,‘n’,‘t’,‘r’,‘a’,‘t’,‘e’,‘ ‘,‘a’,‘n’,‘d’,‘ ‘,‘a’,‘s’,‘k’,‘ ‘,‘a’,‘g’,‘a’,‘i’,‘n’,0×00};
char mAnswer_15[19] = {‘C’,‘a’,‘n’,‘n’,‘o’,‘t’,‘ ‘,‘p’,‘r’,‘e’,‘d’,‘i’,‘c’,‘t’,‘ ‘,‘n’,‘o’,‘w’,0×00};
char mAnswer_16[18] = {‘M’,‘y’,‘ ‘,‘s’,‘o’,‘u’,‘r’,‘c’,‘e’,‘s’,‘ ‘,‘s’,‘a’,‘y’,‘ ‘,‘n’,‘o’,0×00};
char mAnswer_17[14] = {‘V’,‘e’,‘r’,‘y’,‘ ‘,‘d’,‘o’,‘u’,‘b’,‘t’,‘f’,‘u’,‘l’,0×00};
char mAnswer_18[20] = {‘O’,‘u’,‘t’,‘l’,‘o’,‘o’,‘k’,‘ ‘,‘n’,‘o’,‘t’,‘ ‘,‘s’,‘o’,‘ ‘,‘g’,‘o’,‘o’,‘d’,0×00};
char mAnswer_19[18] = {‘D’,‘o’,‘n’,\’,‘t’,‘ ‘,‘c’,‘o’,‘u’,‘n’,‘t’,‘ ‘,‘o’,‘n’,‘ ‘,‘i’,‘t’,0×00};

void setup()
{

Serial.begin(9600);

CLKPR = (1<<CLKPCE);
CLKPR = 0;

// initialize the LIS3LV02DQ
Wire.begin(); // join i2c bus (address optional for master)
Wire.beginTransmission(0x1D);
Wire.send(0×20); // CTRL_REG1 (20h)
Wire.send(0×87); // Device on, 40hz, normal mode, all axiss enabled
Wire.endTransmission();

// initialize the MAX6953
Wire.beginTransmission(0×50);
Wire.send(0×07); // Display Test
Wire.send(0×00); // Normal Operation
Wire.endTransmission();

Wire.beginTransmission(0×50);
Wire.send(0×01); // Intensity16
Wire.send(0x0F); // Full
Wire.endTransmission();

Wire.beginTransmission(0×50);
Wire.send(0×04); // configuration register
Wire.send(0×01); // disable shutdown mode
Wire.endTransmission();
initializeSpecialCharacters();
}

void loop() {
int z_val, x_val, y_val;
int sum_sq, sum_sq_2, diff, mShake, message;
int max_accel;
byte i;

message = 0;

setCharacter(0×00);
delay(random(500,1000));
setCharacter(0×01);
delay(random(500,1500));

x_val = getX();
y_val = getY();
z_val = getZ();

sum_sq = sqrt(pow(x_val, 2) + pow(y_val, 2) + pow(z_val, 2));

delay(100);
x_val = getX();
y_val = getY();
z_val = getZ();
mShake = 0;
sum_sq_2 = sqrt(pow(x_val, 2) + pow(y_val, 2) + pow(z_val, 2));
diff = abs(sum_sq-sum_sq_2);
if(diff > 300) { mShake = 1; }
if(diff > 1000) { mShake = 2; }
if(diff > 1200) { mShake = 3; }

//Serial.print(diff); Serial.print(" "); Serial.print(max_accel); Serial.print(" "); Serial.println(mShake);

if(diff > max_accel) max_accel = diff;

//delay(500);

if(mShake > 0) {
message = random(0,18);
for(int i=0; i<3; i++) {
setCharacter(‘*’); delay(500); setCharacter(‘ ‘); delay(500);
}
} else {
message = -1;
}
switch(message) {
case 0:
i = 0;
while(mAnswer_1[i] != 0×00) {
setCharacter(mAnswer_1[i]); delay(800);
i++;
}
break;
case 1:
i = 0;
while(mAnswer_2[i] != 0×00) {
setCharacter(mAnswer_2[i]); delay(800);
i++;
}
case 2:
i = 0;
while(mAnswer_3[i] != 0×00) {
setCharacter(mAnswer_3[i]); delay(800);
i++;
}
break;
case 3:
i = 0;
while(mAnswer_4[i] != 0×00) {
setCharacter(mAnswer_4[i]); delay(800);
i++;
}
break;
case 4:
i = 0;
while(mAnswer_5[i] != 0×00) {
setCharacter(mAnswer_5[i]); delay(800);
i++;
}
break;
case 5:
i = 0;
while(mAnswer_5[i] != 0×00) {
setCharacter(mAnswer_5[i]); delay(800);
i++;
}
break;
case 6:
i = 0;
while(mAnswer_6[i] != 0×00) {
setCharacter(mAnswer_6[i]); delay(800);
i++;
}
break;
case 7:
i = 0;
while(mAnswer_7[i] != 0×00) {
setCharacter(mAnswer_7[i]); delay(800);
i++;
}
break;
case 8:
i = 0;
while(mAnswer_8[i] != 0×00) {
setCharacter(mAnswer_8[i]); delay(800);
i++;
}
break;
case 9:
i = 0;
while(mAnswer_9[i] != 0×00) {
setCharacter(mAnswer_9[i]); delay(800);
i++;
}
break;
case 10:
i = 0;
while(mAnswer_10[i] != 0×00) {
setCharacter(mAnswer_10[i]); delay(800);
i++;
}
break;
case 11:
i = 0;
while(mAnswer_11[i] != 0×00) {
setCharacter(mAnswer_11[i]); delay(800);
i++;
}
break;
case 12:
i = 0;
while(mAnswer_12[i] != 0×00) {
setCharacter(mAnswer_12[i]); delay(800);
i++;
}
break;
case 13:
i = 0;
while(mAnswer_13[i] != 0×00) {
setCharacter(mAnswer_13[i]); delay(800);
i++;
}
break;
case 14:
i = 0;
while(mAnswer_14[i] != 0×00) {
setCharacter(mAnswer_14[i]); delay(800);
i++;
}
break;
case 15:
i = 0;
while(mAnswer_15[i] != 0×00) {
setCharacter(mAnswer_15[i]); delay(800);
i++;
}
break;
case 16:
i = 0;
while(mAnswer_16[i] != 0×00) {
setCharacter(mAnswer_16[i]); delay(800);
i++;
}
break;
case 17
i = 0;
while(mAnswer_17[i] != 0×00) {
setCharacter(mAnswer_17[i]); delay(800);
i++;
}
break;
case 18:
i = 0;
while(mAnswer_18[i] != 0×00) {
setCharacter(mAnswer_18[i</fon Continue reading