ATtiny555 Replaces 555 Timers with a Microcontroller That Simulates 555s
Why use a timer when a microcontroller will do?
The venerable 555 timer finds its way into many applications. However, as microcontrollers have come down in price and added more capability, they have replaced 555s in many applications. The replacement happens so often that old-school engineers often remark: "you *could* have used a 555 for that!" Shranav Palakurthi, an aspiring Arduino coder, turned the comment around with a microcontroller that acts as a 555 timer, the ATtiny555.
"What, you're using a 555? I could've done that with a microcontroller!" — Shranav Palakurthi
Microchip's ATtiny85 is an eight-pin microcontroller with an AVR core available in surface mount and through-hole DIP-style packaging. These capable chips often find their way into size-constrained projects. ATtiny555 takes advance of the microcontroller's analog-to-digital converter (ADC), high current drive and sink pins, and ability to switch pin states to simulate the 555's internal design.
ATtiny555 does require a single 68 kilohm resistor strapped across the top of the DIP package connecting one pin to ground. One unavoidable trade-off is that ATtiny555 is not pin-compatible with the original 555 chip. The cause for this issue is ATtiny85's ground pin location. Since Palakurthi could not move it, the 555's RESET and GND pins had to be swapped. Palakurthi is investigating if rotating the chip can get the simulation closer to the original timer's configuration.
Looking through the code available on the ATtiny555 GitHub repo, the chip competently mimics the 555's operation and should be usable in most 555 circuits. An analog comparator operates as the Threshold pin monitoring for a signal to go above two-thirds of VCC. The ATtiny85's ADC serves as the trigger pin watching for a drop below one-third of VCC. Finally, the reset pin does precisely that, resets the microcontroller.
This mash-up of 8-pin chips happened when Palakurthi needed a 555 but did not have one on hand. If you find yourself in a similar situation and have an ATtiny, check out this project page for the few instructions required to turn it into an ATtiny555.