Electronic – Peak detector and LM324 not working

signal processing

Trying to make second circuit.

enter image description here

Here is my outputs
enter image description here
(source: cs608722.vk.me)

In1+ connected to ground, OUT1 blue and after diode red

In1+ signal red and Out2 blue
enter image description here
(source: cs608722.vk.me)

Why cap charges if there is no signal.. Capacitor is 0.1uF
Plot's data is from Arduino, 5V-1023 0V-0
LM324 supply from arduino +5V and 0V

Best Answer

The capacitor charges because the LM324 inputs have a small current flowing out of the, called the bias current. All op-amps have some bias current, but the LM 324 has more than most.

It's typically about 20nA, so a 100nF cap will charge about +0.2V/second.