Paper Tyger Site Design
I recently launched a small web page for our local stationery store, The Paper Tyger.
I used Cufon for some of the font rendering, and it’s looking great!
I recently launched a small web page for our local stationery store, The Paper Tyger.
I used Cufon for some of the font rendering, and it’s looking great!
I recently entered two pieces into the Falmouth Artist Guild’s April show, Blowing in the Wind.
The first piece is a cascade of laser cut felt feathers, called Feather Vane.
The second piece is a slightly more conceptual mobile. It’s a large wood and paper sail that holds a piece of charcoal on the end.
It is very delicately balanced so the charcoal just barely skitters across a paper-covered table. As the wind blows the sail around, it traces light marks on the paper.
As the exhibition progresses, the charcoal drawing will build up layer-by-layer. This is the progress after one week. Looking great!
You can see more photos in the Flickr set.
I recently bought 250 stepper motors (part number 21-02485-03) for a sculpture that I’m working on, for the low price of 40 cents a piece! Even if you don’t buy them in bulk, they are still really cheap.
There are several driver circuits available for this motor, which were very helpful in figuring out the strange wiring inside this motor. However, none of the above drivers played nicely with the Arduino Stepper Library, which uses Tom Igoe’s stepper driver circuit. It took an evening to figure out how to connect this stepper to Tom’s driver and the Arduino stepper library, so I thought I would post it here.
The first step is to cut the white wire, which turns the stepper from a weird hybrid into a normal bipolar stepper. The links above will explain this in more detail if you’re curious.
The next step is to correlate the four wires on the motor to Tom Igoe’s circuit and the Arduino stepper library. These use the numbers 1-4 to describe the wires coming out of the motor, and order does matter. With the 21-02485-03, the wires numbered 1-4 correlate to the Red, Blue, Yellow, and Black wires respectively.
With this knowledge we can easily hook up our stepper to Tom’s circuit and start using the Arduino Stepper Library immediately. Here’s a diagram of Tom Igoe’s 4-wire circuit, with the Arduino code after it. The IC chip used is a L293D H-Bridge and note that the notch in the IC faces to the right (a bit hard to tell).

Image developed using Fritzing.
/* Drives the 21-02485-03 Stepper Motor attached to Tom Igoe's four-wire driver circuit */ #include <Stepper.h> // Change these to the pin numbers of each color wire #define YELLOW 8 #define RED 9 #define BLACK 10 #define BLUE 11 #define SPEED 200 // RPM #define LED_PIN 13 // create an instance of the stepper class, specifying // the number of steps of the motor and the pins it's // attached to // // Order matters here when giving it the pins Stepper stepper(20, RED, BLUE, YELLOW, BLACK); void setup() { // set the speed of the motor to 30 RPMs stepper.setSpeed(SPEED); pinMode(LED_PIN, OUTPUT); } void loop() { stepper.step(100); delay(300); stepper.step(-100); delay(300); }
I had some of my mobile designs laser cut out of wool felt through Ponoko, a fantastic service that makes laser cutting almost laughably easy. The mobile pieces came out looking great, but there’s two problems.
When you laser cut felt, it smells very strongly like burning hair (go figure), and it leaves a charred halo around the edges. Some people recommend dry cleaning to remove the smell and char, but that was too expensive and environmentally unfriendly for me. I experimented with a couple ways of cleaning the felt, and this is what worked best for me.
This method is pretty quick, easy, and works. Just remember to use an old toothbrush head.
Photos after the jump
I recently read an article on CNN about a little-known law that allows the US federal government to accept contributions to pay down the country’s debt.
The article contains several quotes from random passers-by in New York City, who were asked if they would consider donating. One person said the following:
“I think I could give $10 to $20. And if everyone could do that it would make a good dent in the debt.”
This person clearly does not understand orders of magnitude; if everyone could give $10-$20, we would make a dent the size of four-hundredths of one percent in the national debt.
To give a better understanding of the numbers involved, I have created the following four graphics, showing exactly how much of a “dent” a personal contribution of $15, $100, $1000, and $10,000 from every US citizen would make in the National Deficit.
If you would like the raw data, these graphics were generated from this Google Spreadsheet.
Of course it’s really not that simple. The more astute of you will notice a fallacy in the above graphics. You see, donations to the federal government are tax deductible. If I donate $10,000 to the national debt today, that lowers my taxable income by $10,000, which in turn lowers my tax burden thus skewing the numbers in the graphics above.
If anyone out there would like to add some tax functions into my Google Spreadsheet, we could avoid this fallacy of overlooking secondary consequences! Somebody get on that!
Several weeks ago I was approached to contribute an art installation to an upcoming show at the Woods Hole Historical Museum commemorating the Woods Hole drawbridge. Our drawbridge, originally installed in the late 1930’s, was replaced with a new one this winter. The show is centered around two time lapse movies that document the entire demolition of the old bridge and construction of the new one. There is also a documentary film about the old bridge, historic photographs, and my project.
I was given the old control box to the bridge, and turned it into an interactive “virtual bridge” installation. The control box is a 40lb metal contraption, with a set of industrial buttons on the face, and a huge nest of wires on the inside. The buttons lights up, each one containing its own 120vac-to-6v step down transformer to power the bulb. Also interesting is the mechanical aspect of the button is a separate module from the electrical contacts. Normally-open or normally-closed electrical contact modules are screwed onto the back of the button module, I assume so one can replace the contacts when they wear out.
Attached to the buttons was a huge mess of wires, which ran out of the box through a conduit. When the bridge was operational, this conduit connected to some sort of logic unit that was lost during demolition. Having talked to bridge operators, and given the vintage of this control system, I suspect the logic was performed with a large bank of relays.
To create a computer input controller for the virtual bridge, my friend Dan ripped out the original wiring, and re-wired just the 120vac circuit to make all the buttons light up. Next, I got the controller to interface with the computer. To do this, I used the USB keyboard encoder hack. This is a very easy technique, accomplished by opening up a keyboard, plugging it in, and shorting pins on the keyboard encoder circuit. With a little trial-and-error, you can determine a set of combinations that reproducibly “type” specific key codes into the computer. For instance, shorting a certain two pins on the encoder might always type the letter “w” onscreen. I came up with one pin combination for each of the buttons on the control box, soldered on some wire leads, and connected them to the buttons on the control box.
Once I had the control box talking to the computer, the rest was done in software. The idea for the installation was simply to “create a virtual drawbridge,” so I had quite a bit of creative freedom. Initially, I was given video footage of the bridge in operation, and I experimented with using the control box to manipulate video playback. I really wanted the control box to perform realtime datamoshing on the bridge video, but ultimately this proved unfeasible and way too weird for the (elderly) population of Woods Hole.
Instead, I scrapped the video footage entirely and used Flash to create a bridge tending video game. Museum patrons – with the aid of onscreen prompts – use the real control box to operate an animated drawbridge, allowing cars to drive over and boats to sail under. The game required quite a bit of illustration, which is not really my forte, but came out looking great. While I had originally designed the game for kids, during the opening reception it was a bigger hit with old people than children! I suspect these folks have been wanting to play with that bridge controller for years, and now they finally can.
I have been working on version 2 of the LigerCat tool since October. Today, we flipped the switch and turned it on, at http://ligercat.ubio.org.
LigerCat is the brainchild of Dr. Neil Sarkar, and was created by me.
It’s hard to explain its use to someone outside the scientific or medicine field, but I’ll try my best to break it down.
The basic idea is that “tagging” is nothing new. The Web 2.0 folks got the idea from librarians, who have been tagging literature for many years. Librarians “tag” things using a “controlled vocabulary,” which is just a set of tags that are curated and maintained by some authoratative body. For instance, scientific articles published in life sciences field are tagged with a controlled vocabulary called Medical Subject Headings (MeSH), which has over 20,000 tags in the set.
The problem is, the journals that publish these articles are not annotated with MeSH descriptors; journals are annotated with another controlled vocabulary called Journal Subject Terms…but there’s only 120 of them! So, an article is published in a journal. This article could be tagged with any number of 20,000 MeSH descriptors. However, the journal that publishes the article is only tagged with one or more of the 120 Subject Terms.
That seems silly, doesn’t it?
That’s where LigerCat comes in. It can find every article published in a journal, and is capable of generating a tag cloud of the MeSH terms applied to every article published in a journal. The National Library of Medicine has a database of life sciences articles called PubMed, so we downloaded all the records, and built indices from that.
From a journal’s MeSH tag cloud, you can click one or more tags. LigerCat will do a live search back to PubMed to see the articles tagged with your selections.
That’s pretty cool to begin with, but there’s a lot more that we can do with the technology.
The articles tab will allow you to do a plain old search into the PubMed article database. Ligercat will download all the results, and build a MeSH tag cloud from the articles returned by your search. You can search for a topic, a person, or an organism, and LigerCat will build you a MeSH cloud based on the results.
Or you can go nuts, and click over to the Genes tab. You can paste a FASTA-formatted sequence of ATC’s and G’s into the text box. (This is a good one to try if you’re curious.) LigerCat uses an algorithm called BLAST to find all the known genes that are similar to the one you pasted. LigerCat will use its own magic to find all the articles written about those genes, then display a MeSH cloud built from all those articles. You could start with an unknown gene sequence, and in the span of a few minutes, be reading articles about that sequence. Pretty neat stuff.
For the geeks reading this, you may notice that the searches to PubMed are performed live outside the HTTP request/response cycle. I used BackgrounDRB to pull this off, and it works quite well. If and when LigerCat experiences a lot of load, BackgrounDRB will allow us to pull the background search workers off onto their own server(s), allowing us to isolate the computationally intensive part of the application away from the app server.
Pretty easy
yum install mysql-devel gem install mysql -- --with-mysql-config=/usr/bin/mysql_config --with-mysql-lib=/usr/lib/mysql
# # Denali's No-Knead Miracle Bread # require 'cast_iron_dutch_oven' # sudo gem install dutch_oven --version 3.5 Quart --source KitchenwaresStore require 'mixing_bowl' require 'spatula' desc "Step 1. To be performed at night" task(:at_night) do ingredients = { 'Warm Water' => '2 Cups', 'Yeast' => '1/4 tsp', # Yes, that's all 'All Purpose Flour' => '1 Cup', # King Arthur is the best. 'Whole Wheat Flour' => '1/4 Cup' } MixingBowl.contents = ingredients.collect {|ingredient, amount| ingredient.measure(amount) } MixingBowl.contents.mix_thoroughly(:with => Spatula) MixingBowl.cover(:with => :cloth, :loosely => true) sleep 4.hours..8.hours end desc "Step 2. To be peformed the next morning" task(:morning => :at_night) do ingredients = { 'All Purpose Flour' => "#{(2 + 1/2).scant} Cups", 'Asiago Cheese' => '4 oz', 'Salt' => '2 teaspoons' } ingredients['Asiago Cheese'].dice '3/8" cubes' MixingBowl.contents << ingredients.collect{ |ingredient, amount| ingredient.measure(amount) } MixingBowl.contents.mix_thoroughly(:with => Spatula) MixingBowl.cover(:with => :cloth, :loosely => true) sleep 6.hours..8.hours end desc "Step 3. To be performed after work" task(:after_work => :morning) do Oven::MiddleRack.contents << DutchOven Oven::MiddleRack.contents.insert(DutchOvenCover, :next_to => DutchOven) Oven::PreHeat.new(500.degrees) case Oven::PreHeat.status when done? sleep 20.minutes # Let DutchOven heat up after oven is at temperature end MixingBowl.contents.sprinkle_with :flour dutch_oven_cover, dutch_oven = Oven::MiddleRack.contents.pop, Oven::MiddleRack.contents.pop dutch_oven.inside.spray_with :oil MixingBowl.contents.roll_into(dutch_oven, :with => WetSpatula) Oven::MiddleRack.contents << dutch_oven.cover!(dutch_oven_cover) Oven::Bake.at(475.degrees, 25.minutes) DutchOven.uncover! Oven::Bake.at(450.degrees, 12.minutes..16.minutes) Oven::MiddleRack.contents.pop rescue ThirdDegreeBurnError Oven.turn_off raise EmergencyRoomException, "Wear oven mitts next time", caller end