Why would you stack a resistor and capacitor on top of each other?

Forget the 40kHz- this kind circuit really likes to oscillate at very high frequency- the feedback resistor is almost open (1M) at high frequencies in comparison to a few pF and the amplifier has a gain-bandwidth product of 1.75GHz. It's similar to a photodiode transimpedance amplifier in that respect. More importantly, you are measuring inputs with very high frequency content.

Seems to me that he wants to minimize as well as control the value of the stray capacitance on the inverting input and across the 4pF cap. At high frequencies (as implied by the 4ns pulses and the amplifier roll-off) this is basically a capacitive circuit- output voltage is input current integrated over time divided by ~4pF. The 4pF feedback (integrating) capacitor (and the amplifier input capacitance) are not greatly larger than stray capacitance from traces and pads. Even the resistor itself adds maybe 1% to the capacitance (assuming 0603).

Of course this kind of thing sometimes shows up as a 'field enhancement' (for example an amplifier oscillates so a cap is stuck on top of the feedback resistors) but it was clearly intentional in this case.


As @IgnacioVazquez-Abrams said, this is a common method for reducing stray inductance which could lead to unwanted oscillations. I have actually seen this method used quite often, especially in circuits more sensitive to excess inductance and oscillations. Simply put, it improves the performance of the filter.

In slower circuits where stray inductance may not be as much of a problem, this method could still be used for saving space on the PCB in high-density designs.

It's certainly not ideal for production as I doubt pick & place machines are really designed to do this. I imagine this would have to be done by hand, which would increase the time requirements and cost.

While it is not the case in your particular example, this method can also be used to trim resistance/capacitance values. If the resistance is a bit too high, one might put another resistor on top of it to reduce the equivalent resistance. Similarly, putting a capacitor on top of another capacitor will increase the capacitance.