With the help of an ATtiny85, Maker Jeremy Cook has successfully built the world’s tiniest ‘most useless machine.’
If you’re into awesome and strange devices — and that’s a good assumption if you read this blog — chances are you’ve heard of the Useless Machine, or Leave Me Alone Box. These gadgets have a switch on top, and when it’s turned on, a “finger” extends to turn it off again. Generally this is done by an elegant circuit and a DC motor, but Maker (and frequent Atmel blogger) Jeremy Cook decided to instead cheat by using a tiny servo and microcontroller to make what he believes is the smallest “useless machine” in existence — or was before it disappeared in the void that is his garage.
To accomplish this feat, Cook soldered the incredibly tiny ATtiny85 to a coin-cell battery, a switch and a little servo motor. Pieces of MDF and polycarbonate were cut to form the body and lid of this device, and everything crudely attached together to form his “useless machine.”
When the switch is flipped, the servo is actuated to push it back into the “off” position. Though this sometimes takes more than one try, it eventually was able to accomplish its useless mission. It was definitely a shoddy prototype, but with a better mechanism, this could be a fun device to show off.
“One thing that I was proud of was using the ‘delay’ command to send a pulse to the servo used for one or two milliseconds, as explained here,” Cook writes. “This allowed for very crude pulse width modulation control with this chip. The little ATtiny doesn’t have all the features of, say, the ATmega328P used in the Arduino Uno development board, but the tiny size, and correspondingly tiny price is hard to beat for some projects!”
Writing for the EE Times, Jeremy Cook penned an article earlier this week about Atmel’s versatile ATtiny, a microcontroller (MCU) routinely used by both DIY Makers and professional engineers to power a wide range of projects.
“What if you want to shrink your project down to something that could rest on your fingertip? Appropriately named, the ATtiny chip fits the bill,” writes Cook. “Smaller than a quarter and costing around $3 when not purchased in bulk, this little guy has a lot going for it.”
Indeed, quite a number of projects and platforms built around Atmel’s ATtiny have surfaced on Bits & Pieces in recent months, including:
* 2D-Lux smart LED disk (SLEDD) – NliteN’s 2D-Lux Smart LED Disk (SLEDD) is a dimmable 60W-incandescent-replacement LED smart “bulb” equipped with an Atmel AVR microcontroller (ATtiny85), USB interface and hardware-expansion pins.
* Digital tic-tac-toe – Powered by the ATtiny85, this modern implementation of the classic game boasts an AI mechanism capable of making defending or winning moves against a human opponent.
As previously discussed on Bits & Pieces, all tinyAVRs are based on the same architecture and compatible with other AVR devices. Features like integrated ADC, EEPROM memory and brownout detectors allow users to design applications without adding external components. The tinyAVR is also equipped with flash memory and on-chip debug for fast, secure, cost-effective in-circuit upgrades.
“The tinyAVR offers an advanced combination of miniaturization, processing power, analog performance and system-level integration,” an Atmel engineer explained. “Simply put, the tinyAVR is the most compact device in the AVR family and the only device capable of operating at just 0.7V. And there’s nothing really tiny about that. Plus, tinyAVR designs can be coupled with Atmel’s CryptoAuthentication tech for an extra level of security.”
It should also be noted that the smallest tinyAVR measures only 1.5mm x 1.4mm. This means makers, modders and engineers can all employ the tinyAVR as a single chip solution in small systems – or use it to deliver glue logic and distributed intelligence in larger systems.
“The AVR CPU gives the tinyAVR devices the same high performance as our larger AVR devices,” the engineering rep continued. “Flexible and versatile, they feature high code efficiency that lets them fit a broad range of applications.”
As expected, tinyAVR offers a high level of integration, with each pin boasting multiple uses as I/O, ADC and PWM. To be sure, even the reset pin can be reconfigured as an I/O pin. Oh, and yes, the tinyAVR also features a Universal Serial Interface (USI) which can be used as SPI, UART or TWI.