by John Lauer
An independently designed 12 V to 5 V, 1 A synchronous buck molecule (TI TPS54202), with calculations, ngspice and PSpice simulation, KiCad 10 schematic and board, and the board laid out and analysed with adom-aiflow.
main
John Lauer
ECAS vs MLCC: a study of moving the buck to polymer capacitors, with its section card
531f515
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
#!/usr/bin/env python3
"""Charts and the comparison table for the ECAS exploration.
Run after variants.py: python3 plots.py -> ../img/*.png and ../results/summary.json
Palette: the dataviz reference categorical order on the light surface (validated: all checks pass,
contrast relief by direct labels plus the tables in the write-up).
"""
import glob, json, os
import numpy as np
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
HERE = os.path.dirname(os.path.abspath(__file__))
ROOT = os.path.join(HERE, "..")
IMG = os.path.join(ROOT, "img"); os.makedirs(IMG, exist_ok=True)
WORK = os.path.join(ROOT, "work")
SURF, INK, INK2, GRID = "#fcfcfb", "#0b0b0b", "#52514e", "#e4e3df"
S = ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4"]
plt.rcParams.update({"figure.facecolor": SURF, "axes.facecolor": SURF, "axes.edgecolor": GRID,
"axes.labelcolor": INK2, "xtick.color": INK2, "ytick.color": INK2, "text.color": INK,
"axes.grid": True, "grid.color": GRID, "grid.linewidth": 0.8, "font.size": 11,
"axes.spines.top": False, "axes.spines.right": False, "lines.linewidth": 2,
"legend.frameon": False, "axes.titlesize": 13, "axes.titleweight": "bold"})
def label_end(ax, x, y, text, color):
ax.annotate(text, (x[-1], y[-1]), xytext=(6, 0), textcoords="offset points", va="center", color=INK, fontsize=10)
ax.plot([x[-1]], [y[-1]], "o", color=color, ms=6, mec=SURF, mew=2)
# ---------------------------------------------------------------- 1. DC bias
def dc_bias():
parts = [("GRM21BR61A226ME44", "22 µF 10 V 0805 (output, as built)", 5, 22),
("GRM31CR71E106KA12", "10 µF 25 V 1206 X7R (input, as built)", 12, 10),
("GRM21BR61A476ME15", "47 µF 10 V 0805", 5, 47),
("GRM188R61E106MA73", "10 µF 25 V 0603", 12, 10),
("ECASD41E336M040KA0", "33 µF 25 V ECAS (polymer)", 12, 33)]
fig, ax = plt.subplots(figsize=(10, 5.6))
for i, (pn, lab, vop, cn) in enumerate(parts):
d = json.load(open(os.path.join(ROOT, "research", "murata", pn + ".json")))["c_dcbias_capchange"]
x = np.array(d["x"]); y = 100 + np.array(d["y"])
m = x <= 25
ax.plot(x[m], y[m], color=S[i], label=lab)
yo = float(np.interp(vop, x, y))
ax.plot([vop], [yo], "o", color=S[i], ms=9, mec=SURF, mew=2, zorder=5)
ax.annotate(f"{yo:.0f} % at {vop} V = {cn*yo/100:.1f} µF", (vop, yo), xytext=(8, -4 if i % 2 else 8),
textcoords="offset points", fontsize=9.5, color=INK)
ax.set_xlabel("DC bias across the capacitor (V)"); ax.set_ylabel("capacitance left (% of the label)")
ax.set_ylim(0, 112); ax.set_xlim(0, 26)
ax.set_title("What the label says vs what the rail sees (Murata measured curves, 25 °C)", loc="left")
ax.legend(loc="lower left", fontsize=9.5)
fig.tight_layout(); fig.savefig(os.path.join(IMG, "dc-bias.png"), dpi=130); plt.close(fig)
# ---------------------------------------------------------------- 2. hot plug
def hotplug():
cases = [("A_as_built", "as built: 47 µF aluminium can (0.3 Ω)"),
("C2_ecas_input_bare", "33 µF ECAS in the can's place (7 mΩ)"),
("C_ecas_input_damped", "33 µF ECAS + 0.22 Ω in series")]
fig, ax = plt.subplots(figsize=(10, 5))
for i, (n, lab) in enumerate(cases):
f = os.path.join(WORK, f"_hp_{n}_16V_1000.txt")
if not os.path.exists(f):
continue
d = np.loadtxt(f); t = d[:, 0] * 1e6; v = d[:, 1]
m = t <= 60
ax.plot(t[m], v[m], color=S[i], label=lab)
k = int(np.argmax(v))
ax.annotate(f"{v[k]:.1f} V", (t[k], v[k]), xytext=(6, 4), textcoords="offset points", fontsize=10, color=INK)
ax.axhline(25, color="#d03b3b", lw=1, ls="--"); ax.text(59, 25.3, "ECAS rating 25 V", ha="right", fontsize=9.5, color=INK2)
ax.axhline(30, color="#d03b3b", lw=1, ls=":"); ax.text(59, 30.3, "TPS54202 VIN abs max 30 V", ha="right", fontsize=9.5, color=INK2)
ax.set_ylim(0, 32); ax.set_xlabel("µs after the board touches a live 16 V rail (1 µH of wiring)"); ax.set_ylabel("VIN at the board (V)")
ax.set_title("Hot plug: the aluminium can's ESR is what tames the wiring's ring", loc="left")
ax.legend(loc="lower right", fontsize=9.5)
fig.tight_layout(); fig.savefig(os.path.join(IMG, "hot-plug.png"), dpi=130); plt.close(fig)
# ---------------------------------------------------------------- 3. load step
def load_step():
cases = [("A_as_built", "as built: 3 × 22 µF 0805"), ("B_ecas_swap", "150 µF ECAS"),
("F_smallest", "2 × 47 µF 0805")]
fig, ax = plt.subplots(figsize=(10, 5))
for i, (n, lab) in enumerate(cases):
f = os.path.join(WORK, f"wave_{n}.npy")
if not os.path.exists(f):
continue
t, vo, vi = np.load(f)
m = (t >= 3.9e-3) & (t <= 4.35e-3)
ax.plot((t[m] - 4e-3) * 1e6, (vo[m] - vo[(t > 3.7e-3) & (t < 4e-3)].mean()) * 1e3, color=S[i], label=lab, lw=1.6)
ax.annotate("3 × 22 µF and 2 × 47 µF lie on top of each other:\nboth are about 30 µF once biased to 5 V", (25, -80), xytext=(60, -74),
textcoords="data", fontsize=9.5, color=INK2, arrowprops=dict(arrowstyle="-", color=INK2, lw=0.8))
ax.set_xlabel("µs after the load steps 0.5 A → 1 A (1 A/µs)"); ax.set_ylabel("VOUT change (mV)")
ax.set_title("Load step at 12 V in: the output capacitor sets the dip, the loop sets the recovery", loc="left")
ax.legend(loc="lower right", fontsize=9.5)
fig.tight_layout(); fig.savefig(os.path.join(IMG, "load-step.png"), dpi=130); plt.close(fig)
AREA = {"CP_Elec_6.3x5.8": 66.7, "C_1206": 10.6, "C_0805": 6.7, "C_0603": 4.3, "R_0603": 4.3,
"CP_Tantalum_Case-D_EIA-7343-31": 42.4, "CP_Tantalum_Case-B_EIA-3528-21": 16.3} # KiCad library courtyards, mm²
def summary():
import sys; sys.path.insert(0, HERE)
from variants import VARIANTS
from parts import lib
LIB = lib()
rows = []
for f in sorted(glob.glob(os.path.join(ROOT, "results", "*.json"))):
if f.endswith("summary.json"):
continue
r = json.load(open(f))
if not isinstance(r, dict) or "variant" not in r:
continue
s = r.get("switching_12V", {})
rows.append({"variant": r["variant"], "label": r["label"], "cin_eff_uF_12V": r["cin_eff_uF_12V"],
"cout_eff_uF": r["cout_eff_uF"], "cff_pF": r["loop"]["cff_used_pF"],
"fc_kHz": r["loop"]["fc_12V_1A_kHz"], "vout_ripple_mV": s.get("vout_ripple_pp_mV_20MHz"),
"vin_ripple_mV": s.get("vin_pin_ripple_pp_mV_20MHz"), "step_mV": s.get("step_up_undershoot_mV"),
"settle_us": s.get("step_up_settle_1pct_us"), "startup_mV": s.get("startup_overshoot_mV"),
"hotplug_16V_1uH": r["hotplug_peak_V"]["16V_1uH"], "zs_peak_ohm": r["source_impedance"]["zs_peak_ohm"],
"cost": r["bom"]["cap_cost_at_100_usd"], "tallest_mm": r["bom"]["tallest_cap_mm"],
"input_cap_rms_A": s.get("input_cap_rms_A"),
"cap_area_mm2": round(sum(AREA[LIB[k if isinstance(k, str) else None]["fp"]] if isinstance(k, str) else
sum(AREA[LIB[kk]["fp"]] for kk in k)
for side in ("vin", "vout") for k in VARIANTS[r["variant"]][side]), 1)})
json.dump(rows, open(os.path.join(ROOT, "results", "summary.json"), "w"), indent=1)
for r in rows:
print({k: v for k, v in r.items() if k not in ("label", "input_cap_rms_A")})
if __name__ == "__main__":
dc_bias(); hotplug(); load_step(); summary()