True's beaked whale.jpg

Western spotted skunk

Hooded skunk

Yellow-throated Marten


Archive for November, 2009

Science fiction stories for middle school

Monday, November 23rd, 2009

Here are sources for science fiction stories that I think would be suitable for middle school students. These are all freely available stories either out of copyright or made available by the author or publisher.

Most of these are very short stories or short stories. I think short stories are good because a few hard words won’t discourage a student–the stories read quickly. And if they don’t like one story they can try another.

At first I wasn’t optimistic that I would find stories available online as only stuff from the thirties or older is typically out of copyright. Here are a few good ones from Project Gutenberg:

Then I looked around more and found that many fairly recent stories are available online at the author’s site or some other apparently authorized site. This site and this site both link to a lot of good free sf. So now that it looks like there’s a lot to choose from I’ll make some suggestions.

Very short stories would be a good choice, this page links to a bunch of them, some only a page or so long:

Mary Robinette Kowal, “Evil Robot Monkey”, (940 words)
Terry Bisson, “They’re Made Out of Meat”, (815 words)
Cory Doctorow, Printcrime, (688 words)
James Van Pelt, “Just Before Recess”, (782 words)
Nolan, William F, “Of Time and Texas”, (608 words)

Other great short stories:
Harlan Ellison, “Jeffty is Five”, (page 71, 8k words)
Kurt Vonnegut, “Harrison Bergeron”
Ray Bradbury, “A Sound of Thunder” (4k words)
Cory Doctorow, Anda’s game (10k words)
Neil Gaiman, A Study in Emerald (9 pages)
Isacc Asimov, The Feeling of Power (3k words)
Orson Scott Card, “Ender’s Game” (15k words)
Larry Niven, “Neutron Star” (7k words)

This site also has section of ‘kids’ stories:

I found these Project Gutenberg stories first but though they are good stories I wouldn’t put them at the top of my list:

H. Beam Piper, Omnilingual (16k words)
H. Beam Piper, Little Fuzzy (59k words)
Fritz Leiber, “Bread Overhead” (5K words)

End the US occupation of Afghanistan today

Sunday, November 22nd, 2009

At the beginning of October, it was reported that eight US soldiers were killed in Nuristan province in Afghanistan. Hearing it at the time, I thought nothing in Nuristan can be worth the life of an American soldier, yet eight of them fought and died there. Afghanistan is literally half way around the world from the US, and Nuristan is the middle of nowhere even for Afghanistan. The US has occupied Afghanistan for eight years already and the current plan is for an ongoing, pointless occupation for at least another five or ten years. President Obama is even considering pouring more US troops into the country, a truly feckless plan.

Then this November the US installed ruler of Afghanistan, ‘President’ Karzai, finished stealing the national election and declared himself President. It was also reported that his brother runs a big piece of the heroin trade and has immunity from US anti-drug efforts because he works for the CIA. Why are US soldiers fighting and dying to support the Karzai family dictatorship?

And the US war effort is still febrile. Eight years into the occupation of Afghanistan, the Pentagon is still talking about ‘ramping up’ the training of translators. US translators who speak Dari or Pashto, the major languages of the country, are so few in number that the translators at NATO headquarters in Kabul are all Afghans. Translators are thin on the ground and the US relies mainly on Afghan locals. How is the US going to run a counterinsurgency and nation-building campaign in country where almost no US troops speak the language?

What is the US doing in Afghanistan? The few thousand Al Qaeda fighters that were in Afghanistan in 2001 were killed by the US or fled to Pakistan. Even the Taliban fighters in Afghanistan don’t want them back.

Nothing is accomplished by continuing the US occupation of Afghanistan. It’s costing the US the lives of our soldiers and $100-200 billion a year. End the US occupation today!

Update: President Obama announced today he will escalate the war in Afghanistan, sending an additional 30,000 troops, for a total escalation of 51,000 troops since he took office. What an incredibly foolhardy and poor decision, one that will kill thousands of people and waste hundreds of billions of dollars. In related news, Middle East scholar Juan Cole provides a thumbnail portrait of the corrupt and fragmentary nature of the Afghan government to which the US has pinned its plans.

PIC servo pot controlled

Saturday, November 21st, 2009

Third PIC program, this one moves a hobby servo motor using a 10kΩ pot. The pot is read using the A/D converter function on the PIC. The four high bits of the value are used to control the servo to sixteen positions over its range. Two more bits could easily be added to give finer control.

It has a light that flips on/off with each jump of the servo, another light that is always on and a third that switches the servo on/off.

PIC12F683 servo motor movie:

Here are the code files: p12_servo2.asm and p12_servo2.hex.

It is wired as shown in the video.

Putting video clips on my blog

Thursday, November 19th, 2009

Putting video clips on my blog was a bit harder than I expected. I first tried converting the .MOV files the camera writes into .avi files using ffmegX and posting them using <embed> tag code. The files showed up great on my Mac but not at all on a Windows computer.

Flash format files, .flv, are the easiest cross-platform way to post video clips. Flash does require that the site supply a Flash player. There are many Flash players available. I tried OS FLV and it worked nicely.

To edit video files I used avidemux, then ffmegX to convert them to .flv, and I put them on the site using the ‘noscript’ <embed> code suggested by OS FLV with the OS FLV player.swf.

PIC servo control

Thursday, November 19th, 2009

Second PIC program, this one moves a hobby servo motor to one of two positions. The switch needs to be pulled up with a resistor.

It has one light that is always on and a second that switches on/off when the servo moves.

PIC12F683 servo motor movie:

Here are the code files: p12_servo1.asm and p12_servo1.hex.

Assembly of the .asm to a .hex:
>gpasm p12_servo1.asm

Write it to the PIC12 using:
wine “C:\Program Files\PICPgm\WinPICPgm.exe”

It is wired as shown in the video.

The servo timing is off from what I calculated. A calculated 1ms to 2ms gave about 60 degrees of movement, what’s shown is 0.75 to 1.25 ms pulses every 20 ms. I haven’t measured the pulse lengths with a scope.

PIC first light!

Tuesday, November 17th, 2009

Got my first PIC microprocessor program running on a PIC12F683.

It has one light that is always on and a second that switches on/off.

PIC12F683 LED lighting movie:

The assembler code:

;written by: Jim Lund
;date: 11-09
;version: 1.00
;for PIC: PIC12F683
;Memory: 2048=800h, RAM 128, EEPROM 256
;clock frequency:

        list      P = PIC12F683

        include  /usr/local/share/gputils/header/

        __config _MCLRE_OFF & _INTRC_OSC_NOCLKOUT & _CP_OFF & _WDT_OFF

        errorlevel -302

        org     0x000
        goto    Start



        clrf    STATUS;
        clrf    GPIO ; resets input/output ports

        bsf     STATUS,RP0 ;Bank 1
        ;movlw  b'00000000'
        ;movwf  OSCTUNE

        bcf     STATUS,RP0 ;Bank 0
        movlw   b'00000111'     ;comparator off
        movwf   CMCON0  ;digital IO
        bsf     STATUS,RP0 ;Bank 1
        clrf    ANSEL   ; digital IO

        movlw   b'001111'      ; sets up which GPIO pins are inputs and which
        movwf   TRISIO          ; are outputs

        movlw   b'00000111'      ; option bits
        movwf   OPTION_REG
        bcf     STATUS,RP0 ;Bank 0
        retlw   0
;Program Start:
        call   Init
        bsf     GPIO, 4  ; turns on LED

        btfss   GPIO, 0 ;test pin 7, next if pin is 0
        goto LEDoff
        bsf     GPIO, 5 ; turns on LED
        goto Main

LEDoff  bcf     GPIO, 5 ; turns off LED
        goto Main


Assembly of the .asm to a .hex:
>gpasm p12_led.asm

Write it to the PIC12 using:
wine “C:\Program Files\PICPgm\WinPICPgm.exe”

and wire it up as shown in the video!

Hobby molecular biology

Monday, November 16th, 2009

What would be required to set up an inexpensive system for hobbyists to experiment with biology? Consider PCR for example. PCR requires heat stable polymerase, primers, nucleotides, buffer.

The DNA polymerase is easy to purify from E. coli carrying the plasmid. Grow bacteria containing plasmid expressing Taq DNA polymerase, boil, spin down denatured proteins, and you are left with the DNA polymerase.

Primers can be bought inexpensively–$0.35 per base, a pair of 18-mers cost less than the shipping. Though they are inexpensive only if one set gets used repeatedly.

The cost of buffer (NaCl, MgCl2, Tris) is negligible.

Nucleotides are expensive up front, $150 for a set of dNTPs (dATP, dCTP, dGTP, dTTP), but this works out to about $0.06 per 50 ul PCR reaction.

Can nucleotides be prepared by a hobbyist? Nucleotides are easy to obtain-DNA is a major constituent of cells and is easy to purify. DNA + DNAase = dAMP, dCMP, dGMP, and dTMP. How can the trinucleotides be regenerated?

One route is to do it enzymatically using
polyphosphate:AMP phosphotransferase (PPT) and adenylate kinase (AdK) with polyphosphate (polyP) as the energy source (Resnick and Zehnder, 2000). It is not clear how the trinucleotide product would be separated and purified. Presumably different enzyme pairs could be used to regenerate the other dNTPs from the monophosphates.

These other enzymes could be cloned in E. coli expression vectors and purified either by tagging them with His6 and using a Ni or Co resin. Or by cloning heat-stable isoforms from one of the extremophiles and using a one-step boiling purification like that used for Taq polymerase.

Update: Bochkov et al., 2006 describe a method of preparing dNTPs from digested DNA. DNA is digested with DNAase and Nuclease S1. DNAase chews DNA into show oligonucleotides and the nuclease breaks them down to single dNMPs.

Then a crude extract of E. coli is prepared that contains the kinases to convert dNMPs to dNTPs along with the acetokinase. The kinases use ATP. ATP must be regenerated, and this is done using acetokinase with acetyl phosphate ($30/g) as an energy source. Combined dNMPs were converted to dNTPs with at least 86% regeneration and separated from reactants by chromatography on a Dowex 1×2 anion exchanger. The conversion was followed by thin-layer chromatography.

For PCR it may be possible to use a crude purification of nucleotides, but purification protocols would need to be developed and tested.

Water on the moon!

Monday, November 16th, 2009

Last October, NASA’s LCROSS mission slammed a spent rocket booster then the LCROSS spacecraft itself into the moon. No debris plume was seen from Earth, but observations from LCROSS of the booster hitting indicate the presence of water on the moon. How much water? Most news accounts don’t say, but the Science magazine article does.

100 kilograms of water was detected from an impact that created a crater estimated to be 20 m wide and 3 meters deep. So 100 kg water in about 500 m3 of regolith = 0.1 g/kg. (Googled a reference giving 2.3 to 2.6 g/cm3 as lunar regolith density).

The article gives a higher estimate for water, 0.1% to 10%, higher than my crude 0.01% estimate. Which is great–enough water to extract easily and live off. Best news for space exploration in thirty years!

LCROSS impact plume
(Credit: NASA)