EveryCircuit
Contact
Reviews
Home
Issacsutt
modified 2 years ago

OP AMP Square Wave Oscillator

13
7
443
08:30:59
A simple OP Amp Oscillator that always has a steady duty cycle regardless of supply voltage or component values (as long as the ratio of the voltage divider resistors remain the same) **Please Note: 1. This circuit assumes the power rails of the OP Amp will be the same as the power supply for the circuit. To accurately simulate this in everycircuit , you must make sure to adjust the power rail settings of the op amp to the same voltage level of the power supply any time you change voltage of the power supply…. In the real world this isn’t a concern because the “Vcc” and “GND” pins of the op amp can be (and almost always are) tied directly to the power supply, (as long as you didn’t buy an op amp that specifically requires a split power supply or negative supply rail). 2. To change the frequency, simply alter the values of resistor or capacitor that make up the RC filter. 3. Additionally, the amplitude and frequency of the sawtooth waveform can also be altered by adjusting solely the value of the resistor between the op amps output and non-inverting input. Think of this adjustment as tweaking a threshold offset, where: there is a base threshold voltage that’s set by the voltage divider, and this specific resistor controls the high and low thresholds which are really just an offset level above and below the base threshold, the difference is it’ll be a positive offset for the high threshold but negative for the low threshold. 4. Controlling the duty cycle can be done by adjusting at least 1 of the 2 legs of the voltage divider. For example, if they are equal then the duty cycle will be 50%. You can also calculate the duty cycle by calculating the output voltage of the voltage divider and then the percentage of it reference to the supply voltage, and that should also be the percentage of the duty cycle, or you can use the formula below: Oscillator Formulas: Duty Cycle: % = (100*r2) / (r1+r2) Identifying each component (from the schematic): R1: 1.01k R2: 1.02k R3: 1.03k R4: 1.04k C: The Capacitor Vcc: The Voltage Source
published 2 years ago
592azy2circuitdude
2 years ago
Good to see you post, @Issacsutt. It's been a while...
592azy2circuitdude
2 years ago
I'm a bit confused when you say, "50% duty cycle regardless of power supply or component value." I changed the resistor connecting the non-inverting terminal to ground, and the duty cycle changed. Perhaps I'm misunderstanding...
Issacsutt
2 years ago
Yeah for sure it’s nice to post something again I know it’s been quite a while…. Sorry for the confusion, I actually wipped up this circuit and posted it while I was waiting in a boring doctors office 😅. I made an update about 15 mins after I posted it when I realized i needed to correct my wording on that: Basically, as long as the two values of the voltage divider are equal, the duty cycle should always be 50%…. So there are two resistors that should always be changed proportionally with each other, but otherwise the magnitude of them or the 3rd resistor is not of any significant importance and should have no impact as long as the alterations aren’t unreasonable (such as too close to zero ohms or being excessively large).
592azy2circuitdude
2 years ago
Ok, I get it now. Thanks 👍
Issacsutt
2 years ago
Yeah totally!
gbhmage
2 years ago
Just add a switch. For some reson the circuit in the simulation needs to be in the off possition then turned on to work.
Issacsutt
2 years ago
Nah you just gotta shake your phone to inject noise, or be a little patient and wait about 5-10 seconds

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