Tag Archives: embedded



Another nostalgic post about an old project that I’m purging from my closet… This time from late-1999 through mid-2000.

The Kiwi was a rather ambitious built-from-scratch Linux PDA that I spent my high school years on. My original goal for this project was reminiscent of the One Laptop Per Child project. I liked typing my notes, but of course laptops were prohibitively expensive. I wanted to design a very simple PDA, with a keyboard, that I could sell to my classmates for $100 a unit.

[flickr id=”5920009823″ thumbnail=”medium_640″ overlay=”false” size=”large” group=”” align=”none”]

To reach that low cost, I needed something extremely simple:

  • A cheap 16 MHz system on a chip, the Motorola 68EZ328 “DragonBall”
  • Minimal amounts of DRAM and Flash
  • A cheap laptop-style matrix keyboard, sourced from a surplus shop.
  • Very low-resolution grayscale LCD, with no touch screen.

With these tight constraints, the project was actually more like a souped up AlphaSmart than a bare-bones PDA. It ran uCLinux, and I could use the uCSimm board to start prototyping the software. This project eventually led to the PicoGUI project, as I needed a special kind of GUI to fit such a small device. And developing PicoGUI led to starting the CIA.vc service.

[flickr id=”5920580416″ thumbnail=”medium_640″ overlay=”false” size=”small” group=”” align=”none”]

The Kiwi prototype was done with a hellish combination of a custom PCB, wire-wrapping, and dead-bug surface mount rework. The PCB acted mainly as an SMT prototyping adapter. All the real interconnection was done with wire-wrapping, as I didn’t trust my design enough to bake it into a PCB right away. Of course, the one thing the PCB was designed to do, it didn’t. So the DRAM chip and serial level-shifter ended up grotesquely blue-wired.

[flickr id=”5920577826″ thumbnail=”medium_640″ overlay=”false” size=”small” group=”” align=”none”]

Despite the mess, this machine did boot Linux. I wrote my own bootloader for it, which I used for initial hardware bringup. It booted the uCLinux kernel from flash, and ran PicoGUI on the tiny LCD. Like most of my projects, it was never finished. PicoGUI took over as the focus of my attention, and I targeted my GUI at larger and less haphazard platforms.


PicoGUI… not quite dead yet?

Way back in 1999, when I was in high school, I started my own embedded GUI project for a little 68EZ328-based Linux machine I wire-wrapped. This turned into PicoGUI, which I spent about 4 years working on. It was a great learning experience, but I eventually stopped maintaining PicoGUI. (I wrote a short document at the time, explaining why.)

Apparently there’s at least one device that still runs it… the mvBlueLYNX networked camera from MATRIX VISION. The manual has a whole section on PicoGUI, including a link to some Doxygen’ed docs for the client library, configuration options for pgserver, and so on.

Looks like they’re using PicoGUI’s “Classique” (Classic Mac OS) theme 🙂


Wireless temperature picture frame mashup


This is the latest geeky addition to our home decor. It’s a Kodak W820 digital picture frame, showing a graph of real-time temperature data collected from around the house: upstairs and downstairs, garage, outdoors, and even inside the refrigerator.

More photos on Flickr, implementation details below…

Temperature Sensors

Most of my friends probably know that back in 2004, when I was still in college, I built a set of wireless temperature sensors. Each one is an Altoids tin containing a 9V battery, a Dallas 1-wire temperature sensor, PIC microcontroller, and a little 315 MHz AM radio transmitter. I built several of these indoor wireless sensors, plus one outdoor sensor which I built out of PVC pipe.

indoor_therm outdoor_mounted Dallas 1-wire Wireless Temperature Sensor

The PIC spends most of its time sleeping, but every 20 seconds or so it wakes up to read the current temperature from the 1-wire sensor. Most of the indoor sensors have the 1-wire temperature probe soldered to the side of the Altoids tin, for the best thermal conductivity. The refrigerator sensor has a length of 30-gauge wire that leads the 1-wire sensor itself into the fridge.

Every couple of minutes, each sensor transmits a burst of packets back to the base station. The base station is another piece of custom hardware: a matching AM radio receiver, some LEDs, and a TUSB3210 microcontroller to do protocol decoding and to interface back to a server machine over USB. In this case, the host machine is a little NSLU2 embedded Linux box which also acts as our home network’s file server.

NSLU2 and wireless temperature receiver

As usual, microcontroller firmware for the transmitter and receiver is open source.


The software running on the server machine has had a rough history. My original implementation was ridiculously complicated: The receiver unit connected to an NSLU2 embedded Linux box over USB. That machine ran a daemon, written in C, which listened for packets over USB and stored their contents in a remote MySQL database. The MySQL database was running on a more powerful server (a 1 GHz Athlon at the time) which had plenty of disk space. That server also ran a web application using mod_python, which pulled data from MySQL, generated graphs on demand using rrdtool, and generally looked really pretty.

My reasons were mostly historical. I wanted to save all of the temperature data (for another project I had at the time), so instead of sending data directly to a lossy RRD file, I just used rrdtool as a cache for the data I was about to graph. As you can imagine, if the cache ever had to be rebuilt, the server would come crashing to its knees. This implementation was plagued with performance and reliability issues.

So, I recently reimplemented a simpler server software solution. I hacked up the C daemon so that instead of writing to a MySQL database, it forks off an rrdtool process to store the data directly into an RRD database. Instead of generating graphs on-demand, I have a small update-graphs shell script which uses rrdtool to generate all of the graphs. This scripts is run from cron every 5 minutes. The resulting graphs aren’t nearly as intricate as the ones that my mod_python app used to generate, but anything looks pretty if you antialias it 😉

The digital picture frame

This frame is a Kodak W820, an amazingly featureful little gadget that I picked up at the local Fry’s for $180. It has an very pretty 8″ 800×480 display and a rather unique touch-based user interface. It also does a pretty ridiculously good job at playing video, considering it’s a picture frame.

But anyway, the real reason to buy this frame is for its Wi-fi connectivity. If you connect it to your network, you get a range of useful and “useful” services:

  • The frame runs its own HTTP server on port 80, with a web interface you can use for managing settings. You can’t upload pictures via this interface, but it does mean that you can configure the picture frame entirely without using Kodak’s silly Windows software.
  • It’s a uPnP media server and a client. The software that comes with it uses uPnP to browse an upload/download files on the frame’s internal memory or memory card, and the frame itself can use uPnP to stream images from your PC. This is a really interesting feature that could be exploited for more dynamic applications…
  • It has a Flickr client. Yes, the frame itself actually speaks the Flickr API.
  • There’s some fancy-pants Kodak online service, which looks like it’s probably little more than an RSS feed in disguise.
  • And best of all, you can give it custom RSS feeds. Like, say, real-time temperature graphs!

The only snag I hit in setting this up was in trying to keep the frame from caching old versions of the temperature graph. It seems to ignore HTTP cache control headers, and the cache seems to be able to hold quite a nontrivial amount of image data!

The best solution I’ve found so far: Use the RSS <ttl> tag to force the frame to reload the RSS feed itself pretty frequently. Then, in my update-graphs script, I dynamically generate an RSS file which includes a timestamp in the URL and GUID for each image. This seems to do the trick.

What next?

I’m really interested in graphing my home power usage, using a receiver circuit based on the one I built for The Kilowatt Clock. I’m currently waiting for some parts from Digi-key, but I’ll definitely blog about this when it’s done.

If you’re at all interested in displaying real-time stats around the home or office, I’d definitely encourage you to play with this picture frame. It has some great hacking potential, and I’m really excited to see what kinds of uses others come up with.