EveryCircuit
Contact
Reviews
Home
KingLeon
modified 2 years ago

Sawtooth Wave Generator

0
9
166
02:56:36
This circuit I found works well as a STW generator and is much simpler than most other designs I found, but I am having trouble understanding the math behind this design. Any help would be much appreciated!
published 2 years ago
592azy2circuitdude
2 years ago
Hi. After studying your circuit for a long time, I would like to try and help you figure out how it works. This is a pretty cool circuit with a lot going on, so I'll do my best...
592azy2circuitdude
2 years ago
The general operation can be split between two parts: rising part and falling part. During the rising part, the top capacitor discharges into the lower capacitor with the transistor and diode acting as open switches. This causes the lower capacitor voltages to rise. Since the OPAMP keeps both inputs near the same voltage, the blue output signal will rise, too.
592azy2circuitdude
2 years ago
During the falling part, the diode and transistor close with a constant voltage drop of ~0.7V and ~2V. (By the way, to improve your design, try adding a resistor on the base of the transistor, which will make Vce ~ 0V instead of 2V). This effectively returns both capacitors to starting charge state.
592azy2circuitdude
2 years ago
As for math, here's some of my calculations: During the falling state, KVL gives 6V = 0.7V + Vr + 2V. Using Ohms Law, Vr = 3.3V and Ir = 3.3/30000 = 110uA. Because of the OPAMP, Vr = Vc1 = 3.3V. Because the transistor and C2 are parallel Vce = Vc2 = 2V.
592azy2circuitdude
2 years ago
For the rising part, we have the diode and transistor open. Because Vr = Vc, Vr = I×R and Vc = Q/C, we get I×R = Q/C. Differentiating this gives a linear first order differential equation I' - (1/RC)×I = 0, with a solution of I(t) = I(0)e^(-t/(RC)). From before, the initial current I(0) is 110uA, so I(t) = 110uA × e^(-3.3t)
592azy2circuitdude
2 years ago
Continuing with this to find the output, Vout = Vc2 because of the opamp. Now that the transistor is open, Vc2(t) = ∫ I(t)/C2. Plugging in I(t) = 110uA × e^(-3.3t) from before and integrating gives Vc2(t) = -333e^-3.3t + K. Remember that the initial voltage of C2, Vc2(0) = 2V. So, the final output equation is V(t) = -335 - 333e^-3.3t. Try graphing this on a calculator with 0 < t < .001, and you should get a nice sawtooth wave section that matches your circuit pretty well.
592azy2circuitdude
2 years ago
Did I help or make it clear as mud? 😅 feel free to ask any questions...
KingLeon
2 years ago
This has been a fantastic help! Thank you very much!!
592azy2circuitdude
2 years ago
Wow. I honestly thought I made it more confusing! I'm very glad I could help 👍

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy