Posted on

Linear Motion from a Rotary Actuator

Locked State
Box lid prototype in the locked state

This is part of a project I have been playing with on and off for the last 9 months. It is similar in concept to a reverse geocaching box but with cooler locking mechanism. I have always appreciated the giant vault door bolt mechanisms and figured designing a laser cut version controlled by a servo would be an interesting learning exercise.

To accomplish the desired effect I had to solve a fairly simple geometry problem for the linkage mechanism. I figured this might be of use to someone else or my future self so I will walk through the derivation of the basic equations for finding functional linkage lengths.

Continue reading Linear Motion from a Rotary Actuator

Posted on

Build Log: Helicopter on an LCD

This was a fun little LCD project I spent an afternoon putting together. It’s based on a whole family of single button obstacle avoidance games. In short you move your helicopter up and down to avoid obstacles, scoring points for the distance travelled before inevitably crashing.

Continue reading Build Log: Helicopter on an LCD

Posted on

Build Log: Shaken Granular Laser

Completed enclosures

Update: Someone translated this post to Russian.

Update: I have confirmed that the output is still well within the spontaneous emission range and I am doubtful I can build an exciter with enough power. The paper uses a 532 nm Nd:YAG laser with a 7ns pulse duration and samples were performed at energies of 1.6mJ and 3.7mJ. This means that their source had an approximate power output between 229kW and 529kW.

There was an interesting article a while back over at new scientist describing research into a laser with a tunable output wavelength, after tracking down the original paper over at arXiv.org and looking at there experimental setup the I decided the device should be pretty straight forward to build.

The principal behind the design is you suspend a bunch of reflective balls in a laser dye and shake them really fast so the balls behave as though they are suspended. The laser dye is then excited by an external source and by changing the vibration frequency you can filter out different wavelengths of laser light emitted by the dye.

Continue reading Build Log: Shaken Granular Laser

Posted on

Selecting Random Items in Amazon SimpleDB

I am in the middle of working on a project that relies heavily on the ability to select random items from an Amazon Web Services SimpleDB domain. A little bit of google-fu turned up an answer to a post over at Stack Overflow which described Amazons recommended approach. A really rough psuedo-code implementation looks like this:
Item selectRandomItem() {
// Generate a random value
String randomValue = generateRandomString();

// Retrieve the data from SDB
Item item = randomLE(randomValue);
if(item == null) {
// Handle the edge case where there are no items
// with randomizers less than the random value
item = randomGE();
}
return item;
}

Item randomLE(String randomValue) {
return sdb.select(
"select * " +
"from MyStore " +
"where randomizer <= '" + randomValue + "'" +
"order by randomizer desc " +
"limit 1"
);
}
Item randomGE(String randomValue) {
return sdb.select(
"select * " +
"from MyStore " +
"where randomizer >= '" + randomValue + "'" +
"order by randomizer asc " +
"limit 1"
);
}
The algorithm stores a randomizer field with a random value on all of the items; when you need a row, generate another random value and select the first item whose randomizer attribute is less than this new random value. Unfortunately this approach is broken. Continue reading Selecting Random Items in Amazon SimpleDB