# Opamp: Compensate to achieve constant gain

I have been trying to achieve a constant gain across an LM318 opamp in a differential amplifier configuration ranging from 500Hz to about 500kHz. The opamp has a bandwidth of 15Mhz.

Since the gain is dependent on frequency, I have not been successful.

If the input amplitude is constant 600mV peak-to-peak, I would like the output to be, for example 4V peak-to-peak at all frequencies of interest.

After some research, the only way this appears to be possible is to use another opamp in the feedback loop to increase the gain at higher frequencies (active feedback). Is this true, or is there a better way to do this, and if so, what would it be?

I would appreciate any help on the subject. Thank you.

Edit: Schematic of what I'm trying to achieve:

• Comments are not for extended discussion; this conversation has been moved to chat. Commented Sep 6, 2020 at 14:54

Putting aside eccentricities of LM318, I see these issues:

• time constant of R37/C16 is 1 microsecond, thus 3dB of 160KHz. This does not allow good gain (flat gain) to 500KHz.

• imbalanced resistor ratios from the 22 ohms of the Bridge sensor to the opamp Vin- and Vin+

• ---- R31/R37 has ratio of 22/18,000 or gain of about 800X

• ---- R33/34/36 has ratio of 22+1000/18,000 or gain of about 18X

• having a fast opamp try to drive a 22 uF capacitor; you'll have an oscillator.

• No bypassing for the two LM318 Power Rails

• The surge currents needed to (attempt to) charge the 22uF will upset (cause sag) in the +VDD, and that will impact the first LM318; this is a feedback loop that will also cause oscillation. Design a VDD_tree; 22uF on each +VDD pin of the two opamps, with 10 ohms from VDD pins to the global VDD. This 22 * 10 = 220 uS timeconstant will help prevent VDD_based oscillation. You may need 100uF on the global +5v (because of the high current needed to charge_the_22uF_CLoad)

• Thank you. Indeed the resistor on Vin- is missing. There is bypassing from VDD+ to VDD-, maybe I should move it closer to the opamps in the schematic. I will tinker with the time constant and the surge currents as well as the comment above (56 pF cap across R36) and report. Commented Sep 6, 2020 at 14:52
• Your suggestion about R37/C16 seems to mitigate my issue. I was able to reduce C16 to 5p and am getting quite an acceptable response from the circuit now. Under that, it starts oscillating. Commented Sep 7, 2020 at 6:11