I would like to generate a 30 kHz & 60 kHz sawtooth waveform using an LM358P operational amplifier per the following schematic.

Theoretically, and in the simulation, the circuit should work perfectly, generating a ~30 kHz or ~60 kHz signal depending on the switch position. In reality, the signal is distorted and varies between 6 & 8 kHz respectively.

Resistors/capacitor values were calculated based on the equations from the LM741 lab exercise which I am linking below.

What can be causing the issue?


Falstad Simulation: Link

LM358P Datasheet: Link

Lab Details: Link


I haven't taken the slew rate of a device into the account initially, but here are my calculations for the 30 & 60 kHZ sawtooth generator.

1. Biasing

Generator is driven from a single 24V power supply, virtual ground is derived from the voltage divider - two 1k resistors in parallel with 220nF capacitors, and saturation voltage is chosen to be 1V & 23V respectively.

Note: Saturation voltage was chosen without consulting the datasheet, so that was the first mistake.





2. Amplitude

Chosen amplitude of a signal was 22V, so the following resistors were chosen.




3. Duty Cycle

As I wanted to generate a sawtooth wave, chosen duty cycle was 10%.


4. Frequency

To keep resistor values small, 10nF capacitor was chosen for the integrator, and for the 30kHz frequency resistor was calculated with the equation from the attached lab.




Note: The frequency had to be appropriately increased to take into the account selected duty cycle.

4. Slew Rate

The slew rate of the LM358 is only 0.3 V/μ - which I didn't take into the account. For the 30 kHZ triangle wave generator minimum required slew rate is 4.14 V/μ, and for the 30kHZ sawtooth wave generator 6.9 V/μ.


  • \$\begingroup\$ Are you running of 24V as in the simulation? You'd be running into slew rate limitations. \$\endgroup\$ Nov 11 '20 at 21:30
  • \$\begingroup\$ What is the slew rate required at the pin 7 output? What is the output slew rate of an LM358? \$\endgroup\$
    – AnalogKid
    Nov 11 '20 at 21:37
  • \$\begingroup\$ From the datasheet: The slewrate is the rate at which an operational amplifier can change its output when there is a change on the input.These devices have a 0.5-V/μs slewrate (B Version). You are right, running the circuit from the 12V power supply generates a 6-8 kHz signal, while from the 24V power supply the signal is 3-4 kHz. \$\endgroup\$
    – George
    Nov 11 '20 at 21:48
  • \$\begingroup\$ What the schematic doesn't show is the hidden connections. If you built this with long dangly wires on a plugboard, it's probably the implementation, not the circuit, that's at fault. "neatness counts" when building circuits. Another thing that's not shown on the schematic is the electrical load of "sweep". Figure out the input impedance of "sweep" and add that to your simulation. Does it still work??? \$\endgroup\$
    – Kyle B
    Nov 11 '20 at 22:38
  • \$\begingroup\$ And, almost certainly, you should have capacitors on the power supply pins of the opamp. Those are not shown here. If you don't have such things, the opamp could definitely behave oddly (in a manner the simulation doesn't simulate). \$\endgroup\$
    – Kyle B
    Nov 11 '20 at 22:40
  1. Your resistor values are too low. Try about 10x the given values and reduce the capacitor proportionally to compensate.

  2. R34 is too low in relation to R36. The op-amp does not swing to the power supply rails.

  3. The op-amp you've chosen is not fast enough for the integrator function, let alone to be used as a comparator at tens of kHz. Note that many op-amps perform badly as comparators, and as well may present a very low impedance to differential voltages of greater than a diode drop or two.

Here is what it looks like operating, albeit at ~1/100 of your desired frequency:

enter image description here

With 10K/15K/5.2K/100nF


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.