Skip to content
Electronics Engineering

electronics-engineering-ai999x

Semiconductors and pn junctions, diode circuits and rectifiers, BJT and MOSFET biasing and amplifiers, op-amp circuits, active filters, oscillators and 555 timers, ADCs and DACs, digital timing and power supplies.

92capabilities
11topics
92formulas typeset
4ways to run: desktop app, command line, browser, Python
1.0.0version
What it does

What Electronics Engineering does

Electronics Engineering (electronics-engineering-ai999x) is an offline Python package for electronics engineering. It covers semiconductors and pn junctions, diode circuits and rectifiers, BJT and MOSFET biasing and amplifiers, op-amp circuits, active filters, oscillators and 555 timers, ADCs and DACs, digital timing and power supplies.

It has 92 capabilities — 92 computational procedures — in 11 topics, the largest being BJT, Op-amps, Active filters, Data converters, Oscillators and Semiconductors. Ask a question in words with ask(), or call a capability by name with typed inputs with solve(). Every answer carries its value and unit, the steps that produced it and the formula in LaTeX.

When a question is not determined — a value is missing, an input is out of range, or the request is outside the package — it says so and names what it needs, instead of guessing. It runs on an ordinary CPU without a network connection (Python >=3.10), and the same question always gets the same answer.

What it covers

Active filters9Butterworth filter: Q of each second-order section · Butterworth or Chebyshev low-pass filter order · Chebyshev type I filter: section Q and frequencies …BJT16BJT beta cutoff and transition frequency fT · BJT cascode: output resistance, transconductance and gain · BJT collector-feedback bias: Q-point …CMOS2CMOS gate propagation delay (switch-resistor model) · CMOS inverter switching threshold VMData converters9ADC output code, LSB and quantisation error · ADC quantisation SNR with oversampling · Binary-weighted resistor DAC …Diodes8Capacitor-input filter: ripple voltage and DC output · Diode current from the Shockley equation · Diode voltage for a given current …MOSFET6Common-source amplifier with source degeneration and ro · MOSFET drain current (cutoff, triode, saturation) · MOSFET small-signal gm, ro and intrinsic gain …Op-amps14Closed-loop bandwidth from the gain-bandwidth product · Inverting amplifier with finite open-loop gain · Inverting op-amp amplifier …Oscillators9555 timer astable: frequency and duty cycle · 555 timer monostable pulse width · Colpitts oscillator frequency and feedback ratio …Power supplies5Adjustable three-terminal regulator output voltage · Heat-sink thermal path: junction, case and sink temperatures · Linear regulator dissipation and efficiency …Semiconductors9Built-in potential of a pn junction · Conductivity and resistivity of a semiconductor · Depletion width, field and capacitance of an abrupt pn junction …Timing5CMOS dynamic (switching) power · Elmore delay of an RC ladder (interconnect) · Flip-flop setup and hold slack, maximum clock frequency …
Get it

Use Electronics Engineering your way

Use it right here in your browser now: the compiled program runs on your own device, with nothing sent anywhere. The AI999X desktop app for Windows and Linux and the command-line program electronics-engineering follow in their next releases.

Desktop app

One app with every AI999X model: search, ask in words, input forms, live figures and explanations. Electronics Engineering joins it in its next release; until then, compute with it in your browser.

The desktop app today · Compute in your browser

Command line

One program per model, for terminals and scripts. This model's program, electronics-engineering, joins the command-line bundle in its next release.

What it answers, command by command

Python

The Python package, for notebooks and your own programs (Python 3.10 or newer).

pip install electronics-engineering-ai999x

Examples · Python guide

From here to first answer

The browser works now; the downloads follow with the next release.

  1. Type a question in words in the calculator below, or choose a capability (or open any capability further down).
  2. Its inputs come filled in with a worked example: change any of them, in any unit of the right kind.
  3. Press Compute: the answer, what it means and its figures, computed on your device.

Open the calculator

In your browser

Compute something now

Ask a question in words, or choose a capability and open its calculator: the inputs come filled in with a worked example; change any of them (any unit of the right kind) and press Compute. It runs on your device; nothing is sent anywhere.

The same capabilities as the desktop app and the command line, as WebAssembly in this page. Every capability below also has its own Compute in your browser button.

Worked examples

One example, every way to run it

Each worked example with its answer, then the same question on the command line, from Python and in your browser. A command-line output is exactly what the program printed for that command.

BJT

BJT voltage-divider bias: VCC = 12 V, R1 = 47 kohm, R2 = 10 kohm, RC = 2.2 kohm, RE = 470 ohm, beta = 150, VBE = 0.7 V

I_B = \frac{V_{TH} – V_{BE}}{R_{TH} + (\beta+1)R_E}
VTH = 2.105263158 V
RTH = 8245.614035 ohm
IB = 1.773972436e-05 A
IC = 0.002660958654 A
IE = 0.002678698378 A
VB = 1.958988238 V
How it was worked out
  1. BJT voltage-divider bias: exact Q-point
    I_B = \frac{V_{TH} – V_{BE}}{R_{TH} + (\beta+1)R_E}
    with VCC = 12 V, R1 = 47 kohm, R2 = 10 kohm, RC = 2.2 kohm, RE = 470 ohm, beta = 150, VBE = 0.7 V
    → VTH = 2.105263158 V, RTH = 8245.614035 ohm, IB = 1.773972436e-05 A, IC = 0.002660958654 A, IE = 0.002678698378 A, VB = 1.958988238 V, VE = 1.258988238 V, VC = 6.145890962 V, VCE = 4.886902724 V
Terminal
$ electronics-engineering solve elx_bjt_voltage_divider_bias "VCC=12 V" "R1=47000 ohm" "R2=10000 ohm" "RC=2200 ohm" "RE=470 ohm" beta=150 "VBE=0.7 V"
VTH = 2.105263158 V
RTH = 8245.614035 ohm
IB = 1.773972436e-05 A
IC = 0.002660958654 A
IE = 0.002678698378 A
VB = 1.958988238 V
VE = 1.258988238 V
VC = 6.145890962 V
VCE = 4.886902724 V
  by: BJT voltage-divider bias: exact Q-point  (VTH = VCC R2/(R1 + R2); RTH = R1 || R2; IB = (VTH - VBE)/(RTH + (beta + 1) RE); VCE = VCC - IC RC - IE RE)
  VCC = 12 V
  R1 = 47000 ohm
  R2 = 10000 ohm
  RC = 2200 ohm
  RE = 470 ohm
  beta = 150
  VBE = 0.7 V
  assumes: VTH > VBE; active region: VCE >= 0.2 V
Active filters

Sallen-Key low-pass filter: R1 = 10 kohm, R2 = 10 kohm, C1 = 20 nF, C2 = 10 nF, K = 1

\omega_0 = \frac{1}{\sqrt{R_1R_2C_1C_2}},\quad Q = \frac{\sqrt{R_1R_2C_1C_2}}{R_1C_2 + R_2C_2 + R_1C_1(1-K)}
f0 = 1125.395395 Hz
Q = 0.7071067812
H0 = 1
peak_gain = 0.7071067812
How it was worked out
  1. Sallen-Key low-pass filter: f0, Q and gain
    \omega_0 = \frac{1}{\sqrt{R_1R_2C_1C_2}},\quad Q = \frac{\sqrt{R_1R_2C_1C_2}}{R_1C_2 + R_2C_2 + R_1C_1(1-K)}
    with R1 = 10 kohm, R2 = 10 kohm, C1 = 20 nF, C2 = 10 nF, K = 1
    → f0 = 1125.395395 Hz, Q = 0.7071067812, H0 = 1, peak_gain = 0.7071067812
Terminal
$ electronics-engineering solve elx_sallen_key_lowpass "R1=10000 ohm" "R2=10000 ohm" "C1=20 nF" "C2=10 nF" K=1
f0 = 1125.395395 Hz
Q = 0.7071067812
H0 = 1
peak_gain = 0.7071067812
  by: Sallen-Key low-pass filter: f0, Q and gain  (w0 = 1/sqrt(R1 R2 C1 C2); Q = sqrt(R1 R2 C1 C2)/(R1 C2 + R2 C2 + R1 C1 (1 - K)))
  R1 = 10000 ohm
  R2 = 10000 ohm
  C1 = 2e-08 F
  C2 = 1e-08 F
  K = 1
  assumes: stable: R1 C2 + R2 C2 + R1 C1 (1 - K) > 0; ideal amplifier
BJT

Common-emitter amplifier: gain, input and output resistance

A_v = -\frac{\beta\,(R_C\parallel R_L)}{r_\pi + (\beta+1)R_{E1}}
gm = 0.04 S
r_pi = 2500 ohm
Av = -133.3333333
Rin = 2222.222222 ohm
Rout = 5000 ohm
Gv = -91.95402299
How it was worked out
  1. Common-emitter amplifier: gain, input and output resistance
    A_v = -\frac{\beta\,(R_C\parallel R_L)}{r_\pi + (\beta+1)R_{E1}}
    with IC = 0.001 A, beta = 100, VT = 0.025 V, RC = 5000 ohm, RL = 10000 ohm, RE1 = 0 ohm, RB = 20000 ohm, Rsig = 1000 ohm
    → gm = 0.04 S, r_pi = 2500 ohm, Av = -133.3333333, Rin = 2222.222222 ohm, Rout = 5000 ohm, Gv = -91.95402299
Terminal
$ electronics-engineering solve elx_common_emitter_amplifier "IC=1 mA" beta=100 "VT=25 mV" "RC=5000 ohm" "RL=10000 ohm" "RE1=0 ohm" "RB=20000 ohm" "Rsig=1000 ohm"
gm = 0.04 S
r_pi = 2500 ohm
Av = -133.3333333
Rin = 2222.222222 ohm
Rout = 5000 ohm
Gv = -91.95402299
  by: Common-emitter amplifier: gain, input and output resistance  (Av = -beta (RC || RL)/(r_pi + (beta + 1) RE1); Rin = RB || (r_pi + (beta + 1) RE1); Gv = Av Rin/(Rin + Rsig))
  IC = 0.001 A
  beta = 100
  VT = 0.025 V
  RC = 5000 ohm
  RL = 10000 ohm
  RE1 = 0 ohm
  RB = 20000 ohm
  Rsig = 1000 ohm
  assumes: r_o neglected; coupling and bypass capacitors short at signal frequency
Oscillators

555 astable: RA = 1 kohm, RB = 10 kohm, C = 10 uF

t_H = \ln 2\,(R_A + R_B)C,\quad t_L = \ln 2\,R_BC,\quad f = \frac{1}{\ln 2\,(R_A + 2R_B)C}
t_high = 0.07624618986 s
t_low = 0.06931471806 s
T = 0.1455609079 s
f = 6.869976385 Hz
duty = 0.5238095238
How it was worked out
  1. 555 timer astable: frequency and duty cycle
    t_H = \ln 2\,(R_A + R_B)C,\quad t_L = \ln 2\,R_BC,\quad f = \frac{1}{\ln 2\,(R_A + 2R_B)C}
    with RA = 1 kohm, RB = 10 kohm, C = 10 uF
    → t_high = 0.07624618986 s, t_low = 0.06931471806 s, T = 0.1455609079 s, f = 6.869976385 Hz, duty = 0.5238095238 Hz
Terminal
$ electronics-engineering solve elx_555_astable "RA=1000 ohm" "RB=10000 ohm" "C=10 uF"
t_high = 0.07624618986 s
t_low = 0.06931471806 s
T = 0.1455609079 s
f = 6.869976385 Hz
duty = 0.5238095238
  by: 555 timer astable: frequency and duty cycle  (t_H = ln2 (RA + RB) C; t_L = ln2 RB C; f = 1/(t_H + t_L))
  RA = 1000 ohm
  RB = 10000 ohm
  C = 1e-05 F
  assumes: thresholds Vcc/3 and 2Vcc/3
Diodes

Diode operating point: VS = 5 V, R = 1 kohm, Is = 1e-14 A, n = 1, T = 300 K

V_S = I_DR + nV_T\ln\left(1 + \frac{I_D}{I_S}\right)
ID = 0.004307456373 A
VD = 0.6925436275 V
P_D = 0.002983101461 W
How it was worked out
  1. Operating point of a diode in series with a resistor (exact)
    V_S = I_DR + nV_T\ln\left(1 + \frac{I_D}{I_S}\right)
    with VS = 5 V, R = 1 kohm, Is = 1e-14 A, n = 1, T = 300 K
    → ID = 0.004307456373 A, VD = 0.6925436275 V, P_D = 0.002983101461 W
Terminal
$ electronics-engineering solve elx_diode_operating_point "VS=5 V" "R=1000 ohm" "Is=1e-14 A" n=1 "T=300 K"
ID = 0.004307456373 A
VD = 0.6925436275 V
P_D = 0.002983101461 W
  by: Operating point of a diode in series with a resistor (exact)  (solve VS = ID R + n VT ln(1 + ID/Is) (bisection on VD))
  VS = 5 V
  R = 1000 ohm
  Is = 1e-14 A
  n = 1
  T = 300 K
  assumes: VS > 0 (forward bias); R, Is, n, T > 0
CMOS

CMOS propagation delay: Rn = 10000 ohm, Rp = 20000 ohm, CL = 100 fF

t_{pHL} = \ln 2\,R_nC_L,\quad t_{pLH} = \ln 2\,R_pC_L
tpHL = 6.931471806e-10 s
tpLH = 1.386294361e-09 s
tp = 1.039720771e-09 s
How it was worked out
  1. CMOS gate propagation delay (switch-resistor model)
    t_{pHL} = \ln 2\,R_nC_L,\quad t_{pLH} = \ln 2\,R_pC_L
    with Rn = 10000 ohm, Rp = 20000 ohm, CL = 100 fF
    → tpHL = 6.931471806e-10 s, tpLH = 1.386294361e-09 s, tp = 1.039720771e-09 s
Terminal
$ electronics-engineering solve elx_cmos_propagation_delay "Rn=10000 ohm" "Rp=20000 ohm" "CL=100 fF"
tpHL = 6.931471806e-10 s
tpLH = 1.386294361e-09 s
tp = 1.039720771e-09 s
  by: CMOS gate propagation delay (switch-resistor model)  (tpHL = ln 2 Rn CL; tpLH = ln 2 Rp CL; tp = (tpHL + tpLH)/2)
  Rn = 10000 ohm
  Rp = 20000 ohm
  CL = 1e-13 F
  assumes: step input, RC switch model
Data converters

ADC output code: Vin = 3.2 V, Vref = 5 V, n = 8

D = \left\lfloor \frac{V_{in}}{V_{ref}}2^n\right\rfloor,\quad \text{LSB} = \frac{V_{ref}}{2^n}
code = 163
bits = 10100011
LSB = 0.01953125 V
V_code = 3.18359375 V
error = 0.01640625 V
How it was worked out
  1. ADC output code, LSB and quantisation error
    D = \left\lfloor \frac{V_{in}}{V_{ref}}2^n\right\rfloor,\quad \text{LSB} = \frac{V_{ref}}{2^n}
    with Vin = 3.2 V, Vref = 5 V, n = 8
    → code = 163, bits = 10100011, LSB = 0.01953125 V, V_code = 3.18359375 V, error = 0.01640625 V
Terminal
$ electronics-engineering solve elx_adc_code "Vin=3.2 V" "Vref=5 V" n=8
code = 163
bits = 10100011
LSB = 0.01953125 V
V_code = 3.18359375 V
error = 0.01640625 V
  by: ADC output code, LSB and quantisation error  (code = floor(Vin 2^n/Vref), at most 2^n - 1; LSB = Vref/2^n)
  Vin = 3.2 V
  Vref = 5 V
  assumes: 0 <= Vin <= Vref; 1 <= n <= 16
MOSFET

Common-source amplifier: gm = 2 mS, ro = 100000 ohm, RD = 10000 ohm, RL = 10000 ohm, RS = 0 ohm, RG = 1000000 ohm, Rsig = 10000 ohm

A_v = -\frac{g_mr_oR_D'}{R_D' + r_o + R_S(1 + g_mr_o)}
Av = -9.523809524
Rin = 1000000 ohm
Rout = 9090.909091 ohm
Gv = -9.42951438
How it was worked out
  1. Common-source amplifier with source degeneration and ro
    A_v = -\frac{g_mr_oR_D'}{R_D' + r_o + R_S(1 + g_mr_o)}
    with gm = 2 mS, ro = 100000 ohm, RD = 10000 ohm, RL = 10000 ohm, RS = 0 ohm, RG = 1000000 ohm, Rsig = 10000 ohm
    → Av = -9.523809524, Rin = 1000000 ohm, Rout = 9090.909091 ohm, Gv = -9.42951438
Terminal
$ electronics-engineering solve elx_common_source_amplifier "gm=2 mS" "ro=100000 ohm" "RD=10000 ohm" "RL=10000 ohm" "RS=0 ohm" "RG=1000000 ohm" "Rsig=10000 ohm"
Av = -9.523809524
Rin = 1000000 ohm
Rout = 9090.909091 ohm
Gv = -9.42951438
  by: Common-source amplifier with source degeneration and ro  (Av = -gm ro RD'/(RD' + ro + RS (1 + gm ro)) with RD' = RD || RL; Rout = RD || (ro + RS(1 + gm ro)))
  gm = 0.002 S
  ro = 100000 ohm
  RD = 10000 ohm
  RL = 10000 ohm
  RS = 0 ohm
  RG = 1000000 ohm
  Rsig = 10000 ohm
  assumes: gm, ro, RD, RL, RG, Rsig > 0; RS >= 0
Command line

Use it from the command line

Every command below was run as shown, and the text under it is exactly what electronics-engineering printed. The same commands work in a Linux terminal and in Windows PowerShell. electronics-engineering joins the command-line bundle in its next release. The user guide covers install, inputs, outcomes, scripting, and every capability with a command and what it printed: PDF · text.

1

Check the install

Prints the model, its version and that this is the Rust build.

Terminal
$ electronics-engineering --version
electronics-engineering-ai999x 1.0.0 (Rust build, ax-engine 0.1.0)
2

Find a capability

Search the capabilities by what you want to know; the first column is the id to pass to info and solve.

Terminal
$ electronics-engineering search "bjt voltage-divider bias: exact q-point"
elx_bjt_voltage_divider_bias         BJT voltage-divider bias: exact Q-point  (BJT / DC bias)
elx_mosfet_divider_bias              MOSFET voltage-divider bias with source resistor: Q-point  (MOSFET / DC bias)
elx_bjt_collector_feedback_bias      BJT collector-feedback bias: Q-point  (BJT / DC bias)
elx_bjt_fixed_bias                   BJT fixed (base-resistor) bias: Q-point  (BJT / DC bias)
elx_bjt_emitter_bias                 BJT dual-supply emitter bias: Q-point  (BJT / DC bias)
elx_diode_operating_point            Operating point of a diode in series with a resistor (exact)  (diodes / operating point)
elx_bjt_cascode                      BJT cascode: output resistance, transconductance and gain  (BJT / amplifiers)
elx_differential_pair                BJT differential pair: differential and common-mode gain, CMRR  (BJT / differential amplifiers)
… 12 more
3

List the capabilities

Every capability the program answers: its id (what you pass to solve) and its name.

Terminal
$ electronics-engineering list
elx_555_astable                          555 timer astable: frequency and duty cycle
elx_555_monostable                       555 timer monostable pulse width
elx_adc_code                             ADC output code, LSB and quantisation error
elx_adc_enob                             Effective number of bits (ENOB) from SINAD
elx_adc_quantization_snr                 ADC quantisation SNR with oversampling
elx_adjustable_regulator_output          Adjustable three-terminal regulator output voltage
elx_aperture_jitter_snr                  SNR limit from sampling-clock (aperture) jitter
elx_bjt_cascode                          BJT cascode: output resistance, transconductance and gain
… 84 more
4

What a capability needs

The equation or method, every input and output with its SI unit. Read this before solve: it tells you the input names.

Terminal
$ electronics-engineering info elx_bjt_voltage_divider_bias
BJT voltage-divider bias: exact Q-point
  VTH = VCC R2/(R1 + R2); RTH = R1 || R2; IB = (VTH - VBE)/(RTH + (beta + 1) RE); VCE = VCC - IC RC - IE RE
  in   VCC      supply voltage [V]
  in   R1       upper divider resistor (supply to base) [ohm]
  in   R2       lower divider resistor (base to ground) [ohm]
  in   RC       collector resistor [ohm]
  in   RE       emitter resistor [ohm]
  in   beta     current gain [1]
  in   VBE      base-emitter voltage [V]
  out  VTH      Thevenin voltage of the divider [V]
  out  RTH      Thevenin resistance of the divider [ohm]
  out  IB       base current [A]
  out  IC       collector current [A]
  out  IE       emitter current [A]
  out  VB       base voltage [V]
  out  VE       emitter voltage [V]
  out  VC       collector voltage [V]
  out  VCE      collector-emitter voltage [V]
5

Solve

Inputs as name=value, each with any unit of the right kind. The answer lists every output, the method used, each input converted to SI, and the conditions the answer assumes.

Terminal
$ electronics-engineering solve elx_bjt_voltage_divider_bias "VCC=12 V" "R1=47 kohm" "R2=10 kohm" "RC=2.2 kohm" "RE=470 ohm" beta=150.0 "VBE=0.7 V"
VTH = 2.105263158 V
RTH = 8245.614035 ohm
IB = 1.773972436e-05 A
IC = 0.002660958654 A
IE = 0.002678698378 A
VB = 1.958988238 V
VE = 1.258988238 V
VC = 6.145890962 V
VCE = 4.886902724 V
  by: BJT voltage-divider bias: exact Q-point  (VTH = VCC R2/(R1 + R2); RTH = R1 || R2; IB = (VTH - VBE)/(RTH + (beta + 1) RE); VCE = VCC - IC RC - IE RE)
  VCC = 12 V
  R1 = 47000 ohm
  R2 = 10000 ohm
  RC = 2200 ohm
  RE = 470 ohm
  beta = 150
  VBE = 0.7 V
  assumes: VTH > VBE; active region: VCE >= 0.2 V
6

Machine-readable answer

–json prints the same answer as one line of JSON (values in SI): for scripts and other programs.

Terminal
$ electronics-engineering solve elx_bjt_voltage_divider_bias "VCC=12 V" "R1=47 kohm" "R2=10 kohm" "RC=2.2 kohm" "RE=470 ohm" beta=150.0 "VBE=0.7 V" --json
{"outcome":"SOLVED","message":"","value":0.00266095865382,"unit":"A","solved_for":"IC","si":[["VCC",12.0],["R1",47000.0],["R2",10000.0],["RC",2200.0],["RE",470.0],["beta",150.0],["VBE",0.7]],"values":[["VTH",2.10526315789,"V"],["RTH",8245.61403509,"ohm"],["IB",0.0000177397243588,"A"],["IC",0.00266095865382,"A"],["IE",0.00267869837818,"A"],["VB",1.95898823774,"V"],["VE",1.25898823774,"V"],["VC",6.1458909616,"V"],["VCE",4.88690272386,"V"]],"target":"IC","phrase":"Thevenin voltage of the divider","assumptions":["VTH > VBE","active region: VCE >= 0.2 V"],"name":"BJT voltage-divider bias: exact Q-point","equation":"VTH = VCC R2/(R1 + R2); RTH = R1 || R2; IB = (VTH - VBE)/(RTH + (beta + 1) RE); VCE = VCC - IC RC - IE RE"}
7

When an input is missing

No number is guessed: the answer names what is missing, shows a complete call, and the program exits with status 1.

Terminal
$ electronics-engineering solve elx_bjt_voltage_divider_bias "VCC=12 V" "R1=47 kohm" "R2=10 kohm" "RC=2.2 kohm" "RE=470 ohm" beta=150.0
NEEDS_INPUT: elx_bjt_voltage_divider_bias needs VBE (base-emitter voltage). Example: solve('elx_bjt_voltage_divider_bias', VCC='12 V', R1='47000 ohm', R2='10000 ohm', RC='2200 ohm', RE='470 ohm', beta=150, VBE='0.7 V').
8

Many questions at once

One JSON request per line in, one JSON answer per line out, in order: for scripts, notebooks and agents (the program starts once). In PowerShell: Get-Content cases.jsonl | electronics-engineering batch

Terminal
cases.jsonl
{"key": "elx_bjt_voltage_divider_bias", "inputs": {"VCC": "12 V", "R1": "47 kohm", "R2": "10 kohm", "RC": "2.2 kohm", "RE": "470 ohm", "beta": 150.0, "VBE": "0.7 V"}}
{"key": "elx_sallen_key_lowpass", "inputs": {"R1": "10 kohm", "R2": "10 kohm", "C1": "20 nF", "C2": "10 nF", "K": 1.0}}
$ electronics-engineering batch < cases.jsonl
{"outcome":"SOLVED","message":"","value":0.00266095865382,"unit":"A","solved_for":"IC","si":[["VCC",12.0],["R1",47000.0],["R2",10000.0],["RC",2200.0],["RE",470.0],["beta",150.0],["VBE",0.7]],"values":[["VTH",2.10526315789,"V"],["RTH",8245.61403509,"ohm"],["IB",0.0000177397243588,"A"],["IC",0.00266095865382,"A"],["IE",0.00267869837818,"A"],["VB",1.95898823774,"V"],["VE",1.25898823774,"V"],["VC",6.1458909616,"V"],["VCE",4.88690272386,"V"]],"target":"IC","phrase":"Thevenin voltage of the divider","assumptions":["VTH > VBE","active region: VCE >= 0.2 V"],"name":"BJT voltage-divider bias: exact Q-point","equation":"VTH = VCC R2/(R1 + R2); RTH = R1 || R2; IB = (VTH - VBE)/(RTH + (beta + 1) RE); VCE = VCC - IC RC - IE RE"}
{"outcome":"SOLVED","message":"","value":0.707106781187,"unit":"","solved_for":"Q","si":[["R1",10000.0],["R2",10000.0],["C1",2e-8],["C2",1e-8],["K",1.0]],"values":[["f0",1125.3953952,"Hz"],["Q",0.707106781187,""],["H0",1.0,""],["peak_gain",0.707106781187,""]],"target":"Q","phrase":"natural frequency","assumptions":["stable: R1 C2 + R2 C2 + R1 C1 (1 - K) > 0","ideal amplifier"],"name":"Sallen-Key low-pass filter: f0, Q and gain","equation":"w0 = 1/sqrt(R1 R2 C1 C2); Q = sqrt(R1 R2 C1 C2)/(R1 C2 + R2 C2 + R1 C1 (1 - K))"}

All commands

CommandWhat it does
electronics-engineering search "<words>"find the capabilities that match
electronics-engineering listevery capability: its id and name
electronics-engineering info <capability>the equation or method, its inputs and outputs with their units
electronics-engineering solve <capability> name=value …the answer; add –target X to solve an equation for X, –json for JSON
electronics-engineering figures <capability> name=value … --out DIRthe live figures for those inputs, as SVG files in DIR
electronics-engineering batch < requests.jsonlone JSON answer per line, for scripts and agents
electronics-engineering catalogevery capability with its inputs, as JSON
electronics-engineering --versionthe model and its version

Exit status: 0 when the question was answered, 1 when it was not (the message says why: a missing input, an invalid value, a question outside the model), 2 for a command it does not know.

Python

Use it from Python

After pip install electronics-engineering-ai999x, ask in words or call a capability. Every snippet was run as shown; the output under it is what it printed. The Python guide covers ask in words, solve, and every capability with a Python example: PDF · text.

import electronics_engineering_ai999x as m

a = m.ask("BJT voltage-divider bias: VCC = 12 V, R1 = 47 kohm, R2 = 10 kohm, RC = 2.2 kohm, RE = 470 ohm, beta = 150, VBE = 0.7 V")
print(a.outcome)
print(a.values)
for step in a.steps:
    print(step["name"])
Output
SOLVED
{'VTH': 2.10526315789, 'RTH': 8245.61403509, 'IB': 1.77397243588e-05, 'IC': 0.00266095865382, 'IE': 0.00267869837818, 'VB': 1.95898823774, 'VE': 1.25898823774, 'VC': 6.1458909616, 'VCE': 4.88690272386}
BJT voltage-divider bias: exact Q-point
Capabilities

Every capability, explained

Search by name, formula, input or topic. Each capability opens to say what it does, what it needs, what it gives back and why, with its worked example, how to run it (on the command line, from Python, in your browser) and its figures.

92 capabilities

Active filters 9

Butterworth filter: Q of each second-order section1 fig.elx_butterworth_section_q

The quality factors of the cascaded second-order sections of an n-th order Butterworth filter (all at the cutoff frequency), and whether a first-order section is needed.

Q_k = \frac{1}{2\sin\left(\frac{(2k-1)\pi}{2n}\right)}

You give

MeaningUnitExample
n
Filter order—4

You get

MeaningUnitExample
Q_{\mathrm{max}}
Largest section Q—1.306562965
Q
Section Q values, ascending—[0.5411961001, 1.306562965]
\text{sections}
Number of second-order sections—2
\text{first\_order}
1 if a first-order section is needed—0

Applies when

  • 2 <= n <= 20

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Butterworth section Q: n = 4
Q_max = 1.306562965
Q = [0.5411961001, 1.306562965]
sections = 2
first_order = 0

Run it

Terminal
$ electronics-engineering solve elx_butterworth_section_q n=4
Q_max = 1.306562965
Q = [0.541196100146,1.30656296488]
sections = 2
first_order = 0
  by: Butterworth filter: Q of each second-order section  (Q_k = 1/(2 sin((2k - 1) pi/(2n))), k = 1 .. floor(n/2))
  assumes: 2 <= n <= 20

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Butterworth or Chebyshev low-pass filter order1 fig.elx_filter_order

The minimum order of a Butterworth or Chebyshev type I low-pass filter meeting a passband edge with at most Ap dB attenuation and a stopband edge with at least As dB.

n \ge \frac{\log_{10}D}{2\log_{10}(f_s/f_p)},\quad n \ge \frac{\cosh^{-1}\sqrt{D}}{\cosh^{-1}(f_s/f_p)}

You give

MeaningUnitExample
\text{ftype}
Butterworth or chebyshev (type I) choice—Butterworth
\text{fp}
Passband edgeHz1000 Hz
\text{fs}
Stopband edgeHz2500 Hz
\text{Ap}
Maximum passband attenuation (ripple) in dB—1
\text{As}
Minimum stopband attenuation in dB—40

You get

MeaningUnitExample
n
Minimum filter order—6

Values with a unit may be written in any unit of the right kind.

Applies when

  • fs > fp
  • As > Ap > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Filter order: ftype = Butterworth, fp = 1000 Hz, fs = 2500 Hz, Ap = 1 dB, As = 40 dB
n = 6

Run it

Terminal
$ electronics-engineering solve elx_filter_order ftype=Butterworth "fp=1000 Hz" "fs=2500 Hz" Ap=1 As=40
n = 6
  by: Butterworth or Chebyshev low-pass filter order  (Butterworth: n >= log10(D)/(2 log10(fs/fp)); Chebyshev: n >= acosh(sqrt D)/acosh(fs/fp), D = (10^(As/10) - 1)/(10^(Ap/10) - 1))
  fp = 1000 Hz
  fs = 2500 Hz
  Ap = 1
  As = 40
  ftype = Butterworth
  assumes: fs > fp; As > Ap > 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Chebyshev type I filter: section Q and frequencies2 fig.elx_chebyshev_sections

The quality factors and natural frequencies (relative to the passband edge) of the second-order sections of an n-th order Chebyshev type I low-pass filter with a given passband ripple, and the real pole of an odd order.

p_k = -\sinh a\sin\theta_k + j\cosh a\cos\theta_k,\ a = \frac{1}{n}\sinh^{-1}\frac{1}{\varepsilon},\ Q_k = \frac{|p_k|}{2|\Re p_k|}

You give

MeaningUnitExample
n
Filter order—4
\text{ripple}
Passband ripple in dB—0.5

You get

MeaningUnitExample
Q_{\mathrm{max}}
Largest section Q—2.940554174
Q
Section Q values, ascending—[0.7051102368, 2.940554174]
\text{f0\_ratio}
Section natural frequencies / passband edge, in the same order—[0.5970023951, 1.031270401]
\text{sections}
Number of second-order sections—2
\text{real\_pole}
Real pole / passband edge (0 for even n)—0

Applies when

  • 2 <= n <= 16
  • 0.001 dB <= ripple <= 6 dB

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Chebyshev filter sections: n = 4, ripple = 0.5 dB
Q_max = 2.940554174
Q = [0.7051102368, 2.940554174]
f0_ratio = [0.5970023951, 1.031270401]
sections = 2
real_pole = 0

Run it

Terminal
$ electronics-engineering solve elx_chebyshev_sections n=4 ripple=0.5
Q_max = 2.940554174
Q = [0.705110236803,2.94055417439]
f0_ratio = [0.59700239512,1.03127040148]
sections = 2
real_pole = 0
  by: Chebyshev type I filter: section Q and frequencies  (eps = sqrt(10^(r/10) - 1); a = asinh(1/eps)/n; poles -sinh a sin th_k + j cosh a cos th_k; Q = |p|/(2 |Re p|))
  ripple = 0.5
  assumes: 2 <= n <= 16; 0.001 dB <= ripple <= 6 dB

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Equal-component Sallen-Key low-pass design1 fig.elx_sallen_key_equal_component_design

The resistor value and amplifier gain of an equal-component (R1 = R2 = R, C1 = C2 = C) Sallen-Key low-pass filter for a cutoff frequency and Q, with the non-inverting gain ratio Rf/Rg = K – 1.

R = \frac{1}{2\pi f_cC},\quad K = 3 – \frac{1}{Q}

You give

MeaningUnitExample
\text{fc}
Natural (cutoff) frequencyHz1000 Hz
Q
Quality factor (0.7071 for Butterworth)—0.7071
C
Chosen capacitor valueF10 nF

You get

MeaningUnitExample
R
Resistor valueohm15915.49431 ohm
K
Amplifier gain—1.585772875
\text{Rf\_over\_Rg}
Gain resistor ratio Rf/Rg—0.5857728751

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0.5 <= Q <= 20

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Equal-component Sallen-Key design: fc = 1000 Hz, Q = 0.7071, C = 10 nF
R = 15915.49431 ohm
K = 1.585772875
Rf_over_Rg = 0.5857728751

Run it

Terminal
$ electronics-engineering solve elx_sallen_key_equal_component_design "fc=1000 Hz" Q=0.7071 "C=10 nF"
R = 15915.49431 ohm
K = 1.585772875
Rf_over_Rg = 0.5857728751
  by: Equal-component Sallen-Key low-pass design  (R = 1/(2 pi fc C); K = 3 - 1/Q; Rf/Rg = K - 1)
  fc = 1000 Hz
  Q = 0.7071
  C = 1e-08 F
  assumes: 0.5 <= Q <= 20

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

First-order active low-pass filter (inverting)1 fig.elx_first_order_active_lowpass

The passband gain -Rf/R1, the cutoff frequency 1/(2 pi Rf C) and the gain at a frequency of an inverting op-amp low-pass filter with C across the feedback resistor.

H(j\omega) = -\frac{R_f/R_1}{1 + j\omega R_fC},\quad f_c = \frac{1}{2\pi R_fC}

You give

MeaningUnitExample
\text{R1}
Input resistorohm10000 ohm
\text{Rf}
Feedback resistorohm100000 ohm
C
Capacitor across RfF1.59 nF
f
Frequency of interestHz1000 Hz

You get

MeaningUnitExample
\text{H0}
Passband gain—-10
\text{fc}
Cutoff frequencyHz1000.974485 Hz
\text{gain\_f}
Gain magnitude at f—7.074510619
\text{gain\_dB}
Gain at f in dB—16.99392806

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal op-amp

Outside these conditions it says what is wrong instead of returning a number.

Worked example

First-order active low-pass filter: R1 = 10000 ohm, Rf = 100000 ohm, C = 1.59 nF, f = 1000 Hz
H0 = -10
fc = 1000.974485 Hz
gain_f = 7.074510619
gain_dB = 16.99392806

Run it

Terminal
$ electronics-engineering solve elx_first_order_active_lowpass "R1=10000 ohm" "Rf=100000 ohm" "C=1.59 nF" "f=1000 Hz"
H0 = -10
fc = 1000.974485 Hz
gain_f = 7.074510619
gain_dB = 16.99392806
  by: First-order active low-pass filter (inverting)  (H(s) = -(Rf/R1)/(1 + s Rf C); fc = 1/(2 pi Rf C))
  R1 = 10000 ohm
  Rf = 100000 ohm
  C = 1.59e-09 F
  f = 1000 Hz
  assumes: ideal op-amp

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Multiple-feedback (MFB) band-pass filter1 fig.elx_mfb_bandpass

The centre frequency, quality factor, -3 dB bandwidth and peak (inverting) gain of a multiple-feedback band-pass filter.

\omega_0 = \sqrt{\frac{R_1+R_2}{R_1R_2R_3C_1C_2}},\quad Q = \frac{\omega_0C_1C_2R_3}{C_1+C_2}

You give

MeaningUnitExample
\text{R1}
Input resistorohm15900 ohm
\text{R2}
Resistor from the middle node to groundohm1330 ohm
\text{R3}
Feedback resistor (inverting input to output)ohm31800 ohm
\text{C1}
Capacitor from the middle node to the inverting inputF10 nF
\text{C2}
Capacitor from the middle node to the outputF10 nF

You get

MeaningUnitExample
\text{f0}
Centre frequencyHz2547.562384 Hz
Q
Quality factor—2.54508224
\text{BW}
-3 dB bandwidthHz1000.974485 Hz
H_{\mathrm{peak}}
Gain at the centre frequency—-1

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal op-amp

Outside these conditions it says what is wrong instead of returning a number.

Worked example

MFB band-pass filter: R1 = 15900 ohm, R2 = 1330 ohm, R3 = 31800 ohm, C1 = 10 nF, C2 = 10 nF
f0 = 2547.562384 Hz
Q = 2.54508224
BW = 1000.974485 Hz
H_peak = -1

Run it

Terminal
$ electronics-engineering solve elx_mfb_bandpass "R1=15900 ohm" "R2=1330 ohm" "R3=31800 ohm" "C1=10 nF" "C2=10 nF"
f0 = 2547.562384 Hz
Q = 2.54508224
BW = 1000.974485 Hz
H_peak = -1
  by: Multiple-feedback (MFB) band-pass filter  (w0 = sqrt((R1 + R2)/(R1 R2 R3 C1 C2)); Q = w0 C1 C2 R3/(C1 + C2); H = -C1 R3/(R1 (C1 + C2)))
  R1 = 15900 ohm
  R2 = 1330 ohm
  R3 = 31800 ohm
  C1 = 1e-08 F
  C2 = 1e-08 F
  assumes: ideal op-amp

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Multiple-feedback (MFB) low-pass filter1 fig.elx_mfb_lowpass

The natural frequency, quality factor and inverting passband gain -R2/R1 of a second-order multiple-feedback low-pass filter.

Q = \frac{\sqrt{R_2R_3C_1C_2}}{C_2\left(R_2 + R_3 + R_2R_3/R_1\right)},\quad H_0 = -\frac{R_2}{R_1}

You give

MeaningUnitExample
\text{R1}
Input resistorohm10000 ohm
\text{R2}
Feedback resistor (middle node to output)ohm10000 ohm
\text{R3}
Resistor from the middle node to the inverting inputohm5000 ohm
\text{C1}
Capacitor from the middle node to groundF47 nF
\text{C2}
Capacitor from the inverting input to the outputF4.7 nF

You get

MeaningUnitExample
\text{f0}
Natural frequencyHz1514.38839 Hz
Q
Quality factor—1.118033989
\text{H0}
Passband gain—-1

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal op-amp

Outside these conditions it says what is wrong instead of returning a number.

Worked example

MFB low-pass filter: R1 = 10000 ohm, R2 = 10000 ohm, R3 = 5000 ohm, C1 = 47 nF, C2 = 4.7 nF
f0 = 1514.38839 Hz
Q = 1.118033989
H0 = -1

Run it

Terminal
$ electronics-engineering solve elx_mfb_lowpass "R1=10000 ohm" "R2=10000 ohm" "R3=5000 ohm" "C1=47 nF" "C2=4.7 nF"
f0 = 1514.38839 Hz
Q = 1.118033989
H0 = -1
  by: Multiple-feedback (MFB) low-pass filter  (w0 = 1/sqrt(R2 R3 C1 C2); Q = sqrt(R2 R3 C1 C2)/(C2 (R2 + R3 + R2 R3/R1)); H0 = -R2/R1)
  R1 = 10000 ohm
  R2 = 10000 ohm
  R3 = 5000 ohm
  C1 = 4.7e-08 F
  C2 = 4.7e-09 F
  assumes: ideal op-amp

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Sallen-Key high-pass filter: f0, Q and gain1 fig.elx_sallen_key_highpass

The natural frequency, quality factor and high-frequency gain of a second-order Sallen-Key high-pass filter with any components and amplifier gain K.

Q = \frac{\sqrt{R_1R_2C_1C_2}}{R_1(C_1+C_2) + R_2C_2(1-K)}

You give

MeaningUnitExample
\text{C1}
First series capacitorF10 nF
\text{C2}
Second series capacitorF10 nF
\text{R1}
Resistor from the middle node to the output (feedback)ohm11250 ohm
\text{R2}
Resistor from the amplifier input to groundohm22500 ohm
K
Amplifier gain—1

You get

MeaningUnitExample
\text{f0}
Natural frequencyHz1000.351462 Hz
Q
Quality factor—0.7071067812
H_{\mathrm{inf}}
High-frequency gain—1

Values with a unit may be written in any unit of the right kind.

Applies when

  • stable: R1 (C1 + C2) + R2 C2 (1 – K) > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Sallen-Key high-pass filter: C1 = 10 nF, C2 = 10 nF, R1 = 11250 ohm, R2 = 22500 ohm, K = 1
f0 = 1000.351462 Hz
Q = 0.7071067812
H_inf = 1

Run it

Terminal
$ electronics-engineering solve elx_sallen_key_highpass "C1=10 nF" "C2=10 nF" "R1=11250 ohm" "R2=22500 ohm" K=1
f0 = 1000.351462 Hz
Q = 0.7071067812
H_inf = 1
  by: Sallen-Key high-pass filter: f0, Q and gain  (w0 = 1/sqrt(R1 R2 C1 C2); Q = sqrt(R1 R2 C1 C2)/(R1 (C1 + C2) + R2 C2 (1 - K)))
  C1 = 1e-08 F
  C2 = 1e-08 F
  R1 = 11250 ohm
  R2 = 22500 ohm
  K = 1
  assumes: stable: R1 (C1 + C2) + R2 C2 (1 - K) > 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Sallen-Key low-pass filter: f0, Q and gain2 fig.elx_sallen_key_lowpass

The natural frequency, quality factor, passband gain and the gain at f0 (K Q) of a second-order Sallen-Key low-pass filter with any components and amplifier gain K.

\omega_0 = \frac{1}{\sqrt{R_1R_2C_1C_2}},\quad Q = \frac{\sqrt{R_1R_2C_1C_2}}{R_1C_2 + R_2C_2 + R_1C_1(1-K)}

You give

MeaningUnitExample
\text{R1}
First series resistorohm10000 ohm
\text{R2}
Second series resistorohm10000 ohm
\text{C1}
Capacitor from the middle node to the output (feedback)F20 nF
\text{C2}
Capacitor from the amplifier input to groundF10 nF
K
Amplifier gain (1 for a unity-gain buffer)—1

You get

MeaningUnitExample
\text{f0}
Natural frequencyHz1125.395395 Hz
Q
Quality factor—0.7071067812
\text{H0}
Passband gain—1
\text{peak\_gain}
Gain at f0, K Q—0.7071067812

Values with a unit may be written in any unit of the right kind.

Applies when

  • stable: R1 C2 + R2 C2 + R1 C1 (1 – K) > 0
  • ideal amplifier

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Sallen-Key low-pass filter: R1 = 10000 ohm, R2 = 10000 ohm, C1 = 20 nF, C2 = 10 nF, K = 1
f0 = 1125.395395 Hz
Q = 0.7071067812
H0 = 1
peak_gain = 0.7071067812

Run it

Terminal
$ electronics-engineering solve elx_sallen_key_lowpass "R1=10000 ohm" "R2=10000 ohm" "C1=20 nF" "C2=10 nF" K=1
f0 = 1125.395395 Hz
Q = 0.7071067812
H0 = 1
peak_gain = 0.7071067812
  by: Sallen-Key low-pass filter: f0, Q and gain  (w0 = 1/sqrt(R1 R2 C1 C2); Q = sqrt(R1 R2 C1 C2)/(R1 C2 + R2 C2 + R1 C1 (1 - K)))
  R1 = 10000 ohm
  R2 = 10000 ohm
  C1 = 2e-08 F
  C2 = 1e-08 F
  K = 1
  assumes: stable: R1 C2 + R2 C2 + R1 C1 (1 - K) > 0; ideal amplifier

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

BJT 16

BJT beta cutoff and transition frequency fT1 fig.elx_transition_frequency

The beta cutoff frequency f_beta and the unity-current-gain (transition) frequency fT = gm/(2 pi (Cpi + Cmu)) of a bipolar transistor from its hybrid-pi capacitances.

f_T = \frac{g_m}{2\pi(C_\pi + C_\mu)},\quad f_\beta = \frac{f_T}{\beta}

You give

MeaningUnitExample
\text{gm}
TransconductanceS40 mS
\beta
Low-frequency current gain—100
\text{Cpi}
Base-emitter capacitanceF10 pF
\text{Cmu}
Base-collector capacitanceF2 pF

You get

MeaningUnitExample
r_{\pi}
r_pi = beta/gmohm2500 ohm
f_{\beta}
beta cutoff frequencyHz5305164.77 Hz
f_{T}
Transition frequencyHz530516477 Hz

Values with a unit may be written in any unit of the right kind.

Applies when

  • single-pole h_fe (the feed-forward zero through Cmu neglected)

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Transition frequency: gm = 40 mS, beta = 100, Cpi = 10 pF, Cmu = 2 pF
r_pi = 2500 ohm
f_beta = 5305164.77 Hz
f_T = 530516477 Hz

Run it

Terminal
$ electronics-engineering solve elx_transition_frequency "gm=40 mS" beta=100 "Cpi=10 pF" "Cmu=2 pF"
r_pi = 2500 ohm
f_beta = 5305164.77 Hz
f_T = 530516477 Hz
  by: BJT beta cutoff and transition frequency fT  (f_beta = 1/(2 pi r_pi (Cpi + Cmu)); fT = beta f_beta = gm/(2 pi (Cpi + Cmu)))
  gm = 0.04 S
  beta = 100
  Cpi = 1e-11 F
  Cmu = 2e-12 F
  assumes: single-pole h_fe (the feed-forward zero through Cmu neglected)

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

BJT cascode: output resistance, transconductance and gain1 fig.elx_bjt_cascode

The output resistance, the short-circuit transconductance and the voltage gain into a load of a cascode (common emitter driving common base) of two identical transistors at the same bias current.

R_{out} = r_o + (1 + g_mr_o)(r_o\parallel r_\pi),\quad A_v = -G_m(R_{out}\parallel R_L)

You give

MeaningUnitExample
\text{IC}
Bias current of both transistorsA1 mA
\beta
Current gain—100
\text{VT}
Thermal voltageV25 mV
\text{VA}
Early voltageV100 V
\text{RL}
Load resistanceohm1000000 ohm

You get

MeaningUnitExample
\text{gm}
Transconductance of each transistorS0.04 S
r_{o}
Output resistance of eachohm100000 ohm
\text{Rout}
Output resistance of the cascodeohm9858536.585 ohm
\text{Gm}
Short-circuit transconductanceS0.03959426027 S
\text{Av}
Voltage gain into RL—-35947.88859

Values with a unit may be written in any unit of the right kind.

Applies when

  • identical transistors, base of the upper one at signal ground

Outside these conditions it says what is wrong instead of returning a number.

Worked example

BJT cascode: IC = 1 mA, beta = 100, VT = 25 mV, VA = 100 V, RL = 1000000 ohm
gm = 0.04 S
r_o = 100000 ohm
Rout = 9858536.585 ohm
Gm = 0.03959426027 S
Av = -35947.88859

Run it

Terminal
$ electronics-engineering solve elx_bjt_cascode "IC=1 mA" beta=100 "VT=25 mV" "VA=100 V" "RL=1000000 ohm"
gm = 0.04 S
r_o = 100000 ohm
Rout = 9858536.585 ohm
Gm = 0.03959426027 S
Av = -35947.88859
  by: BJT cascode: output resistance, transconductance and gain  (Rout = r_o + (1 + gm r_o)(r_o || r_pi); Gm = gm (gm + 1/r_o)/(gm + 2/r_o + 1/r_pi); Av = -Gm (Rout || RL))
  IC = 0.001 A
  beta = 100
  VT = 0.025 V
  VA = 100 V
  RL = 1000000 ohm
  assumes: identical transistors, base of the upper one at signal ground

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

BJT collector-feedback bias: Q-point1 fig.elx_bjt_collector_feedback_bias

The Q-point of a transistor biased by a resistor from collector to base (collector feedback), with an optional emitter resistor.

I_B = \frac{V_{CC} – V_{BE}}{R_F + (\beta+1)(R_C + R_E)}

You give

MeaningUnitExample
\text{VCC}
Supply voltageV10 V
\text{RC}
Collector resistor (carries IC + IB)ohm4700 ohm
\text{RF}
Feedback resistor, collector to baseohm250000 ohm
\beta
Current gain—90
\text{VBE}
Base-emitter voltageV0.7 V
\text{RE}
Emitter resistor (default 0) optionalohm

You get

MeaningUnitExample
\text{IB}
Base currentA1.372288623e-05 A
\text{IC}
Collector currentA0.001235059761 A
\text{IE}
Emitter currentA0.001248782647 A
\text{VC}
Collector voltageV4.130721558 V
\text{VCE}
Collector-emitter voltageV4.130721558 V

Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.

Applies when

  • active region: VCE >= 0.2 V

Outside these conditions it says what is wrong instead of returning a number.

Worked example

BJT collector-feedback bias: VCC = 10 V, RC = 4700 ohm, RF = 250000 ohm, beta = 90, VBE = 0.7 V
IB = 1.372288623e-05 A
IC = 0.001235059761 A
IE = 0.001248782647 A
VC = 4.130721558 V
VCE = 4.130721558 V

Run it

Terminal
$ electronics-engineering solve elx_bjt_collector_feedback_bias "VCC=10 V" "RC=4700 ohm" "RF=250000 ohm" beta=90 "VBE=0.7 V"
IB = 1.372288623e-05 A
IC = 0.001235059761 A
IE = 0.001248782647 A
VC = 4.130721558 V
VCE = 4.130721558 V
  by: BJT collector-feedback bias: Q-point  (IB = (VCC - VBE)/(RF + (beta + 1)(RC + RE)); VC = VCC - IE RC)
  VCC = 10 V
  RC = 4700 ohm
  RF = 250000 ohm
  beta = 90
  VBE = 0.7 V
  assumes: active region: VCE >= 0.2 V

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

BJT current mirror with finite beta1 fig.elx_current_mirror

The reference current and the output current of a basic two-transistor current mirror with a resistor to the supply, including the base-current error Iout = Iref beta/(beta + 2).

I_{out} = \frac{\beta}{\beta+2}I_{ref}

You give

MeaningUnitExample
\text{VCC}
Supply voltageV10 V
R
Reference resistorohm9300 ohm
\text{VBE}
Base-emitter voltageV0.7 V
\beta
Current gain of each (matched) transistor—100

You get

MeaningUnitExample
\text{Iref}
Current in the reference resistorA0.001 A
\text{Iout}
Output (mirrored) currentA0.0009803921569 A
\text{ratio}
Iout/Iref—0.9803921569

Values with a unit may be written in any unit of the right kind.

Applies when

  • matched transistors, Early effect neglected

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Current mirror: VCC = 10 V, R = 9300 ohm, VBE = 0.7 V, beta = 100
Iref = 0.001 A
Iout = 0.0009803921569 A
ratio = 0.9803921569

Run it

Terminal
$ electronics-engineering solve elx_current_mirror "VCC=10 V" "R=9300 ohm" "VBE=0.7 V" beta=100
Iref = 0.001 A
Iout = 0.0009803921569 A
ratio = 0.9803921569
  by: BJT current mirror with finite beta  (Iref = (VCC - VBE)/R; Iout = Iref beta/(beta + 2))
  VCC = 10 V
  R = 9300 ohm
  VBE = 0.7 V
  beta = 100
  assumes: matched transistors, Early effect neglected

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

BJT differential pair: differential and common-mode gain, CMRR1 fig.elx_differential_pair

The differential gain (differential and single-ended output), the common-mode gain and the common-mode rejection ratio of a resistively loaded BJT differential pair with a tail current source of finite resistance.

A_{cm} = -\frac{g_mR_C}{1 + 2R_{EE}(\beta+1)/r_\pi},\quad \text{CMRR} = \frac{1 + 2R_{EE}(\beta+1)/r_\pi}{2}

You give

MeaningUnitExample
I_{\mathrm{tail}}
Tail (bias) currentA1 mA
\beta
Current gain—100
\text{VT}
Thermal voltageV25 mV
\text{RC}
Collector resistor of each sideohm10000 ohm
\text{REE}
Output resistance of the tail current sourceohm100000 ohm

You get

MeaningUnitExample
\text{IC}
Collector current of each transistorA0.000495049505 A
\text{gm}
Transconductance of eachS0.0198019802 S
\text{Ad\_diff}
Differential gain, differential output—-198.019802
\text{Ad\_se}
Differential gain, single-ended output—-99.00990099
\text{Acm}
Common-mode gain, single-ended output—-0.04949257735
\text{CMRR}
|Ad_se/Acm|—2000.5
\text{CMRR\_dB}
CMRR in dB—66.02277111

Values with a unit may be written in any unit of the right kind.

Applies when

  • matched transistors, r_o neglected

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Differential pair: I_tail = 1 mA, beta = 100, VT = 25 mV, RC = 10000 ohm, REE = 100000 ohm
IC = 0.000495049505 A
gm = 0.0198019802 S
Ad_diff = -198.019802
Ad_se = -99.00990099
Acm = -0.04949257735
CMRR = 2000.5

Run it

Terminal
$ electronics-engineering solve elx_differential_pair "I_tail=1 mA" beta=100 "VT=25 mV" "RC=10000 ohm" "REE=100000 ohm"
IC = 0.000495049505 A
gm = 0.0198019802 S
Ad_diff = -198.019802
Ad_se = -99.00990099
Acm = -0.04949257735
CMRR = 2000.5
CMRR_dB = 66.02277111
  by: BJT differential pair: differential and common-mode gain, CMRR  (IC = alpha I/2; gm = IC/VT; Ad = -gm RC (/2 single-ended); Acm = -gm RC/(1 + 2 REE (beta + 1)/r_pi); CMRR = |Ad,se/Acm|)
  I_tail = 0.001 A
  beta = 100
  VT = 0.025 V
  RC = 10000 ohm
  REE = 100000 ohm
  assumes: matched transistors, r_o neglected

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

BJT dual-supply emitter bias: Q-point1 fig.elx_bjt_emitter_bias

The Q-point of a transistor with its base returned to ground through RB and its emitter returned to a negative supply -VEE through RE (emitter bias).

I_E = \frac{V_{EE} – V_{BE}}{R_E + R_B/(\beta+1)}

You give

MeaningUnitExample
\text{VCC}
Positive supplyV10 V
\text{VEE}
Magnitude of the negative supplyV10 V
\text{RB}
Base resistor to groundohm10000 ohm
\text{RC}
Collector resistorohm4700 ohm
\text{RE}
Emitter resistor to -VEEohm10000 ohm
\beta
Current gain—100
\text{VBE}
Base-emitter voltageV0.7 V

You get

MeaningUnitExample
\text{IB}
Base currentA9.117647059e-06 A
\text{IC}
Collector currentA0.0009117647059 A
\text{IE}
Emitter currentA0.0009208823529 A
\text{VB}
Base voltageV-0.09117647059 V
\text{VE}
Emitter voltageV-0.7911764706 V
\text{VC}
Collector voltageV5.714705882 V
\text{VCE}
Collector-emitter voltageV6.505882353 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • VEE > VBE
  • active region: VCE >= 0.2 V

Outside these conditions it says what is wrong instead of returning a number.

Worked example

BJT emitter bias: VCC = 10 V, VEE = 10 V, RB = 10000 ohm, RC = 4700 ohm, RE = 10000 ohm, beta = 100, VBE = 0.7 V
IB = 9.117647059e-06 A
IC = 0.0009117647059 A
IE = 0.0009208823529 A
VB = -0.09117647059 V
VE = -0.7911764706 V
VC = 5.714705882 V

Run it

Terminal
$ electronics-engineering solve elx_bjt_emitter_bias "VCC=10 V" "VEE=10 V" "RB=10000 ohm" "RC=4700 ohm" "RE=10000 ohm" beta=100 "VBE=0.7 V"
IB = 9.117647059e-06 A
IC = 0.0009117647059 A
IE = 0.0009208823529 A
VB = -0.09117647059 V
VE = -0.7911764706 V
VC = 5.714705882 V
VCE = 6.505882353 V
  by: BJT dual-supply emitter bias: Q-point  (IE = (VEE - VBE)/(RE + RB/(beta + 1)); VB = -IB RB; VE = VB - VBE; VC = VCC - IC RC)
  VCC = 10 V
  VEE = 10 V
  RB = 10000 ohm
  RC = 4700 ohm
  RE = 10000 ohm
  beta = 100
  VBE = 0.7 V
  assumes: VEE > VBE; active region: VCE >= 0.2 V

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

BJT fixed (base-resistor) bias: Q-point1 fig.elx_bjt_fixed_bias

The quiescent base and collector currents and the collector-emitter voltage of a common-emitter stage biased by a single base resistor from the supply.

I_B = \frac{V_{CC} – V_{BE}}{R_B},\quad V_{CE} = V_{CC} – \beta I_BR_C

You give

MeaningUnitExample
\text{VCC}
Supply voltageV12 V
\text{RB}
Base resistorohm470000 ohm
\text{RC}
Collector resistorohm2200 ohm
\beta
Current gain—100
\text{VBE}
Base-emitter voltage (about 0.7 V)V0.7 V

You get

MeaningUnitExample
\text{IB}
Base currentA2.404255319e-05 A
\text{IC}
Collector currentA0.002404255319 A
\text{IE}
Emitter currentA0.002428297872 A
\text{VCE}
Collector-emitter voltageV6.710638298 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • active region: VCE >= 0.2 V (otherwise refused as saturated)

Outside these conditions it says what is wrong instead of returning a number.

Worked example

BJT fixed bias: VCC = 12 V, RB = 470000 ohm, RC = 2200 ohm, beta = 100, VBE = 0.7 V
IB = 2.404255319e-05 A
IC = 0.002404255319 A
IE = 0.002428297872 A
VCE = 6.710638298 V

Run it

Terminal
$ electronics-engineering solve elx_bjt_fixed_bias "VCC=12 V" "RB=470000 ohm" "RC=2200 ohm" beta=100 "VBE=0.7 V"
IB = 2.404255319e-05 A
IC = 0.002404255319 A
IE = 0.002428297872 A
VCE = 6.710638298 V
  by: BJT fixed (base-resistor) bias: Q-point  (IB = (VCC - VBE)/RB; IC = beta IB; VCE = VCC - IC RC)
  VCC = 12 V
  RB = 470000 ohm
  RC = 2200 ohm
  beta = 100
  VBE = 0.7 V
  assumes: active region: VCE >= 0.2 V (otherwise refused as saturated)

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

BJT small-signal (hybrid-pi) parameters1 fig.elx_bjt_small_signal_parameters

The transconductance gm, the input resistance r_pi, the emitter resistance r_e, the output resistance r_o (Early voltage) and the intrinsic gain of a bipolar transistor at its bias current.

g_m = \frac{I_C}{V_T},\quad r_\pi = \frac{\beta}{g_m},\quad r_e = \frac{\alpha}{g_m},\quad r_o = \frac{V_A}{I_C}

You give

MeaningUnitExample
\text{IC}
Collector bias currentA1 mA
\beta
Current gain—100
\text{VT}
Thermal voltage (25 or 26 mV)V25 mV
\text{VA}
Early voltageV100 V

You get

MeaningUnitExample
\text{gm}
TransconductanceS0.04 S
r_{\pi}
Base input resistance r_piohm2500 ohm
r_{e}
Emitter resistance r_eohm24.75247525 ohm
r_{o}
Output resistanceohm100000 ohm
\text{A0}
Intrinsic voltage gain gm r_o—4000

Values with a unit may be written in any unit of the right kind.

Applies when

  • IC, beta, VT, VA > 0
  • active region

Outside these conditions it says what is wrong instead of returning a number.

Worked example

BJT small-signal parameters: IC = 1 mA, beta = 100, VT = 25 mV, VA = 100 V
gm = 0.04 S
r_pi = 2500 ohm
r_e = 24.75247525 ohm
r_o = 100000 ohm
A0 = 4000

Run it

Terminal
$ electronics-engineering solve elx_bjt_small_signal_parameters "IC=1 mA" beta=100 "VT=25 mV" "VA=100 V"
gm = 0.04 S
r_pi = 2500 ohm
r_e = 24.75247525 ohm
r_o = 100000 ohm
A0 = 4000
  by: BJT small-signal (hybrid-pi) parameters  (gm = IC/VT; r_pi = beta/gm; r_e = alpha/gm; r_o = VA/IC; A0 = VA/VT)
  IC = 0.001 A
  beta = 100
  VT = 0.025 V
  VA = 100 V
  assumes: IC, beta, VT, VA > 0; active region

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

BJT terminal currents from beta2 fig.elx_bjt_current_relations

The collector and emitter currents and the common-base current gain alpha of a bipolar transistor in the active region from its base current and beta.

I_C = \beta I_B,\quad I_E = (\beta+1)I_B,\quad \alpha = \frac{\beta}{\beta+1}

You give

MeaningUnitExample
\text{IB}
Base currentA20 uA
\beta
Common-emitter current gain (hFE)—100

You get

MeaningUnitExample
\text{IC}
Collector currentA0.002 A
\text{IE}
Emitter currentA0.00202 A
\alpha
alpha = beta/(beta + 1)—0.9900990099

Values with a unit may be written in any unit of the right kind.

Applies when

  • IB > 0, beta > 0
  • active region

Outside these conditions it says what is wrong instead of returning a number.

Worked example

BJT currents: IB = 20 uA, beta = 100
IC = 0.002 A
IE = 0.00202 A
alpha = 0.9900990099

Run it

Terminal
$ electronics-engineering solve elx_bjt_current_relations "IB=20 uA" beta=100
IC = 0.002 A
IE = 0.00202 A
alpha = 0.9900990099
  by: BJT terminal currents from beta  (IC = beta IB; IE = (beta + 1) IB; alpha = beta/(beta + 1))
  IB = 2e-05 A
  beta = 100
  assumes: IB > 0, beta > 0; active region

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

BJT voltage-divider bias: exact Q-point1 fig.elx_bjt_voltage_divider_bias

The Q-point (base, collector and emitter currents, node voltages and VCE) of a common-emitter stage with a base voltage divider and an emitter resistor, by the exact Thevenin analysis (base current included).

I_B = \frac{V_{TH} – V_{BE}}{R_{TH} + (\beta+1)R_E}

You give

MeaningUnitExample
\text{VCC}
Supply voltageV12 V
\text{R1}
Upper divider resistor (supply to base)ohm47000 ohm
\text{R2}
Lower divider resistor (base to ground)ohm10000 ohm
\text{RC}
Collector resistorohm2200 ohm
\text{RE}
Emitter resistorohm470 ohm
\beta
Current gain—150
\text{VBE}
Base-emitter voltageV0.7 V

You get

MeaningUnitExample
\text{VTH}
Thevenin voltage of the dividerV2.105263158 V
\text{RTH}
Thevenin resistance of the dividerohm8245.614035 ohm
\text{IB}
Base currentA1.773972436e-05 A
\text{IC}
Collector currentA0.002660958654 A
\text{IE}
Emitter currentA0.002678698378 A
\text{VB}
Base voltageV1.958988238 V
\text{VE}
Emitter voltageV1.258988238 V
\text{VC}
Collector voltageV6.145890962 V
\text{VCE}
Collector-emitter voltageV4.886902724 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • VTH > VBE
  • active region: VCE >= 0.2 V

Outside these conditions it says what is wrong instead of returning a number.

Worked example

BJT voltage-divider bias: VCC = 12 V, R1 = 47000 ohm, R2 = 10000 ohm, RC = 2200 ohm, RE = 470 ohm, beta = 150, VBE = 0.7 V
VTH = 2.105263158 V
RTH = 8245.614035 ohm
IB = 1.773972436e-05 A
IC = 0.002660958654 A
IE = 0.002678698378 A
VB = 1.958988238 V

Run it

Terminal
$ electronics-engineering solve elx_bjt_voltage_divider_bias "VCC=12 V" "R1=47000 ohm" "R2=10000 ohm" "RC=2200 ohm" "RE=470 ohm" beta=150 "VBE=0.7 V"
VTH = 2.105263158 V
RTH = 8245.614035 ohm
IB = 1.773972436e-05 A
IC = 0.002660958654 A
IE = 0.002678698378 A
VB = 1.958988238 V
VE = 1.258988238 V
VC = 6.145890962 V
VCE = 4.886902724 V
  by: BJT voltage-divider bias: exact Q-point  (VTH = VCC R2/(R1 + R2); RTH = R1 || R2; IB = (VTH - VBE)/(RTH + (beta + 1) RE); VCE = VCC - IC RC - IE RE)
  VCC = 12 V
  R1 = 47000 ohm
  R2 = 10000 ohm
  RC = 2200 ohm
  RE = 470 ohm
  beta = 150
  VBE = 0.7 V
  assumes: VTH > VBE; active region: VCE >= 0.2 V

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Common-base amplifier1 fig.elx_common_base_amplifier

The voltage gain (emitter to collector and source to load), the low input resistance and the output resistance of a common-base stage (hybrid-pi model, r_o neglected).

A_v = g_m(R_C\parallel R_L),\quad R_{in} = R_E\parallel r_e

You give

MeaningUnitExample
\text{IC}
Collector bias currentA1 mA
\beta
Current gain—100
\text{VT}
Thermal voltageV25 mV
\text{RC}
Collector resistorohm5000 ohm
\text{RL}
Load resistorohm5000 ohm
\text{RE}
Emitter bias resistorohm10000 ohm
\text{Rsig}
Source resistanceohm50 ohm

You get

MeaningUnitExample
\text{Av}
Voltage gain emitter to output—100
\text{Rin}
Input resistance (RE || r_e)ohm24.69135802 ohm
\text{Rout}
Output resistance (RC)ohm5000 ohm
\text{Gv}
Overall gain from the source—33.05785124

Values with a unit may be written in any unit of the right kind.

Applies when

  • r_o neglected
  • base at signal ground

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Common-base amplifier: IC = 1 mA, beta = 100, VT = 25 mV, RC = 5000 ohm, RL = 5000 ohm, RE = 10000 ohm, Rsig = 50 ohm
Av = 100
Rin = 24.69135802 ohm
Rout = 5000 ohm
Gv = 33.05785124

Run it

Terminal
$ electronics-engineering solve elx_common_base_amplifier "IC=1 mA" beta=100 "VT=25 mV" "RC=5000 ohm" "RL=5000 ohm" "RE=10000 ohm" "Rsig=50 ohm"
Av = 100
Rin = 24.69135802 ohm
Rout = 5000 ohm
Gv = 33.05785124
  by: Common-base amplifier  (Av = gm (RC || RL); Rin = RE || r_e with r_e = alpha/gm; Gv = Av Rin/(Rin + Rsig))
  IC = 0.001 A
  beta = 100
  VT = 0.025 V
  RC = 5000 ohm
  RL = 5000 ohm
  RE = 10000 ohm
  Rsig = 50 ohm
  assumes: r_o neglected; base at signal ground

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Common-collector (emitter-follower) amplifier1 fig.elx_common_collector_amplifier

The voltage gain, input resistance and output resistance of an emitter follower, including the source resistance reflected into the emitter (hybrid-pi model, r_o neglected).

A_v = \frac{(\beta+1)R_E'}{r_\pi + (\beta+1)R_E'},\quad R_{out} = R_E\parallel\frac{r_\pi + R_{sig}\parallel R_B}{\beta+1}

You give

MeaningUnitExample
\text{IC}
Collector bias currentA5 mA
\beta
Current gain—100
\text{VT}
Thermal voltageV25 mV
\text{RE}
Emitter resistorohm1000 ohm
\text{RL}
Load resistorohm1000 ohm
\text{RB}
Bias resistance at the baseohm100000 ohm
\text{Rsig}
Source resistanceohm10000 ohm

You get

MeaningUnitExample
\text{Av}
Voltage gain base to output—0.9901960784
\text{Rin}
Input resistanceohm33774.83444 ohm
\text{Rout}
Output resistanceohm86.7242088 ohm
\text{Gv}
Overall gain from the source—0.7639939486

Values with a unit may be written in any unit of the right kind.

Applies when

  • r_o neglected

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Common-collector amplifier: IC = 5 mA, beta = 100, VT = 25 mV, RE = 1000 ohm, RL = 1000 ohm, RB = 100000 ohm, Rsig = 10000 ohm
Av = 0.9901960784
Rin = 33774.83444 ohm
Rout = 86.7242088 ohm
Gv = 0.7639939486

Run it

Terminal
$ electronics-engineering solve elx_common_collector_amplifier "IC=5 mA" beta=100 "VT=25 mV" "RE=1000 ohm" "RL=1000 ohm" "RB=100000 ohm" "Rsig=10000 ohm"
Av = 0.9901960784
Rin = 33774.83444 ohm
Rout = 86.7242088 ohm
Gv = 0.7639939486
  by: Common-collector (emitter-follower) amplifier  (Av = (beta + 1)(RE || RL)/(r_pi + (beta + 1)(RE || RL)); Rout = RE || (r_pi + Rsig || RB)/(beta + 1))
  IC = 0.005 A
  beta = 100
  VT = 0.025 V
  RE = 1000 ohm
  RL = 1000 ohm
  RB = 100000 ohm
  Rsig = 10000 ohm
  assumes: r_o neglected

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Common-emitter amplifier: gain, input and output resistance1 fig.elx_common_emitter_amplifier

The voltage gain (base to collector and source to load), the input and output resistances of a common-emitter stage with an optional unbypassed emitter resistance, from the bias current (hybrid-pi model, r_o neglected).

A_v = -\frac{\beta\,(R_C\parallel R_L)}{r_\pi + (\beta+1)R_{E1}}

You give

MeaningUnitExample
\text{IC}
Collector bias currentA1 mA
\beta
Current gain—100
\text{VT}
Thermal voltageV25 mV
\text{RC}
Collector resistorohm5000 ohm
\text{RL}
Load resistorohm10000 ohm
\text{RE1}
Unbypassed emitter resistance (0 if fully bypassed)ohm0 ohm
\text{RB}
Bias resistance seen at the base (R1 || R2)ohm20000 ohm
\text{Rsig}
Source resistanceohm1000 ohm

You get

MeaningUnitExample
\text{gm}
TransconductanceS0.04 S
r_{\pi}
r_piohm2500 ohm
\text{Av}
Voltage gain base to output—-133.3333333
\text{Rin}
Input resistance (including RB)ohm2222.222222 ohm
\text{Rout}
Output resistance (RC)ohm5000 ohm
\text{Gv}
Overall gain from the source voltage—-91.95402299

Values with a unit may be written in any unit of the right kind.

Applies when

  • r_o neglected
  • coupling and bypass capacitors short at signal frequency

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Common-emitter amplifier: IC = 1 mA, beta = 100, VT = 25 mV, RC = 5000 ohm, RL = 10000 ohm, RE1 = 0 ohm, RB = 20000 ohm, Rsig = 1000 ohm
gm = 0.04 S
r_pi = 2500 ohm
Av = -133.3333333
Rin = 2222.222222 ohm
Rout = 5000 ohm
Gv = -91.95402299

Run it

Terminal
$ electronics-engineering solve elx_common_emitter_amplifier "IC=1 mA" beta=100 "VT=25 mV" "RC=5000 ohm" "RL=10000 ohm" "RE1=0 ohm" "RB=20000 ohm" "Rsig=1000 ohm"
gm = 0.04 S
r_pi = 2500 ohm
Av = -133.3333333
Rin = 2222.222222 ohm
Rout = 5000 ohm
Gv = -91.95402299
  by: Common-emitter amplifier: gain, input and output resistance  (Av = -beta (RC || RL)/(r_pi + (beta + 1) RE1); Rin = RB || (r_pi + (beta + 1) RE1); Gv = Av Rin/(Rin + Rsig))
  IC = 0.001 A
  beta = 100
  VT = 0.025 V
  RC = 5000 ohm
  RL = 10000 ohm
  RE1 = 0 ohm
  RB = 20000 ohm
  Rsig = 1000 ohm
  assumes: r_o neglected; coupling and bypass capacitors short at signal frequency

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Common-emitter high-frequency cutoff: Miller effect and open-circuit time constants1 fig.elx_miller_high_cutoff

The Miller capacitance, the upper -3 dB frequency of a common-emitter (or common-source) stage by the Miller approximation, and the open-circuit time-constant estimate that also counts the output side of Cmu.

C_M = C_\mu(1 + g_mR_L'),\quad \tau_{oc} = C_\pi R_\pi' + C_\mu\left(R_\pi' + R_L' + g_mR_\pi'R_L'\right)

You give

MeaningUnitExample
\text{gm}
TransconductanceS40 mS
r_{\pi}
r_pi (use a very large value for a MOSFET)ohm2500 ohm
\text{Cpi}
Input capacitance Cpi (Cgs)F10 pF
\text{Cmu}
Feedback capacitance Cmu (Cgd)F2 pF
\text{RLp}
Total load at the collector (RC || RL || r_o)ohm2500 ohm
\text{Rsigp}
Source resistance seen at the base (Rsig || RB)ohm1000 ohm

You get

MeaningUnitExample
A_{\mathrm{mid}}
Gain across Cmu, -gm RL'—-100
C_{M}
Miller capacitanceF2.02e-10 F
R_{\pi,\mathrm{eq}}
Resistance seen by Cpi (r_pi || Rsig')ohm714.2857143 ohm
f_{H,\mathrm{miller}}
Upper cutoff, Miller approximationHz1051023.209 Hz
\tau_{\mathrm{oc}}
Sum of open-circuit time constantss1.564285714e-07 s
f_{H,\mathrm{octc}}
Upper cutoff, open-circuit time constantsHz1017428.86 Hz

Values with a unit may be written in any unit of the right kind.

Applies when

  • mid-band gain unchanged by the capacitors
  • dominant-pole estimate

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Miller high-frequency cutoff: gm = 40 mS, r_pi = 2500 ohm, Cpi = 10 pF, Cmu = 2 pF, RLp = 2500 ohm, Rsigp = 1000 ohm
A_mid = -100
C_M = 2.02e-10 F
R_pi_eq = 714.2857143 ohm
f_H_miller = 1051023.209 Hz
tau_oc = 1.564285714e-07 s
f_H_octc = 1017428.86 Hz

Run it

Terminal
$ electronics-engineering solve elx_miller_high_cutoff "gm=40 mS" "r_pi=2500 ohm" "Cpi=10 pF" "Cmu=2 pF" "RLp=2500 ohm" "Rsigp=1000 ohm"
A_mid = -100
C_M = 2.02e-10 F
R_pi_eq = 714.2857143 ohm
f_H_miller = 1051023.209 Hz
tau_oc = 1.564285714e-07 s
f_H_octc = 1017428.86 Hz
  by: Common-emitter high-frequency cutoff: Miller effect and open-circuit time constants  (C_M = Cmu (1 + gm RL'); f_H = 1/(2 pi (r_pi || Rsig')(Cpi + C_M)); tau = Cpi R' + Cmu (R' + RL' + gm R' RL'))
  gm = 0.04 S
  r_pi = 2500 ohm
  Cpi = 1e-11 F
  Cmu = 2e-12 F
  RLp = 2500 ohm
  Rsigp = 1000 ohm
  assumes: mid-band gain unchanged by the capacitors; dominant-pole estimate

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Common-emitter low-frequency cutoff by short-circuit time constants1 fig.elx_low_frequency_cutoff

The resistance seen by each coupling and bypass capacitor of a common-emitter amplifier and the lower -3 dB frequency estimated as the sum of the short-circuit pole frequencies (r_o neglected).

f_L \approx \sum_i \frac{1}{2\pi R_iC_i}

You give

MeaningUnitExample
\text{Rsig}
Source resistanceohm1000 ohm
\text{RB}
Bias resistance at the base (R1 || R2)ohm20000 ohm
r_{\pi}
r_piohm2500 ohm
\beta
Current gain—100
\text{RE}
Emitter resistor (bypassed by CE)ohm1000 ohm
\text{RC}
Collector resistorohm5000 ohm
\text{RL}
Load resistorohm10000 ohm
\text{C1}
Input coupling capacitorF10 uF
\text{C2}
Output coupling capacitorF10 uF
\text{CE}
Emitter bypass capacitorF100 uF

You get

MeaningUnitExample
R_{\mathrm{C1}}
Resistance seen by C1ohm3222.222222 ohm
R_{\mathrm{CE}}
Resistance seen by CEohm33.05219968 ohm
R_{\mathrm{C2}}
Resistance seen by C2ohm15000 ohm
f_{\mathrm{C1}}
Pole of C1Hz4.939291337 Hz
f_{\mathrm{CE}}
Pole of CEHz48.15260244 Hz
f_{\mathrm{C2}}
Pole of C2Hz1.061032954 Hz
f_{L}
Estimated lower cutoffHz54.15292673 Hz

Values with a unit may be written in any unit of the right kind.

Applies when

  • short-circuit time-constant estimate
  • r_o neglected

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Low-frequency cutoff: Rsig = 1000 ohm, RB = 20000 ohm, r_pi = 2500 ohm, beta = 100, RE = 1000 ohm, RC = 5000 ohm, RL = 10000 ohm, C1 = 10 uF, C2 = 10 uF, CE = 100 uF
R_C1 = 3222.222222 ohm
R_CE = 33.05219968 ohm
R_C2 = 15000 ohm
f_C1 = 4.939291337 Hz
f_CE = 48.15260244 Hz
f_C2 = 1.061032954 Hz

Run it

Terminal
$ electronics-engineering solve elx_low_frequency_cutoff "Rsig=1000 ohm" "RB=20000 ohm" "r_pi=2500 ohm" beta=100 "RE=1000 ohm" "RC=5000 ohm" "RL=10000 ohm" "C1=10 uF" "C2=10 uF" "CE=100 uF"
R_C1 = 3222.222222 ohm
R_CE = 33.05219968 ohm
R_C2 = 15000 ohm
f_C1 = 4.939291337 Hz
f_CE = 48.15260244 Hz
f_C2 = 1.061032954 Hz
f_L = 54.15292673 Hz
  by: Common-emitter low-frequency cutoff by short-circuit time constants  (R_C1 = Rsig + RB || r_pi; R_CE = RE || (r_pi + Rsig || RB)/(beta + 1); R_C2 = RC + RL; f_L = sum 1/(2 pi R C))
  Rsig = 1000 ohm
  RB = 20000 ohm
  r_pi = 2500 ohm
  beta = 100
  RE = 1000 ohm
  RC = 5000 ohm
  RL = 10000 ohm
  C1 = 1e-05 F
  C2 = 1e-05 F
  CE = 0.0001 F
  assumes: short-circuit time-constant estimate; r_o neglected

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Wilson current mirror output current2 fig.elx_wilson_current_mirror

The output current of a three-transistor Wilson current mirror and its small base-current error, 2/(beta^2 + 2 beta + 2).

I_{out} = I_{ref}\left(1 – \frac{2}{\beta^2 + 2\beta + 2}\right)

You give

MeaningUnitExample
\text{Iref}
Reference currentA1 mA
\beta
Current gain of each matched transistor—100

You get

MeaningUnitExample
\text{Iout}
Output currentA0.00099980396 A
\text{ratio}
Iout/Iref—0.99980396
\text{error}
Relative error 1 – Iout/Iref—0.0001960399922

Values with a unit may be written in any unit of the right kind.

Applies when

  • matched transistors, Early effect neglected

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Wilson current mirror: Iref = 1 mA, beta = 100
Iout = 0.00099980396 A
ratio = 0.99980396
error = 0.0001960399922

Run it

Terminal
$ electronics-engineering solve elx_wilson_current_mirror "Iref=1 mA" beta=100
Iout = 0.00099980396 A
ratio = 0.99980396
error = 0.0001960399922
  by: Wilson current mirror output current  (Iout = Iref (1 - 2/(beta^2 + 2 beta + 2)))
  Iref = 0.001 A
  beta = 100
  assumes: matched transistors, Early effect neglected

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

CMOS 2

CMOS gate propagation delay (switch-resistor model)1 fig.elx_cmos_propagation_delay

The high-to-low and low-to-high propagation delays (50 % points) and their average for a CMOS gate modelled as switched equivalent resistances driving a load capacitance.

t_{pHL} = \ln 2\,R_nC_L,\quad t_{pLH} = \ln 2\,R_pC_L

You give

MeaningUnitExample
\text{Rn}
Equivalent on-resistance of the pull-down networkohm10000 ohm
\text{Rp}
Equivalent on-resistance of the pull-up networkohm20000 ohm
\text{CL}
Load capacitanceF100 fF

You get

MeaningUnitExample
\text{tpHL}
High-to-low delays6.931471806e-10 s
\text{tpLH}
Low-to-high delays1.386294361e-09 s
\text{tp}
Average propagation delays1.039720771e-09 s

Values with a unit may be written in any unit of the right kind.

Applies when

  • step input, RC switch model

Outside these conditions it says what is wrong instead of returning a number.

Worked example

CMOS propagation delay: Rn = 10000 ohm, Rp = 20000 ohm, CL = 100 fF
tpHL = 6.931471806e-10 s
tpLH = 1.386294361e-09 s
tp = 1.039720771e-09 s

Run it

Terminal
$ electronics-engineering solve elx_cmos_propagation_delay "Rn=10000 ohm" "Rp=20000 ohm" "CL=100 fF"
tpHL = 6.931471806e-10 s
tpLH = 1.386294361e-09 s
tp = 1.039720771e-09 s
  by: CMOS gate propagation delay (switch-resistor model)  (tpHL = ln 2 Rn CL; tpLH = ln 2 Rp CL; tp = (tpHL + tpLH)/2)
  Rn = 10000 ohm
  Rp = 20000 ohm
  CL = 1e-13 F
  assumes: step input, RC switch model

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

CMOS inverter switching threshold VM1 fig.elx_cmos_switching_threshold

The switching threshold of a CMOS inverter (input = output, both transistors saturated) from the supply, the two threshold voltages and the two transconductance parameters.

V_M = \frac{V_{tn} + r\,(V_{DD} – |V_{tp}|)}{1 + r},\quad r = \sqrt{k_p/k_n}

You give

MeaningUnitExample
\text{VDD}
Supply voltageV2.5 V
\text{Vtn}
NMOS thresholdV0.4 V
\text{Vtp}
Magnitude of the PMOS thresholdV0.4 V
\text{kn}
NMOS mu_n Cox W/LA/V^20.1 mA/V^2
\text{kp}
PMOS mu_p Cox W/LA/V^20.1 mA/V^2

You get

MeaningUnitExample
r
sqrt(kp/kn)—1
\text{VM}
Switching thresholdV1.25 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • Vtn + |Vtp| < VDD
  • lambda neglected

Outside these conditions it says what is wrong instead of returning a number.

Worked example

CMOS switching threshold: VDD = 2.5 V, Vtn = 0.4 V, Vtp = 0.4 V, kn = 0.1 mA/V^2, kp = 0.1 mA/V^2
r = 1
VM = 1.25 V

Run it

Terminal
$ electronics-engineering solve elx_cmos_switching_threshold "VDD=2.5 V" "Vtn=0.4 V" "Vtp=0.4 V" "kn=0.1 mA/V^2" "kp=0.1 mA/V^2"
r = 1
VM = 1.25 V
  by: CMOS inverter switching threshold VM  (VM = (Vtn + r (VDD - |Vtp|))/(1 + r), r = sqrt(kp/kn))
  VDD = 2.5 V
  Vtn = 0.4 V
  Vtp = 0.4 V
  kn = 0.0001 A/V^2
  kp = 0.0001 A/V^2
  assumes: Vtn + |Vtp| < VDD; lambda neglected

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Data converters 9

ADC output code, LSB and quantisation error2 fig.elx_adc_code

The output code (decimal and binary) of an ideal unipolar truncating n-bit ADC for an input voltage, the LSB size, the voltage the code represents and the quantisation error.

D = \left\lfloor \frac{V_{in}}{V_{ref}}2^n\right\rfloor,\quad \text{LSB} = \frac{V_{ref}}{2^n}

You give

MeaningUnitExample
\text{Vin}
Analog inputV3.2 V
\text{Vref}
Reference (full-scale) voltageV5 V
n
Resolution in bits—8

You get

MeaningUnitExample
\text{code}
Output code (decimal)—163
\text{bits}
Output code in binary—10100011
\text{LSB}
LSB = Vref/2^nV0.01953125 V
V_{\mathrm{code}}
Voltage of the codeV3.18359375 V
\text{error}
Quantisation error Vin – code LSBV0.01640625 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0 <= Vin <= Vref
  • 1 <= n <= 16

Outside these conditions it says what is wrong instead of returning a number.

Worked example

ADC output code: Vin = 3.2 V, Vref = 5 V, n = 8
code = 163
bits = 10100011
LSB = 0.01953125 V
V_code = 3.18359375 V
error = 0.01640625 V

Run it

Terminal
$ electronics-engineering solve elx_adc_code "Vin=3.2 V" "Vref=5 V" n=8
code = 163
bits = 10100011
LSB = 0.01953125 V
V_code = 3.18359375 V
error = 0.01640625 V
  by: ADC output code, LSB and quantisation error  (code = floor(Vin 2^n/Vref), at most 2^n - 1; LSB = Vref/2^n)
  Vin = 3.2 V
  Vref = 5 V
  assumes: 0 <= Vin <= Vref; 1 <= n <= 16

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

ADC quantisation SNR with oversampling1 fig.elx_adc_quantization_snr

The signal-to-quantisation-noise ratio of an ideal n-bit converter for a sine input (6.02 n + 1.76 dB at full scale), with an oversampling ratio and a reduced amplitude, and the in-band noise in LSB.

\text{SNR} = 6.02\,n + 1.76 + 10\log_{10}\text{OSR}\ \text{dB}

You give

MeaningUnitExample
n
Resolution in bits—12
\text{OSR}
Oversampling ratio (default 1) optional—
A_{\mathrm{frac}}
Sine amplitude as a fraction of full scale (default 1) optional—

You get

MeaningUnitExample
\text{SNR\_dB}
Signal-to-quantisation-noise ratio, dB—74.00811155
\text{noise\_rms\_lsb}
In-band noise rms in LSB—0.2886751346
\text{SNR\_full\_scale\_dB}
Full-scale SNR without oversampling, dB—74.00811155

An optional input can be left out: a stated default is used.

Applies when

  • uniform quantisation noise, white over Nyquist
  • OSR >= 1

Outside these conditions it says what is wrong instead of returning a number.

Worked example

ADC quantization SNR: n = 12
SNR_dB = 74.00811155
noise_rms_lsb = 0.2886751346
SNR_full_scale_dB = 74.00811155

Run it

Terminal
$ electronics-engineering solve elx_adc_quantization_snr n=12
SNR_dB = 74.00811155
noise_rms_lsb = 0.2886751346
SNR_full_scale_dB = 74.00811155
  by: ADC quantisation SNR with oversampling  (SNR = 20 log10(A 2^n sqrt(1.5)) + 10 log10(OSR) = 6.02 n + 1.76 + 20 log10 A + 10 log10 OSR)
  assumes: uniform quantisation noise, white over Nyquist; OSR >= 1

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Binary-weighted resistor DAC1 fig.elx_dac_binary_weighted

The output voltage and summing current of a binary-weighted resistor DAC with an inverting op-amp (MSB resistor R, each lower bit doubling it) and the largest resistor needed.

V_{out} = -V_{ref}\frac{R_f}{R}\sum_{k=0}^{n-1}\frac{b_k}{2^k} = -V_{ref}\frac{R_f}{R}\frac{D}{2^{n-1}}

You give

MeaningUnitExample
n
Resolution in bits—4
\text{code}
Input code (decimal)—10
\text{Vref}
Reference voltageV5 V
R
MSB resistorohm10000 ohm
\text{Rf}
Feedback resistorohm5000 ohm

You get

MeaningUnitExample
\text{Vout}
Output voltageV-3.125 V
I_{\mathrm{total}}
Total current into the summing nodeA0.000625 A
R_{\mathrm{LSB}}
LSB resistor R 2^(n-1)ohm80000 ohm

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal switches and op-amp

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Binary-weighted DAC: n = 4, code = 10, Vref = 5 V, R = 10000 ohm, Rf = 5000 ohm
Vout = -3.125 V
I_total = 0.000625 A
R_LSB = 80000 ohm

Run it

Terminal
$ electronics-engineering solve elx_dac_binary_weighted n=4 code=10 "Vref=5 V" "R=10000 ohm" "Rf=5000 ohm"
Vout = -3.125 V
I_total = 0.000625 A
R_LSB = 80000 ohm
  by: Binary-weighted resistor DAC  (I = Vref D/(R 2^(n-1)); Vout = -Rf I)
  Vref = 5 V
  R = 10000 ohm
  Rf = 5000 ohm
  assumes: ideal switches and op-amp

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

DAC output voltage (R-2R or any binary DAC)1 fig.elx_dac_output

The output voltage of an ideal n-bit unipolar DAC for a code, Vout = Vref D/2^n, its step size and its full-scale output.

V_{out} = V_{ref}\frac{D}{2^n}

You give

MeaningUnitExample
n
Resolution in bits—8
\text{code}
Input code (decimal)—200
\text{Vref}
Reference voltageV5 V

You get

MeaningUnitExample
\text{Vout}
Output voltageV3.90625 V
\text{LSB}
Step size Vref/2^nV0.01953125 V
V_{\mathrm{full},\mathrm{scale}}
Output for the all-ones codeV4.98046875 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0 <= code <= 2^n – 1

Outside these conditions it says what is wrong instead of returning a number.

Worked example

DAC output voltage: n = 8, code = 200, Vref = 5 V
Vout = 3.90625 V
LSB = 0.01953125 V
V_full_scale = 4.98046875 V

Run it

Terminal
$ electronics-engineering solve elx_dac_output n=8 code=200 "Vref=5 V"
Vout = 3.90625 V
LSB = 0.01953125 V
V_full_scale = 4.98046875 V
  by: DAC output voltage (R-2R or any binary DAC)  (Vout = Vref D/2^n; full scale Vref (2^n - 1)/2^n)
  Vref = 5 V
  assumes: 0 <= code <= 2^n - 1

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Dual-slope integrating ADC1 fig.elx_dual_slope_adc

The fixed integration time, the de-integration time and count, and the peak integrator voltage of a dual-slope ADC.

T_2 = T_1\frac{V_{in}}{V_{ref}},\quad N_2 = N_1\frac{V_{in}}{V_{ref}}

You give

MeaningUnitExample
\text{Vin}
Input voltage (magnitude)V0.5 V
\text{Vref}
Reference voltage (magnitude)V1 V
\text{N1}
Fixed count of the integration phase—1000
\text{fclk}
Clock frequencyHz100000 Hz
R
Integrator resistorohm100000 ohm
C
Integrator capacitorF0.1 uF

You get

MeaningUnitExample
\text{T1}
Integration time N1/fclks0.01 s
\text{T2}
De-integration times0.005 s
\text{N2}
Count of the de-integration phase (unrounded)—500
V_{\mathrm{peak}}
Peak integrator outputV0.5 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0 < Vin <= Vref

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Dual-slope ADC: Vin = 0.5 V, Vref = 1 V, N1 = 1000, fclk = 100000 Hz, R = 100000 ohm, C = 0.1 uF
T1 = 0.01 s
T2 = 0.005 s
N2 = 500
V_peak = 0.5 V

Run it

Terminal
$ electronics-engineering solve elx_dual_slope_adc "Vin=0.5 V" "Vref=1 V" N1=1000 "fclk=100000 Hz" "R=100000 ohm" "C=0.1 uF"
T1 = 0.01 s
T2 = 0.005 s
N2 = 500
V_peak = 0.5 V
  by: Dual-slope integrating ADC  (T1 = N1/fclk; T2 = T1 Vin/Vref; N2 = N1 Vin/Vref; V_peak = Vin T1/(R C))
  Vin = 0.5 V
  Vref = 1 V
  fclk = 100000 Hz
  R = 100000 ohm
  C = 1e-07 F
  assumes: 0 < Vin <= Vref

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Effective number of bits (ENOB) from SINAD1 fig.elx_adc_enob

The effective number of bits of a converter from its measured SINAD (IEEE 1241: ENOB = (SINAD – 1.76)/6.02) and the bits lost against its nominal resolution.

\text{ENOB} = \frac{\text{SINAD} – 1.76}{6.02}

You give

MeaningUnitExample
\text{SINAD}
Signal to noise and distortion ratio in dB—74
n
Nominal resolution in bits—14

You get

MeaningUnitExample
\text{ENOB}
Effective number of bits—12
\text{bits\_lost}
n – ENOB—2

Applies when

  • full-scale sine test

Outside these conditions it says what is wrong instead of returning a number.

Worked example

ADC ENOB: SINAD = 74 dB, n = 14
ENOB = 12
bits_lost = 2

Run it

Terminal
$ electronics-engineering solve elx_adc_enob SINAD=74 n=14
ENOB = 12
bits_lost = 2
  by: Effective number of bits (ENOB) from SINAD  (ENOB = (SINAD - 1.76)/6.02)
  SINAD = 74
  assumes: full-scale sine test

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Sample-and-hold droop1 fig.elx_sample_hold_droop

The droop rate I/C of a sample-and-hold capacitor discharged by a leakage current, the droop over a hold time (in volts and LSB) and the longest hold that keeps the droop within half an LSB of an n-bit converter.

\frac{dV}{dt} = \frac{I_{leak}}{C}

You give

MeaningUnitExample
I_{\mathrm{leak}}
Leakage (bias) currentA1 nA
C
Hold capacitorF1 nF
t_{\mathrm{hold}}
Hold times10 us
\text{Vref}
Converter full scaleV5 V
n
Converter resolution in bits—12

You get

MeaningUnitExample
\text{droop\_rate}
Droop rate I/CV/s1 V/s
\text{droop}
Droop over the hold timeV1e-05 V
\text{droop\_lsb}
Droop in LSB—0.008192
t_{\mathrm{max},\mathrm{half},\mathrm{lsb}}
Longest hold for half an LSBs0.0006103515625 s

Values with a unit may be written in any unit of the right kind.

Applies when

  • constant leakage current

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Sample-and-hold droop: I_leak = 1 nA, C = 1 nF, t_hold = 10 us, Vref = 5 V, n = 12
droop_rate = 1 V/s
droop = 1e-05 V
droop_lsb = 0.008192
t_max_half_lsb = 0.0006103515625 s

Run it

Terminal
$ electronics-engineering solve elx_sample_hold_droop "I_leak=1 nA" "C=1 nF" "t_hold=10 us" "Vref=5 V" n=12
droop_rate = 1 V/s
droop = 1e-05 V
droop_lsb = 0.008192
t_max_half_lsb = 0.0006103515625 s
  by: Sample-and-hold droop  (dV/dt = I/C; dV = I t/C; t_max = (Vref/2^(n+1)) C/I)
  I_leak = 1e-09 A
  C = 1e-09 F
  t_hold = 1e-05 s
  Vref = 5 V
  assumes: constant leakage current

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

SNR limit from sampling-clock (aperture) jitter1 fig.elx_aperture_jitter_snr

The SNR limit -20 log10(2 pi f tj) set by rms sampling-clock jitter for a full-scale sine, combined with the quantisation SNR of an n-bit converter into a total SNR and effective bits.

\text{SNR}_j = -20\log_{10}(2\pi f t_j)

You give

MeaningUnitExample
f
Input frequencyHz100000000 Hz
\text{tj}
Rms clock jitters1 ps
n
Converter resolution in bits—14

You get

MeaningUnitExample
\text{SNR\_jitter\_dB}
Jitter-limited SNR, dB—64.03640263
\text{SNR\_quant\_dB}
Quantisation SNR, dB—86.04931138
\text{SNR\_total\_dB}
Combined SNR, dB—64.00916741
\text{ENOB\_total}
Effective bits of the combination—10.34039326

Values with a unit may be written in any unit of the right kind.

Applies when

  • full-scale sine; jitter and quantisation noise uncorrelated

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Aperture jitter SNR: f = 100000000 Hz, tj = 1 ps, n = 14
SNR_jitter_dB = 64.03640263
SNR_quant_dB = 86.04931138
SNR_total_dB = 64.00916741
ENOB_total = 10.34039326

Run it

Terminal
$ electronics-engineering solve elx_aperture_jitter_snr "f=100000000 Hz" "tj=1 ps" n=14
SNR_jitter_dB = 64.03640263
SNR_quant_dB = 86.04931138
SNR_total_dB = 64.00916741
ENOB_total = 10.34039326
  by: SNR limit from sampling-clock (aperture) jitter  (SNR_j = -20 log10(2 pi f tj); SNR_q = 6.02 n + 1.76; noise powers add)
  f = 100000000 Hz
  tj = 1e-12 s
  assumes: full-scale sine; jitter and quantisation noise uncorrelated

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Successive-approximation (SAR) ADC conversion2 fig.elx_sar_conversion

The bit-by-bit trial voltages, the final code (decimal and binary) and the DAC voltage of an ideal n-bit successive-approximation ADC converting an input.

b_k = \left[V_{in} \ge V_{DAC}(D_{k} + 2^k)\right]

You give

MeaningUnitExample
\text{Vin}
Analog inputV3.2 V
\text{Vref}
Reference voltageV5 V
n
Resolution in bits—4

You get

MeaningUnitExample
\text{code}
Final code—10
\text{bits}
Final code in binary—1010
\text{trials}
Trial DAC voltages, MSB first (V)—[2.5, 3.75, 3.125, 3.4375]
V_{\mathrm{dac}}
DAC voltage of the final codeV3.125 V
\text{cycles}
Comparison cycles—4

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0 <= Vin < Vref

Outside these conditions it says what is wrong instead of returning a number.

Worked example

SAR ADC conversion: Vin = 3.2 V, Vref = 5 V, n = 4
code = 10
bits = 1010
trials = [2.5, 3.75, 3.125, 3.4375]
V_dac = 3.125 V
cycles = 4

Run it

Terminal
$ electronics-engineering solve elx_sar_conversion "Vin=3.2 V" "Vref=5 V" n=4
code = 10
bits = 1010
trials = [2.5,3.75,3.125,3.4375]
V_dac = 3.125 V
cycles = 4
  by: Successive-approximation (SAR) ADC conversion  (for each bit from the MSB: set it, keep it if Vin >= DAC(trial); LSB = Vref/2^n)
  Vin = 3.2 V
  Vref = 5 V
  assumes: 0 <= Vin < Vref

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Diodes 8

Capacitor-input filter: ripple voltage and DC output1 fig.elx_capacitor_filter_ripple

The peak-to-peak ripple, the DC output, the RMS ripple and the ripple factor of a rectifier with a smoothing capacitor and resistive load (small-ripple approximation).

V_r = \frac{V_p}{f_rR_LC},\quad V_{dc} = V_p – \frac{V_r}{2}

You give

MeaningUnitExample
\text{Vp}
Peak rectified voltage (after the diode drops)V16.3 V
f
Line frequencyHz60 Hz
\text{RL}
Load resistanceohm500 ohm
C
Filter capacitanceF1000 uF
\text{circuit}
Half-wave or full-wave rectification choice—full-wave

You get

MeaningUnitExample
f_{\mathrm{ripple}}
Ripple frequencyHz120 Hz
\text{Vr}
Peak-to-peak rippleV0.2716666667 V
\text{Vdc}
DC output voltageV16.16416667 V
\text{Vr\_rms}
RMS rippleV0.07842341156 V
\text{ripple\_factor}
Ripple factor—0.004851682934

Values with a unit may be written in any unit of the right kind.

Applies when

  • Vr < Vp (small ripple)

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Capacitor filter ripple: Vp = 16.3 V, f = 60 Hz, RL = 500 ohm, C = 1000 uF, circuit = full-wave
f_ripple = 120 Hz
Vr = 0.2716666667 V
Vdc = 16.16416667 V
Vr_rms = 0.07842341156 V
ripple_factor = 0.004851682934

Run it

Terminal
$ electronics-engineering solve elx_capacitor_filter_ripple "Vp=16.3 V" "f=60 Hz" "RL=500 ohm" "C=1000 uF" circuit=full-wave
f_ripple = 120 Hz
Vr = 0.2716666667 V
Vdc = 16.16416667 V
Vr_rms = 0.07842341156 V
ripple_factor = 0.004851682934
  by: Capacitor-input filter: ripple voltage and DC output  (Vr = Vp/(f_r RL C); Vdc = Vp - Vr/2; Vr,rms = Vr/(2 sqrt 3))
  Vp = 16.3 V
  f = 60 Hz
  RL = 500 ohm
  C = 0.001 F
  circuit = full-wave
  assumes: Vr < Vp (small ripple)

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Diode current from the Shockley equation1 fig.elx_shockley_diode_current

The current of a pn-junction diode at a terminal voltage from its saturation current, ideality factor and temperature (forward or reverse).

I_D = I_S\left(e^{V_D/nV_T} – 1\right)

You give

MeaningUnitExample
\text{Is}
Saturation currentA1e-14 A
n
Ideality (emission) factor, 1 to 2—1
\text{VD}
Diode voltage (negative for reverse bias)V0.65 V
T
Junction temperatureK300 K

You get

MeaningUnitExample
\text{ID}
Diode currentA0.0008308438348 A
\text{VT}
Thermal voltageV0.02585199979 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • Is, n, T > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Shockley diode current: Is = 1e-14 A, n = 1, VD = 0.65 V, T = 300 K
ID = 0.0008308438348 A
VT = 0.02585199979 V

Run it

Terminal
$ electronics-engineering solve elx_shockley_diode_current "Is=1e-14 A" n=1 "VD=0.65 V" "T=300 K"
ID = 0.0008308438348 A
VT = 0.02585199979 V
  by: Diode current from the Shockley equation  (ID = Is (exp(VD/(n VT)) - 1), VT = kT/q)
  Is = 1e-14 A
  n = 1
  VD = 0.65 V
  T = 300 K
  assumes: Is, n, T > 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Diode voltage for a given current1 fig.elx_diode_voltage

The voltage across a pn-junction diode carrying a given current (the inverse of the Shockley equation).

V_D = nV_T\ln\left(1 + \frac{I_D}{I_S}\right)

You give

MeaningUnitExample
\text{ID}
Diode currentA0.001 A
\text{Is}
Saturation currentA1e-14 A
n
Ideality factor—1
T
Junction temperatureK300 K

You get

MeaningUnitExample
\text{VD}
Diode voltageV0.6547907227 V
\text{VT}
Thermal voltageV0.02585199979 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • ID > -Is
  • Is, n, T > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Diode voltage for a current: ID = 0.001 A, Is = 1e-14 A, n = 1, T = 300 K
VD = 0.6547907227 V
VT = 0.02585199979 V

Run it

Terminal
$ electronics-engineering solve elx_diode_voltage "ID=0.001 A" "Is=1e-14 A" n=1 "T=300 K"
VD = 0.6547907227 V
VT = 0.02585199979 V
  by: Diode voltage for a given current  (VD = n VT ln(1 + ID/Is))
  ID = 0.001 A
  Is = 1e-14 A
  n = 1
  T = 300 K
  assumes: ID > -Is; Is, n, T > 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

LED series (current-limiting) resistor1 fig.elx_led_series_resistor

The current-limiting resistor for one LED or a string of LEDs in series at a chosen forward current, and the power in the resistor and in the LEDs.

R = \frac{V_S – nV_F}{I_F}

You give

MeaningUnitExample
\text{Vs}
Supply voltageV5 V
\text{Vf}
Forward voltage of one LEDV2 V
\text{If}
LED forward currentA20 mA
n
Number of LEDs in series (default 1) optional—

You get

MeaningUnitExample
R
Series resistanceohm150 ohm
P_{R}
Power in the resistorW0.06 W
P_{\mathrm{LED}}
Power in the LEDsW0.04 W

Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.

Applies when

  • Vs > n Vf
  • If > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

LED series resistor: Vs = 5 V, Vf = 2 V, If = 20 mA
R = 150 ohm
P_R = 0.06 W
P_LED = 0.04 W

Run it

Terminal
$ electronics-engineering solve elx_led_series_resistor "Vs=5 V" "Vf=2 V" "If=20 mA"
R = 150 ohm
P_R = 0.06 W
P_LED = 0.04 W
  by: LED series (current-limiting) resistor  (R = (Vs - n Vf)/If; P_R = If^2 R)
  Vs = 5 V
  Vf = 2 V
  If = 0.02 A
  assumes: Vs > n Vf; If > 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Operating point of a diode in series with a resistor (exact)2 fig.elx_diode_operating_point

The current and voltage of a forward-biased diode fed from a DC source through a resistor, solving the Shockley equation and Kirchhoff's voltage law together (no constant-drop approximation).

V_S = I_DR + nV_T\ln\left(1 + \frac{I_D}{I_S}\right)

You give

MeaningUnitExample
\text{VS}
Source voltageV5 V
R
Series resistanceohm1000 ohm
\text{Is}
Saturation currentA1e-14 A
n
Ideality factor—1
T
Junction temperatureK300 K

You get

MeaningUnitExample
\text{ID}
Diode currentA0.004307456373 A
\text{VD}
Diode voltageV0.6925436275 V
P_{D}
Power in the diodeW0.002983101461 W

Values with a unit may be written in any unit of the right kind.

Applies when

  • VS > 0 (forward bias)
  • R, Is, n, T > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Diode operating point: VS = 5 V, R = 1000 ohm, Is = 1e-14 A, n = 1, T = 300 K
ID = 0.004307456373 A
VD = 0.6925436275 V
P_D = 0.002983101461 W

Run it

Terminal
$ electronics-engineering solve elx_diode_operating_point "VS=5 V" "R=1000 ohm" "Is=1e-14 A" n=1 "T=300 K"
ID = 0.004307456373 A
VD = 0.6925436275 V
P_D = 0.002983101461 W
  by: Operating point of a diode in series with a resistor (exact)  (solve VS = ID R + n VT ln(1 + ID/Is) (bisection on VD))
  VS = 5 V
  R = 1000 ohm
  Is = 1e-14 A
  n = 1
  T = 300 K
  assumes: VS > 0 (forward bias); R, Is, n, T > 0

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Rectifier output: average, RMS, ripple factor and PIV1 fig.elx_rectifier_averages

The DC (average) and RMS output voltage, ripple factor, peak inverse voltage and conduction angle of an unfiltered half-wave, bridge or centre-tapped full-wave rectifier with a constant diode drop (0 V for ideal diodes).

V_{dc} = \frac{k}{2\pi}\left[2V_m\cos\theta_1 – V(\pi – 2\theta_1)\right],\ \theta_1 = \arcsin\frac{V}{V_m}

You give

MeaningUnitExample
\text{Vm}
Peak AC voltage of the (secondary) windingV10 V
\text{circuit}
Half-wave, bridge or center-tapped (Vm per half of the winding) choice—half-wave
\text{Von}
Forward drop of one diode (0 V for ideal diodes)V0 V

You get

MeaningUnitExample
\text{Vp\_out}
Peak output voltageV10 V
\text{Vdc}
Average output voltageV3.183098862 V
\text{Vrms}
RMS output voltageV5 V
\text{ripple\_factor}
Ripple factor (AC rms / DC)—1.211363323
\text{PIV}
Peak inverse voltage of a diodeV10 V
\text{conduction\_deg}
Conduction angle per half cycle, degrees—180

Values with a unit may be written in any unit of the right kind.

Applies when

  • diode drops below Vm
  • resistive load, no filter

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Rectifier output: Vm = 10 V, circuit = half-wave, Von = 0 V
Vp_out = 10 V
Vdc = 3.183098862 V
Vrms = 5 V
ripple_factor = 1.211363323
PIV = 10 V
conduction_deg = 180

Run it

Terminal
$ electronics-engineering solve elx_rectifier_averages "Vm=10 V" circuit=half-wave "Von=0 V"
Vp_out = 10 V
Vdc = 3.183098862 V
Vrms = 5 V
ripple_factor = 1.211363323
PIV = 10 V
conduction_deg = 180
  by: Rectifier output: average, RMS, ripple factor and PIV  (output max(0, Vm|sin| - V) with V = Von (2 Von for a bridge); averages integrated exactly; PIV Vm, Vm - Von, 2Vm - Von)
  Vm = 10 V
  Von = 0 V
  circuit = half-wave
  assumes: diode drops below Vm; resistive load, no filter

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Zener regulator design: series resistor and Zener rating1 fig.elx_zener_series_resistor_design

The largest series resistance that keeps a Zener regulator in regulation at the lowest input and largest load, and the resulting worst-case Zener current and power (highest input, smallest load) and resistor power.

R_S = \frac{V_{in,min} – V_Z}{I_{Z,min} + I_{L,max}}

You give

MeaningUnitExample
\text{Vin\_min}
Lowest input voltageV12 V
\text{Vin\_max}
Highest input voltageV15 V
\text{Vz}
Zener voltageV9.1 V
\text{IL\_min}
Smallest load currentA0 mA
\text{IL\_max}
Largest load currentA50 mA
\text{Iz\_min}
Minimum Zener current for regulationA5 mA

You get

MeaningUnitExample
\text{Rs\_max}
Largest series resistanceohm52.72727273 ohm
\text{Iz\_max}
Worst-case Zener currentA0.1118965517 A
\text{Pz\_max}
Worst-case Zener powerW1.018258621 W
\text{PRs\_max}
Worst-case resistor powerW0.6601896552 W

Values with a unit may be written in any unit of the right kind.

Applies when

  • Vin_min > Vz
  • Vin_max >= Vin_min, IL_max >= IL_min >= 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Zener regulator design: Vin_min = 12 V, Vin_max = 15 V, Vz = 9.1 V, IL_min = 0 mA, IL_max = 50 mA, Iz_min = 5 mA
Rs_max = 52.72727273 ohm
Iz_max = 0.1118965517 A
Pz_max = 1.018258621 W
PRs_max = 0.6601896552 W

Run it

Terminal
$ electronics-engineering solve elx_zener_series_resistor_design "Vin_min=12 V" "Vin_max=15 V" "Vz=9.1 V" "IL_min=0 mA" "IL_max=50 mA" "Iz_min=5 mA"
Rs_max = 52.72727273 ohm
Iz_max = 0.1118965517 A
Pz_max = 1.018258621 W
PRs_max = 0.6601896552 W
  by: Zener regulator design: series resistor and Zener rating  (Rs = (Vin,min - Vz)/(Iz,min + IL,max); Iz,max = (Vin,max - Vz)/Rs - IL,min; Pz = Vz Iz,max)
  Vin_min = 12 V
  Vin_max = 15 V
  Vz = 9.1 V
  IL_min = 0 A
  IL_max = 0.05 A
  Iz_min = 0.005 A
  assumes: Vin_min > Vz; Vin_max >= Vin_min, IL_max >= IL_min >= 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Zener shunt regulator: load voltage and currents1 fig.elx_zener_regulator

The output voltage and the source, load and Zener currents and the Zener power of a Zener shunt regulator (series resistor, Zener across the load), with an optional Zener resistance.

I_Z = \frac{V_{in} – V_Z}{R_S} – \frac{V_Z}{R_L}

You give

MeaningUnitExample
\text{Vin}
Input voltageV20 V
\text{Rs}
Series resistanceohm220 ohm
\text{Vz}
Zener (breakdown) voltageV10 V
\text{RL}
Load resistanceohm1000 ohm
\text{rz}
Zener resistance (0 for an ideal Zener) optionalohm

You get

MeaningUnitExample
\text{Vout}
Load voltageV10 V
I_{s}
Current in the series resistorA0.04545454545 A
I_{L}
Load currentA0.01 A
I_{z}
Zener currentA0.03545454545 A
P_{z}
Zener powerW0.3545454545 W

Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.

Applies when

  • the Zener must be in breakdown: Vin RL/(Rs + RL) > Vz

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Zener regulator: Vin = 20 V, Rs = 220 ohm, Vz = 10 V, RL = 1000 ohm
Vout = 10 V
I_s = 0.04545454545 A
I_L = 0.01 A
I_z = 0.03545454545 A
P_z = 0.3545454545 W

Run it

Terminal
$ electronics-engineering solve elx_zener_regulator "Vin=20 V" "Rs=220 ohm" "Vz=10 V" "RL=1000 ohm"
Vout = 10 V
I_s = 0.04545454545 A
I_L = 0.01 A
I_z = 0.03545454545 A
P_z = 0.3545454545 W
  by: Zener shunt regulator: load voltage and currents  (ideal: Vout = Vz, Iz = (Vin - Vz)/Rs - Vz/RL; with rz: node equation at the load)
  Vin = 20 V
  Rs = 220 ohm
  Vz = 10 V
  RL = 1000 ohm
  assumes: the Zener must be in breakdown: Vin RL/(Rs + RL) > Vz

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

MOSFET 6

Common-source amplifier with source degeneration and ro1 fig.elx_common_source_amplifier

The voltage gain, input and output resistances and overall gain of a common-source stage, exact with the transistor's output resistance ro and an optional unbypassed source resistor.

A_v = -\frac{g_mr_oR_D'}{R_D' + r_o + R_S(1 + g_mr_o)}

You give

MeaningUnitExample
\text{gm}
TransconductanceS2 mS
\text{ro}
Transistor output resistanceohm100000 ohm
\text{RD}
Drain resistorohm10000 ohm
\text{RL}
Load resistorohm10000 ohm
\text{RS}
Unbypassed source resistance (0 if bypassed)ohm0 ohm
\text{RG}
Gate bias resistanceohm1000000 ohm
\text{Rsig}
Source resistanceohm10000 ohm

You get

MeaningUnitExample
\text{Av}
Voltage gain gate to output—-9.523809524
\text{Rin}
Input resistanceohm1000000 ohm
\text{Rout}
Output resistance (excluding RL)ohm9090.909091 ohm
\text{Gv}
Overall gain from the source—-9.42951438

Values with a unit may be written in any unit of the right kind.

Applies when

  • gm, ro, RD, RL, RG, Rsig > 0; RS >= 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Common-source amplifier: gm = 2 mS, ro = 100000 ohm, RD = 10000 ohm, RL = 10000 ohm, RS = 0 ohm, RG = 1000000 ohm, Rsig = 10000 ohm
Av = -9.523809524
Rin = 1000000 ohm
Rout = 9090.909091 ohm
Gv = -9.42951438

Run it

Terminal
$ electronics-engineering solve elx_common_source_amplifier "gm=2 mS" "ro=100000 ohm" "RD=10000 ohm" "RL=10000 ohm" "RS=0 ohm" "RG=1000000 ohm" "Rsig=10000 ohm"
Av = -9.523809524
Rin = 1000000 ohm
Rout = 9090.909091 ohm
Gv = -9.42951438
  by: Common-source amplifier with source degeneration and ro  (Av = -gm ro RD'/(RD' + ro + RS (1 + gm ro)) with RD' = RD || RL; Rout = RD || (ro + RS(1 + gm ro)))
  gm = 0.002 S
  ro = 100000 ohm
  RD = 10000 ohm
  RL = 10000 ohm
  RS = 0 ohm
  RG = 1000000 ohm
  Rsig = 10000 ohm
  assumes: gm, ro, RD, RL, RG, Rsig > 0; RS >= 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

MOSFET drain current (cutoff, triode, saturation)2 fig.elx_mosfet_drain_current

The operating region and drain current of an enhancement NMOS transistor by the square law: cutoff, triode or saturation with optional channel-length modulation (use magnitudes for PMOS).

I_D = \begin{cases} k_n\left(V_{OV}V_{DS} – \tfrac{1}{2}V_{DS}^2\right) & V_{DS} < V_{OV}\\ \tfrac{1}{2}k_nV_{OV}^2(1+\lambda V_{DS}) & V_{DS}\ge V_{OV}\end{cases}

You give

MeaningUnitExample
\text{kn}
Process transconductance times aspect ratio, mu Cox W/LA/V^22 mA/V^2
\text{Vt}
Threshold voltageV1 V
\text{VGS}
Gate-source voltageV3 V
\text{VDS}
Drain-source voltageV5 V
\text{lam}
Channel-length modulation lambda (default 0) optional1/V

You get

MeaningUnitExample
\text{region}
Cutoff, triode or saturation—saturation
\text{ID}
Drain currentA0.004 A
\text{VOV}
Overdrive VGS – VtV2 V
\text{VDS\_sat}
Saturation voltageV2 V

Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.

Applies when

  • kn, Vt > 0; VDS >= 0
  • long-channel square law

Outside these conditions it says what is wrong instead of returning a number.

Worked example

MOSFET drain current: kn = 2 mA/V^2, Vt = 1 V, VGS = 3 V, VDS = 5 V
region = saturation
ID = 0.004 A
VOV = 2 V
VDS_sat = 2 V

Run it

Terminal
$ electronics-engineering solve elx_mosfet_drain_current "kn=2 mA/V^2" "Vt=1 V" "VGS=3 V" "VDS=5 V"
region = saturation
ID = 0.004 A
VOV = 2 V
VDS_sat = 2 V
  by: MOSFET drain current (cutoff, triode, saturation)  (cutoff VOV <= 0; triode VDS < VOV: ID = kn (VOV VDS - VDS^2/2); saturation: ID = (kn/2) VOV^2 (1 + lambda VDS))
  kn = 0.002 A/V^2
  Vt = 1 V
  VGS = 3 V
  VDS = 5 V
  assumes: kn, Vt > 0; VDS >= 0; long-channel square law

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

MOSFET small-signal gm, ro and intrinsic gain1 fig.elx_mosfet_gm_ro

The overdrive voltage, gate-source voltage, transconductance gm = sqrt(2 kn ID), output resistance ro = 1/(lambda ID) and intrinsic gain of a MOSFET in saturation at a drain current.

g_m = \sqrt{2k_nI_D} = \frac{2I_D}{V_{OV}},\quad r_o = \frac{1}{\lambda I_D}

You give

MeaningUnitExample
\text{kn}
mu Cox W/LA/V^22 mA/V^2
\text{ID}
Drain bias currentA1 mA
\text{lam}
Channel-length modulation lambda1/V0.01 1/V
\text{Vt}
Threshold voltageV0.7 V

You get

MeaningUnitExample
\text{VOV}
Overdrive voltageV1 V
\text{VGS}
Gate-source voltageV1.7 V
\text{gm}
TransconductanceS0.002 S
r_{o}
Output resistanceohm100000 ohm
\text{A0}
Intrinsic gain gm r_o—200

Values with a unit may be written in any unit of the right kind.

Applies when

  • saturation
  • ID taken without the (1 + lambda VDS) factor

Outside these conditions it says what is wrong instead of returning a number.

Worked example

MOSFET small-signal parameters: kn = 2 mA/V^2, ID = 1 mA, lam = 0.01 1/V, Vt = 0.7 V
VOV = 1 V
VGS = 1.7 V
gm = 0.002 S
r_o = 100000 ohm
A0 = 200

Run it

Terminal
$ electronics-engineering solve elx_mosfet_gm_ro "kn=2 mA/V^2" "ID=1 mA" "lam=0.01 1/V" "Vt=0.7 V"
VOV = 1 V
VGS = 1.7 V
gm = 0.002 S
r_o = 100000 ohm
A0 = 200
  by: MOSFET small-signal gm, ro and intrinsic gain  (VOV = sqrt(2 ID/kn); gm = sqrt(2 kn ID) = 2 ID/VOV; ro = 1/(lambda ID))
  kn = 0.002 A/V^2
  ID = 0.001 A
  lam = 0.01 1/V
  Vt = 0.7 V
  assumes: saturation; ID taken without the (1 + lambda VDS) factor

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

MOSFET threshold voltage with body effect1 fig.elx_mosfet_body_effect

The threshold voltage of a MOSFET whose source is above its body, Vt = Vt0 + gamma (sqrt(2 phiF + VSB) – sqrt(2 phiF)).

V_t = V_{t0} + \gamma\left(\sqrt{2\phi_F + V_{SB}} – \sqrt{2\phi_F}\right)

You give

MeaningUnitExample
\text{Vt0}
Zero-bias threshold voltageV0.7 V
\gamma
Body-effect coefficient in V^0.5—0.4
\text{phi2F}
Surface potential 2 phi_F (about 0.6 to 0.9 V)V0.7 V
\text{VSB}
Source-body voltageV3 V

You get

MeaningUnitExample
\text{Vt}
Threshold voltageV1.134751352 V
\text{dVt}
Threshold increaseV0.4347513519 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • VSB >= 0
  • uniform substrate doping

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Body effect threshold voltage: Vt0 = 0.7 V, gamma = 0.4 V^0.5, phi2F = 0.7 V, VSB = 3 V
Vt = 1.134751352 V
dVt = 0.4347513519 V

Run it

Terminal
$ electronics-engineering solve elx_mosfet_body_effect "Vt0=0.7 V" gamma=0.4 "phi2F=0.7 V" "VSB=3 V"
Vt = 1.134751352 V
dVt = 0.4347513519 V
  by: MOSFET threshold voltage with body effect  (Vt = Vt0 + gamma (sqrt(2 phiF + VSB) - sqrt(2 phiF)))
  Vt0 = 0.7 V
  gamma = 0.4
  phi2F = 0.7 V
  VSB = 3 V
  assumes: VSB >= 0; uniform substrate doping

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

MOSFET voltage-divider bias with source resistor: Q-point1 fig.elx_mosfet_divider_bias

The Q-point (gate voltage, VGS, drain current, node voltages and VDS) of an NMOS stage with a gate divider and a source resistor, solving the square law and the gate loop (the physical root), with a saturation check.

V_{OV} = \frac{2(V_G – V_t)}{1 + \sqrt{1 + 2k_nR_S(V_G – V_t)}},\quad I_D = \tfrac{1}{2}k_nV_{OV}^2

You give

MeaningUnitExample
\text{VDD}
Supply voltageV15 V
\text{R1}
Upper gate resistorohm1000000 ohm
\text{R2}
Lower gate resistorohm500000 ohm
\text{RD}
Drain resistorohm3300 ohm
\text{RS}
Source resistor (0 allowed)ohm1000 ohm
\text{kn}
mu Cox W/LA/V^22 mA/V^2
\text{Vt}
Threshold voltageV1.5 V

You get

MeaningUnitExample
\text{VG}
Gate voltageV5 V
\text{VGS}
Gate-source voltageV2.936491673 V
\text{VOV}
OverdriveV1.436491673 V
\text{ID}
Drain currentA0.002063508327 A
\text{VS}
Source voltageV2.063508327 V
\text{VD}
Drain voltageV8.190422521 V
\text{VDS}
Drain-source voltageV6.126914194 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • VG > Vt
  • saturation: VDS >= VOV (otherwise refused)
  • lambda neglected

Outside these conditions it says what is wrong instead of returning a number.

Worked example

MOSFET divider bias: VDD = 15 V, R1 = 1000000 ohm, R2 = 500000 ohm, RD = 3300 ohm, RS = 1000 ohm, kn = 2 mA/V^2, Vt = 1.5 V
VG = 5 V
VGS = 2.936491673 V
VOV = 1.436491673 V
ID = 0.002063508327 A
VS = 2.063508327 V
VD = 8.190422521 V

Run it

Terminal
$ electronics-engineering solve elx_mosfet_divider_bias "VDD=15 V" "R1=1000000 ohm" "R2=500000 ohm" "RD=3300 ohm" "RS=1000 ohm" "kn=2 mA/V^2" "Vt=1.5 V"
VG = 5 V
VGS = 2.936491673 V
VOV = 1.436491673 V
ID = 0.002063508327 A
VS = 2.063508327 V
VD = 8.190422521 V
VDS = 6.126914194 V
  by: MOSFET voltage-divider bias with source resistor: Q-point  (VG = VDD R2/(R1 + R2); (kn RS/2) VOV^2 + VOV - (VG - Vt) = 0, positive root; ID = (kn/2) VOV^2)
  VDD = 15 V
  R1 = 1000000 ohm
  R2 = 500000 ohm
  RD = 3300 ohm
  RS = 1000 ohm
  kn = 0.002 A/V^2
  Vt = 1.5 V
  assumes: VG > Vt; saturation: VDS >= VOV (otherwise refused); lambda neglected

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Source follower (common drain)1 fig.elx_source_follower

The voltage gain, input resistance, output resistance and overall gain of a MOSFET source follower, including ro.

A_v = \frac{g_mR}{1 + g_mR},\quad R_{out} = R_S\parallel r_o\parallel\frac{1}{g_m}

You give

MeaningUnitExample
\text{gm}
TransconductanceS2 mS
\text{ro}
Transistor output resistanceohm50000 ohm
\text{RS}
Source resistorohm2000 ohm
\text{RL}
Load resistorohm2000 ohm
\text{RG}
Gate bias resistanceohm1000000 ohm
\text{Rsig}
Source resistanceohm10000 ohm

You get

MeaningUnitExample
\text{Av}
Voltage gain gate to output—0.6622516556
\text{Rin}
Input resistanceohm1000000 ohm
\text{Rout}
Output resistanceohm396.8253968 ohm
\text{Gv}
Overall gain—0.6556947085

Values with a unit may be written in any unit of the right kind.

Applies when

  • drain at signal ground

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Source follower: gm = 2 mS, ro = 50000 ohm, RS = 2000 ohm, RL = 2000 ohm, RG = 1000000 ohm, Rsig = 10000 ohm
Av = 0.6622516556
Rin = 1000000 ohm
Rout = 396.8253968 ohm
Gv = 0.6556947085

Run it

Terminal
$ electronics-engineering solve elx_source_follower "gm=2 mS" "ro=50000 ohm" "RS=2000 ohm" "RL=2000 ohm" "RG=1000000 ohm" "Rsig=10000 ohm"
Av = 0.6622516556
Rin = 1000000 ohm
Rout = 396.8253968 ohm
Gv = 0.6556947085
  by: Source follower (common drain)  (Av = gm R/(1 + gm R) with R = RS || RL || ro; Rout = RS || ro || 1/gm)
  gm = 0.002 S
  ro = 50000 ohm
  RS = 2000 ohm
  RL = 2000 ohm
  RG = 1000000 ohm
  Rsig = 10000 ohm
  assumes: drain at signal ground

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Op-amps 14

Closed-loop bandwidth from the gain-bandwidth product1 fig.elx_closed_loop_bandwidth

The closed-loop gain, the noise gain 1 + Rf/R1 and the -3 dB bandwidth GBW/(noise gain) of an inverting or non-inverting amplifier built with a single-pole op-amp.

f_{3dB} = \frac{\text{GBW}}{1 + R_f/R_1}

You give

MeaningUnitExample
\text{GBW}
Gain-bandwidth product (unity-gain frequency)Hz1000000 Hz
\text{config}
Inverting or non-inverting amplifier choice—non-inverting
\text{Rf}
Feedback resistorohm90000 ohm
\text{R1}
Input (or ground) resistorohm10000 ohm

You get

MeaningUnitExample
\text{G0}
Low-frequency closed-loop gain—10
\text{noise\_gain}
Noise gain 1 + Rf/R1—10
f_{\mathrm{3dB}}
Closed-loop -3 dB bandwidthHz100000 Hz

Values with a unit may be written in any unit of the right kind.

Applies when

  • single-pole op-amp with open-loop gain much larger than the closed-loop gain

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Closed-loop bandwidth: GBW = 1000000 Hz, config = non-inverting, Rf = 90000 ohm, R1 = 10000 ohm
G0 = 10
noise_gain = 10
f_3dB = 100000 Hz

Run it

Terminal
$ electronics-engineering solve elx_closed_loop_bandwidth "GBW=1000000 Hz" config=non-inverting "Rf=90000 ohm" "R1=10000 ohm"
G0 = 10
noise_gain = 10
f_3dB = 100000 Hz
  by: Closed-loop bandwidth from the gain-bandwidth product  (f_3dB = GBW/(1 + Rf/R1) for both configurations)
  GBW = 1000000 Hz
  Rf = 90000 ohm
  R1 = 10000 ohm
  config = non-inverting
  assumes: single-pole op-amp with open-loop gain much larger than the closed-loop gain

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Inverting amplifier with finite open-loop gain1 fig.elx_inverting_amplifier_finite_gain

The exact closed-loop gain of an inverting amplifier built with an op-amp of finite open-loop gain A0, its relative gain error and output.

G = \frac{-R_f/R_1}{1 + \dfrac{1 + R_f/R_1}{A_0}}

You give

MeaningUnitExample
\text{Rf}
Feedback resistorohm100000 ohm
\text{R1}
Input resistorohm1000 ohm
\text{A0}
Open-loop voltage gain (a ratio, not dB)—10000
\text{Vin}
Input voltageV0.01 V

You get

MeaningUnitExample
G
Closed-loop gain—-99.000099
G_{\mathrm{ideal}}
Ideal gain -Rf/R1—-100
\text{Vout}
Output voltageV-0.99000099 V
\text{error}
Relative gain error 1 – G/G_ideal—0.009999009999

Values with a unit may be written in any unit of the right kind.

Applies when

  • A0 > 0 (ratio)
  • infinite input resistance, zero output resistance

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Inverting amplifier with finite gain: Rf = 100000 ohm, R1 = 1000 ohm, A0 = 10000, Vin = 0.01 V
G = -99.000099
G_ideal = -100
Vout = -0.99000099 V
error = 0.009999009999

Run it

Terminal
$ electronics-engineering solve elx_inverting_amplifier_finite_gain "Rf=100000 ohm" "R1=1000 ohm" A0=10000 "Vin=0.01 V"
G = -99.000099
G_ideal = -100
Vout = -0.99000099 V
error = 0.009999009999
  by: Inverting amplifier with finite open-loop gain  (G = -(Rf/R1)/(1 + (1 + Rf/R1)/A0))
  Rf = 100000 ohm
  R1 = 1000 ohm
  A0 = 10000
  Vin = 0.01 V
  assumes: A0 > 0 (ratio); infinite input resistance, zero output resistance

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Inverting op-amp amplifier1 fig.elx_inverting_amplifier

The closed-loop gain, output voltage and input resistance of an ideal inverting amplifier.

V_{out} = -\frac{R_f}{R_{in}}V_{in}

You give

MeaningUnitExample
\text{Rf}
Feedback resistorohm100000 ohm
\text{Rin}
Input resistorohm10000 ohm
\text{Vin}
Input voltageV0.5 V

You get

MeaningUnitExample
G
Closed-loop gain -Rf/Rin—-10
\text{Vout}
Output voltageV-5 V
\text{Zin}
Input resistanceohm10000 ohm

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal op-amp, output not saturated

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Inverting amplifier: Rf = 100000 ohm, Rin = 10000 ohm, Vin = 0.5 V
G = -10
Vout = -5 V
Zin = 10000 ohm

Run it

Terminal
$ electronics-engineering solve elx_inverting_amplifier "Rf=100000 ohm" "Rin=10000 ohm" "Vin=0.5 V"
G = -10
Vout = -5 V
Zin = 10000 ohm
  by: Inverting op-amp amplifier  (G = -Rf/Rin; Vout = G Vin; Zin = Rin)
  Rf = 100000 ohm
  Rin = 10000 ohm
  Vin = 0.5 V
  assumes: ideal op-amp, output not saturated

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Inverting Schmitt trigger thresholds1 fig.elx_schmitt_trigger

The upper and lower switching thresholds, the hysteresis width and the centre of an inverting op-amp Schmitt trigger whose positive feedback divider (Rf from the output, R1 to a reference) sets the + input.

V_{TH,TL} = \frac{V_{sat}R_1 + V_{ref}R_f}{R_1 + R_f}

You give

MeaningUnitExample
\text{Rf}
Resistor from the output to the + inputohm90000 ohm
\text{R1}
Resistor from the + input to Vrefohm10000 ohm
\text{VsatH}
High output saturation voltageV12 V
\text{VsatL}
Low output saturation voltage (negative for a split supply)V-12 V
\text{Vref}
Reference voltage (0 V for ground)V0 V

You get

MeaningUnitExample
V_{\mathrm{TH}}
Upper thresholdV1.2 V
V_{\mathrm{TL}}
Lower thresholdV-1.2 V
\text{hysteresis}
Hysteresis widthV2.4 V
\text{center}
Centre of the hysteresis bandV0 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • VsatH > VsatL
  • input on the inverting terminal

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Schmitt trigger thresholds: Rf = 90000 ohm, R1 = 10000 ohm, VsatH = 12 V, VsatL = -12 V, Vref = 0 V
V_TH = 1.2 V
V_TL = -1.2 V
hysteresis = 2.4 V
center = 0 V

Run it

Terminal
$ electronics-engineering solve elx_schmitt_trigger "Rf=90000 ohm" "R1=10000 ohm" "VsatH=12 V" "VsatL=-12 V" "Vref=0 V"
V_TH = 1.2 V
V_TL = -1.2 V
hysteresis = 2.4 V
center = 0 V
  by: Inverting Schmitt trigger thresholds  (V_T = (Vsat R1 + Vref Rf)/(R1 + Rf); hysteresis = (VsatH - VsatL) R1/(R1 + Rf))
  Rf = 90000 ohm
  R1 = 10000 ohm
  VsatH = 12 V
  VsatL = -12 V
  Vref = 0 V
  assumes: VsatH > VsatL; input on the inverting terminal

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Inverting summing amplifier1 fig.elx_summing_amplifier

The output of an ideal inverting summing amplifier with several inputs, each through its own resistor, and the feedback current.

V_{out} = -R_f\sum_i\frac{V_i}{R_i}

You give

MeaningUnitExample
V
Input voltages in volts vector—[1, 2, -0.5]
R
Input resistors in kilohms, one per input vector—[10, 20, 5]
\text{Rf}
Feedback resistorohm10000 ohm

You get

MeaningUnitExample
\text{Vout}
Output voltageV-1 V
I_{f}
Current through the feedback resistorA0.0001 A

Values with a unit may be written in any unit of the right kind.

Applies when

  • one resistor per input
  • ideal op-amp

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Summing amplifier: V = [1, 2, -0.5], R = [10, 20, 5], Rf = 10000 ohm
Vout = -1 V
I_f = 0.0001 A

Run it

Terminal
$ electronics-engineering solve elx_summing_amplifier "V=[1, 2, -0.5]" "R=[10, 20, 5]" "Rf=10000 ohm"
Vout = -1 V
I_f = 0.0001 A
  by: Inverting summing amplifier  (Vout = -Rf sum(Vi/Ri))
  Rf = 10000 ohm
  assumes: one resistor per input; ideal op-amp

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Negative feedback: closed-loop gain and bandwidth extension1 fig.elx_negative_feedback

The closed-loop gain A/(1 + A beta), the loop gain, the desensitivity factor (also in dB) and the extended bandwidth of a single-pole amplifier with negative feedback.

A_f = \frac{A}{1 + A\beta},\quad f_{H,f} = f_H(1 + A\beta)

You give

MeaningUnitExample
A
Open-loop gain (a ratio)—10000
\beta
Feedback factor (a ratio)—0.01
\text{fH}
Open-loop -3 dB bandwidthHz1000 Hz

You get

MeaningUnitExample
\text{Af}
Closed-loop gain—99.00990099
\text{loop\_gain}
Loop gain A beta—100
\text{desensitivity}
1 + A beta—101
\text{desensitivity\_dB}
Amount of feedback in dB—40.08642748
\text{fH\_closed}
Closed-loop bandwidthHz101000 Hz

Values with a unit may be written in any unit of the right kind.

Applies when

  • single-pole open-loop response
  • frequency-independent beta

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Negative feedback amplifier: A = 10000, beta = 0.01, fH = 1000 Hz
Af = 99.00990099
loop_gain = 100
desensitivity = 101
desensitivity_dB = 40.08642748
fH_closed = 101000 Hz

Run it

Terminal
$ electronics-engineering solve elx_negative_feedback A=10000 beta=0.01 "fH=1000 Hz"
Af = 99.00990099
loop_gain = 100
desensitivity = 101
desensitivity_dB = 40.08642748
fH_closed = 101000 Hz
  by: Negative feedback: closed-loop gain and bandwidth extension  (Af = A/(1 + A beta); fH,f = fH (1 + A beta))
  A = 10000
  beta = 0.01
  fH = 1000 Hz
  assumes: single-pole open-loop response; frequency-independent beta

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Non-inverting op-amp amplifier1 fig.elx_noninverting_amplifier

The closed-loop gain 1 + Rf/Rg and the output voltage of an ideal non-inverting amplifier.

V_{out} = \left(1 + \frac{R_f}{R_g}\right)V_{in}

You give

MeaningUnitExample
\text{Rf}
Feedback resistorohm90000 ohm
\text{Rg}
Resistor from the inverting input to groundohm10000 ohm
\text{Vin}
Input voltageV0.3 V

You get

MeaningUnitExample
G
Closed-loop gain—10
\text{Vout}
Output voltageV3 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal op-amp

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Non-inverting amplifier: Rf = 90000 ohm, Rg = 10000 ohm, Vin = 0.3 V
G = 10
Vout = 3 V

Run it

Terminal
$ electronics-engineering solve elx_noninverting_amplifier "Rf=90000 ohm" "Rg=10000 ohm" "Vin=0.3 V"
G = 10
Vout = 3 V
  by: Non-inverting op-amp amplifier  (G = 1 + Rf/Rg; Vout = G Vin)
  Rf = 90000 ohm
  Rg = 10000 ohm
  Vin = 0.3 V
  assumes: ideal op-amp

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Op-amp difference amplifier (with resistor mismatch)1 fig.elx_difference_amplifier

The output of a one-op-amp difference amplifier with any four resistors, and its differential and common-mode gains (the common-mode gain is zero only when R4/R3 = R2/R1).

V_{out} = \frac{R_4}{R_3+R_4}\left(1+\frac{R_2}{R_1}\right)V_2 – \frac{R_2}{R_1}V_1

You give

MeaningUnitExample
\text{R1}
Resistor from V1 to the inverting inputohm10000 ohm
\text{R2}
Feedback resistorohm100000 ohm
\text{R3}
Resistor from V2 to the non-inverting inputohm10000 ohm
\text{R4}
Resistor from the non-inverting input to groundohm100000 ohm
\text{V1}
Voltage at the inverting sideV1 V
\text{V2}
Voltage at the non-inverting sideV1.2 V

You get

MeaningUnitExample
\text{Vout}
Output voltageV2 V
\text{Ad}
Differential gain (per volt of V2 – V1)—10
\text{Acm}
Common-mode gain—0

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal op-amp

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Difference amplifier: R1 = 10000 ohm, R2 = 100000 ohm, R3 = 10000 ohm, R4 = 100000 ohm, V1 = 1 V, V2 = 1.2 V
Vout = 2 V
Ad = 10
Acm = 0

Run it

Terminal
$ electronics-engineering solve elx_difference_amplifier "R1=10000 ohm" "R2=100000 ohm" "R3=10000 ohm" "R4=100000 ohm" "V1=1 V" "V2=1.2 V"
Vout = 2 V
Ad = 10
Acm = 0
  by: Op-amp difference amplifier (with resistor mismatch)  (Vout = -(R2/R1) V1 + (R4/(R3 + R4))(1 + R2/R1) V2; Ad = (a2 - a1)/2; Acm = a1 + a2)
  R1 = 10000 ohm
  R2 = 100000 ohm
  R3 = 10000 ohm
  R4 = 100000 ohm
  V1 = 1 V
  V2 = 1.2 V
  assumes: ideal op-amp

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Op-amp differentiator: gain and output amplitude1 fig.elx_opamp_differentiator

The gain |H| = 2 pi f R C of an ideal inverting differentiator at a frequency and the peak output for a sinusoidal input of given amplitude.

|H(j\omega)| = \omega RC

You give

MeaningUnitExample
R
Feedback resistorohm10000 ohm
C
Input capacitorF10 nF
A
Peak input amplitudeV1 V
f
Input frequencyHz1000 Hz

You get

MeaningUnitExample
\text{gain}
Gain magnitude—0.6283185307
\text{Vout\_peak}
Peak output voltageV0.6283185307 V
\text{gain\_dB}
Gain in dB—-4.036402633

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal op-amp (no high-frequency limiting)

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Op-amp differentiator: R = 10000 ohm, C = 10 nF, A = 1 V, f = 1000 Hz
gain = 0.6283185307
Vout_peak = 0.6283185307 V
gain_dB = -4.036402633

Run it

Terminal
$ electronics-engineering solve elx_opamp_differentiator "R=10000 ohm" "C=10 nF" "A=1 V" "f=1000 Hz"
gain = 0.6283185307
Vout_peak = 0.6283185307 V
gain_dB = -4.036402633
  by: Op-amp differentiator: gain and output amplitude  (|H| = 2 pi f R C; Vout,peak = |H| A)
  R = 10000 ohm
  C = 1e-08 F
  A = 1 V
  f = 1000 Hz
  assumes: ideal op-amp (no high-frequency limiting)

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Op-amp integrator: output ramp and unity-gain frequency1 fig.elx_opamp_integrator

The output of an ideal inverting integrator after a time with a constant input, its ramp rate, and the frequency at which its gain is one.

V_{out}(t) = V_0 – \frac{1}{RC}\int_0^t V_{in}\,dt

You give

MeaningUnitExample
R
Input resistorohm10000 ohm
C
Feedback capacitorF1 uF
\text{Vin}
Constant input voltageV0.5 V
t
Time since the starts2 ms
\text{V0}
Initial output voltage (default 0) optionalV

You get

MeaningUnitExample
\text{Vout}
Output voltage at tV-0.1 V
\text{slope}
Output ramp rateV/s-50 V/s
f_{\mathrm{unity}}
Unity-gain frequency 1/(2 pi R C)Hz15.91549431 Hz

Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.

Applies when

  • ideal op-amp, output not saturated

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Op-amp integrator: R = 10000 ohm, C = 1 uF, Vin = 0.5 V, t = 2 ms
Vout = -0.1 V
slope = -50 V/s
f_unity = 15.91549431 Hz

Run it

Terminal
$ electronics-engineering solve elx_opamp_integrator "R=10000 ohm" "C=1 uF" "Vin=0.5 V" "t=2 ms"
Vout = -0.1 V
slope = -50 V/s
f_unity = 15.91549431 Hz
  by: Op-amp integrator: output ramp and unity-gain frequency  (Vout = V0 - Vin t/(R C); f = 1/(2 pi R C))
  R = 10000 ohm
  C = 1e-06 F
  Vin = 0.5 V
  t = 0.002 s
  assumes: ideal op-amp, output not saturated

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Op-amp output offset from input offset voltage and bias currents1 fig.elx_opamp_dc_offset

The DC output error of an inverting or non-inverting amplifier (input grounded) caused by the input offset voltage and the input bias and offset currents, and the compensating resistor that cancels the bias-current error.

V_{out} = \left(V_{os} – I_{B+}R_p\right)\left(1 + \frac{R_f}{R_1}\right) + I_{B-}R_f

You give

MeaningUnitExample
\text{Vos}
Input offset voltage (in series with the + input)V2 mV
\text{IB}
Average input bias currentA100 nA
\text{Ios}
Input offset current IB- minus IB+A10 nA
\text{Rf}
Feedback resistorohm100000 ohm
\text{R1}
Resistor from the inverting input to groundohm10000 ohm
\text{Rp}
Resistor from the + input to ground (0 if none)ohm0 ohm

You get

MeaningUnitExample
\text{Vout\_Vos}
Output error from VosV0.022 V
\text{Vout\_bias}
Output error from the bias currentsV0.0105 V
\text{Vout\_total}
Total output errorV0.0325 V
\text{Rp\_optimal}
Bias-cancelling Rp = R1 || Rfohm9090.909091 ohm

Values with a unit may be written in any unit of the right kind.

Applies when

  • currents flow into the inputs; IB- = IB + Ios/2, IB+ = IB – Ios/2

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Op-amp output offset: Vos = 2 mV, IB = 100 nA, Ios = 10 nA, Rf = 100000 ohm, R1 = 10000 ohm, Rp = 0 ohm
Vout_Vos = 0.022 V
Vout_bias = 0.0105 V
Vout_total = 0.0325 V
Rp_optimal = 9090.909091 ohm

Run it

Terminal
$ electronics-engineering solve elx_opamp_dc_offset "Vos=2 mV" "IB=100 nA" "Ios=10 nA" "Rf=100000 ohm" "R1=10000 ohm" "Rp=0 ohm"
Vout_Vos = 0.022 V
Vout_bias = 0.0105 V
Vout_total = 0.0325 V
Rp_optimal = 9090.909091 ohm
  by: Op-amp output offset from input offset voltage and bias currents  (Vout = Vos (1 + Rf/R1) + IB- Rf - IB+ Rp (1 + Rf/R1))
  Vos = 0.002 V
  IB = 1e-07 A
  Ios = 1e-08 A
  Rf = 100000 ohm
  R1 = 10000 ohm
  Rp = 0 ohm
  assumes: currents flow into the inputs; IB- = IB + Ios/2, IB+ = IB - Ios/2

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Phase margin of a two-pole amplifier with feedback1 fig.elx_two_pole_phase_margin

The loop-gain crossover frequency and the phase margin of an amplifier with two real poles and a frequency-independent feedback factor, and its closed-loop DC gain.

PM = 180^\circ – \arctan\frac{f_c}{f_1} – \arctan\frac{f_c}{f_2}

You give

MeaningUnitExample
\text{A0}
DC open-loop gain (a ratio)—100000
\text{f1}
First pole frequencyHz10 Hz
\text{f2}
Second pole frequencyHz1000000 Hz
\beta
Feedback factor—0.1

You get

MeaningUnitExample
f_{c}
Loop-gain crossover frequencyHz99508.54868 Hz
\text{PM\_deg}
Phase margin in degrees—84.32304539
\text{Af}
Closed-loop DC gain—9.9990001

Values with a unit may be written in any unit of the right kind.

Applies when

  • A0 beta > 1
  • two real left-half-plane poles

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Two-pole phase margin: A0 = 100000, f1 = 10 Hz, f2 = 1000000 Hz, beta = 0.1
f_c = 99508.54868 Hz
PM_deg = 84.32304539
Af = 9.9990001

Run it

Terminal
$ electronics-engineering solve elx_two_pole_phase_margin A0=100000 "f1=10 Hz" "f2=1000000 Hz" beta=0.1
f_c = 99508.54868 Hz
PM_deg = 84.32304539
Af = 9.9990001
  by: Phase margin of a two-pole amplifier with feedback  (|A0 beta|^2 = (1 + (fc/f1)^2)(1 + (fc/f2)^2) solved for fc^2; PM = 180 - atan(fc/f1) - atan(fc/f2))
  A0 = 100000
  f1 = 10 Hz
  f2 = 1000000 Hz
  beta = 0.1
  assumes: A0 beta > 1; two real left-half-plane poles

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Slew-rate limit: full-power bandwidth2 fig.elx_slew_rate_limit

The full-power bandwidth SR/(2 pi Vp) of an op-amp, the largest undistorted amplitude at a frequency, the slope a sine wave needs and whether it is slew-limited.

f_{max} = \frac{SR}{2\pi V_p}

You give

MeaningUnitExample
\text{SR}
Slew rateV/s0.5 V/us
\text{Vp}
Peak output amplitudeV10 V
f
Signal frequencyHz20000 Hz

You get

MeaningUnitExample
f_{\mathrm{max}}
Full-power bandwidth at VpHz7957.747155 Hz
\text{Vp\_max}
Largest undistorted amplitude at fV3.978873577 V
\text{slope\_needed}
Maximum slope of the sine, 2 pi f VpV/s1256637.061 V/s
\text{limited}
Slew-limited or not slew-limited—slew-limited

Values with a unit may be written in any unit of the right kind.

Applies when

  • sinusoidal output

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Slew-rate limit: SR = 0.5 V/us, Vp = 10 V, f = 20000 Hz
f_max = 7957.747155 Hz
Vp_max = 3.978873577 V
slope_needed = 1256637.061 V/s
limited = slew-limited

Run it

Terminal
$ electronics-engineering solve elx_slew_rate_limit "SR=0.5 V/us" "Vp=10 V" "f=20000 Hz"
f_max = 7957.747155 Hz
Vp_max = 3.978873577 V
slope_needed = 1256637.061 V/s
limited = slew-limited
  by: Slew-rate limit: full-power bandwidth  (f_max = SR/(2 pi Vp); Vp,max = SR/(2 pi f); slope = 2 pi f Vp)
  SR = 500000 V/s
  Vp = 10 V
  f = 20000 Hz
  assumes: sinusoidal output

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Three-op-amp instrumentation amplifier1 fig.elx_instrumentation_amplifier

The gain and output of the classic three-op-amp instrumentation amplifier: input stage gain 1 + 2 R1/RG times the difference stage gain R3/R2.

V_{out} = \left(1 + \frac{2R_1}{R_G}\right)\frac{R_3}{R_2}(V_2 – V_1)

You give

MeaningUnitExample
\text{R1}
Feedback resistor of each input bufferohm25000 ohm
\text{RG}
Gain-setting resistor between the buffersohm1000 ohm
\text{R2}
Input resistors of the difference stageohm10000 ohm
\text{R3}
Feedback and ground resistors of the difference stageohm10000 ohm
\text{V1}
Input at the inverting sideV1 V
\text{V2}
Input at the non-inverting sideV1.01 V

You get

MeaningUnitExample
G
Differential gain—51
G_{\mathrm{stage1}}
Gain of the input stage—51
\text{Vout}
Output voltageV0.51 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal op-amps, matched resistors

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Instrumentation amplifier: R1 = 25000 ohm, RG = 1000 ohm, R2 = 10000 ohm, R3 = 10000 ohm, V1 = 1 V, V2 = 1.01 V
G = 51
G_stage1 = 51
Vout = 0.51 V

Run it

Terminal
$ electronics-engineering solve elx_instrumentation_amplifier "R1=25000 ohm" "RG=1000 ohm" "R2=10000 ohm" "R3=10000 ohm" "V1=1 V" "V2=1.01 V"
G = 51
G_stage1 = 51
Vout = 0.51 V
  by: Three-op-amp instrumentation amplifier  (G = (1 + 2 R1/RG)(R3/R2); Vout = G (V2 - V1))
  R1 = 25000 ohm
  RG = 1000 ohm
  R2 = 10000 ohm
  R3 = 10000 ohm
  V1 = 1 V
  V2 = 1.01 V
  assumes: ideal op-amps, matched resistors

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Oscillators 9

555 timer astable: frequency and duty cycle2 fig.elx_555_astable

The high and low times, period, frequency and duty cycle of a 555 timer in astable mode with resistors RA and RB and timing capacitor C.

t_H = \ln 2\,(R_A + R_B)C,\quad t_L = \ln 2\,R_BC,\quad f = \frac{1}{\ln 2\,(R_A + 2R_B)C}

You give

MeaningUnitExample
\text{RA}
Resistor from Vcc to the discharge pinohm1000 ohm
\text{RB}
Resistor from discharge to threshold/triggerohm10000 ohm
C
Timing capacitorF10 uF

You get

MeaningUnitExample
t_{\mathrm{high}}
Output high times0.07624618986 s
t_{\mathrm{low}}
Output low times0.06931471806 s
T
Periods0.1455609079 s
f
FrequencyHz6.869976385 Hz
\text{duty}
Duty cycle (fraction high)—0.5238095238

Values with a unit may be written in any unit of the right kind.

Applies when

  • thresholds Vcc/3 and 2Vcc/3

Outside these conditions it says what is wrong instead of returning a number.

Worked example

555 astable: RA = 1000 ohm, RB = 10000 ohm, C = 10 uF
t_high = 0.07624618986 s
t_low = 0.06931471806 s
T = 0.1455609079 s
f = 6.869976385 Hz
duty = 0.5238095238

Run it

Terminal
$ electronics-engineering solve elx_555_astable "RA=1000 ohm" "RB=10000 ohm" "C=10 uF"
t_high = 0.07624618986 s
t_low = 0.06931471806 s
T = 0.1455609079 s
f = 6.869976385 Hz
duty = 0.5238095238
  by: 555 timer astable: frequency and duty cycle  (t_H = ln2 (RA + RB) C; t_L = ln2 RB C; f = 1/(t_H + t_L))
  RA = 1000 ohm
  RB = 10000 ohm
  C = 1e-05 F
  assumes: thresholds Vcc/3 and 2Vcc/3

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

555 timer monostable pulse width2 fig.elx_555_monostable

The output pulse width T = ln 3 R C (about 1.1 R C) of a 555 timer in monostable (one-shot) mode.

T = \ln 3\,RC \approx 1.1\,RC

You give

MeaningUnitExample
R
Timing resistorohm100000 ohm
C
Timing capacitorF10 uF

You get

MeaningUnitExample
T
Pulse widths1.098612289 s

Values with a unit may be written in any unit of the right kind.

Applies when

  • threshold at 2Vcc/3
  • trigger pulse shorter than T

Outside these conditions it says what is wrong instead of returning a number.

Worked example

555 monostable: R = 100000 ohm, C = 10 uF
T = 1.098612289 s

Run it

Terminal
$ electronics-engineering solve elx_555_monostable "R=100000 ohm" "C=10 uF"
T = 1.098612289 s
  by: 555 timer monostable pulse width  (T = ln 3 R C)
  R = 100000 ohm
  C = 1e-05 F
  assumes: threshold at 2Vcc/3; trigger pulse shorter than T

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Colpitts oscillator frequency and feedback ratio1 fig.elx_colpitts_oscillator

The oscillation frequency of a Colpitts oscillator from its inductor and the series combination of its two tank capacitors, the feedback fraction C1/C2 and the minimum amplifier gain C2/C1.

f_0 = \frac{1}{2\pi\sqrt{L\,\frac{C_1C_2}{C_1+C_2}}},\quad A_{min} = \frac{C_2}{C_1}

You give

MeaningUnitExample
L
Tank inductanceH100 uH
\text{C1}
Capacitor across the amplifier outputF1 nF
\text{C2}
Capacitor across the amplifier input (feedback side)F10 nF

You get

MeaningUnitExample
C_{\mathrm{eq}}
Series equivalent capacitanceF9.090909091e-10 F
\text{f0}
Oscillation frequencyHz527857.2298 Hz
\beta
Feedback fraction C1/C2—0.1
A_{\mathrm{min}}
Minimum amplifier gain C2/C1—10

Values with a unit may be written in any unit of the right kind.

Applies when

  • lossless tank, amplifier does not load the tank

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Colpitts oscillator: L = 100 uH, C1 = 1 nF, C2 = 10 nF
C_eq = 9.090909091e-10 F
f0 = 527857.2298 Hz
beta = 0.1
A_min = 10

Run it

Terminal
$ electronics-engineering solve elx_colpitts_oscillator "L=100 uH" "C1=1 nF" "C2=10 nF"
C_eq = 9.090909091e-10 F
f0 = 527857.2298 Hz
beta = 0.1
A_min = 10
  by: Colpitts oscillator frequency and feedback ratio  (C_eq = C1 C2/(C1 + C2); f0 = 1/(2 pi sqrt(L C_eq)); beta = C1/C2)
  L = 0.0001 H
  C1 = 1e-09 F
  C2 = 1e-08 F
  assumes: lossless tank, amplifier does not load the tank

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Hartley oscillator frequency1 fig.elx_hartley_oscillator

The oscillation frequency of a Hartley oscillator with a tapped (or two coupled) inductors and a tank capacitor, and the gain ratio (L1 + M)/(L2 + M).

f_0 = \frac{1}{2\pi\sqrt{(L_1 + L_2 + 2M)C}}

You give

MeaningUnitExample
\text{L1}
Inductance of the output-side coilH100 uH
\text{L2}
Inductance of the feedback-side coilH20 uH
M
Mutual inductance (0 for uncoupled coils)H0 uH
C
Tank capacitanceF1 nF

You get

MeaningUnitExample
L_{\mathrm{eq}}
Total inductance L1 + L2 + 2MH0.00012 H
\text{f0}
Oscillation frequencyHz459440.7462 Hz
A_{\mathrm{min}}
Minimum amplifier gain (L1 + M)/(L2 + M)—5

Values with a unit may be written in any unit of the right kind.

Applies when

  • series-aiding coils, lossless tank
  • M <= sqrt(L1 L2)

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Hartley oscillator: L1 = 100 uH, L2 = 20 uH, M = 0 uH, C = 1 nF
L_eq = 0.00012 H
f0 = 459440.7462 Hz
A_min = 5

Run it

Terminal
$ electronics-engineering solve elx_hartley_oscillator "L1=100 uH" "L2=20 uH" "M=0 uH" "C=1 nF"
L_eq = 0.00012 H
f0 = 459440.7462 Hz
A_min = 5
  by: Hartley oscillator frequency  (L_eq = L1 + L2 + 2M; f0 = 1/(2 pi sqrt(L_eq C)))
  L1 = 0.0001 H
  L2 = 2e-05 H
  M = 0 H
  C = 1e-09 F
  assumes: series-aiding coils, lossless tank; M <= sqrt(L1 L2)

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Op-amp relaxation (astable) oscillator1 fig.elx_opamp_relaxation_oscillator

The period and frequency of a square-wave op-amp astable: an RC timing network on the inverting input and positive feedback R1/(R1 + R2) to the non-inverting input, symmetric supplies.

T = 2RC\ln\frac{1+\beta}{1-\beta},\quad \beta = \frac{R_1}{R_1+R_2}

You give

MeaningUnitExample
R
Timing resistor (output to inverting input)ohm10000 ohm
C
Timing capacitorF100 nF
\text{R1}
Resistor from the + input to groundohm10000 ohm
\text{R2}
Resistor from the output to the + inputohm10000 ohm

You get

MeaningUnitExample
\beta
Feedback fraction R1/(R1 + R2)—0.5
T
Periods0.002197224577 s
f
FrequencyHz455.1196133 Hz

Values with a unit may be written in any unit of the right kind.

Applies when

  • symmetric output levels
  • ideal comparator action

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Op-amp relaxation oscillator: R = 10000 ohm, C = 100 nF, R1 = 10000 ohm, R2 = 10000 ohm
beta = 0.5
T = 0.002197224577 s
f = 455.1196133 Hz

Run it

Terminal
$ electronics-engineering solve elx_opamp_relaxation_oscillator "R=10000 ohm" "C=100 nF" "R1=10000 ohm" "R2=10000 ohm"
beta = 0.5
T = 0.002197224577 s
f = 455.1196133 Hz
  by: Op-amp relaxation (astable) oscillator  (T = 2 R C ln((1 + beta)/(1 - beta)) = 2 R C ln(1 + 2 R1/R2))
  R = 10000 ohm
  C = 1e-07 F
  R1 = 10000 ohm
  R2 = 10000 ohm
  assumes: symmetric output levels; ideal comparator action

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Quartz crystal: series and parallel resonance, Q1 fig.elx_crystal_oscillator

The series and parallel (anti-) resonant frequencies, their spacing and the quality factor of a quartz crystal from its Butterworth-Van Dyke equivalent circuit.

f_s = \frac{1}{2\pi\sqrt{L_mC_m}},\quad f_p = f_s\sqrt{1 + \frac{C_m}{C_0}}

You give

MeaningUnitExample
\text{Lm}
Motional inductanceH0.05 H
\text{Cm}
Motional capacitanceF20 fF
\text{Rm}
Motional resistanceohm20 ohm
\text{C0}
Shunt (holder) capacitanceF5 pF

You get

MeaningUnitExample
\text{fs}
Series resonanceHz5032921.21 Hz
\text{fp}
Parallel resonanceHz5042977.007 Hz
\delta_{f}
fp – fsHz10055.79666 Hz
Q
Quality factor—79056.9415

Values with a unit may be written in any unit of the right kind.

Applies when

  • resonances of the lossless circuit; Q from Rm

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Crystal resonance: Lm = 0.05 H, Cm = 20 fF, Rm = 20 ohm, C0 = 5 pF
fs = 5032921.21 Hz
fp = 5042977.007 Hz
delta_f = 10055.79666 Hz
Q = 79056.9415

Run it

Terminal
$ electronics-engineering solve elx_crystal_oscillator "Lm=0.05 H" "Cm=20 fF" "Rm=20 ohm" "C0=5 pF"
fs = 5032921.21 Hz
fp = 5042977.007 Hz
delta_f = 10055.79666 Hz
Q = 79056.9415
  by: Quartz crystal: series and parallel resonance, Q  (fs = 1/(2 pi sqrt(Lm Cm)); fp = fs sqrt(1 + Cm/C0); Q = sqrt(Lm/Cm)/Rm)
  Lm = 0.05 H
  Cm = 2e-14 F
  Rm = 20 ohm
  C0 = 5e-12 F
  assumes: resonances of the lossless circuit; Q from Rm

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

RC phase-shift oscillator frequency and gain2 fig.elx_rc_phase_shift_oscillator

The oscillation frequency of a three-section RC phase-shift oscillator (high-pass ladder: series C, shunt R; or low-pass ladder) and the amplifier gain of 29 it needs.

f_0 = \frac{1}{2\pi\sqrt{6}\,RC},\quad |A| \ge 29

You give

MeaningUnitExample
R
Resistor of each sectionohm10000 ohm
C
Capacitor of each sectionF10 nF
\text{ladder}
Highpass (series C, shunt R) or lowpass (series R, shunt C) choice—high-pass

You get

MeaningUnitExample
\text{f0}
Oscillation frequencyHz649.7473344 Hz
A_{\mathrm{min}}
Minimum inverting amplifier gain—29
\beta
Feedback network attenuation at f0—0.03448275862

Values with a unit may be written in any unit of the right kind.

Applies when

  • unloaded ladder (driven by a voltage source, feeding a high impedance)

Outside these conditions it says what is wrong instead of returning a number.

Worked example

RC phase-shift oscillator: R = 10000 ohm, C = 10 nF, ladder = high-pass
f0 = 649.7473344 Hz
A_min = 29
beta = 0.03448275862

Run it

Terminal
$ electronics-engineering solve elx_rc_phase_shift_oscillator "R=10000 ohm" "C=10 nF" ladder=high-pass
f0 = 649.7473344 Hz
A_min = 29
beta = 0.03448275862
  by: RC phase-shift oscillator frequency and gain  (high-pass ladder f = 1/(2 pi sqrt(6) R C); low-pass ladder f = sqrt(6)/(2 pi R C); |beta| = 1/29)
  R = 10000 ohm
  C = 1e-08 F
  ladder = high-pass
  assumes: unloaded ladder (driven by a voltage source, feeding a high impedance)

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Type-2 PLL with active PI loop filter: natural frequency and damping1 fig.elx_pll_loop_dynamics

The natural frequency and damping factor of a second-order (type-2) phase-locked loop with phase-detector gain Kd, VCO gain Ko and an active PI loop filter F(s) = (1 + s tau2)/(s tau1).

\omega_n = \sqrt{\frac{K_dK_o}{\tau_1}},\quad \zeta = \frac{\tau_2\omega_n}{2}

You give

MeaningUnitExample
\text{Kd}
Phase-detector gain in V/rad—0.5
\text{Ko}
VCO gain in rad/(s V)—20000
\text{tau1}
Integrator time constant R1 Cs10 ms
\text{tau2}
Zero time constant R2 Cs1 ms

You get

MeaningUnitExample
\text{wn}
Natural frequencyrad/s1000 rad/s
\text{fn}
Natural frequency in HzHz159.1549431 Hz
\zeta
Damping factor—0.5

Values with a unit may be written in any unit of the right kind.

Applies when

  • linear phase model, ideal integrator

Outside these conditions it says what is wrong instead of returning a number.

Worked example

PLL loop dynamics: Kd = 0.5 V/rad, Ko = 20000 rad/(s*V), tau1 = 10 ms, tau2 = 1 ms
wn = 1000 rad/s
fn = 159.1549431 Hz
zeta = 0.5

Run it

Terminal
$ electronics-engineering solve elx_pll_loop_dynamics Kd=0.5 Ko=20000 "tau1=10 ms" "tau2=1 ms"
wn = 1000 rad/s
fn = 159.1549431 Hz
zeta = 0.5
  by: Type-2 PLL with active PI loop filter: natural frequency and damping  (H(s) = K (1 + s tau2)/tau1 / (s^2 + s K tau2/tau1 + K/tau1), K = Kd Ko; wn = sqrt(K/tau1); zeta = tau2 wn/2)
  Kd = 0.5
  Ko = 20000
  tau1 = 0.01 s
  tau2 = 0.001 s
  assumes: linear phase model, ideal integrator

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Wien-bridge oscillator frequency and required gain1 fig.elx_wien_bridge_oscillator

The oscillation frequency of a Wien-bridge oscillator (series R1 C1, parallel R2 C2) and the non-inverting gain it needs (3 for equal components).

f_0 = \frac{1}{2\pi\sqrt{R_1R_2C_1C_2}},\quad A = 1 + \frac{R_1}{R_2} + \frac{C_2}{C_1}

You give

MeaningUnitExample
\text{R1}
Series-arm resistorohm10000 ohm
\text{C1}
Series-arm capacitorF16 nF
\text{R2}
Parallel-arm resistorohm10000 ohm
\text{C2}
Parallel-arm capacitorF16 nF

You get

MeaningUnitExample
\text{f0}
Oscillation frequencyHz994.7183943 Hz
\beta
Feedback fraction at f0—0.3333333333
A_{\mathrm{min}}
Required amplifier gain—3
\text{Rf\_over\_Rg}
Gain resistor ratio—2

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal amplifier

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Wien-bridge oscillator: R1 = 10000 ohm, C1 = 16 nF, R2 = 10000 ohm, C2 = 16 nF
f0 = 994.7183943 Hz
beta = 0.3333333333
A_min = 3
Rf_over_Rg = 2

Run it

Terminal
$ electronics-engineering solve elx_wien_bridge_oscillator "R1=10000 ohm" "C1=16 nF" "R2=10000 ohm" "C2=16 nF"
f0 = 994.7183943 Hz
beta = 0.3333333333
A_min = 3
Rf_over_Rg = 2
  by: Wien-bridge oscillator frequency and required gain  (f0 = 1/(2 pi sqrt(R1 R2 C1 C2)); A = 1 + R1/R2 + C2/C1)
  R1 = 10000 ohm
  C1 = 1.6e-08 F
  R2 = 10000 ohm
  C2 = 1.6e-08 F
  assumes: ideal amplifier

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Power supplies 5

Adjustable three-terminal regulator output voltage1 fig.elx_adjustable_regulator_output

The output voltage of an adjustable three-terminal regulator (LM317 type: reference between OUT and ADJ, R1 from OUT to ADJ, R2 from ADJ to ground), including the adjust-pin current.

V_{out} = V_{ref}\left(1 + \frac{R_2}{R_1}\right) + I_{adj}R_2

You give

MeaningUnitExample
\text{R1}
Resistor from OUT to ADJohm240 ohm
\text{R2}
Resistor from ADJ to groundohm720 ohm
\text{Vref}
Internal reference (1.25 V for the LM317 type)V1.25 V
\text{Iadj}
Adjust-pin current (default 0) optionalA

You get

MeaningUnitExample
\text{Vout}
Output voltageV5 V
I_{\mathrm{R1}}
Current through R1A0.005208333333 A

Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.

Applies when

  • regulator in regulation (input high enough)

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Adjustable regulator output: R1 = 240 ohm, R2 = 720 ohm, Vref = 1.25 V
Vout = 5 V
I_R1 = 0.005208333333 A

Run it

Terminal
$ electronics-engineering solve elx_adjustable_regulator_output "R1=240 ohm" "R2=720 ohm" "Vref=1.25 V"
Vout = 5 V
I_R1 = 0.005208333333 A
  by: Adjustable three-terminal regulator output voltage  (Vout = Vref (1 + R2/R1) + Iadj R2)
  R1 = 240 ohm
  R2 = 720 ohm
  Vref = 1.25 V
  assumes: regulator in regulation (input high enough)

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Heat-sink thermal path: junction, case and sink temperatures1 fig.elx_heat_sink_temperatures

The junction, case and heat-sink temperatures of a power device dissipating P through junction-to-case, case-to-sink (interface) and sink-to-ambient thermal resistances.

T_j = T_a + P\,(\theta_{jc} + \theta_{cs} + \theta_{sa})

You give

MeaningUnitExample
P
Power dissipatedW15 W
\text{Ta}
Ambient temperatureK25 degC
\theta_{\mathrm{jc}}
Junction-to-case thermal resistanceK/W1.5 K/W
\theta_{\mathrm{cs}}
Case-to-sink thermal resistanceK/W0.5 K/W
\theta_{\mathrm{sa}}
Sink-to-ambient thermal resistanceK/W3 K/W

You get

MeaningUnitExample
\text{Tj}
Junction temperatureK373.15 K
\text{Tc}
Case temperatureK350.65 K
\text{Ts}
Sink temperatureK343.15 K
\text{Tj\_C}
Junction temperature in degC—100
\theta_{\mathrm{ja}}
Total junction-to-ambient resistanceK/W5 K/W

Values with a unit may be written in any unit of the right kind.

Applies when

  • steady state, series thermal path

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Heat sink temperatures: P = 15 W, Ta = 25 degC, theta_jc = 1.5 K/W, theta_cs = 0.5 K/W, theta_sa = 3 K/W
Tj = 373.15 K
Tc = 350.65 K
Ts = 343.15 K
Tj_C = 100
theta_ja = 5 K/W

Run it

Terminal
$ electronics-engineering solve elx_heat_sink_temperatures "P=15 W" "Ta=25 degC" "theta_jc=1.5 K/W" "theta_cs=0.5 K/W" "theta_sa=3 K/W"
Tj = 373.15 K
Tc = 350.65 K
Ts = 343.15 K
Tj_C = 100
theta_ja = 5 K/W
  by: Heat-sink thermal path: junction, case and sink temperatures  (Tj = Ta + P (theta_jc + theta_cs + theta_sa))
  P = 15 W
  Ta = 298.15 K
  theta_jc = 1.5 K/W
  theta_cs = 0.5 K/W
  theta_sa = 3 K/W
  assumes: steady state, series thermal path

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Linear regulator dissipation and efficiency1 fig.elx_linear_regulator_efficiency

The input and output power, the dissipation in the pass element and the efficiency of a linear (series) regulator including its quiescent current.

P_D = (V_{in} – V_{out})I_L + V_{in}I_q,\quad \eta = \frac{V_{out}I_L}{V_{in}(I_L + I_q)}

You give

MeaningUnitExample
\text{Vin}
Input voltageV12 V
\text{Vout}
Regulated output voltageV5 V
\text{Iload}
Load currentA500 mA
\text{Iq}
Quiescent (ground-pin) currentA5 mA

You get

MeaningUnitExample
P_{\mathrm{in}}
Input powerW6.06 W
P_{\mathrm{out}}
Output powerW2.5 W
P_{\mathrm{diss}}
Dissipation in the regulatorW3.56 W
\text{efficiency}
Efficiency—0.4125412541
\text{efficiency\_pct}
Efficiency in per cent—41.25412541

Values with a unit may be written in any unit of the right kind.

Applies when

  • Vin > Vout

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Linear regulator efficiency: Vin = 12 V, Vout = 5 V, Iload = 500 mA, Iq = 5 mA
P_in = 6.06 W
P_out = 2.5 W
P_diss = 3.56 W
efficiency = 0.4125412541
efficiency_pct = 41.25412541

Run it

Terminal
$ electronics-engineering solve elx_linear_regulator_efficiency "Vin=12 V" "Vout=5 V" "Iload=500 mA" "Iq=5 mA"
P_in = 6.06 W
P_out = 2.5 W
P_diss = 3.56 W
efficiency = 0.4125412541
efficiency_pct = 41.25412541
  by: Linear regulator dissipation and efficiency  (P_in = Vin (IL + Iq); P_out = Vout IL; P_diss = P_in - P_out; eta = P_out/P_in)
  Vin = 12 V
  Vout = 5 V
  Iload = 0.5 A
  Iq = 0.005 A
  assumes: Vin > Vout

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Required heat-sink thermal resistance1 fig.elx_heat_sink_required

The largest sink-to-ambient thermal resistance (and total junction-to-ambient resistance) that keeps a device dissipating P below its maximum junction temperature.

\theta_{sa} \le \frac{T_{j,max} – T_a}{P} – \theta_{jc} – \theta_{cs}

You give

MeaningUnitExample
P
Power dissipatedW20 W
\text{Ta}
Ambient temperatureK40 degC
\text{Tj\_max}
Maximum junction temperatureK150 degC
\theta_{\mathrm{jc}}
Junction-to-case thermal resistanceK/W1 K/W
\theta_{\mathrm{cs}}
Case-to-sink thermal resistanceK/W0.5 K/W

You get

MeaningUnitExample
\theta_{\mathrm{ja},\mathrm{max}}
Largest junction-to-ambient resistanceK/W5.5 K/W
\theta_{\mathrm{sa},\mathrm{max}}
Largest sink-to-ambient resistanceK/W4 K/W

Values with a unit may be written in any unit of the right kind.

Applies when

  • a positive result (otherwise no heat sink suffices)

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Required heat sink: P = 20 W, Ta = 40 degC, Tj_max = 150 degC, theta_jc = 1 K/W, theta_cs = 0.5 K/W
theta_ja_max = 5.5 K/W
theta_sa_max = 4 K/W

Run it

Terminal
$ electronics-engineering solve elx_heat_sink_required "P=20 W" "Ta=40 degC" "Tj_max=150 degC" "theta_jc=1 K/W" "theta_cs=0.5 K/W"
theta_ja_max = 5.5 K/W
theta_sa_max = 4 K/W
  by: Required heat-sink thermal resistance  (theta_sa = (Tj,max - Ta)/P - theta_jc - theta_cs)
  P = 20 W
  Ta = 313.15 K
  Tj_max = 423.15 K
  theta_jc = 1 K/W
  theta_cs = 0.5 K/W
  assumes: a positive result (otherwise no heat sink suffices)

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Zener-referenced series-pass (emitter-follower) regulator1 fig.elx_series_pass_regulator

The output voltage, load, base, Zener and resistor currents and the pass-transistor dissipation of a regulator in which a Zener diode biased through Rs sets the base of an emitter-follower pass transistor.

V_{out} = V_Z – V_{BE},\quad I_Z = \frac{V_{in} – V_Z}{R_S} – \frac{I_L}{\beta+1}

You give

MeaningUnitExample
\text{Vin}
Unregulated inputV15 V
\text{Vz}
Zener voltageV10 V
\text{Rs}
Zener bias resistorohm1000 ohm
\text{RL}
Load resistanceohm100 ohm
\beta
Current gain of the pass transistor—100
\text{VBE}
Base-emitter voltageV0.7 V

You get

MeaningUnitExample
\text{Vout}
Output voltage Vz – VBEV9.3 V
I_{L}
Load currentA0.093 A
I_{B}
Base currentA0.0009207920792 A
I_{z}
Zener currentA0.004079207921 A
I_{\mathrm{Rs}}
Current in RsA0.005 A
P_{Q}
Pass-transistor dissipationW0.5248514851 W

Values with a unit may be written in any unit of the right kind.

Applies when

  • Vin > Vz > VBE
  • the Zener stays in breakdown (Iz > 0)

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Series-pass regulator: Vin = 15 V, Vz = 10 V, Rs = 1000 ohm, RL = 100 ohm, beta = 100, VBE = 0.7 V
Vout = 9.3 V
I_L = 0.093 A
I_B = 0.0009207920792 A
I_z = 0.004079207921 A
I_Rs = 0.005 A
P_Q = 0.5248514851 W

Run it

Terminal
$ electronics-engineering solve elx_series_pass_regulator "Vin=15 V" "Vz=10 V" "Rs=1000 ohm" "RL=100 ohm" beta=100 "VBE=0.7 V"
Vout = 9.3 V
I_L = 0.093 A
I_B = 0.0009207920792 A
I_z = 0.004079207921 A
I_Rs = 0.005 A
P_Q = 0.5248514851 W
  by: Zener-referenced series-pass (emitter-follower) regulator  (Vout = Vz - VBE; IB = IL/(beta + 1); Iz = (Vin - Vz)/Rs - IB; P = (Vin - Vout) IC)
  Vin = 15 V
  Vz = 10 V
  Rs = 1000 ohm
  RL = 100 ohm
  beta = 100
  VBE = 0.7 V
  assumes: Vin > Vz > VBE; the Zener stays in breakdown (Iz > 0)

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Semiconductors 9

Built-in potential of a pn junction1 fig.elx_builtin_potential

The built-in (contact) potential of an abrupt pn junction from the doping on each side, the intrinsic concentration and the temperature.

V_{bi} = \frac{kT}{q}\ln\frac{N_AN_D}{n_i^2}

You give

MeaningUnitExample
\text{NA}
Acceptor concentration on the p side1/m^31e+17 cm^-3
\text{ND}
Donor concentration on the n side1/m^31e+16 cm^-3
\text{ni}
Intrinsic carrier concentration1/m^31.5e+10 cm^-3
T
Absolute temperatureK300 K

You get

MeaningUnitExample
\text{Vbi}
Built-in potentialV0.7528794135 V

Values with a unit may be written in any unit of the right kind.

Applies when

  • NA, ND >= 100 ni
  • non-degenerate, complete ionisation

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Built-in potential: NA = 1e+17 cm^-3, ND = 1e+16 cm^-3, ni = 1.5e+10 cm^-3, T = 300 K
Vbi = 0.7528794135 V

Run it

Terminal
$ electronics-engineering solve elx_builtin_potential "NA=1e+17 cm^-3" "ND=1e+16 cm^-3" "ni=1.5e+10 cm^-3" "T=300 K"
Vbi = 0.7528794135 V
  by: Built-in potential of a pn junction  (Vbi = (kT/q) ln(NA ND / ni^2))
  NA = 1e+23 1/m^3
  ND = 1e+22 1/m^3
  ni = 1.5e+16 1/m^3
  T = 300 K
  assumes: NA, ND >= 100 ni; non-degenerate, complete ionisation

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Conductivity and resistivity of a semiconductor1 fig.elx_semiconductor_conductivity

The conductivity sigma = q (n mu_n + p mu_p) and the resistivity of a semiconductor from its electron and hole concentrations and mobilities.

\sigma = q\,(n\mu_n + p\mu_p),\quad \rho = 1/\sigma

You give

MeaningUnitExample
n
Electron concentration1/m^31e+16 cm^-3
p
Hole concentration1/m^322500 cm^-3
\mu_{n}
Electron mobilitym^2/(V*s)1350 cm^2/(V*s)
\mu_{p}
Hole mobilitym^2/(V*s)480 cm^2/(V*s)

You get

MeaningUnitExample
\sigma
Conductivity1/(ohm*m)216.2938456 1/(ohm*m)
\rho
Resistivityohm*m0.004623340055 ohm*m
\rho_{\mathrm{ohm},\mathrm{cm}}
Resistivity in ohm cm—0.4623340055

Values with a unit may be written in any unit of the right kind.

Applies when

  • n, p >= 0 (not both zero)
  • mobilities > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Semiconductor conductivity: n = 1e+16 cm^-3, p = 22500 cm^-3, mu_n = 1350 cm^2/(V*s), mu_p = 480 cm^2/(V*s)
sigma = 216.2938456 1/(ohm*m)
rho = 0.004623340055 ohm*m
rho_ohm_cm = 0.4623340055

Run it

Terminal
$ electronics-engineering solve elx_semiconductor_conductivity "n=1e+16 cm^-3" "p=22500 cm^-3" "mu_n=1350 cm^2/(V*s)" "mu_p=480 cm^2/(V*s)"
sigma = 216.2938456 1/(ohm*m)
rho = 0.004623340055 ohm*m
rho_ohm_cm = 0.4623340055
  by: Conductivity and resistivity of a semiconductor  (sigma = q (n mu_n + p mu_p); rho = 1/sigma)
  n = 1e+22 1/m^3
  p = 2.25e+10 1/m^3
  mu_n = 0.135 m^2/(V*s)
  mu_p = 0.048 m^2/(V*s)
  assumes: n, p >= 0 (not both zero); mobilities > 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Depletion width, field and capacitance of an abrupt pn junction1 fig.elx_depletion_width

The depletion-region width (and its parts on each side), the peak electric field and the depletion capacitance per area of an abrupt pn junction at a reverse bias (negative VR for a forward bias below Vbi).

W = \sqrt{\frac{2\varepsilon(V_{bi}+V_R)}{q}\left(\frac{1}{N_A}+\frac{1}{N_D}\right)}

You give

MeaningUnitExample
\text{NA}
Acceptor concentration (p side)1/m^31e+17 cm^-3
\text{ND}
Donor concentration (n side)1/m^31e+16 cm^-3
\text{Vbi}
Built-in potentialV0.81 V
\text{VR}
Reverse bias (negative for forward)V5 V
\text{eps\_r}
Relative permittivity of the semiconductor (11.7 for silicon)—11.7

You get

MeaningUnitExample
W
Depletion widthm9.090996814e-07 m
W_{\mathrm{um}}
Depletion width in micrometres—0.9090996814
\text{xn}
Width on the n sidem8.264542558e-07 m
\text{xp}
Width on the p sidem8.264542558e-08 m
\text{Emax}
Peak electric field (V/m)N/C12781876.66 N/C
\text{Cj\_area}
Depletion capacitance per areaF/m^20.0001139522976 F/m^2

Values with a unit may be written in any unit of the right kind.

Applies when

  • Vbi + VR > 0
  • abrupt junction, depletion approximation

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Depletion width: NA = 1e+17 cm^-3, ND = 1e+16 cm^-3, Vbi = 0.81 V, VR = 5 V, eps_r = 11.7
W = 9.090996814e-07 m
W_um = 0.9090996814
xn = 8.264542558e-07 m
xp = 8.264542558e-08 m
Emax = 12781876.66 N/C
Cj_area = 0.0001139522976 F/m^2

Run it

Terminal
$ electronics-engineering solve elx_depletion_width "NA=1e+17 cm^-3" "ND=1e+16 cm^-3" "Vbi=0.81 V" "VR=5 V" eps_r=11.7
W = 9.090996814e-07 m
W_um = 0.9090996814
xn = 8.264542558e-07 m
xp = 8.264542558e-08 m
Emax = 12781876.66 N/C
Cj_area = 0.0001139522976 F/m^2
  by: Depletion width, field and capacitance of an abrupt pn junction  (W = sqrt(2 eps (Vbi + VR)/q (1/NA + 1/ND)); xn = W NA/(NA+ND); Emax = q ND xn/eps; C' = eps/W)
  NA = 1e+23 1/m^3
  ND = 1e+22 1/m^3
  Vbi = 0.81 V
  VR = 5 V
  eps_r = 11.7
  assumes: Vbi + VR > 0; abrupt junction, depletion approximation

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Drift velocity and drift current in a semiconductor bar1 fig.elx_drift_current

The electric field, the carrier drift velocity, the drift current density and the current when a voltage is applied along a uniformly doped bar.

J = q\,n\,\mu\,E,\quad E = V/L

You give

MeaningUnitExample
n
Concentration of the carriers that drift1/m^31e+16 cm^-3
\mu
Their mobilitym^2/(V*s)1350 cm^2/(V*s)
V
Voltage applied along the barV5 V
L
Bar lengthm0.001 m
A
Cross-sectional aream^21e-08 m^2

You get

MeaningUnitExample
E
Electric field (V/m)N/C5000 N/C
v_{d}
Drift velocitym/s675 m/s
J
Drift current densityA/m^21081469.228 A/m^2
I
CurrentA0.01081469228 A

Values with a unit may be written in any unit of the right kind.

Applies when

  • n, mu, L, A > 0
  • low field (constant mobility)

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Drift current: n = 1e+16 cm^-3, mu = 1350 cm^2/(V*s), V = 5 V, L = 0.001 m, A = 1e-08 m^2
E = 5000 N/C
v_d = 675 m/s
J = 1081469.228 A/m^2
I = 0.01081469228 A

Run it

Terminal
$ electronics-engineering solve elx_drift_current "n=1e+16 cm^-3" "mu=1350 cm^2/(V*s)" "V=5 V" "L=0.001 m" "A=1e-08 m^2"
E = 5000 N/C
v_d = 675 m/s
J = 1081469.228 A/m^2
I = 0.01081469228 A
  by: Drift velocity and drift current in a semiconductor bar  (E = V/L; v_d = mu E; J = q n v_d; I = J A)
  n = 1e+22 1/m^3
  mu = 0.135 m^2/(V*s)
  V = 5 V
  L = 0.001 m
  A = 1e-08 m^2
  assumes: n, mu, L, A > 0; low field (constant mobility)

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Einstein relation and diffusion length1 fig.elx_einstein_diffusion

The diffusion coefficient D = mu kT/q of carriers from their mobility (Einstein relation) and the diffusion length L = sqrt(D tau) from the minority-carrier lifetime.

D = \mu\frac{kT}{q},\quad L = \sqrt{D\tau}

You give

MeaningUnitExample
\mu
Carrier mobilitym^2/(V*s)1350 cm^2/(V*s)
T
Absolute temperatureK300 K
\tau
Minority-carrier lifetimes1 us

You get

MeaningUnitExample
D
Diffusion coefficientm^2/s0.003490019971 m^2/s
D_{\mathrm{cm2}}
D in cm²/s—34.90019971
L_{\mathrm{diff}}
Diffusion lengthm5.907639098e-05 m
L_{\mathrm{um}}
Diffusion length in micrometres—59.07639098

Values with a unit may be written in any unit of the right kind.

Applies when

  • mu, T, tau > 0
  • non-degenerate material

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Einstein relation: mu = 1350 cm^2/(V*s), T = 300 K, tau = 1 us
D = 0.003490019971 m^2/s
D_cm2 = 34.90019971
L_diff = 5.907639098e-05 m
L_um = 59.07639098

Run it

Terminal
$ electronics-engineering solve elx_einstein_diffusion "mu=1350 cm^2/(V*s)" "T=300 K" "tau=1 us"
D = 0.003490019971 m^2/s
D_cm2 = 34.90019971
L_diff = 5.907639098e-05 m
L_um = 59.07639098
  by: Einstein relation and diffusion length  (D = mu kT/q; L = sqrt(D tau))
  mu = 0.135 m^2/(V*s)
  T = 300 K
  tau = 1e-06 s
  assumes: mu, T, tau > 0; non-degenerate material

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Electron and hole concentrations of doped (compensated) material1 fig.elx_doped_carrier_concentrations

The equilibrium electron and hole concentrations of a semiconductor with donors and acceptors, from charge neutrality and the mass-action law (exact, so it also holds for light or compensated doping).

n = \frac{N_D – N_A}{2} + \sqrt{\left(\frac{N_D – N_A}{2}\right)^2 + n_i^2},\quad p = \frac{n_i^2}{n}

You give

MeaningUnitExample
\text{ND}
Donor concentration1/m^31e+16 cm^-3
\text{NA}
Acceptor concentration1/m^30 cm^-3
\text{ni}
Intrinsic carrier concentration1/m^31.5e+10 cm^-3

You get

MeaningUnitExample
n
Electron concentration1/m^31e+22 1/m^3
p
Hole concentration1/m^32.25e+10 1/m^3
n_{\mathrm{cm3}}
n in cm^-3—1e+16
p_{\mathrm{cm3}}
p in cm^-3—22500
\text{type}
n-type, p-type or intrinsic—n-type

Values with a unit may be written in any unit of the right kind.

Applies when

  • ND, NA >= 0; ni > 0
  • complete ionisation, non-degenerate

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Carrier concentrations of doped material: ND = 1e+16 cm^-3, NA = 0 cm^-3, ni = 1.5e+10 cm^-3
n = 1e+22 1/m^3
p = 2.25e+10 1/m^3
n_cm3 = 1e+16
p_cm3 = 22500
type = n-type

Run it

Terminal
$ electronics-engineering solve elx_doped_carrier_concentrations "ND=1e+16 cm^-3" "NA=0 cm^-3" "ni=1.5e+10 cm^-3"
n = 1e+22 1/m^3
p = 2.25e+10 1/m^3
n_cm3 = 1e+16
p_cm3 = 22500
type = n-type
  by: Electron and hole concentrations of doped (compensated) material  (n - p = ND - NA and n p = ni^2: majority = |ND-NA|/2 + sqrt((ND-NA)^2/4 + ni^2), minority = ni^2/majority)
  ND = 1e+22 1/m^3
  NA = 0 1/m^3
  ni = 1.5e+16 1/m^3
  assumes: ND, NA >= 0; ni > 0; complete ionisation, non-degenerate

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Intrinsic carrier concentration1 fig.elx_intrinsic_carrier_concentration

The intrinsic carrier concentration ni = sqrt(Nc Nv) exp(-Eg/2kT) at a temperature, from the effective densities of states at 300 K (scaled as T^1.5) and the band gap; also the intrinsic level's offset from midgap.

n_i = \sqrt{N_cN_v}\,e^{-E_g/2kT},\quad N_{c,v}(T) = N_{c,v}(300)\left(\tfrac{T}{300}\right)^{3/2}

You give

MeaningUnitExample
\text{Nc}
Effective density of states in the conduction band at 300 K1/m^32.8e+19 cm^-3
\text{Nv}
Effective density of states in the valence band at 300 K1/m^31.04e+19 cm^-3
\text{Eg}
Band gap energyJ1.12 eV
T
Absolute temperatureK300 K

You get

MeaningUnitExample
\text{ni}
Intrinsic carrier concentration1/m^36.67589872e+15 1/m^3
\text{ni\_cm3}
Ni in cm^-3—6675898720
\text{Ei\_minus\_midgap\_eV}
Intrinsic Fermi level above midgap, eV—-0.01280189354
\text{Nc\_T}
Nc at T1/m^32.8e+25 1/m^3
\text{Nv\_T}
Nv at T1/m^31.04e+25 1/m^3

Values with a unit may be written in any unit of the right kind.

Applies when

  • Nc, Nv, Eg, T > 0
  • non-degenerate statistics, band gap independent of T

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Intrinsic carrier concentration: Nc = 2.8e+19 cm^-3, Nv = 1.04e+19 cm^-3, Eg = 1.12 eV, T = 300 K
ni = 6.67589872e+15 1/m^3
ni_cm3 = 6675898720
Ei_minus_midgap_eV = -0.01280189354
Nc_T = 2.8e+25 1/m^3
Nv_T = 1.04e+25 1/m^3

Run it

Terminal
$ electronics-engineering solve elx_intrinsic_carrier_concentration "Nc=2.8e+19 cm^-3" "Nv=1.04e+19 cm^-3" "Eg=1.12 eV" "T=300 K"
ni = 6.67589872e+15 1/m^3
ni_cm3 = 6675898720
Ei_minus_midgap_eV = -0.01280189354
Nc_T = 2.8e+25 1/m^3
Nv_T = 1.04e+25 1/m^3
  by: Intrinsic carrier concentration  (Nc(T) = Nc (T/300)^1.5, Nv likewise; ni = sqrt(Nc Nv) exp(-Eg/(2kT)); Ei - Emid = (kT/2) ln(Nv/Nc))
  Nc = 2.8e+25 1/m^3
  Nv = 1.04e+25 1/m^3
  Eg = 1.79443783e-19 J
  T = 300 K
  assumes: Nc, Nv, Eg, T > 0; non-degenerate statistics, band gap independent of T

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Junction (depletion) capacitance versus bias1 fig.elx_junction_capacitance

The depletion capacitance of a pn junction at a reverse bias from its zero-bias value, the built-in potential and the grading coefficient (1/2 abrupt, 1/3 linearly graded), as used for varactors.

C_j = \frac{C_{j0}}{\left(1 + V_R/V_{bi}\right)^{m}}

You give

MeaningUnitExample
\text{Cj0}
Zero-bias junction capacitanceF2 pF
\text{Vbi}
Built-in potentialV0.75 V
\text{VR}
Reverse bias (negative for forward)V5 V
m
Grading coefficient (0.5 abrupt, 0.33 linearly graded)—0.5

You get

MeaningUnitExample
\text{Cj}
Junction capacitanceF7.223151185e-13 F
\text{ratio}
Cj/Cj0—0.3611575593

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0 < m < 1
  • VR > -Vbi

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Junction capacitance: Cj0 = 2 pF, Vbi = 0.75 V, VR = 5 V, m = 0.5
Cj = 7.223151185e-13 F
ratio = 0.3611575593

Run it

Terminal
$ electronics-engineering solve elx_junction_capacitance "Cj0=2 pF" "Vbi=0.75 V" "VR=5 V" m=0.5
Cj = 7.223151185e-13 F
ratio = 0.3611575593
  by: Junction (depletion) capacitance versus bias  (Cj = Cj0 / (1 + VR/Vbi)^m)
  Cj0 = 2e-12 F
  Vbi = 0.75 V
  VR = 5 V
  m = 0.5
  assumes: 0 < m < 1; VR > -Vbi

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Thermal voltage kT/q1 fig.elx_thermal_voltage

The thermal voltage VT = kT/q at an absolute temperature (about 25.85 mV at 300 K), the voltage scale of every diode and transistor equation.

V_T = \frac{kT}{q}

You give

MeaningUnitExample
T
Absolute temperature (degC is converted)K300 K

You get

MeaningUnitExample
\text{VT}
Thermal voltageV0.02585199979 V
\text{VT\_mV}
Thermal voltage in millivolts—25.85199979

Values with a unit may be written in any unit of the right kind.

Applies when

  • T > 0 K

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Thermal voltage: T = 300 K
VT = 0.02585199979 V
VT_mV = 25.85199979

Run it

Terminal
$ electronics-engineering solve elx_thermal_voltage "T=300 K"
VT = 0.02585199979 V
VT_mV = 25.85199979
  by: Thermal voltage kT/q  (VT = k T / q)
  T = 300 K
  assumes: T > 0 K

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Timing 5

CMOS dynamic (switching) power1 fig.elx_cmos_dynamic_power

The dynamic power alpha C VDD^2 f of CMOS logic, the energy drawn from the supply per 0 → 1 transition, the energy stored on the load and the average supply current.

P_{dyn} = \alpha\,C\,V_{DD}^2f

You give

MeaningUnitExample
\alpha
Activity factor: probability of a 0 -> 1 transition per clock cycle—0.1
C
Switched capacitanceF1000 pF
\text{VDD}
Supply voltageV1 V
f
Clock frequencyHz1000000000 Hz

You get

MeaningUnitExample
P
Dynamic powerW0.1 W
E_{\mathrm{supply}}
Energy from the supply per transition, C VDD^2J1e-09 J
E_{\mathrm{stored}}
Energy stored on C, C VDD^2/2J5e-10 J
I_{\mathrm{avg}}
Average supply currentA0.1 A

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0 <= alpha <= 1
  • full-swing switching, short-circuit and leakage power not included

Outside these conditions it says what is wrong instead of returning a number.

Worked example

CMOS dynamic power: alpha = 0.1, C = 1000 pF, VDD = 1 V, f = 1000000000 Hz
P = 0.1 W
E_supply = 1e-09 J
E_stored = 5e-10 J
I_avg = 0.1 A

Run it

Terminal
$ electronics-engineering solve elx_cmos_dynamic_power alpha=0.1 "C=1000 pF" "VDD=1 V" "f=1000000000 Hz"
P = 0.1 W
E_supply = 1e-09 J
E_stored = 5e-10 J
I_avg = 0.1 A
  by: CMOS dynamic (switching) power  (P = alpha C VDD^2 f)
  alpha = 0.1
  C = 1e-09 F
  VDD = 1 V
  f = 1000000000 Hz
  assumes: 0 <= alpha <= 1; full-swing switching, short-circuit and leakage power not included

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Elmore delay of an RC ladder (interconnect)1 fig.elx_elmore_delay

The Elmore delay to every node of an RC ladder (a driver resistance and wire segments, each followed by a capacitance to ground), the delay at the far end and its 50 % estimate ln 2 tau.

\tau_D = \sum_i C_i\sum_{j\le i}R_j

You give

MeaningUnitExample
R
Series resistances in ohms, from the driver outwards vector—[100, 50, 50]
C
Node capacitances in picofarads, one after each resistor vector—[0.1, 0.1, 0.2]

You get

MeaningUnitExample
\tau_{D}
Elmore delay at the far ends6.5e-11 s
\text{t50}
50 % delay estimate ln 2 tau_Ds4.505456674e-11 s
\text{delays}
Elmore delay at each node, seconds—[4e-11, 5.5e-11, 6.5e-11]

Applies when

  • one capacitance per resistor
  • step input

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Elmore delay: R = [100, 50, 50], C = [0.1, 0.1, 0.2]
tau_D = 6.5e-11 s
t50 = 4.505456674e-11 s
delays = [4e-11, 5.5e-11, 6.5e-11]

Run it

Terminal
$ electronics-engineering solve elx_elmore_delay "R=[100, 50, 50]" "C=[0.1, 0.1, 0.2]"
tau_D = 6.5e-11 s
t50 = 4.505456674e-11 s
delays = [4e-11,5.5e-11,6.5e-11]
  by: Elmore delay of an RC ladder (interconnect)  (tau_k = sum_i C_i R(shared path of nodes i and k))
  assumes: one capacitance per resistor; step input

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Flip-flop setup and hold slack, maximum clock frequency2 fig.elx_setup_hold_timing

The setup slack, hold slack, maximum clock frequency and a verdict for a register-to-register path from clock-to-Q, logic delays, setup and hold times and clock skew (positive when the capture clock is late).

T \ge t_{cq} + t_{pd} + t_{su} – t_{skew},\quad t_{ccq} + t_{cd} \ge t_h + t_{skew}

You give

MeaningUnitExample
T
Clock periods5 ns
\text{tcq}
Maximum clock-to-Q delays0.3 ns
\text{tpd}
Maximum logic delays3.5 ns
\text{tsu}
Setup times0.2 ns
\text{tskew}
Clock skew, capture minus launchs0.1 ns
\text{tccq}
Minimum (contamination) clock-to-Qs0.1 ns
\text{tcd}
Minimum (contamination) logic delays0.2 ns
\text{th}
Hold times0.1 ns

You get

MeaningUnitExample
\text{setup\_slack}
Setup slacks1.1e-09 s
\text{hold\_slack}
Hold slacks1e-10 s
f_{\mathrm{max}}
Maximum clock frequencyHz256410256.4 Hz
\text{verdict}
Meets timing, setup violation, hold violation or both—meets timing

Values with a unit may be written in any unit of the right kind.

Applies when

  • edge-triggered registers, single clock

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Setup and hold timing: T = 5 ns, tcq = 0.3 ns, tpd = 3.5 ns, tsu = 0.2 ns, tskew = 0.1 ns, tccq = 0.1 ns, tcd = 0.2 ns, th = 0.1 ns
setup_slack = 1.1e-09 s
hold_slack = 1e-10 s
f_max = 256410256.4 Hz
verdict = meets timing

Run it

Terminal
$ electronics-engineering solve elx_setup_hold_timing "T=5 ns" "tcq=0.3 ns" "tpd=3.5 ns" "tsu=0.2 ns" "tskew=0.1 ns" "tccq=0.1 ns" "tcd=0.2 ns" "th=0.1 ns"
setup_slack = 1.1e-09 s
hold_slack = 1e-10 s
f_max = 256410256.4 Hz
verdict = meets timing
  by: Flip-flop setup and hold slack, maximum clock frequency  (setup slack = T + skew - (tcq + tpd + tsu); hold slack = tccq + tcd - th - skew; f_max = 1/(tcq + tpd + tsu - skew))
  T = 5e-09 s
  tcq = 3e-10 s
  tpd = 3.5e-09 s
  tsu = 2e-10 s
  tskew = 1e-10 s
  tccq = 1e-10 s
  tcd = 2e-10 s
  th = 1e-10 s
  assumes: edge-triggered registers, single clock

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

RC delay, 10-90 % rise time and bandwidth2 fig.elx_rc_delay_rise_time

The time constant, the 50 % delay (ln 2 RC), the 10-90 % rise time (ln 9 RC = 2.2 RC), the -3 dB bandwidth and the rise-time-bandwidth product (0.35) of a first-order RC low-pass.

t_r = \ln 9\,RC \approx 2.2RC,\quad t_rf_{3dB} \approx 0.35

You give

MeaningUnitExample
R
Resistanceohm1000 ohm
C
CapacitanceF10 pF

You get

MeaningUnitExample
\tau
Time constant RCs1e-08 s
\text{t50}
50 % delays6.931471806e-09 s
t_{\mathrm{rise}}
10-90 % rise times2.197224577e-08 s
f_{\mathrm{3dB}}
-3 dB bandwidthHz15915494.31 Hz
\text{tr\_times\_bw}
Rise time x bandwidth—0.3496991526

Values with a unit may be written in any unit of the right kind.

Applies when

  • step input, first-order RC

Outside these conditions it says what is wrong instead of returning a number.

Worked example

RC delay and rise time: R = 1000 ohm, C = 10 pF
tau = 1e-08 s
t50 = 6.931471806e-09 s
t_rise = 2.197224577e-08 s
f_3dB = 15915494.31 Hz
tr_times_bw = 0.3496991526

Run it

Terminal
$ electronics-engineering solve elx_rc_delay_rise_time "R=1000 ohm" "C=10 pF"
tau = 1e-08 s
t50 = 6.931471806e-09 s
t_rise = 2.197224577e-08 s
f_3dB = 15915494.31 Hz
tr_times_bw = 0.3496991526
  by: RC delay, 10-90 % rise time and bandwidth  (t50 = ln 2 RC; tr = ln 9 RC; f = 1/(2 pi RC); tr f = ln 9/(2 pi))
  R = 1000 ohm
  C = 1e-11 F
  assumes: step input, first-order RC

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Synchronizer metastability MTBF1 fig.elx_metastability_mtbf

The mean time between synchronizer failures MTBF = exp(tr/tau)/(T0 fclk fdata) from the resolution time allowed, the flip-flop's time constant and window, and the clock and data rates.

\text{MTBF} = \frac{e^{t_r/\tau}}{T_0f_{clk}f_{data}}

You give

MeaningUnitExample
\text{tr}
Resolution time availables2 ns
\tau
Metastability time constants50 ps
\text{T0}
Metastability window T0s100 ps
\text{fclk}
Clock frequencyHz500000000 Hz
\text{fdata}
Rate of asynchronous data changesHz10000000 Hz

You get

MeaningUnitExample
\text{MTBF\_s}
MTBFs4.707705337e+11 s
\text{MTBF\_years}
MTBF in years (365.25 days)—14917.81801
\text{log10\_MTBF\_s}
log10 of MTBF in seconds—11.67280927

Values with a unit may be written in any unit of the right kind.

Applies when

  • tr/tau <= 700

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Metastability MTBF: tr = 2 ns, tau = 50 ps, T0 = 100 ps, fclk = 500000000 Hz, fdata = 10000000 Hz
MTBF_s = 4.707705337e+11 s
MTBF_years = 14917.81801
log10_MTBF_s = 11.67280927

Run it

Terminal
$ electronics-engineering solve elx_metastability_mtbf "tr=2 ns" "tau=50 ps" "T0=100 ps" "fclk=500000000 Hz" "fdata=10000000 Hz"
MTBF_s = 4.707705337e+11 s
MTBF_years = 14917.81801
log10_MTBF_s = 11.67280927
  by: Synchronizer metastability MTBF  (MTBF = exp(tr/tau)/(T0 fclk fdata))
  tr = 2e-09 s
  tau = 5e-11 s
  T0 = 1e-10 s
  fclk = 500000000 Hz
  fdata = 10000000 Hz
  assumes: tr/tau <= 700

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Figures

Computed, not drawn by hand

Every point in these figures is an answer of the model: one input is varied, the others are held at the worked example, and the curve shows how the result responds. The marked point is the worked example itself.

Sallen-Key low-pass filter: f0, Q and gain

\omega_0 = \frac{1}{\sqrt{R_1R_2C_1C_2}},\quad Q = \frac{\sqrt{R_1R_2C_1C_2}}{R_1C_2 + R_2C_2 + R_1C_1(1-K)}
Q against R1: Sallen-Key low-pass filter: f0, Q and gainQ (quality factor) against R1 (first series resistor), with C1 = 2.00e-8 F, C2 = 1.00e-8 F, K = 1, R2 = 10000 ohm. 31 points computed by electronics-engineering-ai999x; marked: R1 = 10000, Q = 0.707107.500075001000012500150000.670.680.690.70.710.707107 R1 — first series resistor [ohm]Q
Q (quality factor) against R1 (first series resistor), with C1 = 2.00e-8 F, C2 = 1.00e-8 F, K = 1, R2 = 10000 ohm. 31 points computed by electronics-engineering-ai999x; marked: R1 = 10000, Q = 0.707107.

ADC output code, LSB and quantisation error

D = \left\lfloor \frac{V_{in}}{V_{ref}}2^n\right\rfloor,\quad \text{LSB} = \frac{V_{ref}}{2^n}
code against Vin: ADC output code, LSB and quantisation errorcode (output code (decimal)) against Vin (analog input), with Vref = 5 V, n = 8. 31 points computed by electronics-engineering-ai999x; marked: Vin = 3.2, code = 163.234100150200250163 Vin — analog input [V]code
code (output code (decimal)) against Vin (analog input), with Vref = 5 V, n = 8. 31 points computed by electronics-engineering-ai999x; marked: Vin = 3.2, code = 163.

Operating point of a diode in series with a resistor (exact)

V_S = I_DR + nV_T\ln\left(1 + \frac{I_D}{I_S}\right)
ID against VS: Operating point of a diode in series with a resistor (exact)ID (diode current) against VS (source voltage), with Is = 1.00e-14 A, R = 1000 ohm, T = 300 K, n = 1. 31 points computed by electronics-engineering-ai999x; marked: VS = 5, ID = 0.00430746 A.460.0020.0040.0060.00430746 AVS — source voltage [V]ID [A]
ID (diode current) against VS (source voltage), with Is = 1.00e-14 A, R = 1000 ohm, T = 300 K, n = 1. 31 points computed by electronics-engineering-ai999x; marked: VS = 5, ID = 0.00430746 A.

555 timer astable: frequency and duty cycle

t_H = \ln 2\,(R_A + R_B)C,\quad t_L = \ln 2\,R_BC,\quad f = \frac{1}{\ln 2\,(R_A + 2R_B)C}
f against RA: 555 timer astable: frequency and duty cyclef (frequency) against RA (resistor from Vcc to the discharge pin), with C = 1.00e-5 F, RB = 10000 ohm. 31 points computed by electronics-engineering-ai999x; marked: RA = 1000, f = 6.86998 Hz.5007501000125015006.76.86.976.86998 HzRA — resistor from Vcc to the discharge pin [ohm]f [Hz]
f (frequency) against RA (resistor from Vcc to the discharge pin), with C = 1.00e-5 F, RB = 10000 ohm. 31 points computed by electronics-engineering-ai999x; marked: RA = 1000, f = 6.86998 Hz.
Questions

Frequently asked

What does electronics-engineering-ai999x do?

Electronics Engineering answers questions in electronics engineering: semiconductors and pn junctions, diode circuits and rectifiers, BJT and MOSFET biasing and amplifiers, op-amp circuits, active filters, oscillators and 555 timers, ADCs and DACs, digital timing and power supplies. Each answer gives the value with its unit, the steps and the formula in LaTeX.

Is there a desktop app or a command-line program?

Yes, both, for Windows and Linux, in their next release: the AI999X desktop app holds all AI999X models in one window, and the command-line bundle one program per model (electronics-engineering for this one). Until then this model runs in your browser on this page. Downloads and checksums: https://www.ai999x.com/desktop-cli/

How do I install electronics-engineering-ai999x?

With pip: pip install electronics-engineering-ai999x. The same files are on Hugging Face (hf download AI999X/electronics-engineering-ai999x –local-dir electronics-engineering-ai999x) and GitHub.

Does it run offline?

Yes. It is a Python package that runs on an ordinary CPU without a network connection (Python >=3.10); no GPU and no API key are needed.

How many capabilities does electronics-engineering-ai999x have?

92 capabilities in 11 topics, including BJT, Op-amps, Active filters, Data converters, Oscillators.

Which field and tasks does it cover?

Field: Engineering. Tasks: Question Answering, Sentence Similarity, Feature Extraction.

What does an answer look like?

Asked "BJT voltage-divider bias: VCC = 12 V, R1 = 47 kohm, R2 = 10 kohm, RC = 2.2 kohm, RE = 470 ohm, beta = 150, VBE = 0.7 V", it answers: VTH = 2.10526 V, RTH = 8245.61 ohm, IB = 1.77397e-05 A, IC = 0.00266096 A, IE = 0.0026787 A, VB = 1.95899 V, VE = 1.25899 V, VC = 6.14589 V, VCE = 4.8869 V.

What happens when a question cannot be answered?

It says so and names what is missing or out of range, instead of guessing a number.

More from AI999X

Explore every model.