Rick Swift & Apple & Embedded I make things. Sometimes, I’ll talk about it here.

My Gorram Frakking Blog

University Satellite Delfi-C3 Successfully Deployed

The Delft University of Technology in the Netherlands successfully launched and deployed a 3U Cubesat called "Delfi-C3", into polar low-Earth orbit. Because it carries no batteries, it only operates when not in eclipse. We on the West coast of the United States, and those in Alaska, were the first ones able to hear it. I was unable to hear it on its first pass at around 0455 UTC (2155 local), but they encouraged me to try again for the second pass, at around 0631 UTC. I finally heard it at 06:39:08 (give or take a second or two). (Pictures of the satellite.)
I had almost given up, when I remembered to try the backup frequency, and voilà! There it was! I was able record audio (received by an ICOM IC-R1500 connected to my Mac via USB, recording into QuickTime Player at the device-native format) and send it to the team.
…
And I just got off the phone with Wouter! He called me to thank me for sending them the audio file, and to tell me that it was, in fact, Delfi-C3, and that I am the first person to hear it. He says this confirms that it is operating in Science mode on the backup frequency. Sadly, it appears that my recording was too noisy to allow any telemetry to be decoded.
What a rush! I'm so thrilled for those guys, and thrilled to have suddenly been a real, if small, part. Wouter tells me they are all very happy to hear that their satellite is alive and well.
Congrats, guys!

iPhotos of Saturn

I snapped these by holding my iPhone, with its crummy, scratched-up lens, up to the eyepiece of my little telescope. The cold wind was shaking the scope and making me shiver. The actual view was much better, but I was surprised enough to get these that I decided to post them here.
I tried with my digicam, but gave up too soon; I couldn't get it to show up at all.

IMG_0108.JPG IMG_0109.JPG IMG_0110.JPG

My first amateur radio contact ever, with Astronaut Dan Tani aboard the International Space Station

On February 6, 2008, I had the great honor of making radio contact with Astronaut Daniel Tani, as he flew overhead aboard the International Space Station (ISS). This was one of the most exciting and awesomely cool things I've ever gotten to do. It was my first voice ham radio contact ever, and after a great deal of help from the tireless Kenneth Ransom, Dan and I finally managed to schedule a time to chat.
Today I received permission to post publicly a photo, taken by Cosmonaut Yuri Malenchenko, of Dan while he was talking to me:

Dan Tani floating sideways in microgravity aboard ISS

Almost as cool was the email I got from space when I was first trying to schedule the contact with Dan. It was a bit of a challenge, because you need line-of-sight in order to establish radio communications at the frequencies we were using (144 MHz, also known as 2 meter). This means that the contact has to occur during a pass. Since ISS orbits the Earth once every 90 minutes, and the Earth itself rotates during that time, it's only overhead during certain times of the day, and those times are different every day.
Add to that the fact that Dan is an incredibly busy person up there, so we had to find a time when he was both off duty and ISS was in sight. Around 1600 PST on February 6th that finally happened (I think Dan stayed up late to make it happen, and for that I thank him). We were able to chat for about 9 minutes, and it was great fun.
Thanks again to Kenneth Ransom, Yuri Malenchenko, and Mike Kobb (who assisted on the ground as my antenna tracker).
I had the privilege to go to Florida to see Dan's first shuttle mission launch (STS-108). I lack the words to express my extreme appreciation of Dan, for making that possible, and for taking the time to do this with me. From the bottom of my heart, thank you, Dan!

Solar Thingie

I came across a page about peak-power tracking in solar PV applications. I decided I wanted to goof around with solar stuff, so I started tinkering. This is what I have so far:

Solar Thingie thumbnail, click for larger version

So far there's not much going on. It measures voltage generated by the panel, and current being delivered to the load (a little red LED in this picture; the circuit is powered from a bench supply). I started adding a 5-volt LDO, which I'll use to regulate power to the MCU and LCD when powered from the panel.
If I can get AVaRICE to stop hosing my ATmega324P parts, I'll slow this down to 4 MHz (it's running at 16 MHz here) and power it from 3.3 V. That should work better in actual sun-powered applications.

Using dd to write floppy disks on Mac OS X

At work I had the need to write a bootloader directly to a floppy disk. In-house we use dd on Linux to do this, but it was giving me trouble on Mac OS X. I finally figured it out. Here are the instructions I wrote up:
These steps work on Mac OS X 10.5.2. They probably work on earlier versions, too, but I haven't tried it. This works with a TEAC FD-05PUW USB floppy drive that I picked up at Fry's (sometime in 2008-02).
When you plug in the USB floppy and insert a disk, the Finder will mount it on the desktop (if it's formatted) and create a couple of entries in /dev like /dev/disk1 and /dev/rdisk1 (the actual numbers corresponding to the drive will depend on how many other drives are attached. Be sure you're working with the right one!)
You would then be tempted to execute something like the following. Unfortunately, you'll get an error:

$ sudo dd if=redboot-pc/install/bin/redboot.bin of=/dev/disk1
dd: /dev/disk1: Resource busy

If you try using the raw device instead, you get a different error:

$ sudo dd if=redboot.bin of=/dev/rdisk1
dd: /dev/rdisk1: Invalid argument
382+1 records in
382+0 records out
195584 bytes transferred in 41.107951 secs (4758 bytes/sec)

In this case, the file is actually 195936 bytes in length. I'm not sure why it seems to write some of the bytes (I'm not sure it actually even wrote that many).
Using the buffered device (/dev/disk1 is correct, but it's busy because it's mounted by the Finder. If you simply unmount it via the Finder, then all the entries in /dev for the device go away, and you're unable to tell dd what to do. The solution is to unmount the disk using diskutil unmount, which leaves the /dev/disk1 entry in place, and then you can use dd correctly:

$ diskutil unmount /dev/disk1
$ sudo dd if=redboot-pc/install/bin/redboot.bin of=/dev/disk1
382+1 records in
382+1 records out
195936 bytes transferred in 13.345421 secs (14682 bytes/sec)

After that, I think it's safe to just unplug the USB drive, but I'd feel better if I knew how to completely unmount the device before doing so. In any case, the OS didn't complain like it would if a volume were mounted and online.