Skip to content

New AVRopendous models

One product very similar to the Teensy USB development board are the open-source (hardware and software) avropendous boards, which now seem to be available in a DIP form factor ala the Teensy board, at a similarly low price.  The AVRopendous-DIP ($22) uses the same AT90USB162 as the Teensy board, and allows selecting 5v or 3v3 operation via a jumper.  There seem to be some more recent additions to the AVRopendous-DIP family, in particular the ATmega32U4-based AVRopendous2-DIP ($29), the AT90USB646-based AVRopendous3D-DIP ($32), and the AT90USB647-based AVRopendous3H-DIP (not yet for sale?)  The 3D and 3H variants provide a more powerful microcontroller, and the 3H variant adds the ability to function in USB host or OTG modes.  Not to be dismissed however, the AVRopendous2-DIP has more than double the memory (both flash and RAM) of the AT90USB162-based products and can supply the most current (450ma) at 3.3v.

Most of the things I’m interested in interfacing these days is 3v3, which tend to require extra components to safely interface to a 5v device like the Teensy board.  I looked into what it would take to modify the Teensy operate at 3v3, it should just barely be doable with some very delicate soldering.  (I had hoped there was some bit of the Teensy design that would make this trivial, like a 0-ohm resistor I could move to make it work at 3.3v.  Alas, no such luck…)  The AVRopendous design does make this trivial,  with it’s jumper-selectable voltage.  It’s not a perfect substitution since the AVRopendous lacks the compact bootloader that the Teensy ships with (although made up for by additional flash memory on the AVRopendous2-DIP), and the device has a slower clock (8mhz) that is required to work at both voltages.  However, the $25 ATmega32U4-based AVRopendous2-DIPnh (with no headers) option is a deal I couldn’t pass up… Expect to see some pix and a review here when it arrives.

Teensy meets nixie

I had a brief chance to play with some nixie tubes, specifically the nixie duo and driver kits from ogi lumen.  The tubes themselves are beautiful and retro, and the ogi lumen driver and mounting boards provide a nice compact mounting for the display, which can be extended by simply plugging in more modules.  The boards require some sort of external controller for the display; ogi lumen provides sample code for the Arduino.  I hacked up some code to control the tubes using the Teensy USB development board, modifying the Teensy USB serial example to allow sending digits to the nixie tubes via a simulated USB serial port.   This worked suprisingly well; the Teensy solution  is a bit more compact and integrated than an equivalent solution using an Arduino board.  (Slightly cheaper as well.)  Here’s the photo goodness:

Let’s fix things

We live in an era of liberal return policies.  After purchasing a defective item from a store, we’ve become accustomed to returning the item to the store in exchange for a working item.  Ever wonder where those items go after they’re returned?  It’s nice to imagine that they somehow make their way back to the factory where they are repaired and resold (presumably as “refurbished” items.)  However the reality is that for most inexpensive items, the items are usually “destroyed” by the retailer in exchange for credit from the manufacturer, where destroyed means they are in some way rendered unsellable and then sent out in the trash.  Quite often the item can be easily repaired, but for mass-market items it’s usually not cost effective for the manufacturer to do so.  One of my personal resolutions has been to buck this trend by fixing items rather than returning them, and to spend the effort to fix items when it would be more convenient to just toss it and buy another one.  Generally I learn something about how things work in the process, and feel good about keeping something out of the landfill.  (Not to mention reducing my carbon footprint by a small amount.)

From this idea I tried to imagine a different world, one where our money doesn’t flow overseas to third-world countries where underpaid workers work tireless hours assembling low-quality goods.  Instead items are designed to be readily serviced, and defective items are generally repaired, more out of principle than whether it makes economic sense to do so.  (Probably with the help of legislation overriding the economic incentive for manufacturers to make their items increasingly disposable.)  An item that lasts a lifetime is true wealth, whereas cheap, disposable items are a constant burden, forever needing to be replaced. Our service economy seems to be working overtime to invent new services that we truly do not need.  ($5 latte anyone?)  If only we could find a way to channel some of that money into cost-effective repair services, we might actually make a difference.

Teensy++

As is typical, once I buy something they immediately annouce/release a newer, better version.  I happen to notice an entry on Paul Stoffregen’s dorkbot blog that the Teensy has a new bigger brother, the Teensy++, which seems to be shipping already.  While details seem to be thin on the ground at the moment, the major changes seem to be a switch from the AT90USB162 to an AT90USB646 and the addition of more IO pins (with a corresponding form factor change from a 24-pin DIP to a 40-pin DIP.)

Leather electrical tape

I enjoy working with leather.  As a material, leather has a nice old-world feel to it, being nicely organic yet luxurious and strong.  Often I’ve gotten some inexpensive gadget in a cheaply molded plastic case and have wanted to replace it with something more sturdy.  Unfortunately in many of these gadgets the case serves a crucial function insulating the internal PCB from the outside world.  For this application, leather is not a very good replacement, since it conducts electricity about as well as human skin does, especially when humid or damp. While considering possible solutions, I hunted for some kind of paint-on coating that would serve as an insulating layer, ideally being as durable and flexible as the leather itself.  I ended up finding a product variously known as “liquid electrical tape” or “brush-on electrical tape” sold in small cans having an integral brush.    It is available in various colors, ranging from clear to black.  I was surprised to find this is stocked by my local hardware store, albeit only in black.

A first test of the liquid electrical tape on a piece of scrap leather (veg-tanned tooling hide) shows some promising results.  I painted on three coats, waiting about 5 minutes for it to dry between coats.  After drying, the liquid tape becomes a somewhat rubbery substance that happily flexes and stretches with the leather.  The resulting coating seems to function as a good insulator, even when the leather is completely soaked.  (Not too suprising for a product sold as a replacement for electrical tape.)

Next up is to find a likely candidate for an enclosure makeover…

Repurposing 1: USB gift card

I like the idea of repurposing electronics.  Occasionally I find something interesting and cheap that begs to be used in a new and interesting way.  For example, from time to time the retailer Target releases gift cards with various electronic bits inside.  These cards are effectively free since you can use the gift card’s value for your next purchase and then keep the card.  Mine was a Speed Racer promotional gift card that was available some time ago.  The card housed a 64MB (writable) USB flash disk pre-loaded with Speed Racer content.  The card itself is long gone and I unfortunately do not have any pictures of it prior to dismemberment (others have posted pictures of the card though.)  Inside the card is a small circuit board and a flexible wired USB connector.  This arrangement provides for maximum flexibility for turning just about anything into a small (64MB) but functional USB disk.  On the board is an unlabeled surface-mount flash chip, a 12MHz crystal, an LED, and a Chipsbank CBM2090 USB 2.0 flash disk controller (datasheet, pdf).  One interesting feature of  the controller is the ability to emulate a USB CD-ROM, which can be used for various purposes, nefarious or otherwise.  The tool to configure this mode doesn’t seem to be readily available from the Chipsbank website, but a Google search for “CBM2090 umptool” turns up some information about it.  The datasheet provides some additional ideas, the CBM2090 claims to integrate a 5v to 3.3v LDO regulator (the datasheet seemed vague on maximum current) and possibly a 1.8V regulator as well. This might be useful for powering a reasonable small circuit.  Also tantalizing are the mention of a pair of TXD and RXD serial port pins, and a 32-bit CISC embedded processor.  However, the datasheet doesn’t really provide much to go on there.  Using the LED for output or control may be another interesting possibility, using commands to eject and mount the drive turned it into a $0.00 USB-controlled blinkenlight. (The LED is on when mounted and blinks rapidly when ejected.)

USB gift card internals

Teensy automation

Don’t get me wrong, I think screensavers are a nifty invention.  However, they can be a major hassle.  Every time I sit down in front of my computer, I’m faced with the arduous task of wiggling the mouse in order to get rid of the screensaver.  This got me thinking… If only there were some way to automate this task.   Now thanks to the Teensy USB board and a spare Parallax PIR motion sensor I had floating around, I have a solution to this problem.  The Parallax sensor is low cost ($10) and pretty much ready-to-use out of the box.  Keith Neufeld has an excellent, detailed write-up of the motion sensor on his blog, along with some revealing pics of all the naughty bits. The sensor is very low power (<100uA) and can operate from a 3.3V to 5V power supply.  It has a single logic output pin which transitions to high when motion is detected, so it could not be any easier to interface.  I connected its power to the Teensy board and wired the output to a GPIO pin on the Teensy board and made a quick hack of the Teensy usb mouse example so that it polls the PIR sensor and wiggles the mouse cursor when  it detects motion after no motion is detected for 10 minutes.  Now whenever I sit down at the machine, the board automatically wakes up the screensaver, saving me from the laborious toil of moving the mouse and all of its associated hazards.

Here are some pictures of the Teensy, now with pins (soldered in pointing upwards) and  interfaced to the PIR motion sensor, also in a custom enclosure.

Very Teensy indeed

The Teensy board (tiny Atmel AT90USB162 USB proto board) from PJRC arrived today, and it is indeed very small.   I gave the pre-packaged examples a try, using the command-line teensy_loader_cli application.  Much to the credit of PJRC, the Teensy loader worked swimmingly on the first try.  The blinky morse code example also built and installed cleanly, along with the HID Listen application which allows one to view debug info (printf-style) that can be sent over the USB link.  Quite a nice set of tools for starting out with development.  Based on a very positive out-of-box experience and open-source support, Teensy promises to be a very approachable development tool for USB applications.  Here are some pictures of the board, one with a US dime for reference and the other in a custom enclosure made out of some rapid-prototyping thermoplastic material scavenged from my home (where it is readily available in  large quantities.)


USB Goodness

Lately I’ve been exploring low-cost USB solutions for interfacing microcontrollers to systems without legacy serial or parallel ports.  A obvious and popular solution is a USB to TTL-level RS232 converter.  These are available as an on-board device (as seen in the official Arduino boards) or as a cable or add-on board (popular with the smaller ‘duino clones.)  The best of which seem to be the FTDI TTL232 series of cables which can be had for around $20.   The Modern Device Company recently released an even lower cost USB BUB converter board that looks to be a nice solution.

Beyond simply emulating a serial port are approaches that provide a native USB interface to the microcontroller, allowing a full range of device types to be presented to the host system.  One inspiring example for hobbyists is the USBtiny approach which emulates a USB low-speed device using an Atmel ATtiny microprocessor that lacks native hardware support for USB.  (The Adafruit USBtinyISP AVR programmer uses this approach to great effect.)  This design can be achieved for very low cost with a small number of components; however, the quirk that makes it possible limits it to low-speed operation.  Yet it is still sufficient for many applications.

A step up from there are some low-cost microcontrollers with native USB support.  Some time ago I picked up an Atmel AT90USB1287-based AT90USBKEY demo board, which at $30 seemed like an excellent low-cost hobbyist platform, particularly with its 16MB of onboard flash and support for USB OTG-style host mode.  However the registration-required, EULA encumbered nature of their examples pretty much prevented any sort of open-source community surrounding the board.  One person mentioned on a forum that they had taken the time to convert the example sources to compile under avr-gcc, but they felt they could could not share the patches legally.  So the board sat around collecting dust until earlier today, when I decided to place an order for the $19 AT90USB162-based  Teensy USB development board from PJRC, based on their claims of an open-source USB library and some budding support for a “Teensyduino“  integration with the Arduino IDE.  The find of the day turned out to be that open-source USB library, namely Dean Camera’s LUFA (Lightweight USB Framework for AVRs.)  Interestingly, Dean’s default target just happens to be the aforementioned AT90USBKEY.  A short download and a (rarely occurring) successful first-time ”make all” later and I had a nice set of working examples for the board.  Much kudos to Dean, now I have something else I can hack on while I await the arrival of the Teensy board.  (Not that I ever seem to have a shortage of things to hack on…)

I’m doing science and I’m still alive

After the Heathkits and Altairs of the 1970s went away, they left behind a sad landscape for electronics hobbyists.  As a case in point, the handy local Radio Shack slowly shifted away from selling things useful to hobbyists, becoming just a re-branded electronics store and stocking very little in the way of components. Most of their space seems to be devoted to cell phones these days.  Market trends such as surface mount technology, low voltage electronics and ever-increasing complexity seemed to doom the hobbyist electronics world forever.  Yet the “long tail” of the internet has given rise to a new breed of  electronic store carrying components, breakout boards and the like that can be used in building-block fashion to produce new designs and functionality.  This has brought together a community of like-minded “makers” who then use the plethora of online parts stores and batch PCB manufacturing houses to enter this marketplace themselves.  Each bit adding cumulatively in true open-source fashion leaves a whole much greater than the sum of its parts.  Never before has the barrier to entry been so low, complete microcontroller development kits can had for under $20, and sub $100 CPLD and FPGA development kits allow the creation and deployment of complex digital designs (custom CPU cores for example) that were once only within the realm of extremely well-funded ASIC designers.

I find myself to be addicted to electronic things.  I’ve surrounded myself with bits of circuit board with wires attached.  The words “development kit” or “eval board” or “prototype”  sets me off thinking of the potential and possibilities.  I savor the chance to learn something new, to make something just a little bit better or just to do something myself.  I like to look at naked pictures of circuit boards.  I like to reverse engineer and repurpose hardware to do things it was never intended to do.  I’m a programmer with a screwdriver and a soldering iron.

Stay tuned for more adventures…