Can anybody explain me the capacitor charge/discharge equation derivation in detail...
I do not know how much detail you want, but I can try.
I am not drawing a diagram and you need to have a diagram to get most out of this description...
1. Consider a power supply (battery) of const voltage V and zero internal resistance; it can supply infinite current.
2. We have resistor of resistance R connected in series with a capacitor of capacitance C. The positive end of the battery is connected to the resistor via a switch and the free end of the capacitor is connected to the negative end of the battery.
3. Set up initial conditions: at time t=0, the capacitor has no potential across it and the switch is closed.
4. Now consider the case at time t; the current is i(t) and the voltage is v(t). The total voltage across the circuit is V=i(t).R + v(t); v(t) is the voltage across the capacitor.
5. Capacitor formula is C=dQ/dV; or CdV=dQ; also dQ=i(t)dt; therefore CdV=i(t)dt; The voltage across the capacitor will be then integral (1/C)(i(t)dt) with limit from 0 to t. Put this in the previous equation.
6. Hence is final equation is V= V(t) + (1/RC)(dV(t)/dt)
7. This equation is a simple differential equation and can be solved easily.