So I have a capacitor being charged by a solar cell which has a varying (but readable) power output. This is being fed directly into a 10 farad cap with a solar panel voltage of about \$2.8V\$. For the sake of this question let's assume the output of the panel is \$5mW\$. Also, at the time of calculation, the voltage on the cap is known.
I would like to calculate the amount of time it would take to reach a voltage on the cap from some starting voltage on the cap (as a function).
Using a bit of algebra I've figured
$$t = CR \cdot \ln(1-V_C/V_S) $$
where \$V_S\$ is the open circuit voltage of the solar cell and \$V_C\$ is the voltage on the cap. And the resistance is
$$R = P_S/({V_C}^2) $$
where \$P_S\$ is the power output of the solar panel.
but the current and voltage vary based on the power output and charge and therefore the apparent resistance also changes (well I would assume). I'm a bit rusty on my calculus and am having a hard time coming up with an equation to express this relation.
Best Answer
With the simplifying assumptions that:
then the calculation is quite simple. The energy, voltage, and capacitance of a capacitor are related by:
$$ E = \frac{1}{2}CV^2 $$
Using this, you can calculate the energy already stored in the capacitor at the initial voltage, and the final energy required at your target voltage. The difference is the total work required, and the time required to do that much work is the work divided by the power of your charger.
$$ E_0 = \frac{1}{2}C{V_0}^2 \\ E_{end} = \frac{1}{2}C{V_{end}}^2 \\ \Delta E = \frac{1}{2}C{V_{end}}^2 - \frac{1}{2}C{V_0}^2 \\ t = \frac{\frac{1}{2}C{V_{end}}^2 - \frac{1}{2}C{V_0}^2}{P} \\ t = \frac{\frac{1}{2}C ({V_{end}}^2 - {V_0}^2)}{P} $$
Given
then:
$$ t = \frac{\frac{1}{2}1F ((5V)^2 - (1V)^2)}{5mW} $$
$$ t = \frac{\frac{1}{2}1F (25 - 1)V^2}{5mW} $$
\$F=J/V^2\$ and \$W=J/s\$ by definition of the farad and watt so:
$$ \require{cancel} \begin{align} t &= \frac{\frac{1}{2}1\cancel{J}/\cancel{V^2} (25 - 1) \cancel{V^2}}{0.005\cancel{J}/s} \\ &= \frac{\frac{1}{2}1 (24)}{0.005/s} \\ &= \frac{12s}{0.005} \\ &= 2400s \end{align} $$