# Calculating resistance given capacitance and charge over time

Given the seconds $t$ it takes a capacitor (with farads $C$) to discharge from 5 volts ($V_0$) to 0 volts ($V_t$), how do you calculate the effective ohms of resistance R in a circuit?

Based on the standard capacitor voltage discharge formula $V_t = V_0(1-e^{-t/RC})$, would the resistance formula be $R = \dfrac{-t}{C \cdot log(1-V_t/V_0)}$?

• If you just have a resistor in parallel with a capacitor with no other connections, the time to discharge the capacitor to 0 is infinite. You need to either set some non-zero voltage level when you will measure the time. Or set some fixed time delay when you will measure the voltage. Jan 28, 2013 at 17:20
• The resistor and capacitor are in series. Jan 28, 2013 at 17:36
• In that case, what is the other end of the resistor connected to? What is the other end of the capacitor connected to? Can you provide a schematic? Jan 28, 2013 at 17:45
• @ThePhoton, The schematic is essentially what's shown here. I'm attempting to measure the effective resistance between two probes. Jan 28, 2013 at 18:06
• When discharging the capacitor, that is a parallel circuit. The R and C are connected together at the "top" end as shown in the schematic. They are also effectively connected together at the ground node (because the uC output pin is set to "low"). Since both ends of the R and C are connected together, they are in parallel, not series. Jan 28, 2013 at 18:17

The voltage of a capacitor initially at voltage $V_0$ with capacitance $C$ discharging through a resistance $R$ at time $t$ is given by

$V_t = V_0 e^{-t/(RC)}$

$V_t$ will approach $0V$ but never fully discharge, but we can still solve for $R$, which will allow you to calculate the resistance by measuring the capacitor voltage some time $t$ after starting to discharge it:

$V_t / V_0 = e^{-t/(RC)}$

$\log_e(V_t/V_0) = \dfrac{-t}{RC}$

$R = \dfrac{-t}{C \cdot \log_e(V_t/V_0)}$

Which is almost what you had, except for the $(1-...)$ bit, which is for charging a capacitor.