In the Improved rectifier post, I gave the following circuit for an inverting rectifier and showed traces of its performance using diode-connected S9018 NPN transistors as diodes:
With a constant amplitude triangle wave input (about 2.6v peak-to-peak), the circuit had some pretty serious glitches:
|frequency||positive glitch||negative glitch|
I claimed that I could reduce the glitches by replacing the NPN transistors with 1N5817 Schottky diodes. The diodes arrived today, and I tried them out with the same 10kΩ resistors and 30kHz triangle wave as before:
I noticed that there was a bit of phase shift for the 30kHz signal, as well as the small overshoot. I tried adding capacitors in parallel with the resistors to improve the performance at 30 kHz (both to correct the phase shift and to keep the gain at -1).
C2 seems to adjust the overshoot, and C1 then needs to be set to fix the phase and gain. I had the best results at 30kHz with C1=330pF and C2=220pF:
Unfortunately, there is no easy way in the BitScope software to set the offset of the traces precisely. You can do a lot of range changing and clicking the left or right sides of buttons (and start all over if you accidentally hit the middle of the button), but the offset is only displayed to 2 decimal points, but can be adjusted somewhat finer, making it hard to guess exactly what it is set to. As result, I’ve not been able to measure the overshoot or undershoot when it is less than 10mV—I’m never sure exactly what I’m measuring with respect to, and visually similar settings result in ±10mV in the estimate. In any event, the errors in this version of the improved rectifier are at least 5× better than in the version with the S9018 diode-connected transistors.
The circuit works well throughout the audio range, and can be pushed to 100kHz, though the “corners” have gotten soft enough that clipping to the threshold voltage is no longer very precise at (about 60mV off @ 80kHz—undershoot, not overshoot). At 100kHz, the output signal is still pretty good, but there is about an 85mV error in the threshold, and the corners are so rounded that the output almost looks like a sine wave:
I can get better performance at 100kHz with smaller capacitors (100pF and 220pF, instead of 220pF and 330pF), but at the cost of some overshoot at 20kHz and 30kHz. I suspect that the right values for the capacitors depend heavily on what op amp is used (especially its slew rate), but since I only have MCP6002 (and the equivalent MCP6004) op amps, I’ve not tested this suspicion.