I am trying to get PSpice to simulate an integrator but I am having difficulties. The output should be a triangle wave form that is approximately 1.3 volts. However I keep getting something much higher that doesn't resemble a triangle. (See images below) I am using a square wave with a peak to peak voltage of 5V (2.5 / -2.5). I have the frequency set at 2 kHz or a pulse width of .25ms and a period of .5ms.

It is weird but I get better results if I switch the negative and positive supply inputs. But it was still incorrect.

Has anyone had success with a similar project? Or has anyone had this problem? Should I give up on Pspice and operational amplifiers? I never get the results need. It's too iffy. Thanks for your help. schematic http://www.itssimplydesign.com/schematic.png

schematic http://www.itssimplydesign.com/graph.png

  • \$\begingroup\$ Please don't edit the solution into your question, and definitely don't edit the title to indicate that it's solved. If none of the existing answers solves your problem, but you've solved it independently, feel free to post your own answer to the question. The answered/unanswered status is indicated by the green check-mark and green highlighting of the answer count on the main page; don't edit the title. \$\endgroup\$ – Kevin Vermeer Dec 29 '11 at 21:23

You actually appear to have a triangle waveform.

I simulated the same circuit using the Pulsonix SPICE simulator and got a similar triangle waveform:


You should be able to try it for yourself using the Pulsonix demo:


My Pulsonix schematic is here:


  • \$\begingroup\$ Thanks! I will definitely check it out. I have not experimented with Pulsonix Spice yet. My school has us using PSpice so I find it good practice to use it as much as I can. \$\endgroup\$ – atomSmasher Dec 29 '11 at 19:14

Screw the simulator and think instead. This is a very simple circuit that can be analysed with a calculator and a brain faster than you can enter it into a simulator.

This is basically a inverting opamp circuit. The + input is held at 0. There is plenty of supply voltage room for signals near the middle, so we can ignore supply clipping for now. We are looking at the opamp output voltage so R8 can also be ignored. That leaves only the opamp, two feedback components, and the input resistor. A quick check shows that the crossover frequency between C1 and R2 is 34 Hz. Since this is much much lower than the 2 kHz input, we can see this circuit will act as a integrator with R2 eventually zeroing out the DC level since the input has 0 DC. So now that we're down to two components (R7, C1), this is simple to analyze.

The - input is at virtual ground, so there will always be either +2.5V or -2.5V accross R7, which means 532 µA alternately charging and discharging C1.

(532µA)(250µs)/100nF = 1.33V

which is how much the voltage on C1 will change each input pulse level. The initial voltage on C1 isn't known, but eventually R2 will ensure that the average DC level is 0. So in steady state you should expect a triangle wave centered at 0 with about 1.3V peak to peak amplitude. At startup the voltage may be anthing within the supply limits, but should decay to the steady state within a few 100 ms.

Now let's look at your simulator results. Looks like the output is as expected. What exactly is the problem?

  • \$\begingroup\$ Thank you for your help! Believe it or not I already "thought". I did nodal analysis to arrive at the value in my question. However, I anticipate I will be using PSpice a lot next semester in school so I am trying to get ahead of the game by testing all the circuits I can. I guess it threw me off when the triangle wave shown in my simulation did not match what was on my scope "wave steady on the time axis" It is odd seeing it fall like it does. Either way thanks for your help! I will study my results in a larger domain. \$\endgroup\$ – atomSmasher Dec 29 '11 at 19:19
  • 2
    \$\begingroup\$ @atom: By the time you hooked up the scope, blinked, and looked at the screen, the output would have settled. You should get the same thing if you run the simulation longer. The simulator showed you a small snapshot at startup with arbitrary intial conditions. \$\endgroup\$ – Olin Lathrop Dec 29 '11 at 20:32

To properly answer my question regarding PSPICE it was found that my mistake was in two different areas. The first mistake was leaving TF and TR set to 0, they need to be set to a small value such as 1e-8. PSPICE does not like a zero value. Without this value the simulation will not work.

The second problem was related to the time domain of my simulation. It was pointed out by @Olin in his original answer that I was still in transient. I was not considering the circuit in steady state, in the above graph. I adjusted my end time to 100ms and it worked perfectly.


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.