This seems to be some easy thing someone figured out already, but here I am after an hour of searching - and fearfully asking the question.

My aim is to build a relatively simple 555 circuit using as basic elements as possible (suitable for newbies like me) that provides a square wave with duty cycle of either >90% or <10% (adjustable duty cycle is a bonus, if it doesn't affect the complexity too much), and with the frequency adjustable in a range of about 1-200Hz by a potentiometer. (It would be used in a simple strobe, the output drives a transistor that turns on/off some 1W LED)

In the standard 555 astable oscillator circuit (see below), R2 determines the off-time, and R1+R2 the on-time. Adjusting R1 thus alters the duty cycle that I would like to avoid.

standard ne555 astable circuit
The only idea I found so far is this question, where the frequency controlling capability of a voltage applied on pin 5 is discussed. I, however, tried this with pin 5 connected to a 470k potmeter as a voltage divider from 0-Vcc in an f = 1Hz, duty cycle = 50% configuration: adjusting the voltage on pin5 only disturbs the oscillation, but does not affect the frequency noticeable.

So: What is the minimal circuit for adjusting the frequency of the 555 without affecting duty cycle?

Update: At the end I turned to the most trivial road and swapped both resistor with a suitable logaritmic potmeter... :)

  • 1
    \$\begingroup\$ I'll go ahead and say it as a comment: Why not, rather than trying to change how a 555 works, simply replace the 555 with a microcontroller? I'm not going to post this as answer here, but basically, electronics.stackexchange.com/a/282928/64158 \$\endgroup\$ Jan 30 '17 at 18:49
  • \$\begingroup\$ The 555 isn't really set up to maintain the duty cycle as it changes frequency. However, if you run it at 10x the frequency you require and follow it with a 4017 you can combine the outputs (with diodes) of the 4017 to give 10%,20% etc. up to 90% duty cycle On the other hand use a microcontroller with analog inputs for frequency and cycle . \$\endgroup\$ Jan 30 '17 at 18:49
  • \$\begingroup\$ @marcus müler microcontrollers require a) (often pricey) equipment to program (that I lack), and b) knowledge on how to program them. I aggree today cca. everything can be made simpler with an MCU, but there are beginner hobbyists as well... \$\endgroup\$
    – Neinstein
    Jan 30 '17 at 18:54
  • 2
    \$\begingroup\$ @Neinstein well, I wouldn't call 50ct - 1.50€ (most expensive microcontroller I use for not-high-rate-data handling) "expensive" per se, and microcontroller dev boards can be had for less than 10€. b) is a very valid constraint! I often recommend to learn how to program a MCU for exactly the reason that you gain a lot of options, but of course, there's only so much you can learn at once :) \$\endgroup\$ Jan 30 '17 at 19:00
  • \$\begingroup\$ Dear downwoter, whoever you shall be, please kindly educate me. ... \$\endgroup\$
    – Neinstein
    Feb 1 '17 at 22:24

I wouldn't use the 555 for this task. Wouldn't even consider the idea. But it's your question. So, if your active-low duty cycle is small enough, then the datasheet says that:

$$D = \frac{R_B}{R_A + 2 R_B}$$

From that, it follows:

$$R_A = R_B\cdot\left[\frac{1}{D}-2\right]$$

Obviously, that only works with \$D\lt 0.5\$ and probably works best with \$D=0.25\$ at a guess. But if you have a fixed duty cycle to achieve and if that duty cycle is within the capacity of the simple astable configuration, then I think it may be possible.

This would mean, though, that you adjust the frequency using the capacitor only. And that means you'll need a variable capacitor. These are really easy if the required capacitance is low enough. I used to use air capacitors with up to a few hundred pico-Farads at maximum. But they do take space. And that's yet another problem.

You might be able to find a switched capacitor arrangement to use. I recall reading about a variable capacitor that used a mechanical switching mechanism. Regardless, it may help to review this Wiki page: variable capacitor to peruse a few options to consider.

I just popped the above formula relating \$R_A\$ and \$R_B\$ into a spice simulator and found that it does seem to work as advertized over at least several orders of magnitude for variations in \$C\$. So perhaps the answer to your question is, "Yes, it's possible. If you can find or construct the right variable capacitance to use with realistic resistance values that will cover your frequency range and so long as your desired duty cycle is within certain limits."

However, if you are looking for anything close to \$1\:\textrm{Hz}\$ then I fear it will not be possible, at all, using the basic astable configuration.

  • \$\begingroup\$ For 555, D is only valid for >50%. \$\endgroup\$ Jan 30 '17 at 19:35
  • \$\begingroup\$ Thanks. If not the 555, is there any similarly simple circuit you would recommend me to look up? \$\endgroup\$
    – Neinstein
    Jan 30 '17 at 19:37
  • \$\begingroup\$ StainlessSteelRat, it seems @jonk used the expression for the "output driver duty cycle" instead of "output waveform frequency duty cycle". The latter is 1-D using above notation. But the answer is valid. \$\endgroup\$
    – Neinstein
    Jan 30 '17 at 20:03
  • \$\begingroup\$ @StainlessSteelRat I pulled the equation and use of D from equation (5) on the TI datasheet on page 11: ti.com/lit/ds/symlink/lm555.pdf I also mentioned "active-low duty cycle" in the answer to help clarify. \$\endgroup\$
    – jonk
    Jan 30 '17 at 22:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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