Category Archives: Hardware

ADAT modification for the Layla converters

Background and Motivation

Since this project involves a bunch of digital audio stuff that some of my readers might not be familiar with, I’ll start by describing my motivation for the project and some of the background information about the protocols and hardware involved.  If you’re already familiar with this stuff and just want to see the hack, jump to the next section.

I have a somewhat unusual audio setup at home.  I use a DAW (digital audio workstation) software on my desktop computer as a digital mixer for all of the sound coming from it.  Using JACK on Linux, I route the output of each program to a different mixer channel, so in addition to having different volume settings for each program, I can apply effects as well (such as equalization or applying a little bit of compression when watching a movie late at night, so the loud parts aren’t quite so loud.)  I can then route the audio between multiple outputs, primarily my studio monitors and my headphone amplifier.

The sound card I use is an RME Digi9652.  These are older PCI cards, which are now inexpensively available second-hand since newer computers have mostly PCI-e slots instead.  But, the card still works on my motherboard, has great Linux support, and provides 26 inputs and 26 outputs with very low latency.  Like many multichannel audio cards, all of the I/O is digital.  The 9652 has three pairs of ADAT Lightpipe ports and one pair of coaxial S/PDIF connectors.  In order to get analog audio in and out, it requires the use of external converters connected to the ADAT ports.

ADAT Lightpipe is a protocol developed by Alesis in the early 90s for their digital multitrack tape recorders (the Alesis Digital Audio Tape, or ADAT).  It uses the same plastic fiber optic cables and connectors as consumer TOSLINK connections, but carries 8 channels of audio rather than a stereo pair.  The ADAT tape deck is now pretty much obsolete as most digital audio recording is now done with computers or hard-disk based recorders, but the optical interface is still around, often just called “ADAT” now.  The relatively low complexity of its implementation and inexpensive LED transceivers has established it as the de facto standard for connecting low channel count digital audio devices together.

Previously in my home setup, I wasn’t using any of the inputs, and ran 4 channels of output—two to my headphone amplifier and two to my monitors.  I was using another board that I built (which I might write about later) to take one of the ADAT outputs and split it into multiple 2-channel S/PDIF outputs, one of which went to a Benchmark DAC1 driving my headphone amplifier and the other to my AMB γ2 driving the monitors.

I wanted, however, to be able to include some of my other audio devices in the same setup as well.  One of these devices is my Netflix player; I run Linux on my desktop which Netflix doesn’t support, so it’s easier just to use hardware where it’s supported.  Basically, I wanted a few analog inputs that I could plug other devices like this into in order to get their audio into my mixer, so it could be processed and routed like the audio coming from software running on my computer.

The Hack

The off-the-shelf solution to my problem would have been to just buy an 8-channel A/D and D/A converter box with ADAT I/O.  These tend to start somewhere around $500 for a cheap one, though, and I didn’t want to spend that much.  They also tend to hold more of their value second-hand, as ADAT is still widely used, so it’s harder to find cheap used ones.  But, there was something interesting in my junk pile that ended up being the solution.

layla

This thing is the converter box for an audio interface that Echo made in the late 90s, called the Layla.   There were two other audio interfaces in the Event series, named Darla and Gina, with fewer channels—the Layla was the top of the series with 10 analog outputs and 8 analog inputs.  It connected to the computer by a 25-pin proprietary umbilical cable to a PCI card.  I came across this interface box being thrown away, with the PCI card long gone.  By itself, it’s practically worthless, as the 25-pin interface is not at all standard.  I originally grabbed it intending to salvage some of the parts out of it and maybe re-use the case (empty rackmount cases are expensive!)

But my current need for audio I/O had me looking at it again.  I decided to replace the DB-25 connector with an ADAT interface, which would let me connect it to my RME card.  I’ll jump to the end result and show it working before I go into detail on how it was done:

back_plugged

That black plate in the middle is the only indication that it’s been modified.  It covers up the spot where the original DB-25 connector was, and replaces it with a pair of optical connectors and a mini USB port for configuration.  On the left side are the analog inputs and outputs; these are all functional except for outputs 9 and 10 (as ADAT only carries 8 channels).  The wordclock I/O is also functional, though the S/PDIF and MIDI are not.

To accomplish this, I essentially re-used the whole analog section and the converters themselves, while re-wiring and replacing most of the digital electronics.

Inside

interior

Inside the Layla box (ignore the modifications for now) the analog inputs are the section on the left, and the outputs are immediately to the right of the inputs.  Both directions use Crystal Semiconductor (now Cirrus Logic) converter chips, with two channels of audio handled by each chip.  On the input side, there’s an MC33079 op amp acting as a balanced line receiver, a CS3310 digital volume control IC, and another op amp buffering the inputs to the CS5335 analog-to digital converters.  The CS3310s are controlled over a serial (SPI) bus, and allow the input gain to be set anywhere from -95.5dB up to +31.5dB, in 0.5dB increments.

On the outputs, the CS4327 converters feed into more MC33079 op amps that act as the balanced line drivers.  Each pair of channels also has a quad CMOS switch, with two switches allocated to each channel.  One disconnects the converters from the line drivers, acting as a hardware mute.  The other switches an extra resistor into the feedback loop of the op amps, dropping the output levels from +4dBu to -10dBV.

To the right of the outputs is the power supply, which creates the ±15V analog voltage supply rails for the op amps, and the +5V analog/digital supply for the converters and digital volume controls.  The big red, black, and yellow wires are actually how it came from the factory—originally, Echo intended to power the interface box from the PCI card (you can see where the 25-pin connector used to be below the power supply, by the way) but they ended up adding the dedicated power supply stuck on to the right side of the board after being unsatisfied with the performance of the device when it was running on noisy computer power at the end of a long cable that also carried high-speed digital signals. [1]

To the right of the power supply, there used to be an FPGA that coordinated all of the converters and sent the data back over the 25-pin cable.  In the picture above, I’ve removed the original FPGA completely.

The modification consists of two main parts: the ADAT interface itself, and a microcontroller to manage the digital controls like the input and output gains.

ADAT Interface

adat_board

ADAT Lightpipe was covered by a few patents that Alesis owned, which meant paying license fees to include it as an interface.  As a result, there aren’t a lot of off-the-shelf chips that handle ADAT.  (This is now changing—best I can tell (though I am not a lawyer) the patents have recently expired, and implementations of the ADAT protocol are now showing up as IP blocks that can run on FPGAs and some microcontrollers.)  For this project, I’ve used the Wavefront chipset.  Wavefront Semiconductor manufactured a couple of Alesis’s custom chips, including the AL1401AG and AL1402G ADAT interface chips.  These are presumably the chips that were inside the actual ADAT decks (though I’ve never taken one apart to confirm that).

The AL1402G takes an ADAT bitstream and decodes it into 4 channels of serial digital audio, with each data line containing interleaved data for two audio channels.  It also recovers a system clock (256*Fs, where Fs is the sample rate), a bit clock (64*Fs) which indicates when the individual bits of audio data should be latched, and word clock (Fs).  The AL1401AG takes the serial audio signals and wordclock and goes the other direction, producing an ADAT bitstream.

digital_audio

To add the ADAT chipset, I started by gluing a 20-pin header to an open space on the board.  I glue the headers down first with superglue, and add some 2-part epoxy later to really make sure that they stay put.  This provides a point from which signals on the board can be wired into an additional PCB that can be easily disconnected for servicing.

The signals are then wired up using 30-gauge wire-wrapping wire.  I’ve roughly color-coded data lines as yellow, clocks as white, power as red, and ground as blue.  The various signals were located by referencing the datasheets for the converter chips and looking for continuity between the pins on the chip and easier places to solder to.  The A/D converters have resistors on most of their signals, which have nice big pads to which to solder wires.  The D/As didn’t have the resistors on the data lines, so I’ve scraped away a bit of the soldermask on the traces and soldered the wires to the exposed copper.  The clock lines are shared between all of the converters on the board, so the clock signals just connect in one location and then run through the traces on the PCB to everything else.  I did cut off the part of the traces where they used to run to the FPGA to keep them from acting as big antennas.

There are a couple of different formats for serial digital audio—they all use a system clock, bit clock, and word clock (sometimes also called LR clock because its value toggles between the left and right channels) and all will generally have 32 bits of data transmitted for each channel.  Most audio converters are either 16, 20, or 24-bits, however, so there’s variation on which of those 32 bits are used to transmit the actual data.  The two most common are left-justified (where, for a 24-bit converter, the first 24 bits are used and the last 8 are ignored) and I²S, which is like left-justified but the first bit of the channel comes one bit clock cycle after the word clock changes, rather than at the same time.  Right-justified formats are also sometimes used as well.  To account for all of these different formats, most chips that have a serial digital audio interface have a couple of pins that can be set high or low to configure which format should be used.  This is true of both the converters in the Layla and the Wavefront chips.  Unfortunately, the Layla PCB is hardwired to configure the converters to use I²S, which is a format that the Wavefront chips don’t support.  This required lifting the configuration pins off of their pads on the PCB and running short wires to connect them to either power or ground.  With the D/A converters, it was only necessary to change one of the configuration pins, which you can see as the short blue wires next to the chips.  On the A/D side, both configuration pins needed to change, so there’s both a red and a blue wire.  Wiring-wise, this was the most tedious part of the modification.

The actual board that carries the ADAT chipset is made from a single-sided PCB, with the spaces between traces milled out with a 1/64″ endmill.  A 20-pin through-hole connector on the back side of the board mates with the 20-pin header epoxied to the original board.  The ADAT transceivers connect via the 6-pin header on the top side of the board, which will be discussed later in this article.

Next to the ADAT board, you can also see an additional 7805 regulator that I’ve added to the main PCB.  The existing 5-volt supply is already pretty heavily loaded by the converters themselves, and since it’s also used by the analog side of the converters, I didn’t want to put too much more digital circuitry on it.  The additional 7805 is a separate supply that runs the circuitry I’ve added.  The tab is soldered to a pad for an electrolytic capacitor that was unpopulated on the original board.

The Controller

control

The original Layla came with software that allowed the user to adjust the input and output gains.  This was mediated by the FPGA, which I removed.  To be able to control these signals, I added another 20-pin header and PCB that controls these signals.  I used an ATmega32U2 microcontroller, which has just enough I/O pins for the task.  The 32U2 also has a USB interface, with which I provide a way for the settings to be changed from a computer.

All of the digital control lines conveniently come out to resistor packs near where the FPGA used to be.  There are 4 chip select lines for the 4 digital volume ICs, as well as shared clock and data lines for their SPI bus.  Then there are 9 digital lines that go to the CMOS switches on the output—8 switch the individual outputs between +4dBu and -10dBV levels, and the ninth is the mute signal, which applies to all channels at once.  The controller board connects to these lines via the epoxied header, and the USB port on the back panel connects through another 6-pin header on the top side of the board.

The USB port, when connected, shows up as a vendor-specific USB device, for which I’ve written a small command-line tool in Python that allows changing the gains.  The actual gain settings are stored in the microcontroller’s EEPROM, so they are retained across power cycles.

The error signal from the ADAT receiver is also wired to the microcontroller, which drives the mute line when no ADAT signal or an invalid ADAT signal is present.  This prevents horrible noises from going to the outputs when the ADAT input is unplugged.  The D/A converters don’t have any kind of built-in muting feature, and have a tendency to produce very loud squealing noises if the clock inputs are invalid.  The automatic muting keeps that noise from going to my speakers.

The Rear Panel

back

The actual connectors are mounted on the back of the case on an aluminum plate.  The optical transmitter and receiver were salvaged from a lightning-damaged AudioBox 1818VSL (long story.)  There’s also an LED on the back panel that lights up when a valid ADAT bitstream is present on the input, and the USB port for controlling the gains.

The panel is waterjet-cut from 1/16″ aluminum and somewhat hastily spraypainted matte black.  A small PCB with the I/O connectors screws on with a pair of angle brackets.

io_solder

The optical transmitter and receiver are through-hole parts, so they end up on the other side of the single-sided copper board with the LED and brackets:

io_component

And then everything gets connected together with 6-pin ribbon cables, through a hole milled into the back of the box where the original DB-25 connector used to be:

plate_removed

Clocking

I wanted to be able to still use the wordclock input and output on the back of the box—wordclock is always useful to have in larger audio systems.  The clock recovered from the ADAT bitstream is also sometimes more jittery than desirable.  The ADAT receiver chip supports a wordclock input as well.

The clock configuration isn’t as cleanly done in this hack at this point, mainly because I didn’t have a digital mux in my parts bin that would have enabled the microcontroller to select the clock source.  Instead, the ADAT receiver can be switched between clock modes with the little slide switch on the side of the ADAT board, and the buffered signal from the BNC jack is enabled with this jumper on a header (also glued to the original PCB):

clock

So, currently, changing the clock source requires opening up the case.  I might at some point get around to adding that mux so it’s software selectable.

The wordclock output connector is always active, and will output whatever clock source the board is currently using.

Conclusion

In the end, it works great!  It ended up being a bit more work than I was expecting (especially discovering that the config pins on the converters were going to need to get lifted from the baord to change the data format) but it’s always nice to recycle something useless into something functional.  The entire hack took a couple days, starting with probing for the signals, adding the headers and soldering all of the jumper wires, making the PCBs, debugging, testing, and finally writing the software for the microcontroller (which I’m still tweaking a little bit.)

The converters are old—they are only 20 bits whereas most newer pro audio gear is 24-bit, but 20 bits is actually fine for most purposes.  The analog stuff is actually pretty well done, and I’m pleased with how it sounds.  I haven’t tried it for any serious recording work (yet), but the outputs are actually very satisfying on my monitors, which frees up my gamma 2 DAC for me to use elsewhere.

Lighting Control Boards

I designed these boards to be integrated into 12VDC track lighting fixtures with MR16 LED lamps in the Media Lab atrium.  They are based on the Atmel XMega A4 series (originally designed for the ATxmega32A4 and that’s what’s in the atrium lighting installation, but forwards-compatible with the A4U series chips; most of my current uses for this board use the ATxmega128A4U) and the AT86RF231 radio (though the RF230 and newer variants like the RF233 should also be usable.)

mr16board

The radio is pinned out to the SPI interface on port C, and 3 LEDs along the edge of the board are pinned out to port D.  Dimming the MR16 lamps is accomplished by PWM control of a low-side N-channel MOSFET, connected to a PWM output compare unit on port E.  All of the other GPIO pins are broken out to 100-mil headers on the board, which includes all of ports A, B, and E, and part of ports C and D.  22 total GPIO pins are broken out.

The left half of the board contains the power supply circuitry and the power MOSFET.  The bridge rectifier on the power input allows for the supply to be connected in either polarity, or to AC power.  A linear regulator cheaply (but inefficiently) drops the supply voltage to the 3.3V needed by the logic on the board.  If the power supply circuitry and MOSFET are not needed, the entire left half of the board may be cut off and 3.3V fed directly to the 100-mil headers.

The RF antenna can be attached via an SMA connector, but in low-cost applications a 25mm wire (quarter-wave antenna) works very well.

The removability of the power supply circuitry and the extensive I/O breakout make this board useful as a general-purpose Xmega wireless development board, and I’ve indeed reused it in several other wireless projects.

I have adapted my basic extension of Atmel’s 802.15.4 MAC/transceiver toolkit (which is now quite dated and contains unnecessary workarounds for AT86RF230 revision A silicon errata) to this board.  Most of my recent development, however, uses the Atmel Lightweight Mesh protocol, to which I’ve added HAL support for the A4 series chips and board support for this board.  (Hg repository: http://simonetti.media.mit.edu/hg/lwm).

MR16 Board Schematics are available.

Printing Functional Objects with the Form 1

3D-printed microphone clip

3D-printed microphone clip and custom-built microphone.  Please excuse the messy desk in the background.

The idea of starting with a digital model of a 3D object and having a physical representation in your hands a few hours later is certainly kind of magical.  I remember when my department at UW got its first 3D printer (which cost about as much as a nice car and was the size of a refrigerator) I spent hours staring through its window, watching it build up objects a layer at a time.  Amazingly, just a few years later, there are now several desktop-sized printers available at a fraction of the cost.  With the recent availability of these “personal” 3D printers, it’s been interesting to see the resulting models that people have printed.  I’ve yet to see one that doesn’t have a few chess pieces and an Eiffel Tower or two sitting next to it, showing off its capabilities.

While these intricate models are definitely cool, 3D printing isn’t just about models that look nice.  To me, the real value of 3D printing is being able to print out physical models that are functional, that wouldn’t otherwise be easy to obtain.  I’ve recently been working with the Form 1, which is a recent desktop-sized 3D printer capable of some pretty impressive prints.  While I’ve certainly printed a few things that are just for looking at, I’ve also been using it to make functional objects.  And so far, I’ve been pretty happy.

One of the models I’ve printed is a custom microphone clip (pictured above.)  I’ve recently gotten into building custom microphones (which I’ll write more about in a later article) starting with some that are fairly unique.  One of my current research projects involves audio recording and streaming at an outdoor site (you can listen in live, here).  I needed some microphones that were relatively inexpensive, sensitive enough to pick up quiet sounds, and wouldn’t get destroyed after months of being exposed to the elements.  I’ve arrived at the design you see above, which packs a nice electret microphone capsule and the circuitry for it into a weather-resistant XLR connector (what you’d normally find at the end of a microphone cable.)  They’ve been working great outdoors, where they are hanging from trees and tied to shrubs.

It turns out that they actually make great omnidirectional microphones for more traditional recording applications, too.  But few pianos that I’ve encountered have convenient overhanging tree branches to tie the microphones to.  So, they need to go on stands, and for that, I need microphone clips.  And these microphones are too small to work in most standard microphone clips.  And, if you go to buy microphone clips, you discover that clips are either sold for specific microphones (which are generally overpriced—I guess the manufacturers figure that if you’re spending $1000 on a microphone you’re willing to pay $40 for a piece of plastic that holds it) or they’re sold as “universal,” which basically means that it fits any microphone as long as it’s an SM-58.

mic_clip_sw

So, faced with either expensive clips that might or might not fit my microphones, or cheap universal ones that almost certainly would be too loose, I fired up my CAD software and sketched one out.  It’s two pieces—the base that screws onto the stand (including 3D printed threads—US microphone stands use really weird 5/8″-27 threads) and the clip that holds the microphone itself.  The two parts fasten together with a bolt & nut, which, when tightened down loosely, creates a friction hinge allowing the angle of the microphone to be adjusted.

mic_clip_form

Here’s the Form file.  I haven’t quite figured out how to do the supports for the base.  I’ve actually had best results printing the base without supports (it’s a little bit of a challenge to get it off of the build platform, but it keeps the surface finish on the outside nice.  I’d love to support it from the bottom, but the current PreForm software really wants to put supports inside that get just a little bit too close to the threads (one of my earlier prints has a support that fused into the threads.)

Overall, it turned out great!  For a few dollars in material, I have some perfectly functional mic clips, with working threads and everything.  (The threads did require some careful cleaning with tweezers after the print finished to remove a little bit of gunk.)  The material actually has just the right amount of flex in it that the microphone snaps in and out of the clip easily but stays put when it’s in the clip.  The pair I made worked great for recording inside of a piano!

This is the stuff that I think is really cool about desktop 3D printing.  In a couple of hours I was able to draw up and have in my hands an accessory that works perfectly with a device that I built—something that I really can’t just go on Amazon and buy.

The ZigBoard (working title)

3D PCBComputer rendering of prototype board. Created with Altium Designer 6.9; components modeled in SolidWorks 2009

Many small projects seem like they would benefit from low-power, low-bandwidth wireless connectivity. Commercial modules such as the excellent XBee series of devices exist, but are relatively large, expensive, and seem better suited to tinkering with the technology than integration into a finished project. Single-chip RF transceiver solutions are small and inexpensive, but require a fabricated PCB for every design. My goal with this project is to develop an inexpensive and small RF transceiver module that is flexible enough to use in the prototyping stages of a project while not being so general and large that it’s wasteful to use in a finished work.

Specifications

  • Communications Protocol: 802.15.4, provided by the AT86RF230 transceiver chip and MAC implemented in firmware
  • Microprocessor: ATmega168 or ATmega328 (same footprint, more memory)
  • Antenna: 2.4 GHz board antenna design from TI application note
  • Matching network: Integrated 2.4 GHz chip balun for Wi-Fi and Bluetooth applications
  • Interfaces: RS232 and I2C exposed at board edge, SPI exposed in programming connector
  • Additional I/O: 2 digital GPIO lines with PWM, 3 GPIO lines with analog inputs
  • Dimensions: 1.25″ by 0.6″

Key Design Goals

  • Low cost: $10-20 per board
  • Hand-assemblable (minimal component count, low component density, and oversized pads for the 0402 components)
  • Possible to integrate into an existing microcontroller-based system in addition to providing sufficient I/O and computing to drive external hardware, sensors, etc. (It’s basically a low-cost 8-bit wireless mote.)
  • Small size
  • Inexpensive board fabrication: 2 layers, 0.006″ minimum trace/spacing, 0.015″ minimum hole size
  • Can be paired with an FTDI TTL RS-232-to-serial module ($15) to provide a computer-to-802.15.4 interface.

Status

The boards are completed and functional, but I haven’t had a chance to properly document them here yet. For an example of the boards in use and firmware/software code, please refer to this project on my MAS 863.10 page.

Partially assembled prototype
Partially assembled prototype board.

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.

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.