# How Do I Calculate The discharge Time of Capacitor with a resistor as a load?

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?

simulate this circuit – Schematic created using CircuitLab

• 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. – Iron Maiden Jun 16 '18 at 2:24
• How close to 0V is acceptable 10% ? 1% – Tony Stewart EE75 Jun 16 '18 at 3:59
• $R*C = \tau$ simple as that – Voltage Spike Jun 16 '18 at 6:08
• within 10% is acceptable. – Oscar Chu Jun 16 '18 at 8:43

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.$