Electronics calculators
LED resistor, voltage divider, RC and LC, filters, op-amp gain, 555 timer, transistor and MOSFET drive, regulators, buck inductor, E-series finder and SMD resistor codes, with the formulas shown.
Type values with engineering prefixes: 4.7k, 4k7, 100n, 10u (or µ), 2M2. Lower-case m is milli, capital M is mega. Units are written in each label; everything is in base units unless stated. Nothing leaves this page.
LED series resistor
R = (Vs − Vf) / If. The "safe" value is the next standard value at or above R, so the current is never higher than you asked for. Forward voltage Vf is typical per colour (red about 2 V, blue/white about 3 V); read it from the datasheet. Power rating shown is twice the dissipation, rounded up to a common size.
Voltage divider
Output of a given divider (with optional load)
Choose the resistors for a wanted output
Vout = Vin · R2 / (R1 + R2). A load RL in parallel with R2 lowers the output; keep RL at least 10 times R2 (or design with the load entered, as in the second block). A divider is a signal tool, not a power supply: it wastes current and its output sags with load.
RC time constant and charge / discharge
τ = R·C. Charging from 0: v(t) = Vs·(1 − e−t/τ); discharging: v(t) = V0·e−t/τ. After 1τ a charging capacitor is at 63.2%, after 5τ at 99.3%.
RC and RL filter cutoff
First-order filter: fc = 1/(2π·R·C) for RC and fc = R/(2π·L) for RL. At fc the gain is 0.707 (−3.01 dB) and the phase is 45°. A low-pass passes frequencies below fc; a high-pass passes those above. Source and load impedances shift the real cutoff.
LC resonance
f0 = 1/(2π√(LC)); characteristic impedance Z0 = √(L/C). Real inductors and capacitors have parasitics and tolerance, so tune by measurement.
Op-amp gain
Gain from resistors
Resistors for a wanted gain (nearest standard values)
Inverting: G = −Rf/Rin. Non-inverting: G = 1 + Rf/Rg. Difference amplifier with matched resistors (R1 = R2, Rf = R3): G = Rf/R1. Remember the gain-bandwidth limit and that the output cannot go beyond the supply rails.
555 timer
Astable (free-running): frequency and duty
Astable design from a frequency
Monostable (one-shot)
Standard bipolar 555 formulas. Astable: f = 1/(ln 2·(R1 + 2·R2)·C) ≈ 1.44/((R1 + 2·R2)·C), high time = ln 2·(R1 + R2)·C, low time = ln 2·R2·C, duty = (R1 + R2)/(R1 + 2·R2), so the duty can never go below 50% with the basic circuit. Monostable: t = 1.1·R·C. CMOS versions (e.g. 7555) follow the same formulas; use R between about 1 kΩ and 1 MΩ.
Capacitor energy and charge, and reactance
Reactance (decoupling and bypass)
E = ½·C·V², Q = C·V, Xc = 1/(2π·f·C), XL = 2π·f·L. A real capacitor also has ESR and ESL, so above its self-resonant frequency it behaves like an inductor. Large charged capacitors can hold a painful or damaging charge: discharge them through a resistor.
Transistor base resistor (saturated BJT switch)
Forced beta: the base gets Ic/10 (rule of thumb, editable) so the transistor is hard on whatever its actual hFE. Rb = (Vdrive − Vbe)/Ib. Pick the next standard value below Rb for more drive. Vbe is about 0.7 V for small silicon transistors; for Darlingtons use about 1.4 V.
MOSFET gate drive (approximate)
Approximate. Treats the gate as a simple capacitor Ciss charged through Rg: 10-90% rise ≈ 2.2·Rg·Ciss. The real switching time is dominated by the Miller (gate-drain) charge, so use the datasheet gate charge Qg for serious work. A gate resistor of 10 Ω to 100 Ω slows the edges and calms ringing; a 10 kΩ to 100 kΩ pull-down keeps the gate off while the driver is not powered.
Battery life estimate
Average load of a duty-cycled device
Hours = capacity × usable fraction / load. Usable capacity is lower than the label at high current, low temperature, and near the cut-off voltage; 70-80% is a common planning figure. This ignores self-discharge and regulator losses.
Zener shunt regulator
Rs = (Vin − Vz)/(Iz + IL). Check the zener power with the load removed: all of the current then flows in the zener. Output is only roughly Vz (it shifts with current and temperature) and the arrangement is inefficient; for anything that matters use a regulator IC.
Linear regulator dissipation
P = (Vin − Vout)·I (plus Vin·Iq for the quiescent current). The heat is the whole difference in voltage times the current. Junction rise is P·θJA (use the datasheet value, or add a heatsink). If the result is large, use a lower input voltage or a buck converter.
Buck converter (ideal)
Inductor for a wanted ripple
Ideal continuous-conduction relations: D = Vout/Vin, ripple ΔI = (Vin − Vout)·D/(L·f), L = (Vin − Vout)·D/(f·ΔI). Real converters lose a little to switches and diodes, so the real duty is a bit higher. Choose an inductor whose saturation current exceeds the peak. A ripple of 20-40% of the output current is a common starting point.
E-series values and nearest-value finder
Values are 1.0 to 9.x per decade, multiplied by 10, 100, 1k and so on. E6 ~20%, E12 ~10%, E24 ~5%, E48 ~2%, E96 ~1% typical tolerances. "Nearest" has the smallest relative error.
SMD resistor code decoder
Standard mode: 3 digits = two digits then the number of zeros (103 = 10 kΩ, 472 = 4.7 kΩ); 4 digits = three digits then zeros (1002 = 10 kΩ); an R, K or M marks the decimal point (4R7 = 4.7 Ω, 4K7 = 4.7 kΩ), and 000 or 0 is a zero-ohm link. EIA-96 mode: two digits give a value from the E96 table (01 = 100 … 96 = 976) and the letter is the multiplier (Z 0.001, Y or R 0.01, X or S 0.1, A 1, B or H 10, C 100, D 1k, E 10k, F 100k), so 01C = 10 kΩ and 68X = 49.9 Ω. Tolerance is not in the code. If a marking does not decode, measure the part out of circuit.
Unit prefix converter
Formulas are textbook models; part tolerance, temperature and parasitics change real results, and the datasheet governs. Planning aid for low-voltage hobby electronics; the person building the circuit is responsible for its safety.
Ruggi.Site