EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: SteveUK on January 26, 2012, 04:11:18 am
-
I have a 1.2 kHz square wave going into the attached integrator circuit. I'm supplying +/-9v with two 9v batteries and the incoming signal ground is going to 0v (between the two batteries).
Instead of the expected triangle wave output, I'm getting something down at about -9v. I can't even trigger on it. The inverting input does have a triggerable signal and is also attached. Any ideas?
Ultimately I want a single supply integrator, but I thought I'd start with the simpler case of dual supply first.
Time Scale for all traces is 0.5ms/div.
Voltage Scale is 0.5 V/DIV (but I'm using x10 probes)
-
Looks like your input is all +ve and with a dc gain of ten the integrator is bouncing off the bottom rail. Your input needs to be symmetrical about 0v.
-
Rufus is right. Add a 1uF capacitor in series with the 4k7 resistor to eliminate the DC from the input.
-
@SteveUK: Regarding the above comments, look carefully at how the square wave is drawn on the circuit diagram picture with regard to the dotted line 0 V reference point.
-
Hi, I think that the problem is the DC gain, wich is set to -10, Rf=47k and Ri=4.7k, if u want to mantain the dc level from the input change the feedback resistor to 4.7k
-
Regarding the above comments, look carefully at how the square wave is drawn on the circuit diagram picture with regard to the dotted line 0 V reference point.
The "Looks like" came from the input scope trace and assumption the trace wasn't offset, and it fits the other observations.
-
The "Looks like" came from the input scope trace and assumption the trace wasn't offset, and it fits the other observations.
Right. My comment was addressed to Steve, that the problem is evident from a close examination of the original circuit diagram. You need an upward push (negative voltage due to inverting input) to ramp up, and a downward push (positive voltage) to ramp down. Zero volts is no push at all, so the output won't ramp in either direction. The input square wave must therefore cycle above and below zero (dotted line) in order to produce the desired output.
-
The "Looks like" came from the input scope trace and assumption the trace wasn't offset, and it fits the other observations.
Right. My comment was addressed to Steve, that the problem is evident from a close examination of the original circuit diagram. You need an upward push (negative voltage due to inverting input) to ramp up, and a downward push (positive voltage) to ramp down. Zero volts is no push at all, so the output won't ramp in either direction. The input square wave must therefore cycle above and below zero (dotted line) in order to produce the desired output.
i think the correct way to see it is as a square wave input with offset, as its on inverting input and dc gain of -10 as i said and the opamp is clipped to the -9 source
the circuit should work for that signal, just make R2=R1 and recalculate the cap if needed
-
i think the correct way to see it is as a square wave input with offset, as its on inverting input and dc gain of -10 as i said and the opamp is clipped to the -9 source
the circuit should work for that signal, just make R2=R1 and recalculate the cap if needed
I don't know. The integration function is G Int(V, dt) where G is the gain applied to the integral and V is the constant input voltage. The result of this integration is GVt (+ constant). If V is zero, then the GVt term will be zero and the output of the integrator will be a constant voltage, neither ramping up nor down.
How will you cause the integration circuit to have a changing output when the input voltage is zero? It seems you would need to apply some compensating offset on the input and I don't see where your suggested modification does that.
-
the schematic is from forest m mimms 111 opamp book i beleive.
-
did you use a buffer ?
-
i think the correct way to see it is as a square wave input with offset, as its on inverting input and dc gain of -10 as i said and the opamp is clipped to the -9 source
the circuit should work for that signal, just make R2=R1 and recalculate the cap if needed
I don't know. The integration function is G Int(V, dt) where G is the gain applied to the integral and V is the constant input voltage. The result of this integration is GVt (+ constant). If V is zero, then the GVt term will be zero and the output of the integrator will be a constant voltage, neither ramping up nor down.
How will you cause the integration circuit to have a changing output when the input voltage is zero? It seems you would need to apply some compensating offset on the input and I don't see where your suggested modification does that.
well, first the output can change at no input, capacitor discharging but isnt the case, what if theres a little input offset(opamp), that causes the cap to charge and thats why it gets clipped after some time.
try it, simulated if u want but my suggestion fixes that clipping, just the signal is always below 0 V
-
Silly question - you mentioned you are using two 9V batteries in series to create +/-9V. Did you connect the common connection between the batteries to ground in your circuit?
-
Rufus is right. Add a 1uF capacitor in series with the 4k7 resistor to eliminate the DC from the input.
Yes, that was it. I'd tried a few other integrator circuits without luck, and had been eliminating DC with a capacitor, but when I used the Forest M Mims circuit, I forgot. Although, don't have 1uF, so I'm using 0.47uF.
The square wave gets a bit distorted going through the capacitor. The output from the integrator looks ok though, although Higher audio frequencies get quite badly attenuated. This is a problem since the next stage is to use a comparator to turn the triangle/sawtooth into an adjustable duty cycle square wave.
This circuit is going to look like an inverting amplifier at low frequencies, right? So with the values in the circuit, the low frequency gain is 10. I don't really want low frequencies being boosted at all, so I suppose I can change R2 to 4.7k.
Thinking about it though, my plan seems poor. Since we get the triangle wave from the fact that the voltage rises on the capacitor as it charges up (although it looks much more linear than the normal charging of a capacitor), so for higher frequency square waves, there is less time for this charging to take place, and therefore a lower voltage is reached, resulting in a triangle wave with lower amplitude. Is my reasoning sound there?
-
(although it looks much more linear than the normal charging of a capacitor)
Thinking about that statement, I suppose it only looks linear as long as the capacitor doesn't charge up to anywhere near the voltage of the signal being supplied to it.
-
With a constant squarewave voltage input, the output of an integrator is proportional to the period of the waveform.
So double the frequency and halve the integrator output.
To get the variable period, the easier way is to use a sinewave frequency generator, as it will have a constant output amplitude for all frequencies. Here is a typical voltage controlled Sinewave oscillator. This is taken from the LM324 data sheet, but it would probably work better with a rail-to-rail output opamp for the second opamp (or a comparitor is even better) as the output balance and level is affected by the saturation voltage of the second opamp.
+VC is the input voltage to control the frequency. It can vary from 0V to almost double the positive supply voltage for the maximum frequency.
(https://www.eevblog.com/forum/beginners/lm358n-integrator-problem/?action=dlattach;attach=19933)
The output voltage is proportional to the positive supply rail voltage, so a second comparator comparing the triangular wave to a potentiometer from 0V to the positive rail will give a stable adjustment of duty cycle across the whole frequency range.
You should find exactly the same circuit in your LM358 data sheet.
Richard
-
Since we get the triangle wave from the fact that the voltage rises on the capacitor as it charges up (although it looks much more linear than the normal charging of a capacitor)
It's more linear in this case because it is not the normal charging of a capacitor. The op amp in the feedback loop is adjusting the output to eliminate the voltage difference on the input. As a result of the active feedback there is a constant current being fed into the capacitor and a constant rate of change of voltage at the capacitor terminals.
If you had a perfect square wave going in you would in theory get a perfectly straight edged sawtooth coming out.
(In mathematical terms the equation of a capacitor is a differential equation:
I = C dV/dt
By clever use of the op amp we can use this to turn the capacitor into an integrator, by observing that the voltage on a capacitor comes from integrating the current passing through it. We essentially get:
V = (1/C) x (Integral of) I dt
Of course, as you observe, the circuit can't integrate forever. Once the voltage on the capacitor reaches one of the voltage rails the whole thing will come grinding to a halt.)