0
\$\begingroup\$

I was trying to make an ADC with an RC circuit. I was using an ATMEGA328P to measure the time the capacitor needed to discharge to 0V. I created the circuit with a sample and hold opamp, a precision 1uF Cap, and a 10K precision Resistor.
I was trying to find out the formula to calculate the capacitor original charged voltage with the time constant I get from my microcontroller and my known resistor and capacitor value. Is there any way/formula to calculate it?

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • 1
    \$\begingroup\$ Have you never searched for the so popular capacitor discharging formula on internet? It will lead you to V(t)=Vo* e^(-t/RC), where Vo is the initial voltage across the cap. \$\endgroup\$ – Flávio Alegretti Jun 16 '18 at 2:24
  • \$\begingroup\$ How close to 0V is acceptable 10% ? 1% \$\endgroup\$ – Sunnyskyguy EE75 Jun 16 '18 at 3:59
  • \$\begingroup\$ \$ R*C = \tau \$ simple as that \$\endgroup\$ – Voltage Spike Jun 16 '18 at 6:08
  • \$\begingroup\$ within 10% is acceptable. \$\endgroup\$ – Oscar Chu Jun 16 '18 at 8:43
2
\$\begingroup\$

If the capacitor is charged to voltage \$V_0\$ it will take

\$R C\$ (R in ohms, C in farads) seconds to discharge to \$V_0\over e\$ \$\approx 0.368 V_0. \$

It (in theory) will never get to 0V.

If you are timing it, you will get diminishing returns by triggering on much less than about that number as the curve flattens so your reading will be more sensitive to noise.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.