# How to calculate resistors for a 555 sawtooth with an opamp sink controlling it's frequency

I modified this sawtooth-wave 555 osc and removed the ground at the 4k resistor, replaced it with an inverting opamp. The opamp produces a negative voltage and sinks the current, that previously went into ground after the 4k resistor. Applying 0-5V to the inverting input causes the 555 oscillate in different frequencies, where 5V gives the highest frequency and 0V the lowest.

The resistors on the inverting input and the feedback seem not to influence the sink but varying R1-R3 does. Via trial and error I set the values to somewhat "reasonable", that 0-5V produce a good range of frquencies although I have no clue how to calculate the values.

So, if I am using 0-5V at the inv. input, what formular could I use for the resistors to calculate the frequencies the 555 is doing at each voltage?

• Your diagram has nothing connected to the control voltage. Are you sure it's correct? – Scott Seidman Mar 3 at 22:50
• The transistor is going to make this tough to put an equation on. If you need a robust equation, there are probably better 555 circuits to use. – Scott Seidman Mar 3 at 22:52
• As for falstad sim it works without. Although it could need a cap to ground. – user6329530 Mar 3 at 22:53
• You're missing it. Your title SAYS you're driving the control voltage with an op amp. If you're not, please change the title, so we can stop wondering about it. – Scott Seidman Mar 3 at 22:54
• Edited the title. What 555 circuit would you propose instead? – user6329530 Mar 3 at 22:58

The voltage at the op-amp output is -Vin (your 1K resistors are a bit low, 10K would be better).

The base voltage (ignoring base current) is (5V/500 - Vin/4K)* (4K||500) =

Vb = 4.44V - Vin*0.111

The emitter voltage relative to the +5 when the transistor is conducting is Vb + 0.7 -5V = 0.14V - Vin*0.111

So the emitter current ~= collector current is Ic ~= (Vin-1.26V)*0.111mA when Vin > 1.26V, approximately 0 for Vin < 1.26V

The 555 charges and discharges to 2/3 and 1/3 Vcc. We can ignore the discharge time for lower frequencies since there is no resistor.

So the time to charge the capacitor through 1/3 of Vcc is:

tc = $$\\frac{C\cdot 1.667V}{Ic}\$$ = $$\\frac{200\text{nF} \cdot 1.667V}{(Vin- 1.26V)*0.111mA}\$$

Ignoring the discharge time, the frequency will be:

f = $$\\frac{(Vin- 1.26V)*0.111mA}{200\text{nF} \cdot 1.667V}\$$ = 333(Vin - 1.26V) Hz.

If the emitter voltage gets too close to (2/3)*Vcc the current source will saturate before it charges the capacitor sufficiently, but that won't occur unless your input voltage is more like 15V.

If you want to make an audio-range VCO that uses cheap easily available parts, I would suggest dumping the 555 and using the one on the LM324 datasheet which uses half the chip and an inexpensive BJT (or MOSFET).

• Thanks for your detailed math example, that was what I was looking for. I also have some LM324 in my box, just used the 555 here because I used an example circuit from falstad that has a sawtooth. The aim for me was to test the idea of changing one ground with an opamp current sink because I wanted to see, if pulling the discharging sink down below ground would as well change the frequency like a resistor before ground would do. Quite a "reverse": Instead of limiting the current to ground, make the sink stronger with a -V to discharge faster. – user6329530 Mar 4 at 8:45
• Just to clarify: I am trying to learn how oscillators work. Many of them use a capacitor and it's discharge time to adjust the frequency. A resistor before ground often limits the discharge current and thus manipulates the frequency. However replacing a resistor with a control voltage is not simple so I wondered if an opamp providing a variable current sink could do the same. – user6329530 Mar 4 at 8:48

You are charging the 555 with a constant current that is determined by $$\V_B\$$, the base voltage of the transistor. The constant current is approximately $$\frac{5-(V_B+0.7)}{R_3}$$.

$$\V_B\$$ is set by the values of $$\R_1\$$ and $$\R_2\$$. The faster you charge and discharge, the higher your frequency will be.

The voltages at Trigger and Threshold are going to be a function of your transistor.

• Ok this might become complex. I am trying to understand how this works. So opamp negative voltage output would get devided by R1-R2 voltage devider, is this correct? – user6329530 Mar 3 at 23:11
• Not quite. The difference between the op amp output and 5V gets divided. – Scott Seidman Mar 3 at 23:52
• The reason why you're not having luck with changing 5he op amp input is that it's too easy to turn the transistor all the way on. – Scott Seidman Mar 3 at 23:55
• But I am not having no luck. At least in the simulation, the circuit works fine, it produces a different frequency over the whole range from 0-5V on the opamp input. The issue is just that I don't know what I am doing and would like to learn how to reasobably calculate anything in this setup to be less clueless about it. – user6329530 Mar 4 at 8:16