Electronic – meant by “capacitors try to try to maintain voltage at a constant level”

capacitor

I'm trying to self learn electronics and to that end have been studying capacitors and I came across the following

A capacitor’s ability to store energy as a function of voltage
(potential difference between the two leads) results in a tendency to
try to maintain voltage at a constant level. In other words,
capacitors tend to resist changes in voltage drop. When voltage across
a capacitor is increased or decreased, the capacitor ”resists” the
change by drawing current from or supplying current to the source of
the voltage change, in opposition to the change

I can't understand the wording here, so if anyone can answer the following questions I'll be really grateful.

  1. Does this resisting to the voltage happen while charging or only
    after capacitor been fully charged?
  2. What exactly happens if the voltage drops in the source
  3. What exactly happens if the voltage increased in the source.

EDIT
Let me see if i got this correct.
Lets say a capacitor is connected to a 5v source in series where the capacitor and the voltage source are ideal

  1. the capacitor starts charging up and the voltage across it increases
  2. the current through the capacitor increases as the voltage across it
    increases
  3. when voltage across the capacitor reaches 5v the current stop
    flowing through the capacitor
  4. if the voltage of the source drops to 4V, then capacitor will
    discharge some current opposite the current flow from the source
  5. this will reduce the net current flowing through the capacitor and
    thus reducing the voltage across it to 4V.
  6. after the voltage across the capacitor reaches 4v current again will
    stop flowing through the capacitor
  7. now if the voltage of the source increases to 7V the capacitor will
    start to charge again and current flowing through the circuit will
    increase.
  8. when the voltage across the capacitor reached 7V then current will
    again stop flowing

    is my understanding correct? if so does that mean that a ideal capacitor can charge it self upto infinity or is there a max limit

Best Answer

capacitors are kind of like rechargable batteries. if you increase the voltage feeding them they charge up some, they absorb some of the difference between their voltage and the voltage source, if the voltage source drops they give some back to the circuit, esp if the voltage source goes away all together.

it goes like C dv/dt using calculus the capacitance times the change in voltage over time. doesnt matter if that change in voltage is from 10 to 100 or 3 to 7 or 27 to 13 volts.

When the source has a step change, the capacitor does not instantly step, that is what C dv/dt tells you, there is some period of time for that capacitor and that step change for the capacitor to store up (or release) enough charge to match the source, if it can. if your step changes are far enough apart then you can forget about step changes before, but if you change it fast enough it may not have caught up before it has to change again a fast enough square wave on the source and the capacitor makes it look like a sawtooth or like sharks fins...

the "resistance" is this capacitance times the change in voltage over time. be it an increase or decrease.