Comprehending a Circuit: Timing with Vref & Vchange

  • Thread starter sr_sample
  • Start date
  • Tags
    Circuit
In summary, the circuit in question appears to be a combination of a comparator and an integrator. The output voltage varies based on the input voltage and a reference voltage, and also has a ramp time due to the capacitance in the circuit. It is not a classical integrator as the input is not the typical non-inverting input, but rather the inverting input. The circuit can be simulated using SPICE and can produce a clean triangle wave when fed a square wave input. However, there may be slight variations in the simulation depending on the circuit values used. Overall, it seems to be a unique circuit that has both comparator and integrator functions.
  • #1
sr_sample
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: 632
Engineering news on Phys.org
  • #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
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
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...




negitron said:
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
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
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 wouldn't 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.



negitron said:
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
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
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: 598
  • #9
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
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 won't 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
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
negitron said:
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
uart said:
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 won't 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
Bob S said:
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

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
negitron said:
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
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: 598
Last edited by a moderator:
  • #16
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: 612
  • input.jpg
    input.jpg
    4.5 KB · Views: 569
  • output.jpg
    output.jpg
    5.3 KB · Views: 550
  • #17
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
    8.1 KB · Views: 576
Last edited:
  • #18
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: 515
  • #19
Which brings up a point: if the OP wants time delays, why not a delay line? Cheap, reliable and easy to implement.
 
  • #20
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
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
I mean one of these.
 
  • #23
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.
 

1. What is Vref and how does it affect circuit timing?

Vref, or reference voltage, is a fixed voltage used to establish a baseline for other voltages in a circuit. In terms of circuit timing, Vref is used to determine when a signal should change from high to low or vice versa. It helps ensure that the signal timing is accurate and consistent.

2. How is Vref typically generated in a circuit?

Vref can be generated in a variety of ways depending on the specific circuit and its components. Some common methods include using a voltage divider circuit, using a precision voltage reference IC, or using a voltage regulator.

3. Can Vref be adjusted or changed during circuit operation?

In some cases, Vref can be adjusted or changed during circuit operation. This is most commonly done using a potentiometer or variable resistor. However, it is important to carefully consider the effects of changing Vref on the circuit's timing and overall functionality.

4. What is Vchange and how does it impact circuit timing?

Vchange, or change voltage, is a voltage that is used to trigger a change in a signal. This can be used in conjunction with Vref to determine when a signal should transition from high to low or vice versa. Vchange can be generated using a variety of methods, such as a comparator or a digital-to-analog converter.

5. How does the combination of Vref and Vchange affect circuit timing accuracy?

The combination of Vref and Vchange is crucial for ensuring accurate circuit timing. Vref provides a baseline for signal timing, while Vchange triggers the actual change in the signal. By carefully selecting and adjusting these voltages, the circuit's timing can be fine-tuned for optimal accuracy.

Similar threads

Replies
9
Views
4K
  • Electrical Engineering
Replies
6
Views
1K
Replies
12
Views
2K
Replies
50
Views
6K
  • Electrical Engineering
Replies
3
Views
799
  • Electrical Engineering
Replies
4
Views
2K
  • Electrical Engineering
Replies
3
Views
1K
  • Electrical Engineering
Replies
27
Views
1K
  • Electrical Engineering
2
Replies
41
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
13
Views
2K
Back
Top