design_compute_component_value
Compute manufacturable component values snapped to IEC 60063 E-series, applying standard sizing equations and reporting achieved results with error for electronic design.
Instructions
Compute a manufacturable component value, snapped to an E-series.
Use this instead of doing the arithmetic by hand: it applies the
standard sizing equation, snaps to the nearest IEC 60063 preferred
value, and reports the ACHIEVED result plus the error so you can see
if the snap is good enough or a tighter series is needed.
Args:
kind: Which calculation:
- "nearest": snap value to the nearest preferred value.
- "feedback_divider": regulator FB divider
v_out = v_ref*(1+Rtop/Rbot); needs v_out, v_ref;
optional r_bottom_ohms to fix the low side.
- "resistor_divider": unloaded divider
v_out = v_in*Rb/(Rt+Rb); needs v_in, v_out.
- "led_resistor": series resistor; needs v_supply,
v_forward, i_led_ma.
- "rc_lowpass": first-order RC; needs f_cutoff_hz and
exactly one of r_ohms / c_farads.
- "crystal_load_caps": symmetric crystal load caps; needs
c_load_pf (datasheet CL), optional c_stray_pf (default
5 pF per leg).
- "i2c_pullup": bus pull-up window (NXP UM10204); needs
v_bus, c_bus_pf, t_rise_ns (1000 standard / 300
fast / 120 fast-plus).
- "divider_tolerance": worst-case output window of an
unloaded divider; needs v_in, r_top_ohms,
r_bottom_ohms, optional tol_pct (default 1).
- "opamp_gain": Rf/Rin (or Rg) for a gain stage; needs
gain and config (inverting / non_inverting).
- "buck_inductor": buck inductor; needs v_in, v_out,
i_out_a, f_sw_khz, optional ripple_pct (default 30).
- "capacitor_energy": stored energy; needs c_farads,
voltage.
- "holdup_cap": bulk hold-up capacitance; needs i_load_a,
t_s (hold-up time), v_drop (allowed sag).
- "discharge_resistor": bleeder; needs c_farads,
v_initial, v_final, t_s (discharge time).
- "junction_temp": Tj = Ta + P*theta_JA; needs power_w,
theta_ja, optional t_ambient (default 25).
- "max_power": thermal derating; needs tj_max,
theta_ja, optional t_ambient.
- "required_theta_ja": package/heatsink sizing; needs
power_w, tj_max, optional t_ambient.
series: E-series name (E6/E12/E24/E48/E96). Default E96 for
dividers/precision, pass E24 for jellybean R/C.
Returns:
{"ok": True, ...fields..., "summary": "..."} or
{"ok": False, "error": "..."}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| t_s | No | ||
| gain | No | ||
| kind | Yes | ||
| v_in | No | ||
| v_bus | No | ||
| v_out | No | ||
| v_ref | No | ||
| value | No | ||
| config | No | inverting | |
| r_ohms | No | ||
| series | No | E96 | |
| tj_max | No | ||
| v_drop | No | ||
| i_out_a | No | ||
| power_w | No | ||
| tol_pct | No | ||
| v_final | No | ||
| voltage | No | ||
| c_bus_pf | No | ||
| c_farads | No | ||
| f_sw_khz | No | ||
| i_led_ma | No | ||
| i_load_a | No | ||
| theta_ja | No | ||
| v_supply | No | ||
| c_load_pf | No | ||
| t_ambient | No | ||
| t_rise_ns | No | ||
| v_forward | No | ||
| v_initial | No | ||
| c_stray_pf | No | ||
| r_top_ohms | No | ||
| ripple_pct | No | ||
| f_cutoff_hz | No | ||
| r_bottom_ohms | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||