29
\$\begingroup\$

I've noticed that whilst I have a well-known solution using an NE555, that IC doesn't fulfill my needs perfectly. Others have told me that the NE555 is very rarely an appropriate solution to one of the problems it's being used for.

What are the systematic problems with the NE555?

More specifically, I'd like to have a better (lower part count / complexity, better stability, lower power consumption) solution for the following typical applications:

  • One-off timer (monostable multivibrator)
  • Ramp generator
  • Pulse-width modulator
  • Dear versed reader: please extend this list with typical applications!
\$\endgroup\$
7
  • \$\begingroup\$ NB: this is meant to be a reference Q&A; so if you're an experienced user and have an application that is commonly asked about here, please add it to the list above, and add a solution stub below, if at all possible. \$\endgroup\$ Mar 14, 2020 at 14:46
  • 8
    \$\begingroup\$ All these answers have great points, that being said students in school today will probably never even use a 555 for educational purposes. With the advent of cheap easy to program microcontrollers, even things like ramps can be generated via pwm with a filter circuit. And that honestly might have more educational value because in a commercial environment that's exactly what they would be doing. \$\endgroup\$
    – MadHatter
    Mar 14, 2020 at 16:39
  • 2
    \$\begingroup\$ As an experienced EE of many decades, I have never used a 555 timer of any brand or type. I can recommend no circuit where a 555 is anything but a hinderance. I can also say exactly the same for the 741 op-amp. I just wouldn't waste any money on either. \$\endgroup\$
    – Andy aka
    Jan 2, 2022 at 12:06
  • 5
    \$\begingroup\$ @Andyaka you may have never used a 555 timer but, year after year, the lowly 555 timer is consistently the highest volume integrated circuit sold every year (more than a billion are produced each year). No other chip comes close to the one-billion unit level of the 555. They are used in everything from toys, LED flicker lamps, cheap smps oscillators in battery powered devices, my coffee grinder uses a 555 timer as a one-shot (the four different grind quantities. Are just four different fixed resistors to select for the one-shot timer - it was even a through-hole. I wish I took a photo). \$\endgroup\$ Jan 5, 2022 at 7:06
  • 1
    \$\begingroup\$ @GTElectronics I suspect that the TL431 and equivalents would give the '555 a good run for its money. || Like Andy, I would never design a 555 into anything - there will always be a better and/or cheaper way of doing things. [I long ago use a 74C14 as a SMPS in a high volume low cost Taiwanese produced product :-) ]. \$\endgroup\$
    – Russell McMahon
    Aug 12, 2022 at 13:25

7 Answers 7

26
\$\begingroup\$

Systemic problems and upsides of the NE555

Let's refer to a common datasheet, the TI NE555 datasheet.

Power usage

The NE555 is really power-hungry. As in, it realistically requires a supply voltage >= 5 V, and uses a typical current of 10 mA at no load, no switching; that's at least 50 mW for doing nothing. Modern microcontrollers work at lower voltages, and typical everything enabled, even if not used (example datasheet) at say 12 MHz clock rate (which should be way more than enough to synthesize any signal shape that the NE555 might create) half of that; but realistically, you'd run your MCU at a lower frequency, and let it sleep most of the time when using it to replace an NE555 in most applications.

There's CMOS-based xx555 ICs, which have significantly lower power consumption, but share the other downsides of the NE555.

Now, in an application where you can really work with these CMOS-based 555 for rarely-occurring switching processes, they can pose a good low-power solution to a common problem.

Supply Voltage

  1. The NE555 needs > 4.5 V to operate; typically, more. Very few modern applications still need a 5 V supply. You'll often find yourself in a situation where you just add a higher supply voltage just to use your NE555. That complicates the overall circuitry, but is often ignored.
  2. The NE555 is sensitive to supply voltage fluctuations. Not even because it's not perfect – it's just the way it's designed: threshold voltage, trigger and reset voltages, but also output currents are all functions of the supply current; and: not linear functions of that – so that changing the supply voltage means that the behaviour of your circuit changes.
    That means that you'll always want to use your 555 on a well-regulated supply. That, again, adds "hidden" complexity to your circuitry.

Now, supply regulation circuits for low-power applications (i.e., when not using NE555 but a CMOS variant) are simple, and you'd honestly want one of these, anyway, so this might not be as bleak as it sounds at first.

Dependence on passive component values

In most applications, the timing of what the 555 produces is controlled by one or multiple capacitors.

Now, capacitors are interesting components:

  1. Their size gets larger the larger their value,
  2. sadly, same goes for tolerances, and
  3. many types of capacitors age, i.e. they change their values over time (especially, electrolytic capacitors used when you need a large capacitance)
  4. ... and over temperature
  5. ... and over frequency (though that is a lesser concern for 555 applications, which inherently are slow)
  6. ... and over voltage.
  7. You rarely get capacitors that even specify lower tolerances than 5%

Of course, resistors aren't perfect, either, but they can be had in much tighter tolerances and generally tend to change much less over time. They do have a temperature dependence, but that's largely insignificant here.

That inherently means that every circuit you build with a 555 that needs to fulfill a specific time behaviour rather accurately has to be hand-tuned, and often, re-tuned after time.

On the other hand, especially in educative settings, this is a highly valuable tool for teaching people about things you can do with analog currents, charging capacitors etc. So, for didactic purposes, the 555 might be a good choice.

Limited accuracy of the chip itself

The datasheet guarantees not much; a maximum initial timing error of 3%, even if all your passive components are perfect.

Speed

Aside from the accuracy limitation on the lower end of speed (due to limited size of accurate capacitors), the NE555 is a pretty slow component, by modern means. For example, the propagation times of rising input edges are in the order of magnitude of 1 µs – that practically means that everything above 100 kHz is inherently problematic, and below, one still get a lot of the worst-lossy regions of the output.

So, in general, for anything that is "HF", don't use the NE555, for anything that is slow, don't use the NE555. That raises the question what the actual "sweet spot" for that component really would be...

Then again, audio falls into that region.

Glitches

The exact behaviour on power-up isn't that well-defined; voltage spikes during voltage ramp-up might very well trigger output changes, making the whole 555 family a bit undesirable for power-up delay applications.

\$\endgroup\$
16
  • 2
    \$\begingroup\$ to this comprehensive answer I'd add that too many folks make astable oscillations at many 10's of kilohertz frequency. 555 is not a fast part. As Marcus says, a counter-chain from a microcontroller is a more reliable solution. \$\endgroup\$
    – glen_geek
    Mar 14, 2020 at 15:26
  • 1
    \$\begingroup\$ @glen_geek it's a Wiki answer; could you just add a ## Astable applications – fast oscillator (or what you deem more applicable) heading to it and the same bullet point to the question, and add exactly your concern under ### Problems in that section? Someone else (I? Third party?) might fill in the voids later. \$\endgroup\$ Mar 14, 2020 at 15:30
  • 1
    \$\begingroup\$ Since this is community wiki anyway you might want to break it up into separate answers for each application. It gets pretty confusing to try to edit an answer when it gets too long. \$\endgroup\$
    – The Photon
    Mar 14, 2020 at 16:07
  • \$\begingroup\$ Ohh! Good point, @ThePhoton \$\endgroup\$ Mar 14, 2020 at 16:09
  • \$\begingroup\$ the capcitor in pin 5 should give good immunity to power fluctuations, if not use a larger capacitor there. \$\endgroup\$ Mar 14, 2020 at 22:24
14
\$\begingroup\$

What is a 555, anyway? At its core, it's a pair of comparators that set and reset a flip-flop in the device, equipped with a push-pull and open-collector output. It's essentially an 'out of window' comparator with triggers at 1/3 and 2/3 VCC. It's kind of like a Schmitt trigger that way, and can even be used as one.

As a way of explaining how the 555 works, here's a simulation showing its internals (simulate it here):

Enter image description here

From this answer: Astable 555 circuit always on, not oscillating:

What's great about it? It's flexible, runs over a wide voltage range, and is cheap. The fact that it has comparators in it make it useful in bridging analog to digital.

What's bad about it? It's not very accurate, has unreliable power-on behavior, is kind of power-hungry (at least in bipolar form), is sensitive to external component variations, is lousy for long time intervals due to capacitor leakage, is kind of slow, and can have issues in multiple-sourcing.

I fondly remember playing with the 555 when I was a teenager. It was literally the first IC I ever applied power to (yay for das blinkenlights!) But as useful and fun as it was then, some (mumble) decades ago, I think of it now as an XY problem. For every application that might use a 555, there’s probably a better / cheaper / more reliable way.

The late, great Bob Pease shared that view: What’s All This 555 Timer Stuff, Anyway?

Big picture: the 555 is fine as a hobbyist IC, but it isn't so great for real product work.

If the 555 is so awful, what should we do instead? Many offer up microcontrollers and other digital-centric techniques to replace the 555. Microcontrollers are great if you don't mind a bit of programming, choose your device carefully, and don't mind making 3.3 V or 5 V. Long counters using sensible reference components are another improvement, but it can be more complex and expensive.

Others will offer application-specific parts to do special functions, like voltage monitoring and reset (if these latter functions are what you're doing, you have no business using a 555).

But... is there a sort of latter-day 'do it all' toolbox that could replace the 555, that can 'do' analog as well as digital, and do it reliably?

Yes. A Silego Greenpak (acquired by Dialog, and now part of Renesas) can do most, if not all of those 555-ish things and a lot more besides, at much reduced power and very low cost (less than 20 cents).

So what’s this thing called a Greenpak, anyway? It’s a small mixed-signal programmable array that includes logic, counting / timing, PWM, comparators, power-on reset and other blocks. Some Greenpaks even have large FETs in them with current sensing. Think of it: all of those tools, in one very small package, and practically no NREs. Apple bought lots of them (maybe they still do), that’s how good they are.

Disclaimer: I don’t work for Renesas (née Dialog, née Silego), or for that matter, Apple. I’ve used Greenpaks to good advantage in consumer products. On the other hand, I’ve never used a 555 in a product.

Bonus: a Silego, literally programmed to be a 555

\$\endgroup\$
12
  • 3
    \$\begingroup\$ only twice the price of a 555, that's pretty good. \$\endgroup\$ Mar 14, 2020 at 22:28
  • 2
    \$\begingroup\$ The USB-based developer kit they provide is inexpensive and allows quick experimenting before committing to a blown part. One quibble: no Verilog / VHDL support or any notion of synthesis or simulation. But comparing to a 555, way more powerful as a solution. \$\endgroup\$ Mar 14, 2020 at 23:03
  • 1
    \$\begingroup\$ looks kind of hard to solder though, or do they also do SOIC or TQFP \$\endgroup\$ Mar 14, 2020 at 23:18
  • 4
    \$\begingroup\$ This answer would be much improved if you would explain a little more about "Silego Greenpak" is and give links to further information. \$\endgroup\$
    – cjs
    Mar 14, 2020 at 23:21
  • 2
    \$\begingroup\$ It’s practically impossible to hand-solder them. But they are available on DIP adapters for early prototypes. It’s also possible to connect the USB dev board in-system to emulate a programmed part. \$\endgroup\$ Mar 14, 2020 at 23:46
8
\$\begingroup\$

Application-specific replacements – Monostable operation (e.g., one-shot timers)

Typical NE555 schematic

Image from Datasheet

Problems

  • Low accuracy
    • Especially for long delays demanding large capacitances, very low accuracy
  • High stand-by power waste
  • High complexity for low-complexity problem

Non-555 Approaches

  1. Microcontroller
  2. Low-complexity FET trigger
  3. RC Time-constant-based buffered solution
  4. Dedicated Timer ICs
  5. Oscillator-fed Counters

Microcontroller

If you already have a microcontroller in your application, try to absorb the 555's function in that. It even makes sense to not let the microcontroller sleep, as supply currents of microcontrollers are typically lower than that of a NE555. However, in many cases, a simple "wake on interrupt" would totally do, and allow for extremely low power applications.

If you don't have a microcontroller in your application already, it might still be worth pursuing this: Small microcontrollers like the ATtiny only need at most one external passive component (a decoupling capacitor), and integrate internal oscillators that, while far from perfect, are still better than a NE555 circuit.

So, minimal NE555 circuit: 1× NE555 + 4× passives, not even counting supply voltage stabilization. Minimal microcontroller circuit: 1× MCU + 1× decoupling capacitor. That is often even cheaper, when you factor in assembly costs and board space!

Almost all microcontrollers have a built-in oscillator that they can use; they often have low accuracy (1 to 5% tolerance isn't rare, so they're only slightly better than 555 solutions), but most of the time you can alternatively use an external quartz crystal that gives you an accuracy that is in the parts per million. That of course increases part count by three (crystal, and typically two capacitors), so that worst case, your microcontroller solution is as complex as your 555 solution, just able to solve way more problems...

Low-complexity FET trigger

Basically: charge or discharge a capacitor through a resistor; connect gate of a (MOS)FET to the capacitor potential. When the voltage across the capacitor crosses a threshold, it will change the behaviour of the transistor drastically.

This suffers from

  • supply voltage dependency,
  • trigger signal dependency, and, worst of all, from
  • capacitor and transistor part variations and accuracy.

Basically, discharging / charging capacitors connected to a transistor was the typical way of implementing timers before the NE555 even existed (and that was 1971!!). It's thus typically even less accurate than using a 555, but it's also even easier to get the parts, and if you're seriously considering using any 555 today, you potentially don't care about precision, anyway.

The NE555 is a BJT part, which is the main reason for its inadequate power usage; you can do better than it using a MOSFET, but then you might as well be using a xx555 based on CMOS technology.

So, this is a niche solution for low-requirement use cases, where you're more bound by the parts that are in your part drawer, anyway, then by any constraint of your application.

RC Time-constant-based buffered solution

To at least remedy the supply and discrete semiconductor dependency, using a logic gate (typically, a "NOT" or "AND" or so) or buffer with well-defined input and output voltages is an appropriate approach. Schmitt triggering behaviour can be desirable, too, if your input is noisy or slow-rising.

To furthermore remove the influence on the properties of input, a buffer (or gate) applied to the input does well, especially since such are often sold in multi-component ICs (e.g., four buffers in one IC):

schematic

simulate this circuit – Schematic created using CircuitLab

Note that, in the above, you could replace the buffers with inverters without changing the operation.

Due to the high input impedance of moderately modern logic ICs, you can pick high values for the resistor and thus low values for the capacitor, making the power usage of this very low.

The downside is still

  • behaviour depends on passive components, especially the capacitor's, specific value, and
  • it's typically hard to completely eradicate influence of the supply voltage.

But: due to the aforementioned high input impedance, it's often easier to build long-term timers than with a 555 this way.

Dedicated Timer ICs

If you really just need a "I'll pay the price. Just give me a practically zero-current solution", especially for high-reliability applications where you want an off-MCU hardware watchdog:

TI makes the TPL5100; it's probably not the only IC of its kind.

Oscillator-fed Counters

It is a bit of a plaything, but if you either have an oscillator that you could use, or if you want the quartz oscillator accuracy without using a microcontroller:

  • Use an inverter IC and a quartz quartz crystal as the source of a highly accurate frequency
  • Use a counter IC to count the number of oscillations you need in your application
  • Use logic gates to change your output exactly when the right number of oscillations has happened
  • ... and reset the counter at that point.

This is especially easy if your time intervals are a power of two of your oscillator periods; you can cascade binary counters.

\$\endgroup\$
5
\$\begingroup\$

Application-specific replacements – Ramp generator

E.g., for audio-effect sawtooth purposes

Typical NE555 schematic

TBA.

Upsides

  • Exactly what the 555 was optimized to do
  • Low complexity solution to a problem that seems relatively complex
  • high educational value

Problems

  • Strong dependence on passive and 555 accuracy

Approaches

Typical approaches:

  1. Op-amp integrator
  2. Digital signal generation

Op-amp integrator

Op-amp integrators are easy to build: just charge a capacitor in the feedback chain. You get the negative integral of you your input signal, with some capacitor and input resistor defined slope.

If necessary, make the input reliable by first using a buffer (or another op-amp in a (dampened) comparator configuration) on it.

Ramp generator

schematic

simulate this circuit – Schematic created using CircuitLab

General op-amp integrator used as ramp-generator

This will simply give you a constant upwards slope, until the output hits the maximum of the op-amp (typically set by your op-amp's supply voltage). The slope is simply

$$ -\frac{V_\text{in}}{R_2\cdot C_1} \text,$$

so for a triangle wave, you'd simply feed in a square wave, whose center point is the ground used for the non-inverting input:

Triangle-wave generator

schematic

simulate this circuit

Op-amp integrator used with a virtual ground at half VCC, fed with a 50% duty cycle square wave to generate a triangle wave.

Note that the downward slope happens while your input is high, and vice versa!

Controllable sawtooth-wave generator

If you should need the ramp to be periodic (i.e., a sawtooth wave), the capacitor can be shorted to ground.

schematic

simulate this circuit

Op-amp integrator used with a virtual ground at half VCC, but with a "fast-discharge" diode

If you've understood the triangle wave generation above, this is pretty simple: as long as your input is zero, both diodes are in reverse bias, and doesn't let through any significant current. It works like the triangle generation above; the capacitor gradually charges.

As soon as you pull the input high, both are in forward bias, and the capacitor is rapidly discharged through D1, and finally the output is pulled up to the input voltage (minus twice the diode forward drop, which is why Schottky diodes are preferable for this application – make sure you use some with low leakage current and sufficient size to not burn when discharging C1).

After pulling high for a short period, you begin your next ramp cycle.

This gives you a falling sawtooth that jumps from low to high, and ramps from high to low. If you want the opposite, attach an inverting op-amp amplifier after.

Digital signal generation

In short: Microcontroller generates step-py voltage ramp function, reconstruction filter smooths that out.

Such a voltage ramp can either be produced by a PWM unit, or a dedicated DAC. Also, you can use an op-amp integrator (see above) to convert a constant output voltage to a ramp.

For smoothing, depending on how often per second you change your output, a simple RC lowpass might suffice. If you want to be very smart about it: by putting a Schottky diode in parallel to the resistor, you can make charging the capacitor slow, and discharging it fast (or vice versa).

This gives you (within the bandwidth of your DAC) absolute freedom over the signal shape. Often, that gives you the freedom to solve other problems down the signal chain: Say you need your triangle wave to excite some heavy machinery. But: your driver stage is highly nonlinear, so the triangle wave you feed into it comes out as something much smoother. It is easy to compensate by pre-distorting your triangle wave digital samples!

\$\endgroup\$
5
\$\begingroup\$

The bipolar 555 timer is essentially obsolete. However, the CMOS equivalent is still widely used in modern circuits and products.

For example, one of my favorite circuits uses a single TLC555 timer, two resistors, and two capacitors to generate a close approximation of a fixed-frequency sine wave. It has a relatively stable output frequency, even with varying supply voltage. The output impedance is quite high, but easily fixed by adding a single bipolar transistor buffer and a single resistor.

Both approaches usually need an AC coupling capacitor to get rid of the DC offset on the output signal.

Yes - you can use a really inexpensive microcontroller to do something similar, but that actually takes more components when you add the output filter that gets rid of clock artifacts.

There are literally thousands of applications where the CMOS 555 timer just shines. I expect it continues to be available for many decades to come.

\$\endgroup\$
2
  • \$\begingroup\$ Nice to see someone posting in favor of the old triple-5! It's not as useful today as it used to be, for sure, but it's still good for specific applications where its simplicity is desirable. That simplicity also makes it great for hobbyists to play around with and get a feel for using ICs and learn how to think about analog circuits--didactic uses are still useful! \$\endgroup\$
    – Hearth
    Mar 20, 2020 at 14:51
  • \$\begingroup\$ Exactly! I like how this answer points out the things that are systematically good about specific variants of the 555; I upvoted this. \$\endgroup\$ Apr 5, 2020 at 13:10
3
+150
\$\begingroup\$

@MarcusMüller and @hacktastical have both written about nice alternatives that are more precise, efficient and powerful than 555s.

On the flipside, consider that if you are using only very basic functions of a 555, (such as basic low precision clock generation, triggering, ...) a simple comparator will do these things very well and you can use the same circuit/footprint with different comparators depending on if you need low power or very fast toggling.

Essentially take a comparator-based relaxation oscillator and play with the values around it. For example, you can even use it as a cheapo 1st order delta-sigma ADC creating a ~100 kHz PWM digital stream:

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
3
  • \$\begingroup\$ very nice! Got a link to an answer with a relaxation oscillator? I think people like to look at things and go "oooh, that's not actually harder than using a 555 with all its external components for the same job". \$\endgroup\$ Jan 1, 2022 at 18:00
  • 1
    \$\begingroup\$ @MarcusMüller I have added an example for a modulator, I think a basic clock generator is easy to figure out using google/wiki. \$\endgroup\$
    – tobalt
    Jan 1, 2022 at 18:09
  • \$\begingroup\$ that's really really cool of you :) \$\endgroup\$ Jan 1, 2022 at 18:11
2
\$\begingroup\$

My favorite relaxation oscillator.

The 74LVC1G14 is a single CMOS Schmitt trigger inverter that operates from any voltage 1.65 to 5.5 V. Inputs and outputs are 5V tolerant if using lower supply voltages. Output currents to 25 mA source or sink. I have used it from 0.1Hz up to 1MHz should go higher.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
2
  • \$\begingroup\$ I've used various versions of the 7xxx 14 for many different purposes. About 20 years ago I used one as a switching regulator (! :-) ) in a production applicationfor use in Taiwan. I wanted something that used ICs available here and there and that I could be sure would work as desired. It needed very low quiescent current, ability to operate 4 x VERY depleted carbon-zinc C cells which were being loaded by a pulsating motor load - to provide the processor core with steady 5V and 3V3 loads when batteries were at bottom end of life but still being used (in some exercise equipment). It worked :-) \$\endgroup\$
    – Russell McMahon
    Apr 4 at 8:51
  • \$\begingroup\$ @RussellMcMahon:: This is the first 74xx series available that offered single logic elements in a package. Before, you had to buy fou or six and tie off the unused ones. \$\endgroup\$
    – RussellH
    Apr 4 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.