I am trying to design a non-inverting integrator to get a triangular wave from a square wave. (the square wave will be generated using a 555 timer)

I am using this design i found online: FIG1

I calculated its transfer function and i got: H(s)= 1/(RCs)

When I try to simulate the circuit (FIG2) using PSpice I get this output: FIG3

With the vaalues I used shouldn't I have to be getting a higer amplitude signal?? Is there something wrong with the desing/calculations?? Thanks a lot in advanced and sorry for my bad english :-/

** Since i cannot post more than one link there are all the pictures in a big one: enter image description here

  • \$\begingroup\$ Check the GBW product and slewrate of the LM324. It really wasn't designed for 4us period signals... \$\endgroup\$ – user_1818839 Oct 16 '16 at 0:23
  • \$\begingroup\$ Thanks @BrianDrummond, i did not take in account the slew rate. \$\endgroup\$ – jagjordi Oct 16 '16 at 10:28

The LM324 output can drive maybe 10mA - you will have to increase those 10 ohm resistors significantly.

Try reducing the input frequency to maybe 1kHz and use 2.5K/1n or 25k/100pF.

As @packt notes your inverting/non-inverting inputs appear to be swapped in the Orcad or PSPICE schematic.

You are not going to get any kind of acceptable results at 250kHz using an op-amp such as the LM324 with a typical slew rate of 400mV/us - for a 3V output it would have to slew 3000mV in 2us which is 1500mV/us. It just cannae do it, even disregarding the input error magnitude.

In fact if you just connect the op-amp as a voltage follower you should get a triangle wave output, getting the same crappy results with far fewer parts.

Edit: here is what I mean (in the comments) by incorporating an integrator into the 555 oscillator. The inverter should be a CMOS buffer such as the single gate buffer with high drive capability (eg. 32mA). The op-amp needs to be reasonably fast. Increase R3 and/or C1 to get lower frequency- this value is roughly your initial 250kHz frequency.


simulate this circuit – Schematic created using CircuitLab

This is a conventional inverting integrator driven by the difference between the 2.5V voltage at the R1/R2 voltage divider and the buffer output. When the 555 output is high, the inverter output is close to GND and the integrator output ramps up until it reaches 3.33V. Then the 555 output goes low, the buffer output goes very close to 5V and the integrator output ramps down until it reaches 1.67V and the cycle repeats.

  • \$\begingroup\$ Hi @spheropefhany, thanks a lot for your quick response. \$\endgroup\$ – jagjordi Oct 16 '16 at 10:30
  • \$\begingroup\$ I did not take in account the slew rate of the op amp and I can see that is a problem. My problem is that i need to generate a triangular wave with a frequency of arround 100kHz. Using a 555 to generate a square wave and then integrate it was my first thougght but clearly its not going to work (at least the integration part). Any ideas on how to get that 100kHz triangular wave? Thanks a lot again. \$\endgroup\$ – jagjordi Oct 16 '16 at 10:33
  • \$\begingroup\$ Well the 555 generates a reasonably triangular wave too, you just have to pick it off another pin - unless you need a perfectly triangular wave. \$\endgroup\$ – user_1818839 Oct 16 '16 at 10:35
  • \$\begingroup\$ That's the problem, I need a perfect (or as good as possible) triangular wave. This is because the triangular wave would be used as reference for a comparator in a Class D amplifier. Any suggestions on how to get that triangular wave? Thanks again \$\endgroup\$ – jagjordi Oct 16 '16 at 10:42
  • \$\begingroup\$ As @Brian says if you pick off the capacitor voltage and buffer it, it is sort-of triangular and goes from 1/3 to 2/3 Vcc. Another approach is to use the integrator as part of the oscillator, which could give you nice triangle waves. In any case you'll need a much faster op-amp. \$\endgroup\$ – Spehro Pefhany Oct 16 '16 at 10:43

That's not a non-inverting integrator you have there but an oscillator, because your feedback is positive.

You have to put another OP as an inverter stage behind the first stage, or put a second, identical RC combination at the input. See http://www.mikrocontroller.net/attachment/261247/integrierer.png

  • \$\begingroup\$ Of course, it is an integrator. Its name is "BTC integrator" (BTC: Balanced Time Constants). It is not true that positive feedback causes oscillation. However, the invers is true: Oscillators always have positive feedback. \$\endgroup\$ – LvW Oct 16 '16 at 7:19
  • \$\begingroup\$ correction: It is not true that positive feedback ALWAYS causes oscillation. \$\endgroup\$ – LvW Oct 16 '16 at 9:14
  • \$\begingroup\$ Hi @janka thanks for your quick answer. I swaped the inverting and non inverting inputs but the problem persists. Also, what software are you using in your simulation? Thanks \$\endgroup\$ – jagjordi Oct 16 '16 at 10:35
  • \$\begingroup\$ @LvW: I never stated something like "positive feedback ALWAYS causes oscillation". Positive feedback causes self-amplification of the signal. When you have only resistors in the positive feedback path, it gives you a Schmitt trigger. When you have C or L in the positive feedback path, it gives you to a relaxation oscillator. The BTC integrator you mentioned has feedback to the inverting input. It's the circuit I proposed (see the link) as an alternative to putting an inverter OP behind the first stage OP. \$\endgroup\$ – Janka Oct 16 '16 at 13:16
  • \$\begingroup\$ Janka, sorry you are right. I just saw the (rather small) circuit diagram - very similar to the BTC intergator, but I did not recognize the "+" and "-" signs at the input. That means: I automatically did assume the correct polarity (which, in fact, was wrong). However, changing the polarity it is - in fact- a positive integrator (for equal time constants). \$\endgroup\$ – LvW Oct 16 '16 at 13:28

I'm not sure if it has a relation, but check your inverting(-) and non-inveting(+) input connections in your PSpice schematics. You should connect them in the opposite way to obtain the non-inverting integrator layout.

Secondly, even if you fix your connections, you should check your r c values again and recalculate your gain. Lastly, I think your input signal should be peak-to-peak -V to +V, not 0 to +V. In your case of input signal, result of the integration should not be an exact triangle wave(if I'm not wrong).


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.