0
\$\begingroup\$

I'm trying to create an output frequency using a potentiometer and a 555 CMOS timer that can be adjusted from 200 Hz to 2 kHz. I only have a 25 kΩ and a 50 kΩ potentiometer.

Using the 25 kΩ potentiometer I've calculated R1 as follows:

f = 1.44/((R1 + 2·R2)·C)

R2 = 25 kΩ potentiometer

C = 0.01 μF

2 kHz = 1.44/((R1 + 2·25 kΩ)·0.01 μF

R1 = 22 kΩ.

However, I'm not sure this is correct. I've created the circuit in Multisim:

enter image description here

But changing the percentage on the potentiometer has little to no effect on the output frequency, which for some reason is around 2.5 kHz.

\$\endgroup\$
1
  • 4
    \$\begingroup\$ You have designed a pulse width modulator. When you adjust the pot, the mark reduces by the same amount that the space increases or vice-a-versa and so the frequency remains unchanged. \$\endgroup\$
    – user173271
    Nov 21, 2022 at 22:16

2 Answers 2

2
\$\begingroup\$

I'm glad GodJihyo worked with you to produce something that makes a lot of sense. Your own comments to that answer added some important details:

  • You are using a toggle-flop at the 555 output. That relieves some ambiguity with respect to the output you require. By definition we now know that you want (or can accept) a 50% duty cycle.
  • You are using CMOS.

This last detail made me want to revisit the CMOS variety. So I looked here at the LMC555. In skimming over it, I immediately saw their very simple circuit that doesn't even use the discharge pin and the approximate equation they supply for it. (It's something I've read about before, and seemed obvious at the time, but seeing it again made me want to write about it.)

The circuit would be something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

Here, they simply let the output do all the work. So still fewer parts.

You already know the two values you have for \$P\$. (You can use either.) But you need to find \$R\$ and \$C\$ given your frequency span. And this is pretty easy to do.

var('r c p fl fh')
eq1 = Eq( 1/1.4/c/(r+p), fl )
eq2 = Eq( 1/1.4/c/r, fh )
ans = solve( [ eq1, eq2 ], [ r, c ] )[0]
for i in ans: i.subs( { fl:200, fh:2000, p:25e3 } )
  2777.77777777778
  1.28571428571429e-7
for i in ans: i.subs( { fl:200, fh:2000, p:50e3 } )
  5555.55555555556
  6.42857142857143e-8

Suppose you wanted to gain a little bit of extra range, just to be sure:

for i in ans: i.subs( { fl:180, fh:2200, p:25e3 } )
  2227.72277227723
  1.45743145743146e-7
for i in ans: i.subs( { fl:180, fh:2200, p:50e3 } )
  4455.44554455446
  7.28715728715729e-8

By skimming the results above, you can see that you increase the range by increasing the capacitor value (\$C\$) and at the same time also decreasing the series resistor value (\$R\$.)

Another way of saying one part of this is to recognize that \$\tau = R\cdot C=\frac1{1.4\,\cdot\, f_{_\text{H}}}\$. Or, put another way, the potentiometer value has nothing to do with setting the high-end. That's entirely due to the product of \$R\$ and \$C\$.

However, the potentiometer value does impact the values of both \$R\$ and \$C\$ in just such a way that the dual affect cancels out when you multiply them both together. If you first set \$\alpha=\frac{f_{_\text{H}}}{f_{_\text{L}}}-1\$, the individual equations for each are: \$R=\frac{P}{\alpha}\$ and \$C=\frac{1}{1.4\,\cdot\, f_{_\text{H}}}\cdot\frac{\alpha}{P}\$.

The \$P=25\:\text{k}\Omega\$ looks nicer to me as it places the capacitor in a range of values I find 'comfortable.' In fact, the value of \$150\:\text{nF}\$ is readily available, too. So I might try making \$R=2.2\:\text{k}\Omega\$ to go along with that:

schematic

simulate this circuit

An LTspice run looks like this:

enter image description here

The results are that the blue trace is slightly less than \$180\:\text{Hz}\$ and the green trace is just slightly less than \$2.2\:\text{kHz}\$. About as hoped.

I don't think the extra drag on the 555 timer output is a problem here and there are fewer parts and the mathematics is easy, too.

\$\endgroup\$
4
  • \$\begingroup\$ Yes, that's what I was looking for. Could you give me the equation you used to calculate the values for R and C values? I want to play around with the frequency and possibly reduce it to eventually work with a 3-digit display and I'm having trouble understanding the Matlab equation. \$\endgroup\$
    – Licentia
    Nov 22, 2022 at 18:00
  • 1
    \$\begingroup\$ @Licentia The equation is derivable from the 'solve' I used in the above answer. I was kind of 'encouraging' you to learn to use SymPy/Python/Sage. They are good tools to know. But sure. It is \$R=P \cdot \frac{f_{_\text{L}}}{f_{_\text{H}}-f_{_\text{L}}}\$ and \$C=\frac1{1.4\, \cdot \,P}\cdot\frac{f_{_\text{H}}-f_{_\text{L}}}{f_{_\text{H}}\, \cdot\, f_{_\text{L}}}=\frac1{1.4\, \cdot \,f_{_\text{H}}\,\cdot\,P\,\cdot\, R}\$. As you can see, \$R\$ is proportional to the potentiometer itself and \$C\$ is inversely proportional to the potentiometer value. \$\endgroup\$
    – jonk
    Nov 22, 2022 at 19:13
  • 1
    \$\begingroup\$ @Licentia So you would find that \$R\,\cdot\, C=\frac1{1.4\,\cdot\, f_{_\text{H}}}\$, which is what sets the high-end frequency limit. \$\endgroup\$
    – jonk
    Nov 22, 2022 at 19:20
  • \$\begingroup\$ @Licentia I've added the specific details to the answer. \$\endgroup\$
    – jonk
    Nov 22, 2022 at 19:32
3
\$\begingroup\$

That circuit is for variable duty cycle. The frequency will stay roughly the same but the ratio of high time to low time will change.

Look for a variable frequency circuit, here's one you could try that supposedly lets you switch between constant frequency and constant duty cycle. I haven't tried it myself so try it in your simulator and see what it does.

You could use a simple astable multivibrator circuit like this:

schematic

simulate this circuit – Schematic created using CircuitLab

This should go from a little below 200 Hz to over 2000 Hz so it will divide down to the range you want. Here's a 555 timer calculator you can use to find component values if you want to tweak it a bit.

\$\endgroup\$
6
  • \$\begingroup\$ Nice catch. Just a note though. That schematic has a switch that gates \$R_6\$ to the 555 output. Given that the 555 output is a pretty powerful 2-quadrant drive, I'm not sure those two added parts do much. But I could be confused by the schematic's layout, too. (I've not redrawn it.) Do you see the same issue? Or did I miss something important? \$\endgroup\$
    – jonk
    Nov 21, 2022 at 22:52
  • \$\begingroup\$ @jonk I don't know, I'll have to try it out when I have more time and report back or change the link to a better example if I find one. I wanted to give something the OP could try out and that looked like it would illustrate both modes of operation. \$\endgroup\$
    – GodJihyo
    Nov 21, 2022 at 23:04
  • \$\begingroup\$ It's just a curious moment I had when skimming the schematic. \$\endgroup\$
    – jonk
    Nov 21, 2022 at 23:24
  • \$\begingroup\$ I'm using a CD4027 as a T-flip flop to divide the frequency by 2 down to 100Hz to 1kHz but I'm still having trouble figuring out how to create a 200Hz to 2kHz signal using a CMOS 555 timer that can be adjusted with a potentiometer \$\endgroup\$
    – Licentia
    Nov 22, 2022 at 1:11
  • \$\begingroup\$ @Licentia Since this is CMOS (and since the 555 is generally speaking ratiometric) do you expect the circuit to operate very similarly over a wide range of Vcc values? (Mostly, just curious.) \$\endgroup\$
    – jonk
    Nov 22, 2022 at 1:37

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.