Every now and then you need an electronic component and there just isn’t a good match available…necessity is the mother of invention so why not make your own? The problem was I had a very tight cost budget, very little PCB space, and was behind schedule…I needed a cheap, tiny solution FAST. Fortunately, I found the ATtiny10 which is an 8-bit AVR micro-controller available in a SOT23-6 package (about the size of the head of a pin) that costs $0.28 in small quantity.

I needed to generate a 5V PWM output to drive a MOSFET for programmable closed-loop control of the speed of two types of DC motors in a very tiny space. There aren’t that many *really* small micro-controllers in packages that are reasonable to prototype with (I hate prototyping with QFN and BGA packages). I considered a few including the Microchip PIC10F322 (also SOT23-6) and the STM8 series (smallest package is SO8). I eventually counted out the PIC because the development environment was so unfriendly (I’m done with expensive proprietary compilers) and the space was too tight for an SOIC8. This left the ATTiny10.

I used avr-gcc as the C compiler which is fast, familiar, and generates tight code (you can’t go wrong with gcc). Even better, Microchip has breadboard-friendly DIP-8 versions (ATtiny13) so I could rapidly prototype a solution. The documentation is excellent, the peripheral set is rich and easy to use (unlike ST uCs which are incredibly flexible but accordingly complex). It was so easy that I was able to get the code fully functional in just a few hours having never use AVR processors before. I understand you can even use Arduino to program it (I didn’t).

Useful tools:

It’s not going to replace the STM32 family for most of my applications, but for those times I need a really cheap, really small solution, the ATtiny10 is a nice addition to the toolbox. You can even order them with your software pre-installed Digikey making them truly a custom hardware component!