Monthly Archives: November 2009

Weekend Project: The Message Box

Having a small character LCD hooked up to a computer isn’t really a novel idea. They became popular on servers, which often run without monitors attached, to convey vital system status information to technicians. In more recent years, they have become popular in custom-built PCs. I wanted one on my desk because there are often small notifications that I want to be accessible at all times, but not the center of my attention. On-screen notifications, such as icons in the GNOME panel, the Windows system tray, or Growl on Mac OS X work fairly well, but only if I’m sitting at my computer and have the monitors turned on. An external notification device is able to convey this information without a large display.

I could have purchased a pre-built unit; they exist both as displays that fit into an empty expansion bay on the front of a PC, or separate desktop units. However, my aesthetics don’t always match up with the PC-modding community (I tend to prefer things simple and understated rather than bright and flashy; I don’t want my PC to look like the typical “gaming rig”).

Building things yourself is great because you get to decide exactly how it’s going to look and work. I also chose to add 3 RGB LEDs to the device—many small bits of information are binary, such as having a new e-mail message. The LEDs provide a great way to convey information like this, and they’re meaningful from across the room. Using RGB LEDs makes them customizable, or allows information to be encoded in the color of the indicators.

The message box.
The completed message box.

Specifications

  • Enclosure: Recycled Apple power adapter packaging
  • LCD: 2 line by 16 character display, using the ubiquitous HD44780 controller
  • Microcontroller: ATmega168, using the internal RC oscillator
  • Interface: USB, using the FT232R chip for USB-to-serial
  • LEDs: 3 RGB T1-3/4 LEDs

Construction

Rather than designing a custom PCB and fabricating a custom enclosure, I decided that I’d put together the Message Box as a true weekend project, using only materials I had around in the parts bin. The enclosure that I chose is the plastic box that Apple uses to package their chargers for the iPhone/iPod touch. It was perfect for re-use in a project like this.
Plastic box.
The Apple plastic box.

I started by cutting a piece of perfboard to fit the inside of the box. I drilled four holes in the corners of the board and the box so that the board could be mounted on standoffs. I soldered a USB mini-B jack to the edge of the board, then drilled and filed out an opening for it in the plastic.

After confirming the fit of the board in the box, I placed all of the large components on the board: the LCD, the ATmega168, and the 3 LEDs. I checked the fit in the box and then soldered them down.

The FTDI chip that I used to provide the USB interface is only available in surface-mount form. There’s a nice evaluation board with the chip and a USB port on it that I’ve used before in other projects, but I didn’t have any sitting around. The prefabricated evaluation board also adds about $20 to a project, where the chip itself and a USB connector can be sourced for a couple of bucks.

To use the surface mount chip, I placed a piece of Kapton tape on the bottom of the perfboard to keep the pads from shorting out the pins on the chip, and epoxied the chip to the tape. The whole board is wired point-to-point using 30-gauge wire. Soldering the wire directly to the pins of the chip takes a reasonably fine iron tip and a little bit of practice, but it’s really not bad once you get the hang of it.

USB interface.
The USB jack and FTDI chip.

I then proceeded to wire up the rest of the board. For the passive components, I used 0603-size surface mount resistors and capacitors. These are actually great for point-to-point work like this, because they fit perfectly between pins with the standard 100-mil through-hole spacing. The bypass capacitors fit neatly between the power and ground pins on the chips, and the LED resistors take up hardly any space at all. You just need a good pair of tweezers for placing them accurately.

Wiring.
Point-to-point wiring on the back side of the board.

Firmware and Software

I wrote the firmware for the device in C, using the avr-gcc toolchain. There is a 6-pin ISP socket on the back of the board to enable the microcontroller to be programmed.

The device appears under Linux as a standard USB serial port (/dev/ttyUSB0). I set up the protocol so that any text written to the port appears on the display. I also implemented a very limited subset of the VT100 terminal command set for operations such as clearing the display and positioning the cursor. To control the LEDs, I added a few custom escape sequences.

On the PC end, I wrote a Python script that updates the information on the display. It periodically polls a variety of sources such as RSS feeds, e-mail inbox message counts, instant message clients, and music players, and then updates the text on the LCD and the state of the LEDs accordingly.

Conclusion

The Message Box is a great little device; I’m glad I spent the time building it. I’m still tweaking the code to make it do different things and customize the functionality, but that’s what’s great about having a custom-built solution—in the end, it will do exactly what I want it to do.

Robot Power System

In order to construct Intel Labs Seattle’s mobile robotics platform, MARVIN, I needed to build a power system to supply the DC voltages required by the different components of the system. I used nickel-metal hydride battery packs as the battery power source and VICOR DC-DC converters to provide the various required voltages. The control panel on the rear of the robot is laser-cut acrylic and provides control over battery power, battery chargers, power to individual system components, and battery current and voltage monitoring.

One of the important features of the design is an onboard AC to DC power supply. This allows the robot to run indefinitely from a single tether, which plugs into a standard electrical outlet; no external power supply is needed. The system switches seamlessly between wall and battery power when wall power is connected or disconnected, so no part of the system needs to be shut down to connect or disconnect power. Onboard chargers enable the robot to recharge its batteries while it is plugged in.

Control panel
MARVIN’s rear control panel.  Power module controls are at the bottom.

Specifications

  • Batteries: 2 13000mAh 24V Ni-MH packs in series, for 48V system power
  • DC voltage rails: 48/56V (unregulated), 24V 500W, 12V 500W, 5V 100W
  • Chargers: 2 onboard 1A Ni-MH chargers
  • Wall power supply: 110/220VAC input 56V output 1600W DC power supply, with automatic switchover
  • System runtime: 2-3 hours under normal load (arm and hand in motion, laser rangefinder and two PCs running)
  • Monitoring: Battery current and voltage meters on the back panel; soon to have computer monitoring of system voltages and currents via this board

Power module internalsInside the power module while I was constructing it. DC-DC converters and solid state relay are mounted on an aluminum side panel for heatsinking. Fuses, relays for the switching/interlock logic, and screw terminals for easy connection of peripherals are mounted on the bottom plate. Batteries will fill most of the empty space.

Classroom Presenter for the XO Laptop

UW Classroom Presenter, developed by Richard Anderson et al. at the University of Washington, is interactive presentation software that runs on tablet PCs. Each student uses his or her own tablet PC, can see written annotations made on the slide by the instructor (called “ink”) and can add his or her own ink to slides which can be submitted back to the instructor to be reviewed or shared with the class. In my undergraduate capstone project at the University of Washington, I worked with several other students to develop a version of Classroom Presenter that runs on the One Laptop Per Child foundation’s XO laptop.

The software is not just a port but a complete adaptation to make it usable on the XO. The XO is not a tablet, so only simple drawing with the trackpad (or a mouse) is possible. We added text input features to enable students to provide a textual response to a question without needing to write it with a mouse. We use the XO’s built-in facilities for discovering shared activities and connecting to other machines, so that connecting the machines together is simple enough for elementary students to do themselves. We also included features necessary for setups that don’t include a projector: the original UW Classroom Presenter expects that if the teacher wants to share a student’s submission with the class, he or she will use a projector to display it. In our implementation, we enable the teacher to broadcast selected student submissions to the rest of the class, so students may view them on their own screens.

The project culminated in a trial at a local elementary school, where students in small groups shared XO laptops to complete activities about a recent field trip, while the teacher talked about the students’ work and shared their submissions with the rest of the class.

Screenshot with student ink
Screenshot of a slide in Classroom Presenter for the XO with student responses

Students using Classroom Presenter for the XO
Students using Classroom Presenter on the XO during our classroom trial.
Photo: Mark Ahlness / CC BY-NC-ND 2.0

Links

Conclusions

The results of the trial were very positive; we received great feedback both from the teacher and from his students. The source code we developed has been made available under an open source license.

Photography

Photography

In the autumn of 2004, I moved to Seattle to attend the University of Washington. I began taking photos to share some of the neat places I discovered while exploring the areas around campus with my family and friends back at home. I started with a pocket-sized point-and-shoot digital camera, back when they were starting to become popular. As I learned more about the art and science of photography, I’ve moved on to cameras and lenses that afford better manual control.

I still enjoy taking walks around the beautiful University of Washington campus on weekends and capturing some of the scenery.

Most of my earlier work is posted on my blog, Ordered Pixels. More recently, I’ve been using flickr to organize and share my photos. A few selected shots are shown below.

Artistic Photography

Sunset over the Olympics
Sunset over the Olympics. Nikon D700, Tamron 210mm f/4.0

Pink Japanese Maple
Bright Pink Japanese Maple. Nikon D70, Micro-Nikkor 55mm f/2.8

Wild Geranium and Green Bee
Wild Geranium and Green Bee. Nikon D700, Micro-Nikkor 55mm f/2.8

Hidden Hydrangea
Hidden Hydrangea. Nikon D700, Micro-Nikkor 55mm f/2.8

Helleborus
Helleborus. Nikon D70, Micro-Nikkor 55mm f/2.8

Autumn Leaves
Colorful Autumn Leaves. Nikon D700, Micro-Nikkor 55mm f/2.8

Orange Quad
Autumn Sunset on the UW Quad. Nikon D700, Nikkor 17-35mm f/2.8

Technical and Product Photography

In addition to my hobby photography, I often take photos of my own and others’ work at Intel Labs Seattle. My photos have been featured in various promotional materials, posters, presentations, papers, and technical documentation.

Robot Montage
Marvin the Mobile Manipulation Platform and iPhone control application. Used in promotional materials and presentations.
Nikon D700, Nikkor 50mm f/1.4

Intel WISP
Intel Wireless Identification and Sensing Platform (WISP). Used in promotional materials.
Nikon D70, Micro-Nikkor 55mm f/2.8

802.15.4 board
Prototype 802.15.4 Board. Nikon D700, Micro-Nikkor 55mm f/2.8

Power Monitor Board

Board photoAssembled power monitor board.

I designed this board to monitor the power system in Intel Labs Seattle’s mobile robotics platform. It provides four current and four voltage measurements, and interfaces with a PC via USB. Readings for all of the channels can be read at over 100 Hz.

Specifications

  • Microcontroller: 8-bit AVR
  • Interfaces: USB via FTDI chip
  • Voltage measurement inputs: 4 voltage dividers using precision resistors, up to 80V
  • Current measurement inputs: 4 current sense amplifiers with 0.025Ω sense resistors (up to 4A)

Basic E-Field Sensor Board

Board photo
Basic E-Field Sensor Board. Designed for UW CSE Software for embedded systems class.

For the Winter 2009 offering of the University of Washington CSE Software for Embedded Systems course, I designed a laboratory assignment around electric field sensing. In the lab, students used an 8-bit microcontroller to accomplish the following:

  • generate a waveform at a specific frequency to drive a resonant transmitter
  • synchronously sample a received signal with an analog/digital converter
  • demodulate the received signal in software to recover the signal magnitude
  • use pulse-width modulation to drive an RGB LED, varying its color with the sensed distance between the sensor and the user’s hand

Design
For the lab, I developed a custom PCB that contains both the transmit and receive electrodes, as well as the resonant tank for the transmitter and the analog front-end for the receiver. Header pins along the front edge of the board enabled students to plug the unit into their breadboards for connection to their microcontroller circuits. Placing the portions of the circuit that were sensitive to layout and breadboard capacitance on the PCB enabled students to focus on the objectives of the lab assignment rather than on debugging layout problems.

I designed the board to be easy to assemble; the students computed the frequencies that they would use based on the capabilities of their microcontroller and the parts available in the lab, then selected components and assembled the boards themselves. Several pads for various capacitors were provided for frequency selection.
Video

E-field sensor board in action.
Links

Robot Finger E-Field Sensor Board

Board photo
E-Field sensor board for robot fingers. v1.1 hardware, assembled board.

This board that I developed fits inside of each of the three fingers of Intel Labs Seattle’s mobile robot. It includes two resonant transmitters for generating high voltage AC signals, two analog front-ends for amplifying the received current to be fed into the microcontroller’s ADC, and enough processing in the microcontroller to perform synchronous demodulation on the received signal.

 

Each transmit-receive pair has unique geometry and constitutes a unique measurement. Within a single finger, four different transmit/receive channel pairs are possible: with the current antenna configuration in the fingers, there are split left and right receive electrodes and mid- and short-range transmit electrodes. Each finger can also be linked to a third transmit electrode in the palm of the hand, which provides additional left and right long-range channels.

 

Specifications

 

  • Microcontroller: 8-bit AVR at 20 MHz
  • Interfaces: USB via FTDI chip, I2C, and analog outputs to palm board
  • Transmit channels: 2 tunable transmitters
  • Receive channels: 2 amplified receivers
  • Transmit frequency: 156 kHz

 

Design and Construction

 

The board is designed to fit entirely within the fingertip links of the BarrettHand Grasper, a standard robotic hand widely used in research. The stock aluminum fingertips are replaced with plastic 3-D printed parts that are mostly transparent to electric fields. To fit all of the electronics into the fingers, I used QFN ICs and 0402 surface-mount components. The sensor boards are stacked on top of a transmit electrode board and a perpendicular receive electrode board inside the plastic fingertips.

Finger assembly
Complete finger assembly with v1.5 hardware.

An on-board USB-to-serial chip provides a way to interface an individual finger directly to a PC for development and debugging. When installed in the hand, the finger boards communicate via an I2C interface to another board in the palm of the hand, which aggregates the measurements from all of the fingers and sends them back to the PC over USB.

 

Relevant Publications

Mayton, B.D., Legrand, L., and Smith, J. 2009.  Robot, Feed Thyself: Plugging In to Unmodified Electrical Outlets by Sensing Emitted AC Electric FieldsIEEE International Conference on Robotics and Automation, 2010.

Mayton, B.D., Legrand, L., and Smith, J. 2009.  An Electric Field Pretouch System for Grasping and Co-ManipulationIEEE International Conference on Robotics and Automation, 2010.

CSE 466: Software for Embedded Systems

I was a TA for the Software for Embedded Systems course for three quarters. I developed lab assignments and custom hardware for the class, and assisted students in the lab. I received an honorable mention for the Bandes Memorial Award for Excellence in Teaching and a nomination for the University of Washington College of Engineering Community of Innovators Awards for my work.

Lab Assignments I Developed

Listed below in chronological order are several of the laboratory assignments that I developed for the class over the three quarters I was a TA. The final projects were collaborative efforts involving input from all of the students in the course at the time.

  • Autumn 2007, Lab 6: Sound on the SuperBird — Students learned about sampled sound, wrote code for sound playback on an embedded platform, and developed creative applications with their sound code
  • Autumn 2007, Lab 8: Final Project: SWARMS — Students developed wireless ‘agents’ that communicated with each other and produced sounds using the Pure Data audio synthesis language, exploring the concepts of swarming and emerging behavior and embedded wireless sensor networks. Specifications were developed in class discussions, based on student suggestions.
  • Winter 2008, Lab 7: The AirStick (in collaboration with Josh Smith at Intel Labs Seattle) — Students wrote software for a 4-way electric field sensing “air joystick,” and learned about signal modulation and demodulation, code and time division multiplexing
  • Winter 2008, Lab 8: Final Project: The Second Annual CSE466 World Cup — Building on a project that was developed (and software that I wrote) when I was a CSE466 student, students developed wireless controllers to move their players in a 28-player soccer game, using the “AirStick” joysticks they developed in the previous lab. (See also the related paper)
  • Winter 2009, Lab 3: PWM and Electric Field Sensing — Using a custom electric field sensing board that I designed, students learned about signal modulation, synchronous demodulation, and developed a 1-D electric field sensor that used pulse-width modulation to control the color of an LED based on the distance between their hands and the sensor board.
  • Winter 2009, Lab 4: SPI, USB, and Electric Field Sensing Part II — In this continuation of the previous lab, students interfaced their electric field sensor with a PC over USB and used it to control a color wheel on the computer display.
  • Winter 2009, Lab 6: Sound on the SuperBird — Students learned about sampled sound and how to use ALSA on an embedded platform. They developed a sine-table synthesizer before moving on to a creative and open-ended sound/synthesis project.
  • Winter 2009, Lab 8: Final Project: The Raven Deconstructed — Revisiting the emergent behavior elements of the previous SWARMS project, students built wireless agents that listened to each other’s messages and determined when to play phrases of Edgar Allan Poe’s The Raven and various raven sounds. Using an accelerometer, agents also detected when they were moved and played startled raven sounds and told other nearby agents to do the same.

Relevant Publications

Borriello, G., Hartung, C., Hemingway, B., Koscher, K., and Mayton, B. 2008. Multi-player soccer and wireless embedded systems. In Proceedings of the 39th SIGCSE Technical Symposium on Computer Science Education (Portland, OR, USA, March 12-15 2008). SIGCSE ’08. ACM, New York, NY, 82-86.