Introduction

The Arduino makes it very easy to play with microcontrollers. However when I've played with PIC-based hardware in the past, one of the pleasures was the feeling of working on bare-hardware. You could order all the parts from RS or Farnell, and the only software you needed to understand was the processor's instruction set.

To some extent the very thing that makes the Arduino such a success, detract from this simplicity. On the Arduino the ATMega runs a bootloader which takes care of initialization, and the Arduino's libraries often hide details of the hardware behind a cleaner API.

On the hardware front a good fraction of the board's area and cost is devoted to the USB/Serial interface and the voltage regulator which make the device easy to use, but they aren't so useful if you plan to embed the device and run it from a couple of AA batteries.

That's not to say that I dislike the Arduino, far from it, but I just wanted to jump off in a slightly different direction.

Desiderata

  1. All the parts should be sold by standard component suppliers.
  2. The board should be powered moderately efficiently from AA batteries.
  3. Things should be simple enough to build on stripboard.

Hardware design

In essense the design is simple: start with the Arduino schematic, but remove the power supply and serial interface. This makes the schematic easy to draw:

Actually of course we need to add some hardware too:

Power Supply

For the power supply we want something to convert the 2.5--3V from a couple of AA cells into 5V. It's clear that to do this one wants some sort of switch-mode converter, for which there are many one-chip solutions from e.g. Maxim and Linear Technology.

Howver, rather than design one myself, I took the lazy route and simply copied Lady Ada's Minty Boost1 converter, which is based around the LT1302.2

Her project is designed to deliver rather more current than we need, and in this low-current application the efficiency is likely to fall significantly. However, I'm happy to trade my design time for this when making a prototype. The LT1302 has a special Burst Mode designed for more efficiency in low-power operations, and LadyAda uses that. However, I found it added quite a bit of extra noise to the supply rails, so I've disabled it.

Programming interface

When it comes to programming, we simply omit all of the serial/USB interface and rely instead in the ATMEga's ICSP (in-circuit serial programming) interface. Although the serial/USB interface is convenient, so is the direct ICSP route and I idly wonder why the Arduino doesn't adopt it. For people wanting a simply plug-and-play solution with a standard USB cable, one could presumably embed a USB ICSP programmer on the board.

The ICSP lines are brought out to a standard 6-pin header, to which any number of programmers can be attached. I use the AVR-ISP500 from Olimex.3

Interface hardware

Although I built my AArduino for a specific purpose (controlling a camera and flash), I'm not going to discuss the application specific hardware here. Suffice to say it's a very routine mixture of analogue sensor inputs, a few digital inputs which monitor push-buttons, digital outputs controlling a LCD text display, and finally a couple of opto-isolated digital outputs to trigger the camera and flash.

Construction

The whole thing was built on standard 0.1in stripboard. The layout was done manually with pencil, rubber, and layout sheets.4

Sadly, I didn't record the Minty Boost part of the layout, but here's the microcontroller part:

In practice

In practice the prototype works well most of the time, but inevitably there are some caveats.

Noise

I'm not sure whether it's noise on the supply rails, some sort of RF coupling, or what, but the analogue inputs on the ATMega have significantly higher noise-levels when powered by battery than when, for example, an external 5V supply is connected to the board. The unsophisticated approach of adding extra low ESR capacitors across the supply rails helped a bit, but the difference remained.

The LT1302 has a special low-power mode which cycles the converter between burst and current modes. I found this added to the supply rail noise, so disabled it.

LCD power up.

Sometimes the LCD display doesn't start up cleanly. Cycling usually fixes this, but it's not ideal. Presumably the switched mode supply has some sort of nasty power-up transient which confuses the display. Letting the supply stabilize before providing power to the rest of the circuit would probably fix that, or at least I guess it would.

Power supply efficiency

I think a good switch-mode design ought to yield an efficiency close to 90%. In practice, by shoe-horning the Minty Boost into my AArduino I see about 75% which falls to about 75% with Burst Mode disabled on the LT1302. By comparison, using a linear regulator to drop 9V from a PP3 battery to 5V for the Arduino has a maximum of about 56%.

The final project