True's beaked whale.jpg

Western spotted skunk

Hooded skunk

Yellow-throated Marten

Wolverine

Hobbiest scale prototyping?

December 16th, 2008

One of the coolest technologies around are the rapid prototyping technologies: CNCs, Laser scanning, and Stereolithography. I first ran into stereolithography at a UK campus fair soon after I arrived, I forget which one.

In stereolithography a 3D computer model gets formed into a actually plastic part using a process in which heat from a laser polymerizes a liquid. Each pass forms a layer, and layers of under 0.1 mm are added to build the complete part. This technology was developed in the late 1980’s and is now fairly common though very expensive. The machines are $50-150k, and shops will turn out a part for a few hundred dollars. Incredible stuff.

Part made with stereolithography

The University of Kentucky has a Rapid Prototyping shop with a Stereolithography machine on campus.

Two things make this tech expensive, the monomer plastic ($200+ per liter) and the machines. The monomer is magic stuff, 21st century chemistry, and can’t substituted.

Can a machine be made more cheaply? Perhaps. Instead of the UV laser and X/Y scanning optics, how about using a DLP and a UV bulb? The DLP (an array of computer controlled mirrors, the display tech for bright computer projectors) directs the UV light to the correct part of the work area, the monomer polymerizes, the part is lowered, and the cycle repeats.

Could this work? It seems plausible. Best as I can tell, the monomer needs to be heated 20-30°C to polymerize. This is done in ~100μs by the laser, so a UV bulb shining for longer might be able to polymerize the monomer. The UV laser (100mW typically) has an intensity equivalent to 10,000W shining on a small 2cm x 2cm work area, so a 200W or 400W UV bulb (commercially available) shining for 1/10 of a second should in theory work. Losses due to heat dissipation may make a longer light pulse necessary, but it would likely still be under a second if this will work at all. The monomer could be preheated to the highest temperature where polymerization doesn’t occur to help polymerization along.

The result would be a simple and cheap stereolithography device with a small working area (2cmx2cmx15cm)! It could be built for very little ($200 UV bulb, $100 old DLP projector, $200 lenses and misc parts), with the high cost of the plastic monomer the biggest limitation. A DLP chip with 1000×1000 mirrors would have a 0.02 mm resolution. If UV intensity required for polymerization isn’t limiting, at 0.075 mm resolution a standard DLP would give a 7.5cm x 7.5cm working area and allow larger parts to be built.

What is the cost in plastic monomer for the parts? About 15c to 50c for a small Lego size piece, compared to the 5c a block cost for Legos.

 

Update: I had a look around for cheaper & more accessible plastic monomer. Two turned up–rubber stamp photopolymer resin and screen printing photopolymer emulsion.

The rubber stamp photopolymer is inexpensive and would likely UV cure in under a minute (1s or 60s is hard to gauge). Unfortunately, the resin is quite viscous, 60,000 cps, quite thicker than honey. So likely too thick for adding a thin layer at a time.

Screen printing photopolymer emulsion appears more promising. It polyvinyl alcohol or polyvinyl acetate with diazo or SBQ crosslinking initiators. It forms a plastic that is fairly weak and not water resistant but which can be hardened with secondary UV curing and hardening agents. UV polymerization typically takes a few minutes (with a source of 1-2 W/cm2); a strong UV source should reduce the time to under a minute. These photopolymer emulsions typically have viscosities of 3,500 to 12,000 cps, much more suitable!

Signs of progress

December 16th, 2008

Heard from a chorus of conservative pundits… “It’s a sign of progress in Iraq that Iraqi reporter Muntader al-Zaidi felt safe enough to throw a shoe at President Bush”. Or at least it will be if he survives the reported beatings and torture he is enduring.

Note to movie and TV writers: this would be an appropriate use of the word quantum, as in, “This is a sign of a quantum of progress in Iraq.”

Words I like

December 6th, 2008

Twee.

Can your congressperson live on $169,300?

November 24th, 2008

In 2008, members of Congress were paid $169,300. Periodically stories surface about Congressional Reps sleeping in their offices or taking D.C. housing as a bribe (Minnesota Sen. Norm Coleman most recently). Atrios mentions it here.

So how much extra does it cost to be a Congressperson? They live away from home in D.C. when Congress is in session. They return to their district on weekends to be with their family or visit the district. They need to keep up appearances. Let’s make a list:

D.C. Apartment: $2,500/month
Clothes & dry cleaning: $1,500/month
Weekly flight home: $500/wk x 40
——————————————
Total: $68,000

So after accounting for the special expenses that come with the job, a Congressperson makes over $100k a year. Not a gold mine, but by itself almost double what the average family makes. And this is, I think, fairly conservative, as some of these expenses get picked up by campaign funds, and from the stories many Congresspeople have much cheaper D.C. digs, have a shared apartment, etc.

A memory game with molecules

November 17th, 2008

I had an idea for a game. It’s a memory game, the idea is to flash a molecule on the screen for a few seconds in the left hand window, then in the window to right the player builds the molecule. That’s basically the game. The player learns to recognize interesting chemicals, learns to break down larger molecules into functional groups as a way of remembering them, and perhaps learns what they are.

As the molecule fades it would be replaced with a picture that goes with the molecule–oranges for citric acid, as a memory aid or a clue for the chemically astute player.

The game could be made easier by having the molecule fade out slowly, or flashing on periodically, or visible through a port.

I don’t really want to write a molecule editor myself, that would take a lot of time and also it turns out to have been done by chemist/programmers many times. Yeah! Some very good molecular editors are out there. I was particularly impressed with Molinspiration WebME editor. Two problems though, it’s 2D and not open source.

Looking further, I found BKchem and molsKetch both of which look good and are GPL licensed but are 2D. Jamberoo is Java based but the molecule editing worked too slowly for a game.

Avogadro is 3D, is GPL licensed so the source code is available, and works on Linux/OSX/Win. It looks good and works well, so I think it would make a good starting point for a game.

Vitamin C in Avogadro:
Avogadro screen shot

Notes from the 2008 election

November 5th, 2008

The national popular vote shifted +8% for the Democratic candidate compared to 2004 but some counties voted more Republican. I think we are seeing the most racist regions of the country, running in a belt across the Southern and Appalachian states. This map likely minimizes the extent of the belt, as in southern state counties with large black populations there was a high black turnout and Obama got a higher percent of the black vote.

counties more Republican in 2008
(image from http://nytimes.com/)

On the other side of the coin is Indiana which swung +21% in Obama’s favor–the biggest surprise of the election this year. It looks like Indiana is finally giving up its claim to be the northern-most Southern state and is rejoining the Midwest.

Andy Rooney’s world

October 26th, 2008

On 60 Minutes today, Andy Rooney talked about unemployment. Mr. Rooney heard that 10 million Americans are unemployed. Andy refuses to believe this–I guess his friends’ kids are working and his powers of observation don’t extend any further than that. He’s the Inspector Clouseau of commentary.

If many people *are* unemployed, Mr. Rooney knows why–people these days won’t work hard. Why, he worked in a paper mill (for a few months when in college) for $0.45/hour. Convert that from 1939 dollars to 2008 dollars and we have $7.08/hr, higher than today’s minimum wage of $6.55/hr. Of course today’s workers have more taken out for Social Security and Medicaid. In 1939 there was no Medicaid and the SS tax was 2% while today they are 15.3% combined, so today’s single worker takes home $5.97. Mr. Rooney’s short term college job is looking pretty good.

Andy Rooney is as out of touch as John McCain, who said in the Republican primary that American workers won’t take jobs picking lettuce for $50/hour, a whole collection of wrong ideas.

Pepper spray antidote

October 14th, 2008

Pepper spray has been around for years now, but there is not commonly available antidote. And we know how the active ingredient, capsaicin acts to active, or hold open, the ion channels that transduce pain signals. In fact, a quick Google shows that capsaicin binds and activates a receptor called the vanilloid receptor subtype 1 (VR1), a member of a group of related receptors called TRP ion channels that are activated by temperature changes.

Capsaicin chemical structure
Capsaicin chemical structure (from Wikipedia)

So an antidote would be an inhibitor of the VR1 receptor, and such a thing should be easy to find, or create, and in fact another Google shows that several have been created. Capsazepine was the first inhibitor discovered, way back in 1994. Activators and inhibitors of this receptor have many potential uses as analgesics and anti-inflammation compounds so there is a lot of research interest.  See also, Discovery and development of TRPV1 antagonists.

Capsazepine
Capsaicin inhibitor capsazepine (from Wikipedia)

A spray containing one of these inhibitors should be an effective antidote for pepper spray. But surprisingly no such inhibitor is available! The small quantities of purified inhibitors are available in small quantities for research purposes (i.e. capsazepine, 50mg for $455 but I can’t find anyone who has made an antidote preparation. This should be safe and fairly easy. Safe, because it would be applied mainly externally, and because pepper spray is itself fairly safe–aside from the pain and shock it is used to cause. It doesn’t have other, non-specific side effects. And relatively easy to make because the literature describes the synthesis of inhibitors from capsaicin itself. So the starting product used to make an inhibitor can be capsaicin, and capsaicin is readily available in large quantities!

Update:
Wikipedia: Discovery and development of TRPV1 antagonists

A synthesis:
The easiest antagonist to make may be norcapsaicin or nornorcapsaicin, basically capsaicin with a shorter alkane tail.  Is is not a great competitive antagonist, but should compete with capsaicin to bind TRPV1.

Norcapsaicin be synthesized from vanillylamine and trans-7-Methyl-5-octenoic acid by reaction with thionyl chloride (SOCl2) to give norcapsaicin.  Vanillylamine can be generated by reaction of capsaicin with lipase B from vanillylamine and trans-7-Methyl-5-octenoic acid by reaction with thionyl chloride (SOCl2) to give norcapsaicin. Vanillylamine can be generated by reaction of capsaicin with lipase B from Candida antarctica (ref).   Trans-7-Methyl-5-octenoic acid can be synthesized from isobutyraldehye (500 ml, $32) in a 3-step reaction:
“Allylic alcohol 2A was produced by treatment of isobutyraldehyde IA with vinyl magesium bromide at room temperature in 73% yield, and was subsequently subjected to the orthoester Claisen rearrangement by heating with triethyl orthoacetate in the presence of a catalytic amount of propionic acid at 138 °C for 3h. (E)-6-Methyl-4-heptenoate 3A, a common precursor of capsaicinoids (C-8 – C-13), was thus obtained exclusively (E/Z> 100 by a capillary GLC analysis) in the 73% isolated yield… Alkaline hydrolysis of ester 3A gave acid 8Aa in 89% yield” (ref).

The shape of programmer’s brains

October 11th, 2008

I ran across a remarkable paper, “The Camel has two Humps”. Incoming Introduction to Programming students all *want* to learn to program, but about half the class never gets the hang of it and never will. The authors found a test that identifies the students that can learn to program.

The authors’ pretest asks questions about variable assignment: a=10, b=20, a=b. There is a typical meaning for these assignments in programming languages but the incoming students may not know them. So the authors classify the type of logic required to reach different answers and whether the students use the same logic for each question or switch around on different questions. Students who come up with consistent answers for different questions are the students who can learn to program.

Here’s a key figure:
consistent and inconsistent answers corellated with grades

This is remarkable, a way to candle incoming CS students and figure out (mostly) which ones can learn to program.

One notable thing that further research can answer is about the oddballs. The 2-3% of initially inconsistent testers that *do* learn to program–what sort of programmers are they? Do they end up writing different programs than the typical programmer?

Word cloud program

August 24th, 2008

I saw the Wordle site for making word clouds and was really impressed. I had a few ideas for doing things differently–showing phrases instead of individual words for example. So I wrote my own version.

Origin of the Species word cloud

It displays phrases, words, or combinations of words and phrases. Text size indicates the relative frequency of different words. The output is a PDF file.

Uplift word cloud

The algorithm used to arrange the words places them randomly on open spaces in the image. Horizontal and vertical placements alternate. There is a bias toward placements towards the center of the image. This helps keep the cloud together. Words difficult to place are shrunk up to 10%. The Postscript font metrics are used to find the exact size of each letter. The allows close word placement.

GEB

Here it is: freq_8-08.zip
System requirements: OS X or Linux.