Summary of HF AC Millivoltmeter Adapter using microcontroller
Summary: A compact HF peak detector circuit measures AC peak-to-peak voltage with improved linearity by using a 16× JFET preamp, a near-zero-biased Schottky voltage-doubler detector, buffering, and an adjustable gain/offset output stage. Powered by +12V/+5V regulators and a -3.5V supply from an oscillator and voltage multiplier, the design minimizes diode nonlinearity for accurate HF measurements up to 2 MHz.
Parts used in the HF AC Millivoltmeter Adapter:
- Plastic pencil box enclosure
- 0.047 µF coupling capacitor
- 10 MΩ resistor (input bleed and detector return)
- Transient protection: two back-to-back emitter-base junctions (transistors)
- 2N5485 JFET (preamp input)
- 2N3906 transistor (preamp)
- 20 kΩ feedback resistor (preamp)
- 10 kΩ source-setting resistor (preamp)
- 50 pF peaking capacitor (preamp compensation)
- Schottky diodes (D1 and D2 in half-wave voltage doubler)
- 2.2 kΩ resistors (voltage divider biasing diodes)
- Dual op-amp TL062 (buffer and output amplifier)
- Gain and offset potentiometers (output stage adjustment)
- +12 V regulator
- +5 V regulator
- 8 kHz oscillator (for negative supply generation)
- Buffer and half-wave voltage multiplier (to produce -3.5 V)
- Input connector
- Switches for near-zero and near-full scale reference switching
Encased in a pencil box to keep the point-to-point wiring on the back of the board from shorting to wires and things on the workbench, the plastic case also holds the offset and gain post as well as the input connector and the switches that switch on the near-zero and near-full scale references.
I wanted a way to measure the current in some HF power circuits and thought it would be a 5 minute task to throw together a sufficiently linear peak detector and calibrate it. I was wrong. Months later, I settled on the circuit shown here.
Circuit Overview
The blocks are (left-to right) top: 2 MHz preamp, unity gain buffer, and output amplifier with gain and offset adjustment; bottom: +12 and +5 V regulators, 8 kHz oscillator, buffer with voltage multiplier to supply -3.5V to the op-amp.
Diode detectors are good at changing AC into DC, even at high frequencies. The main problem with diode detectors have inherent nonlinearities, particularly for small signals. To minimize the effects of the nonlinearities. A preamplifier boosts the amplitude of the input signal by 16X, thereby reducing the the diode detector’s nonlinearity effects by the same factor. The detector is followed by a buffer and adjustable gain stage. This last stage compensates for DC offset that results from bias on the diode detector and reduces the full scale amplitude so that the output signal DC level is equal to the input peak-to-peak value.
Power for the circuits is provided by analog regulators, and an oscillator followed by a buffer and half wave voltage multiplier provides -3.5 volts DC as the negative supply for the dual op-amp.
Input coupling and Preamp
The input net work consists of AC coupling made of a 0.047 uf capacitor and a 10 Meg resistor and transient protection. The -3 db corner of the high pass filter is 0.34 Hz. Some degree of transient protection is obtained by two back-to-back emitter-base junctions, which work a lot like back-to-back Zeners. The main difference between these and Zeners is that the reverse biased junction capacitance is lower and the knee fairly sharp, meaning that it should have no measurable effect on a 200 kHz, 200 millivolt input signal.
The input of the preamp is the gate of the 2N5485 JFET, and since the drain drives the forward-biased base-emitter junction of the 2N3906. The signal on the JFET’s drain is very small, thus there is little miller capacitance, keeping the input capacitance low.
Negative feedback thorough the 20k resistor from the collector of the 2N3906 and the source of the 2N5485 JFET stabilizes the DC operating point of both transistors and stabilizes the gain of the stage overall. I measured the gain of the one I built at 16X.
The 10K resistor was selected for the individual 2N5485 to set the DC level on the output of the stage. On the one I built, the DC level at the output is 4.7 VDC. This resistor (10k in this schematic) may need to be changed for individual JFETs because of variation in the pinch-off voltage.
Checking with an oscilloscope, the preamp appears to flat from below 1 Hz to past 2 MHz (-3 db point). It looks like the gain is flat to within a couple of percent past 400 kHz. If either of the semiconductors are substituted the 50 pf peaking capacitor may have to be changed. To check peaking, drive the input with a square wave and adjust the capacitor for the most “square” edge you can get without visible overshoot. If you see ringing, it is most likely because of a layout problem.
P-P Detector and Voltage Follower
The AC signal from the preamp is connected to a half-wave voltage doubler employing Schottky diodes. The doubler is just slightly forward biased to make it more linearl particularly for small singals, by the voltage divider made of 2.2k resistors and the 10 Meg resistor. The voltage divider makes 2.5 volts on the anode of D1 and the 10 Meg resistor provides a current return to ground from the cathode of D2. Since the 10 Meg resistor is so large, the current through the diodes is very small, meaning that the forward voltage of D1 and D2 is also very small.
The current is about 250 nanoamps. From this we would normally subtract the input bias current of the of-amp, but since at room temperature the input bias current of a TL062 is a couple hundred nanoamps, it can be neglected. It should be pointed out that with the very large load of 10 Meg Ohms and a large bias voltag source (2.5V), the current through the diode will not change significantly with signal levels of a couple hundred millivolts, and I think this contributes to the excellent linearity.
The bias improves the linearity of the detector a lot. Above is a plot of output signal error, with the circuit output normalized to the input, as a function of the expected input signal amplitude for both an unbiased detector and the nearly zero biased detector used in this circuit. The signal path includes the entire circuit from preamp through gain control. The “expected input signal amplitude is the P-P voltage calculated to be at each tap on a voltage divider as show in the section below under Calibration, based on the marked values of the resistors used and the amplitude of the square wave used to drive the divider. The signal was measured at the DC output of the circuit and the gain and offset adjusted using a spreadsheet with the points near 2 millivolts and 200 millivolts adjusted for accuracy by using the offset and gain adjustments, respectively.
For more detail: HF AC Millivoltmeter Adapter using microcontroller
- Why use a preamplifier before the diode detector?
The 16X preamplifier boosts input amplitude, reducing diode detector nonlinearities and improving linearity. - What provides the negative supply for the op amp?
An 8 kHz oscillator with a buffer and half-wave voltage multiplier supplies about -3.5 volts DC. - How is input AC coupling implemented?
Input coupling uses a 0.047 µF capacitor and a 10 MΩ resistor, creating a -3 dB high-pass corner at 0.34 Hz. - How is transient protection achieved at the input?
Two back-to-back emitter-base junctions are used as transient protection similar to back-to-back Zeners but with lower capacitance. - How are the Schottky diodes biased for linearity?
A voltage divider of 2.2 kΩ resistors and the 10 MΩ resistor sets about 2.5 V on the diode anode, providing slight forward bias and very small diode current for improved linearity. - What op amp is used for the buffer and output amplifier?
The TL062 dual op amp is used for the buffer and adjustable gain/offset output stage. - How is DC operating point and gain stabilized in the preamp?
Negative feedback through a 20 kΩ resistor from the 2N3906 collector to the 2N5485 source stabilizes DC operating points and overall gain. - What frequency range does the preamp cover?
Measured response is flat from below 1 Hz to beyond 2 MHz, with gain flat to within a few percent past 400 kHz. - Why might the 10 kΩ resistor need changing?
The 10 kΩ resistor sets the DC output level for individual 2N5485 JFETs and may need adjustment due to pinch-off voltage variation. - How is peaking adjusted in the preamp?
Drive the input with a square wave and adjust the 50 pF peaking capacitor for the squarest edge without overshoot; ringing likely indicates layout issues.


