C228 of 30
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

C2 · Lesson 28 · Project

Keep a circuit alive through a power cut, and choose the capacitor

A smart meter, a data logger or a car's dashcam has to finish writing its data when the power disappears. A supercapacitor, charged while power is on, can keep it running for the seconds that takes. Sizing one is a real design problem: the electronics behind it draw constant power, so the current rises as the voltage falls; the capacitor's own resistance drops voltage and wastes energy; and below a certain voltage the converter quits or the whole supply collapses. In this project you'll simulate the discharge in Python, see what the resistance costs, and choose the smallest capacitor that meets a hold-up specification.

  • A supercapacitor charged to V1 feeds a converter drawing constant power P. The solid curve is the capacitor's internal voltage, ignoring losses; the dashed one is the voltage at its terminals, lower by the drop across its ESR.
  • The ESR drop grows as the voltage falls and the current rises. Make the ESR large and watch the terminal voltage fall away early.
  • The readouts give the ideal hold-up time to V2 and the voltage below which the supply can't deliver P at all.

Predict

A converter draws a constant 2 W from a supercapacitor with 0.5 Ω of ESR. Below what capacitor voltage can it no longer get 2 W, however much current it draws?

Name it

The model

A capacitor C at internal voltage Vc, with series resistance ESR, feeds a load drawing constant power P at its terminals, where the voltage is Vt=Vc−I⋅ESR. The load needs VtI=P, a quadratic in I:

I=Vc−Vc2−4P⋅ESR2⋅ESR

which has a real solution only while Vc≥2P⋅ESR. The capacitor discharges at dVcdt=−IC. With ESR = 0 this integrates to the hold-up time of lesson 11, C(V12−V22)2P; with ESR it doesn't integrate neatly, so step it in time (lesson 25).

The specification

The load stops when either the terminal voltage falls below the converter's minimum input V2, or the quadratic has no solution (collapse). The design is the smallest capacitor that holds up for the required time, and capacitors with more capacitance usually have less ESR, so both change at once.

Charging

The backup capacitor has to be charged, usually at a limited current Ic so it doesn't overload the main supply: from empty, t=CVIc. Supercapacitors also need a voltage limit, typically 2.7 V per cell, so 5 V parts are two cells in series with balancing.

Worked example

A 1 F supercapacitor at 5 V backs up a 2 W load that works down to 3 V. How long does it last, ideally and with 0.5 Ω of ESR?

Show the solution
  1. Ideal backup time. t=1×(25−9)2×2s=4.0s
  2. With 0.5 Ω of ESR. Stepping the model with 0.5 Ω gives 3.26 s.
  3. Where the time goes. The ESR wastes energy as heat and, worse, drops the terminal voltage below the capacitor's own.
  4. The cutoff. When the terminal voltage reaches 3 V, the load draws I=2W3V=0.67A which drops 0.33 V in the ESR, so the capacitor itself is still at 3.33 V.

Answer ideally 4.0 s; with 0.5 Ω of ESR, 3.26 s.

Worked example

How long does a 1 A charger take to bring that 1 F capacitor from empty to 5 V?

Show the solution
  1. Charge needed. Q=CV=1F×5V=5C
  2. Time at 1 A. t=QI=5C1A=5s

Answer the charger takes 5 s.

Check

A 1 F capacitor at 5 V feeds a lossless 3 W load that works down to 3.3 V. How long does it hold up?

Write units the way you normally would: 1.5 s and 1500 ms are the same answer.

Check

A 1 W load runs from a capacitor with 0.1 Ω of ESR. Below what capacitor voltage can it no longer be supplied?

Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.

Check

A capacitor at 4 V with 0.6 Ω of ESR feeds a 2 W load. What current flows?

Write units the way you normally would: 1.5 A, 1500 mA and 0.0015 kA are the same answer.

Check

A capacitor at 4 V with 0.6 Ω of ESR feeds a 2 W load. What voltage reaches the load?

Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.

Check

A 2 A charger fills an empty 1 F capacitor to 2.7 V. How long does it take?

Write units the way you normally would: 1.5 s and 1500 ms are the same answer.

Check

How much energy does a 1 F capacitor hold at 2.7 V?

Write units the way you normally would: 1.5 J, 1500 mJ and 0.0015 kJ are the same answer.

Check

Write load_current(vc, P, esr): the current a constant-power load P draws from a capacitor at internal voltage vc with series resistance esr, or None if it can't be supplied. Handle esr == 0.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Write holdup(C, V1, V2, P, esr=0.0, dt=1e-3): step the capacitor's voltage from V1 in steps of dt seconds, and return the time at which the terminal voltage would first fall below V2 or the load can no longer be supplied. Use load_current.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Write choose(caps, V1, V2, P, T): caps is a list of (C, esr) pairs. Return the smallest C whose hold-up (your holdup) is at least T seconds, or None.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Explain why

Why does a supercapacitor with high ESR give less hold-up time than its stored energy suggests?

Practice

Keep practicing

9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.