I am trying to create a peak detect with an opamp and am having some issues (I am more of a digital guy). The voltage I expect is somewhere in the 0V-3.3V range. I am using a Microchip MCP6021 (datasheet) as my opamp and the pulse of interest is going through a 10k resistor to V+. The output goes through a 1N914 diode then then can either 1) go through a 10k to V-, or go through a 0.1uF cap to ground. The opamp is running off of a 3.3V supply.
If I monitor the voltage after the diode, it seems like it just locks in on the max voltage in this case, and I cannot reset it. I put a momentary pushbutton across the cap to ground to try to clear it out, but it only works when I am pushing the button in, when I let go the voltage bounces back up.
I also put a 5Mohm cap across the cap to ground to bleed off the cap (an RC of 0.5s), but that doesn't seem to have an effect.
What simple thing about opamps am I missing here?
If I monitor the voltage after the diode, it seems like it just locks in on the max voltage in this case, and I cannot reset it. I put a momentary pushbutton across the cap to ground to try to clear it out, but it only works when I am pushing the button in, when I let go the voltage bounces back up.
I also put a 5Mohm cap across the cap to ground to bleed off the cap (an RC of 0.5s), but that doesn't seem to have an effect.
What simple thing about opamps am I missing here?