# Variable Sawtooth Core Oscillator

#### crutschow

Joined Mar 14, 2008
28,545
Thank you for the thorough explanation and content to go with it. Just a question though. You mentioned that I would need to switch the C1 capacitor between 15nF and 1500nF to get the 20 - 20k range. Could I have a fixed capacitance and a variable resistor to accomplish the same thing?
Afraid not.
There's already a variable resistor that goes over the practical range limit to adjust the frequency.
You actually need to do three range changes for 15nF, 150nF, and 1500nF.
You'll need a switch, but it could be a CMOS electronic switch, such as a CD4066, if that helps.

#### romons

Joined Feb 12, 2017
8
A 555 uses current through a resistor to charge a cap to a voltage 2/3 of vcc. At that point, the cap is drained to 1/3 vcc through another resistor. The output pin is high when it is charging, and low when discharging.

However, you can also charge the cap using a current source, and discharge it directly instead of through a resistor. Doing this will make the timing cap voltage be a sawtooth. An opamp follower on this voltage gives a low impedance output.

By varying the current source, you can vary the frequency. This is easily achieved by using a current mirror on the high side, and an opamp current sink.

If you want to try this, let me know, and I'll create an ltspice circuit for you.

#### Veracohr

Joined Jan 3, 2011
763
Look at the sawtooth circuit in the LM13700 datasheet.

#### romons

Joined Feb 12, 2017
8
Here is the circuit I promised. It works from 20Hz to 20kHz, producing a ramp. It uses two chips, an opamp and a CN555, along with three transistors and a few resistors and caps. Enjoy!

#### drmanmachine

Joined Mar 12, 2016
68
View attachment 120580 Here is the circuit I promised. It works from 20Hz to 20kHz, producing a ramp. It uses two chips, an opamp and a CN555, along with three transistors and a few resistors and caps. Enjoy!
Thank you for taking the time. I will go ahead and build this circuit on a breadboard and see how it comes out. This might be the ultimate solution. Thank you for your efforts.

#### drmanmachine

Joined Mar 12, 2016
68
Look at the sawtooth circuit in the LM13700 datasheet.
I took a look at it. Very informative. Thank you for throwing that my direction. If I can get my hands on the chip, I'll experiment and see what I could come up with.

#### drmanmachine

Joined Mar 12, 2016
68
I'm sorry to have to bring this topic back to light. I think my level of understanding is a bit flawed. I appreciate the suggestions and efforts that everyone here has provided, but I think my problem is understanding how and why the circuits here provide the solution of a variable sawtooth core audio oscillator of 20 Hz. to 20 kHz.. I have a circuit simulator on my mac called "iCircuit" that has allowed me to build up a schematic and simulate it.

Here is a screenshot of the circuit I put together.

#### Attachments

• 315.1 KB Views: 30

#### Veracohr

Joined Jan 3, 2011
763
My simulation of your 555 circuit shows the frequency to be in the MHz range, and not very sawtooth-shaped. Use the one romons posted.

Can you be more specific about what you don't understand? The general idea of the 555-based circuit is that the opamp-resistor-transistor circuit generates a constant current, which is mirrored with the PNPs to a grounded capacitor, which causes a linear ramp in voltage on the cap. The cap voltage is connected to the 555 threshold input, so that when it gets to a certain point, the 555 output goes low and opens a channel to ground at the Discharge pin, allowing the cap to discharge through the 555's Discharge pin. When the cap voltage becomes low enough, the 555 output goes high again, cutting off the discharge path, allowing the cycle to begin again.

#### drmanmachine

Joined Mar 12, 2016
68
My simulation of your 555 circuit shows the frequency to be in the MHz range, and not very sawtooth-shaped. Use the one romons posted.

Can you be more specific about what you don't understand? The general idea of the 555-based circuit is that the opamp-resistor-transistor circuit generates a constant current, which is mirrored with the PNPs to a grounded capacitor, which causes a linear ramp in voltage on the cap. The cap voltage is connected to the 555 threshold input, so that when it gets to a certain point, the 555 pulses, allowing the cap to discharge through the 555's Discharge pin. When the cap voltage becomes low enough, the 555 output goes low again, cutting off the discharge path, allowing the cycle to begin again.
Using Romon's schematic, where can I vary the frequency? I would assume that I would use one of the resistors and change it to a pot? Also, there is a V_Test supply with a 100mV supply connected to a V_in. What is that v_input?
I think I was having difficulty understanding how to calculate the frequency range. Your explanation of what is happening does help significantly and I appreciate that.

#### Veracohr

Joined Jan 3, 2011
763
The small voltage input to the opamp is what determines the charging current, which determines the frequency along with the value of the cap and the trigger voltage at which the 555 changes states (which is based on the supply voltage).

The slope of the ramp is based on the capacitor equation $$I_c = C\frac{dV}{dt}$$

So the higher the current, the faster the cap voltage gets to the threshold (2Vcc/3), and the higher the frequency.

With a single supply, you would need a rail to rail opamp. The minimum current (frequency) depends on the minimum opamp output voltage.

#### drmanmachine

Joined Mar 12, 2016
68
The small voltage input to the opamp is what determines the charging current, which determines the frequency along with the value of the cap and the trigger voltage at which the 555 changes states (which is based on the supply voltage).

The slope of the ramp is based on the capacitor equation $$I_c = C\frac{dV}{dt}$$

So the higher the current, the faster the cap voltage gets to the threshold (2Vcc/3), and the higher the frequency.

With a single supply, you would need a rail to rail opamp. The minimum current (frequency) depends on the minimum opamp output voltage.
Can the frequency vary? If I want the range of 20 - 20k?

#### Veracohr

Joined Jan 3, 2011
763
According to my simulation, 5mV-5V input accomplishes about 20Hz-20kHz. You'd probably want an exponential control input so that the frequency varies linearly.

#### Alec_t

Joined Sep 17, 2013
12,473
You vary Vin to vary the frequency. However, you are asking for a 1000:1 frequency range, which means you would need (in theory) a similar Vin range if the timing capacitor is fixed. I have my doubts as to whether that Vin range would be practical. If not, you would have to use a few different timing capacitors.

#### GopherT

Joined Nov 23, 2012
8,012
Get an Exar 2206 chip and the correct pots. It is made for exactly what you want to do.

#### romons

Joined Feb 12, 2017
8
According to my simulation, 5mV-5V input accomplishes about 20Hz-20kHz. You'd probably want an exponential control input so that the frequency varies linearly.
The frequency is proportional to the voltage input. There are some errors, mainly caused by base current in the current mirror and constant current source. There are several ways to solve that problem, but I was assuming the OP would be using a pot to control the input, so it didn't really matter.
Can the frequency vary? If I want the range of 20 - 20k?
The "test" voltage in the original circuit should be driven by a pot. However, you can eliminate the opamp altogether, and just drive the base using a pot instead. The opamp makes the frequency proportional to the input voltage, but you don't care about that, really.

In fact, you could use a pot to replace the npn transistor and control opamp. Tie the wiper and one side to ground, and the other side to the current mirror input where the collector of the npn was connected. Use a 10k pot, I think. If you can't get the frequency low enough with that, use 100k.

#### drmanmachine

Joined Mar 12, 2016
68
Thank you for all of your feedback.

In fact, you could use a pot to replace the npn transistor and control opamp. Tie the wiper and one side to ground, and the other side to the current mirror input where the collector of the npn was connected. Use a 10k pot, I think. If you can't get the frequency low enough with that, use 100k.
Just so I can fully understand this, would the circuit look something like this?

#### Attachments

• 279.2 KB Views: 11

#### romons

Joined Feb 12, 2017
8
Thank you for all of your feedback.

Just so I can fully understand this, would the circuit look something like this?
Yes. The problem here is that the current, and thus the frequency, is proportional to 1/R, instead of before, where it was proportional to R. You don't care about that, though.