Op amp question

  • Thread starter sr_sample
  • Start date
  • #1
5
0
Hello,

Does anyone know how this circuit work? I am having some dificulties understanding it. It looks like an integrator. The Vref is fixed at 2.5V and Vchange can be anything from 0-5V.


For example,

Case 1: When Vchange = 1.5V, what is Vout and how long does the op amp take to reach Vo.

Case 2: Now Vchange now goes from 1.5V to 2V. What is Vo and how long does the op amp take to reach Vo.

I am trying to use this as a timing circuit for a personal hobby project.


Thanks,
 

Attachments

  • opamp.JPG
    opamp.JPG
    10.8 KB · Views: 552

Answers and Replies

  • #2
negitron
Science Advisor
844
2
Depends on the supply voltage. For any voltage at or below Vref, the output will be zero volts; for any input greater than Vref, the output will be approximately .3 V below the supply voltage. It's essentially a comparator.
 
  • #3
1,497
4
This is appears to be an integrator so the output will be proportional to the integral of the input


[tex] V_{out} = K \cdot \int_0^T V_{in}(t) dt [/tex]
 
  • #4
5
0
Thank you Negitron. I was thinking that it may be a comparator or an integrator. But it appears to have both function. If I am not being incorrect, when Vrange is less that Vref, the output of the op amp will ramp down to zero (the comparator portion) from Vrange at a certain rate determined by the R1 and CI.

When Vrange > Vref, the output will ramp up to Vcc at a rate of R1, C1.

Thanks for helping me to clear this us. I think i got it now...




Depends on the supply voltage. For any voltage at or below Vref, the output will be zero volts; for any input greater than Vref, the output will be approximately .3 V below the supply voltage. It's essentially a comparator.
 
  • #5
negitron
Science Advisor
844
2
I'm not so sure it's an integrator; at least it's not like any integrator I'm familiar with. These usually have the non-inverting input tied to ground with the signal input on the inverting input. But this circuit has the inverting input tied to a reference voltage and the signal input on the inverting input with what appears at first glance to be a low-pass filter.

If I feel motivated later on, I'll try to SPICE this circuit for you, if you can supply the missing circuit values.
 
  • #6
5
0
Thank you. You are right, it is not an integtator in the classical sense. The voltage across the capacitor cannot change instantaneously. So it must have a ramp time. However, it wouldnt matter if the input is a square wave or a flat line because of the voltage difference at the op amp input...I think you are right because the voltage diference would turn it into a comparator with its output slewing at a certain rate (caused by the cap).

Thanks for the SPICE offer, but I think I now know enough to crunch the numbers in excel.

Thanks again...your answer helped a great deal.



I'm not so sure it's an integrator; at least it's not like any integrator I'm familiar with. These usually have the non-inverting input tied to ground with the signal input on the inverting input. But this circuit has the inverting input tied to a reference voltage and the signal input on the inverting input with what appears at first glance to be a low-pass filter.

If I feel motivated later on, I'll try to SPICE this circuit for you, if you can supply the missing circuit values.
 
  • #7
uart
Science Advisor
2,797
21
The output is :

[tex] v_o = v_i + \frac{1}{R_1 C_1} \int v_i \, dt [/tex]

EDIT : Forgot to mention that this is the response due to [itex]v_i[/itex] but there is also a response due to [itex]V_{ref}[/itex], being that of a simple integrator also, giving the overall response of :

[tex] v_o = v_i + \frac{1}{R_1 C_1} \int (v_i - V_{ref}) \, dt [/tex]


and for a fixed [itex]V_{ref}[/itex] the transfer function from [itex]v_i[/itex] to [itex]v_o[/itex] is :

[tex]H(s) = 1 + \frac{1}{R_1 C_1 s}[/tex]

For the circuit as shown R2 and C2 have no effect on the transfer characteristics because they are in parallel and the input is voltage driven. If however the driving source has a series resistance of Rs and an open circuit voltage of [itex]v_s[/tex] then the overall transfer function (from [itex]v_s[/itex] to [itex]v_o[/itex] for a fixed [itex]V_{ref}[/itex]) would become :

[tex] V_o(s) / V_s(s) = \frac{R_2}{R_2 + R_s} \cdot \frac{1 + R_1 C_1 s} {R_1 C_1 s (1 + R_p C_2 s)}[/tex]

where [itex] R_p = R_s R_2 / (R_s + R_2) [/itex]
 
Last edited:
  • #8
4,662
6
I have attached a thumbnail of an amplifier and simulation essentially matching your circuit. Your circuit is a pure integrator.
1) I have used your R1=R2= 10k, and your C1=C2=10uF.
2) I put your R2 in series with the V_range input to make the amplifier a balanced differential.
3) I had to put a 1 meg resistor in feedback to get initial condition of 2.5 volts out.
4) I used a 3-step 2.5V -> 1.5V- > 2.0V ->2.5V pulse
5) The integrator faithfully followed the input.
Please review
Bob S
 

Attachments

  • Integrator_differential1.jpg
    Integrator_differential1.jpg
    47.7 KB · Views: 488
  • #9
negitron
Science Advisor
844
2
Feed it a square wave. A pure integrator should output a clean triangle wave, the latter being the integral of the former. I SPICEd the same circuit, using the values you just posted, but did not get that result. However, I can't figure out how to post the output (Orcad PSPICE 9.2) or the schematic.
 
  • #10
uart
Science Advisor
2,797
21
It (the original circuit) is definitely not just an integrator. It does integrate the difference between Vin and Vref but it also has a direct feed through term as well. It's precisely as I posted above :

[tex] v_o = v_i + \frac{1}{R_1 C_1} \int (v_i - V_{ref}) \, dt [/tex]

BTW. Bob's circuit has and extra R4 C2 time constant that the original circuit didn't have, this may change things somewhat. Note that in the original circuit the R2 and C2 at the op-amp v+ input where in parallel with the input voltage and so have no effect. Spice wont like having a voltage source in parallel with a capacitor like that so you're best to just leave those components out of the simulation, or alternatively add just a very small series resistance to Vin to satisfy to convergence in spice.
 
Last edited:
  • #11
uart
Science Advisor
2,797
21
BTW. I've been taking the voltage named "V_range = {0 to 5V}" as the time varying input voltage in my analysis. I've only just noticed that the original poster also label that same point as VCC. If that's the same as the OP-AMP Vcc (which would be pretty silly) then I take back everything I said about this circuit. I think the OP should clarify this point.
 
  • #12
4,662
6
Feed it a square wave. A pure integrator should output a clean triangle wave, the latter being the integral of the former. I SPICEd the same circuit, using the values you just posted, but did not get that result. However, I can't figure out how to post the output (Orcad PSPICE 9.2) or the schematic.
Err, no. The correct integrator output is a step function, with the length of the ramp in the front being the width of the square wave input. The final output voltage is the volt-sec of the square qave input divided by the RC time of the integrator.
 
  • #13
4,662
6
It (the original circuit) is definitely not just an integrator. It does integrate the difference between Vin and Vref but it also has a direct feed through term as well. It's precisely as I posted above :

[tex] v_o = v_i + \frac{1}{R_1 C_1} \int (v_i - V_{ref}) \, dt [/tex]

BTW. Bob's circuit has and extra R4 C2 time constant that the original circuit didn't have, this may change things somewhat. Note that in the original circuit the R2 and C2 at the op-amp v+ input where in parallel with the input voltage and so have no effect. Spice wont like having a voltage source in parallel with a capacitor like that so you're best to just leave those components out of the simulation, or alternatively add just a very small series resistance to Vin to satisfy to convergence in spice.
uart-

I believe your post #7 is completely correct as shown, including the need for the series resistance Rs. Now if you let R2 -> infinity in your last equation, you will have a perfect differential integrator. with a time constant RsC1 in the denominator. The output voltage will then be the input volt-seconds (relative to the input Vref) of the area, divided by RsC1. I believe the OP took an ideal differential integrator with Vref being ground, and with the input being what he calls V2.5volts.
At this point the OP should tell us what is the area he intends to integrate, in volt-seconds (relative to his Vref), so we can determine the RsC1 in your last equation in post #7. If the OP really intends to use the circuit he showed. I will re-run my SPICE analysis, after he assigns values to all components.
Bob S
 
  • #14
negitron
Science Advisor
844
2
Err, no. The correct integrator output is a step function, with the length of the ramp in the front being the width of the square wave input. The final output voltage is the volt-sec of the square qave input divided by the RC time of the integrator.

All of which means if you feed it a square wave, you'll get a triangle wave like I said, because a triangle wave is the integral of a square wave.

http://archive.chipcenter.com/eexpert/dashby/dashby014.html [Broken]

Basically what you are doing is putting the square wave into an integration circuit. And the integral of a square wave is a triangle wave.

It's nquick-and-dirty way to tell if your integrater is, well, integrating. Also, an easy source of triangle waves.
 
Last edited by a moderator:
  • #15
4,662
6
All of which means if you feed it a square wave, you'll get a triangle wave like I said, because a triangle wave is the integral of a square wave.
http://archive.chipcenter.com/eexpert/dashby/dashby014.html [Broken]
It's nquick-and-dirty way to tell if your integrater is, well, integrating. Also, an easy source of triangle waves.
The integral of a bipolar square wave is a triangle wave. The integral of a unipolar square wave is a step function.

[Edit] The thumbnail shows the integration of a unipolar square pulse. The pulse is 0.5 volts high and 150 milliseconds wide, so the volt-sec is 0.075 volt sec. The integrator RC = 10k x 10 uF = 0.1 sec, so the integrator output should be, and is, 0.75 volts (+2.5 volts = 3.25 volts).
 

Attachments

  • Integrator_differential2.jpg
    Integrator_differential2.jpg
    44.3 KB · Views: 496
Last edited by a moderator:
  • #16
vk6kro
Science Advisor
4,081
40
I built the original circuit and got the waveform as shown.

Using a LED as a stable voltage reference (at 1.9 volts) the circuit functions pretty much like a comparator but with a strange slope on the trailing edge when fed with a 250 Hz pulsed square wave signal.
 

Attachments

  • opamp.JPG
    opamp.JPG
    12.2 KB · Views: 533
  • input.jpg
    input.jpg
    9.8 KB · Views: 495
  • output.jpg
    output.jpg
    8.2 KB · Views: 467
  • #17
uart
Science Advisor
2,797
21
Hi vk6kro. The LM234 will not operate properly when vin+ or vin- goes to close to Vcc, that's why you're not getting "integration" but instead getting "latch-up" when your input signal goes high.

Try running the input pulse somewhere about 0 ot 4 or 0 to 5 volts and you'll see it operates exactly as I have said. Being an integrator it will of course saturate in an open loop configuration without reset like that though.

BTW. If you set the period short enough so that it doesn't saturate in both half cycles then it should look much like the image in the attachment. Note that the upward integration slope is slightly larger than the downward integration slope so it will saturate near the Vcc rail at the end of each +ive half cycle as shown. Here I'm assuming (Vhigh - V_ref) > (V_ref - 0) to get the slope asymmetry, for example (4 - 1.9) > (1.9 - 0). I'm also assumming that the op-amp doesn't misbehave too badly when coming out of +ive saturation.
 

Attachments

  • output.png
    output.png
    15.1 KB · Views: 503
Last edited:
  • #18
vk6kro
Science Advisor
4,081
40
Yes, that's exactly right.

If I juggle the input very carefully, I can get it symmetrical as in your drawing. See attachment.

Otherwise it either has a slope on the leading or trailing edge.

At no time does it go high and stay high like the simulation predicted.

From the poster's point of view, this is just a wave shaper and it will not generate time delays like he was hoping for.
 

Attachments

  • out.JPG
    out.JPG
    4.4 KB · Views: 439
  • #19
negitron
Science Advisor
844
2
Which brings up a point: if the OP wants time delays, why not a delay line? Cheap, reliable and easy to implement.
 
  • #20
vk6kro
Science Advisor
4,081
40
Yes.

Also, if he wants longer ones, there are dedicated monostable chips (like the 74C221) or programmable ones like the Picaxes for delays from 1 mS to years.
 
  • #21
vk6kro
Science Advisor
4,081
40
Negitron, I should have asked what kind of delay lines you mean. Like in TV sets?

This circuit behaves just like a comparator if you just vary the DC input levels. You hardly notice the poor rise and fall times caused by the capacitor.

So, whether you call it a comparator or an integrator depends on the input frequency.
It is a little of both.
 
  • #22
negitron
Science Advisor
844
2
I mean one of these.
 
  • #23
vk6kro
Science Advisor
4,081
40
I haven't heard of those for years. There were some magazine articles about using them to get echo effects.
Have you used them for anthing else?
Looks like they'd be fun to play with.
 

Related Threads on Op amp question

  • Last Post
Replies
3
Views
4K
  • Last Post
Replies
13
Views
3K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
6
Views
3K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
13
Views
4K
  • Last Post
Replies
7
Views
2K
  • Last Post
Replies
7
Views
2K
  • Last Post
Replies
3
Views
865
  • Last Post
2
Replies
31
Views
3K
Top