You Can Always Use An ATtiny Instead Of A 555

It’s a constant of writing for Hackaday, that whenever a project appears using a 555 timer, someone will say “You could have used a microcontroller to do that!”. It’s something that [Shranav Palakurthi] has approached with the ATTiny555, a project that emulates an entire 555 by making clever use of the humble and ubiquitous microcontroller chip. We’ve all been guilty of it at some time, but now at last the ATTiny85 enthusiasts have conclusive proof that their favourite piece of cheap silicon can prove its mettle.

The full details of the ingenious 555 replacement can be found in its GitHub repository, and for those willing to take the plunge it’s as simple as adding a resistor and updating the firmware. It’s not the perfect 555 replacement with its imperfect analogue performance and swapped reset and ground pins, but it does however bring the advantage of a lower supply voltage.

You can see the device in action in the YouTube video below the break, but meanwhile rejoice that finally there’s a way to replace all those unnecessary 555s with your favourite inexpensive 8-pin chip!

While we’re on the subject of the 555, don’t forget we’re running our 555 contest again.

62 thoughts on “You Can Always Use An ATtiny Instead Of A 555

    1. For maximum over-engineering it seems like an entire IEEE 1588 infrastructure(ideally with a classy atomic clock as the timebase) should be shoehorned in: just think of the convenience of replacing all your pesky little discrete oscillators with an entire computer and relatively high end NIC. So versatile.

  1. ‘It’s a constant of writing for Hackaday, that whenever a project appears using a 555 timer, someone will say “You could have used a microcontroller to do that!”.’ – Wait what? Wasn’t it the other way around usually?

      1. The packages above are the cheapest options for both, with 4×4 and 5×5 mm they’re about the same size.
        The DIP t85 costs almost twice that. It’s probably cheaper to put the MLF/QFN on a DIP adapter board…
        But a pro wouldn’t do that and a hobbyist doesn’t need it.
        Anyway, I heard the ESP’s ADC isn’t very good, so check beforehand…
        Good day.

  2. Quote: “but it does however bring the advantage of a lower supply voltage”

    The CMOS version of the 555 (LMC555) will run at Vcc of 1.5 Volts

    From memory the ATtiny will run at slower clock rates down to 1.8 Volts

    So …

    Cold have done it with a (CMOS) 555.

    1. Requirements dictate design… in a perfect world perhaps.
      In many cases it is the deadline, budget or current stock of available parts (which goes hand-in-hand with experience related to those parts and the reason to stick with them) which truly dictate the design.

  3. A fun and useful comparison. The argument can only ever go one way. You can make a microcontroller do the job of a 555, but you can’t make a 555 act like a microcontroller.

    In fact I can’t think of anything the 555 can do that the MCU can’t, except maybe lower power consumption, which is dependent on the application, components and the particular 555 chip.

    1. Power consumption: I’m not sure you can make an Attiny unter maximum allowed load consume as much power as a NE555 switching at 1 kHz, no significant load.

      Sure, CMOS 555 variants are quite different in that. But the ubiquitous NE555 is really a bad bad power hog.

    2. > You can make a microcontroller do the job of a 555

      Except for waking up gracefully from a brown-out condition.

      One point of using analog electronics is that you can’t crash the CPU when there isn’t any.

    3. A 555 can sink 100 mA, even 200 mA until it overheats. Not many micros can do that.

      In my opinion, current drive is one area in which the 555 needs improvement. Sinking and sourcing an amp would be nice.

      1. At Vcc = 15V

        ISINK = 10 mA VOL = 0.1V (typ) 0.25 V (max)
        ISINK = 50 mA VOL = 0.4V (typ) 0.75 V (max)
        ISINK = 100 mA VOL = 2V (typ) 2.5 V (max)
        ISINK = 200 mA VOL = 2.5 V (typ) (max not fiven)

        At 200mA, it is burning 0.5W at the output pin.

        So realistically, it is only good for 50mA sink. Anything above that, it has very high saturation voltages
        Note: Output is no longer a logic low level.

        Any SOT23 NPN would do a better job than that.

  4. Did this with a PIC10F a very long time ago. 3 input pins to control frequency and 1 for squarewave output. Mainly as had some spare PICs and nothing to do in a lunch hour. Also, writing code in assembly mildly annoyed a colleague/mate for some reason, so any excuse to do a little extra was a bonus.

    1. Right, so this is a fun coincidence. Going through some junk at my office I found an old PIC10 taped to a yellow floppy disk. The floppy contained an assembly program and presumably the assembled hex file that was on the PIC10, producing a square wave as you described.

  5. Ha. Ha. Nice 555 joke.
    But nobody cares as they will use Arduino or RPI to generate a square wave.

    On the more practical side:
    ATTINY85 – $1.15
    555 – $1.21 …for 50 pieces. ;)

    1. If your application already has an MCU then the cost of using the MCU to generate a square wave is $0.
      Adding a 555 for something you can integrate into the MCU is going to be more expensive.

      The problem with armchair engineers is that you’ve never designed an actual product for manufacturing and don’t realize that there’s more to BOM optimization that arithmetic.

  6. You could but you would be foolish to do so.
    50 NE555 will cost you 1.80 euro plus dimes in postage whereas an attiny85 is 1 for 1.80 and somehow 1.20 in postage. It might even be cheaper to use a promini for that

  7. I also wonder why people keep perpetuating the lie that Attiny and really any Atmel chips are “cheap”. They invariably are seriously overpriced for what they can do compared to alternatives in the market and have been for years.
    But I’m sure Microchip loves it that they can keep fleecing the hobbyists that keep buying their crappy chips as long as the lie keeps being repeated.

  8. Really cool, but I haved mixed feelings. I like using 555s and other software-less ICs, because they are open, fully documented by now abd being made by several companies. Atmel AVRs or PICs are not, unfortunately, unless I’m wrong here. The chip die hasn’t been photographed or isn’t being cloned or manufactured under license by other chip makers, as far as I know. Also, the micro code/sourcode of these aren’t documented. Or is it? Is there a ROM dump of the AVRs/PICs.

  9. This has been an interesting discussion. Being “old” I have enjoyed the 555 for many years. One point that seems to have been overlooked is if you design a system that requires certification (GOV projects) and it has software of any kind there is about 4 times the work and more than 4 times the cost to get it certified and documented! A simple 555 could save you a lot in time and money!

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.