A couple of the projects I’m working on will require very small electronics that still need some sort of microcontroller to do something smart, like pulse an LED, respond to a button press, etc…For larger things, I’m using the Arduino series of microcontroller boards, powered by the Atmel AVR MCU (MicroController Unit), but often the final project is to be embedded in something, like a cane, visor, or prop gun, and a full sized Arduino board is too large, even the smaller ones, like the nano, and too expensive ($30+ ) for a complete board…and they are probably overkill for what you need, having far more pins (inputs/outputs) and unnecessary parts (like headers, onboard LEDs, etc.)
I happened across a Make Magazine article called “How-To: Shrinkify your Arduino Projects” that describes using Atmel’s ATtiny AVR chips, which are a much smaller (8 or 16 pin) and much cheaper (I got mine for less than $1 each on ebay) version of the brain of the Arduino, the ATMega328. You have less pins (2 digital, 3 analog on the 8-pin ATTiny8x series) but the darned thing is tiny, the size of my pinkie fingernail! Note that you could do this with the larger and more expensive ATmega chips, but if all you need is a simple microprocessor, the ATtiny is pretty awesome!
The Make Article references a post from “High-Low Tech”, an MIT Research Group. The article has since been updated to reflect the support in the newest Arduino IDE (1.03 as of this post) and describes how to wire up the ATtiny to the Arduino and program it via the Arduino IDE.
To program the ATtinys, you need an Arduino to serve as the programmer and you either wire up via breadboard the ATTiny or use an Arduino Shield for it. I got a shield from a Turkish Company, Flytron, for $20, that does both the 8 and 16 pin variants. After the Make article, lots of companies are making shields and programmers for the ATtiny platform (Sparkfun and Adafruit being the two most common and popular, but they are also all over ebay.) I do wish the shield I got had a ZIF (Zero Insertion Force) socket, as the pins bend easily taking the chip in and out, but other than that, its a nice little shield!
So, without further ado, here is my first programmed Atmel ATtiny85, running the Arduino LED Fade sketch! Its currently powered from a full Arduino board just for convenience, but sans battery the entire setup is smaller than the 2″x1″ breadboard its running on!