Join Barron Stone for an in-depth discussion in this video Detect the signal peak, part of Electronics Foundations: Semiconductor Devices.
- [Instructor] A peak detector is a circuit that measures the peak amplitude of a signal to determine the highest voltage that a signal reaches. One common use for peak detectors is in audio processing systems. Since the volume of an audio signal will vary depending on it's voltage levels, by monitoring the audio signal with a peak detector to determine it's maximum value, a sound system can appropriately scale it's output. I can build a simple peak detector circuit by connecting a diode in series with a capacitor.
When a positive input voltage is applied to this circuit, current will pass forward through the diode and charge the capacitor up to that value. If the input voltage is then reduced, that charge stored in the capacitor doesn't have anywhere to go, since current can't pass backwards through the diode. If the input voltage is then reduced, that charge stored in the capacitor doesn't have anywhere to go since current can't pass backwards through the diode. So, the capacitor remains charged and holds that higher voltage from before.
So, the output voltage across the capacitor will correspond to the maximum input voltage that the circuit has seen. This is a bit of a simplification. The output voltage won't be exactly the same as the peak input voltage because the circuit will lose about point six volts to the forward voltage drop across that diode. So, to determine the actual peak input voltage, I'll need to account for that lost voltage from the diode by adding it back to the value I measured at the output.
To demonstrate that, I've built a simple peak detector circuit on my breadboard using a one in four one four eight diode and a 100 microfarad capacitor. I'm using an adjustable DC power supply to provide the input voltage for the circuit. And, I'm measuring that with channel one of my oscilloscope. Channel two is measuring the output voltage across the capacitor. When I turn the input voltage, shown in yellow, up to two volts, I see that the output voltage in blue rises to around one point four volts, as I expected due to that forward voltage drop of the diode.
Now, if I lower my input voltage back down to one volt, I see that the output voltage remains at that peak value. The components in that circuit are not perfect, so over time, it will leak a small amount of current, and the output voltage will slowly drift down toward zero. And so, because of that, I don't want to wait too long before measuring the output of the peak detector, or else, I'll get a slightly lower value. I'm not going to wait for that now, so I'll crank the voltage back up to three volts, which is higher than the previous maximum voltage.
And when I drop that signal back down again, the output voltage remains near two point four volts, which corresponds to the higher three volt peak input voltage. Now, what if I want the peak detector circuit to reset it's output back down to zero after a specific amount of time? Maybe I only care about the peak value that occurred within the past five seconds. To accomplish that, I can insert a resistor in parallel with the capacitor to provide an escape route for the capacitor's stored charge.
When the input voltage drops below the peak, current will flow through the resistor to more quickly discharge the capacitor. The amount of time it takes to discharge will depend on the resistor and capacitor values. To determine which component values I need, I often use the rule of thumb that the amount of time in seconds that it takes for a charged capacitor to discharge through a resistor, is roughly five times the resistance times the capacitance values.
Let's say I want my peak detector to reset itself within about five seconds after seeing a peak. Since I'm only using a 100 microfarad capacitor, I'll rearrange that equation to solve for the necessary resistor value to achieve my desired discharge time. Five seconds divided by five times 100 microfarads gives me a resistor value of 10 kilohms. This is the same peak detector circuit I demonstrated before, but now I've added a 10 kilohm resistor in parallel with the capacitor.
If I create a short spike on the input voltage, by quickly raising it and then dropping it back down, I can see that the output voltage in blue quickly rises up to the corresponding peak and then slowly decays as the capacitor discharges through the resistor.
- Semiconductor materials
- Diode applications
- Rectifying a signal
- Detecting the signal peak
- Protecting against large signals, reverse current, and flyback voltage
- Special purpose zener diodes, Schottky diodes, and photodiodes
- NPN and PNP bipolar junction transistors
- Using a BJT as a switch
- Field effect transistors
- Differences between BJTs and MOSFETs
- Operational amplifiers
- Op-amp applications
- Comparing signals
- Buffering signals
- Amplifying signals
- Filtering signals
- Combining signals