Source code coming soon. The GitHub repository is private for now and opens to everyone very soon.
BetterSPICE Beta 0.8.0 Join the beta Download soon
Part VI  Parts and modelsReferenceContentsIndex
35

Devices: sensors, optoelectronics and displays

Optocouplers, thermal parts, crystals and oscillators, light and field sensors, LED assemblies, displays and lamps. The parameter tables use the same columns as Devices: passives. Every part has labelled fields with units in the inspector and in All parameters, and the live stimulus of a sensor (light, temperature, field, strain, distance, load) is its main field, first in the list, with a slider range that fits it. A field that shows auto takes a value derived from other parameters until you type one (for example the must-operate voltage of a relay is 0.75 of its coil voltage). Clear it to go back. A variant placed from the library starts with its own typical values, such as 1 kΩ for a Pt1000 or 1.2 V dropout for an AMS1117. A part placed from the library can start with its own values, and a part made with the Part Wizard takes them from its datasheet fields (Part templates reference).

35.1Optocouplers and opto sensors

Optocouplers and opto sensors
TypePinsVariantsClass
opto (U)transistor, darlington, slot, reflective: anode, cathode, collector, emitter. transistor_b: plus base. triac, triac_zc: anode, cathode, mt1, mt2. logic: anode, cathode, vcc, out, gnd, en.transistor (PC817), transistor_b (4N25), darlington, triac (MOC3021), triac_zc (MOC3041), logic (6N137), slot (photo-interrupter), reflective (TCRT5000)approximate, verified ±0.33 % (PC817 class)

An input LED whose current, filtered with the rise time, drives a photocurrent into the base of an output transistor. Saturation emerges from the transistor model. The triac outputs fire above ift and hold above ih, the zero-cross version only while the output voltage is below vinh. The logic output is an open collector that pulls low while the LED is above if_th and en is high, after tp. The slot interrupter has blocked and the reflective sensor reflect, both live sliders.

Optocouplers and opto sensors
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Current transfer ratioctrA/A (1 = 100 %)1 (darlington 5, slot 0.2, reflective 0.05)> 0Default, inspector, part fileAt if_test.
LED forward voltagevfV1.2> 0Default, inspector, part fileAt if_test.
Test currentif_testA10 mA> 0Default, inspector, part file
CTR exponentctr_exp0-1 to 2Default, inspector, part fileCTR · (I_F / if_test)ctr_exp. 0 is constant.
Output transistor gainbf300> 0Default, inspector, part file
Rise / fall timetrs4 µs (darlington 60 µs)> 0Default, inspector, part file
Dark currenticeoA10 nA≥ 0Default, inspector, part file
Max collector-emitter voltagebvceoV70> 0Default, inspector, part fileWarns when exceeded.
Slot interruptedblocked0 to 10Live sliderSlot only.
Reflectancereflect0 to 11Live sliderReflective only.
Triac trigger currentiftA10 mA> 0Default, inspector, part file
Triac holding currentihA100 µA> 0Default, inspector, part file
Triac on-state voltagevtmV1.8> 0Default, inspector, part fileAt 100 mA.
Zero-cross inhibit voltagevinhV20> 0Default, inspector, part filetriac_zc only.
Logic LED thresholdif_thA5 mA> 0Default, inspector, part file
Logic propagation delaytps50 ns≥ 0Default, inspector, part file

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

35.2Fuses and circuit breakers

Fuses and circuit breakers
TypePinsVariantsClass
fuse (F)a, bvery fast (FF), fast (F), slow (T), breaker, thermal, thermostat (none: instant trip)approximate, checked against datasheet curves

A fuse heats with I²t and blows when the melting energy reaches i2t: dW/dt = i² - W / τ with τ = i2t / itrip². It never blows below itrip and blows after about i2t / I² on a heavy overload. Its resistance rises towards r_hot · r as it heats. Each family has defaults of its own, taken from the published opening-time limits (IEC 60127-2 sheets 2 and 3, Schurter SA, Littelfuse 0217 and 0218, IEC 60898-1): a very fast fuse has itrip 1.6 and i2t 0.15, a fast fuse 1.9 and 0.7, a slow fuse 1.9 and 6.5, a breaker 1.3 and 20 (itrip times irated, i2t times irated²). A slow fuse has a second thermal node, its body, which holds it for minutes just above itrip while a large overload still melts the element at its I²t. A breaker adds an instant magnetic trip at imag. A thermal cut-off opens when the ambient reaches t_open. A thermostat opens above t_open and recloses at t_close. A UL 248-14 fuse opens at 135 % within an hour: set itrip to about 1.25 times irated. The rating label shows the speed, for example "1 A T". The library has fuse parts with their datasheet values and time-current points to start from: Littelfuse 0217 (fast) and 0218 (time-lag), Bel 5HF and Schurter SA 5x20 (very fast).

Fuses and circuit breakers
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Rated currentiratedA1> 0Default, inspector, part fileScales the defaults of r, itrip, i2t and imag.
Cold resistancerΩ0.1 / irated1.3 (instant type 0.01)> 0Default, inspector, part file
Minimum fusing currentitripAvery fast 1.6, fast 1.9, slow 1.9, breaker 1.3 x irated (instant type 1)> 0Default, inspector, part fileSteady-state melting current. The instant type opens above it.
Melting I²ti2tA²svery fast 0.15, fast 0.7, slow 6.5, breaker 20 x irated²> 0Default, inspector, part fileEnter the datasheet value to follow its curve.
Body share, body time constantk_body, tau_body-, sslow 0.3 and 200 s, others 00 to 1, > 0File or All parametersThe second thermal node of a slow fuse. 0 is the one-node law.
Hot / cold resistance ratior_hot41 to 1000Default, inspector, part file
Voltage ratingvratedV rms250> 0Default, inspector, part fileAn AC rms rating: warns when the peak across the open fuse is above vrated x 1.414.
Breaking capacityibreakAnone> 0File or All parametersWarns W_RATING when the current at the blow is higher.
Arcing timet_arcs0 (1 µs)>= 0File or All parametersThe conductance falls over this time. The readout i2t_arc is the clearing I²t.
Magnetic trip currentimagA10 x irated> 0Default, inspector, part fileBreaker only.
Opening temperaturet_open°C98 (thermostat 70)anyDefault, inspector, part file
Reclose temperaturet_close°Ct_open - 15anyDefault, inspector, part fileThermostat.
Ambient temperaturet_amb°C25anyLive slider
Self-heating, time constantrth, tau_thK/W, s50, 10File or All parametersThermostat.
Blown resistanceroffΩ1 GΩ> 0File or All parameters
Starts blownblown0 / 10Inspector
Replacedreplacedcount0Replace fuseCounts up each time you replace a fuse or reset a breaker. A blown fuse then closes again, cold.

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

A blown fuse warns W_FUSE_BLOWN with the time, the current and the I²t. On the schematic a blown fuse or tripped breaker pops: the element is drawn broken with sparks and a glow for 0.7 s, and BLOWN (TRIPPED for a breaker) stays under its value. A fuse that only a Simulate run blew has a dashed outline and the time. Click the part, press Replace fuse (Reset breaker) at the top of its Inspector, or use the same item in its right-click menu to close it again, as one undo step. Thermostats and PPTCs reset by themselves. The ngspice export writes a fuse as the resistance it starts with, and ngspice does not blow it.

A fast fuse that has just blown on a short circuit: the element is drawn broken, BLOWN stays under its value, and the Inspector offers Replace fuse.
Figure 35.1A fast fuse that has just blown on a short circuit: the element is drawn broken, BLOWN stays under its value, and the Inspector offers Replace fuse.

35.3Resettable fuse (PPTC)

Resettable fuse (PPTC)
TypePinsVariantsClass
pptc (F)a, bnoneapproximate, checked against a datasheet

A polymer fuse whose resistance rises five decades over about 10 K around its switching temperature, heated by its own current, and cools back to reset. It holds ihold and trips at itrip at 25 °C, and both derate with the ambient temperature. After the first trip it does not return to its initial resistance within a simulation. The symbol shows TRIPPED while it is open. The model follows the Bourns MF-R050 datasheet, which is also in the library as a part, at the fault current you enter in t_trip and i_ttrip, and trips later than the typical curve far above that current.

Resettable fuse (PPTC)
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Hold currentiholdA0.5> 0, below itripDefault, inspector, part file
Trip currentitripA1> 0Default, inspector, part file
Initial resistance, minimumr_minΩ0.15> 0Default, inspector, part file
Initial resistance, maximumrmaxΩ1.8 x r_min> 0File or All parametersThe untripped resistance is the mean of r_min and rmax.
Resistance 1 h after tripr1maxΩ0.6> 0Default, inspector, part file
Time to tript_trips0.1> 0Default, inspector, part fileAt i_ttrip.
Fault current for t_tripi_ttripA8 x itrip> 0Default, inspector, part file
Max voltagevmaxV15> 0Default, inspector, part file
Switching temperaturet_sw°C125anyDefault, inspector, part file
Resistance rise below the switchr_rise2.2> 1File or All parametersSet by pd when pd is given.
Tripped dissipationpdWnone> 0File or All parametersThe datasheet figure. It sets r_rise.
Ambientt_amb°C25anyLive slider

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

35.4Thermistors and RTDs

Thermistors and RTDs
TypePinsVariantsClass
ntc, ptc, rtd (RT)a, bntc: sensor, icl (inrush limiter). ptc: switching (ceramic), linear (KTY). rtd: pt100, pt1000, ni1000approximate, R(T) exact

Each has a resistance law and a single thermal node, so it heats with its own power: P = V² / R into a thermal resistance 1 / dissipation with time constant tau. The ambient t_amb is a live slider: drag it to heat or cool the sensor while the circuit runs.

Thermistors and RTDs
PartLaw
NTCR = r25 · exp(beta · (1/T - 1/T_ref)), T in kelvin. With sh_b set, the Steinhart-Hart law 1/T = A + B ln R + C (ln R)³ replaces beta.
PTC switchingFalls slowly up to the Curie temperature t_c, then rises with slope per kelvin up to r_max_ratio x r25.
PTC linear (KTY)R = r25 · (1 + alpha ΔT + beta2 ΔT²), ΔT = T - 25 °C.
RTDCallendar-Van Dusen: R = r0 · (1 + A T + B T² + C (T - 100) T³), the C term only below 0 °C.
Thermistors and RTDs
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
R at reference temperaturer25ΩNTC 10 kΩ (icl 5 Ω), PTC 100 Ω (linear 1 kΩ)> 0Default, inspector, part file
B constantbetaK3950 (icl 2800)> 0Default, inspector, part fileNTC.
Reference temperaturet_ref°C25Default, inspector, part fileNTC.
Steinhart-Hartsh_a, sh_b, sh_c0anyDefault, inspector, part fileNTC.
Curie temperaturet_c°C80anyDefault, inspector, part filePTC switching.
Slope above t_cslope1/K0.15> 0Default, inspector, part file
Ceilingr_max_ratio104> 0Default, inspector, part file
KTY coefficientsalpha, beta21/K, 1/K²7.88 x 10-3, 1.937 x 10-5Default, inspector, part file
R at 0 °Cr0Ω100 (pt1000, ni1000: 1000)> 0Default, inspector, part fileRTD.
CVD coefficientscvd_a, cvd_b, cvd_cPt: 3.9083 x 10-3, -5.775 x 10-7, -4.183 x 10-12Default, inspector, part fileRTD.
Dissipation constantdissipationW/KNTC 2 mW/K (icl 12), PTC 5, RTD 2> 0Default, inspector, part file
Thermal time constanttausNTC 10 (icl 60), PTC 20, RTD 3> 0Default, inspector, part file
Max powerpmaxWNTC 0.2 (icl 2.5)> 0Default, inspector, part fileWarns when exceeded.
Ambient temperaturet_amb°C25-273 to 10 000Live slider

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

Try it
An NTC in a divider
  1. Place a 3.3 V source, a 10 kΩ resistor and an NTC (10 kΩ, B 3950) to ground. Probe the middle.
  2. Drag the NTC's ambient slider from 25 to 50 °C.

You should seeThe middle falls from 1.65 V to about 0.86 V as the NTC drops to about 3.6 kΩ.

35.5Thermocouple

Thermocouple
TypePinsVariantsClass
tcouple (TC)+, -K, J, T, E, Napproximate, NIST polynomials exact

The EMF E(t_hot) - E(t_cold) from the NIST ITS-90 reference polynomials for each type, behind the loop resistance. Type K gives about 41 µV/K near room temperature.

Thermocouple
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Hot junctiont_hot°C100-273 to 2000Live slider
Cold junctiont_cold°C25-273 to 2000Live slider
Loop resistancerΩ10> 0Default, inspector, part file

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

35.6Crystals and ceramic resonators

Crystals and ceramic resonators
TypePinsVariantsClass
xtal, resonator (Y)xtal 2pin: x1, x2. 4pin: x1, x2, case1, case2. resonator 3pin: in, gnd, out. 2pin: a, b.xtal: 2pin, 4pin. resonator: 3pin (built-in capacitors), 2pinapproximate, BVD network exact

The Butterworth-Van Dyke equivalent: a shunt capacitance c0 across a motional branch of esr, Lm and cm. Lm is set so the series resonance lands on freq at the load capacitance cl. A small start-up kick starts the oscillation, which then grows at the rate the amplifier allows, as on a real board. The readouts show the measured oscillation frequency and the drive power. The timestep is limited to a fortieth of a period, so simulate short times.

Crystals and ceramic resonators
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Nominal frequencyfreqHzxtal 16 MHz, resonator 8 MHz> 0Default, inspector, part fileAt the load capacitance.
Load capacitanceclF18 pF≥ 0Default, inspector, part filextal.
ESResrΩ40> 0Default, inspector, part filextal motional resistance.
Motional resistancermΩ10> 0Default, inspector, part fileresonator.
Shunt capacitancec0Fxtal 3 pF, resonator 20 pF≥ 0Default, inspector, part file
Motional capacitancecmFxtal 7 fF, resonator 2 pF> 0Default, inspector, part file
Frequency offsetppmppm0anyDefault, inspector, part filextal.
Max drive leveldrive_maxW100 µW> 0Default, inspector, part fileWarns when exceeded.
Start-up kicki0A1 µA≥ 0File or All parameters
Pin-to-case capacitanceccaseF0.5 pF≥ 0Default, inspector, part filextal 4pin.
Built-in load capacitorscl_intF15 pF≥ 0Default, inspector, part fileresonator 3pin, each side.

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

35.7Oscillator modules

Oscillator modules
TypePinsVariantsClass
xo (X)EN (VC for vcxo), GND, OUT, VDDxo (CMOS), tcxo (sine), vcxo, memsapproximate

A clock source powered from its own pins: a square wave with duty and edge time, or for the TCXO a sine of vpp centred at VDD/2. It starts startup seconds after enable and is off below vdd_min. The VCXO pulls its frequency by ± pull ppm across VC = 0 to VDD. Period jitter can be added.

Oscillator modules
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Output frequencyfreqHz25 MHz> 0Default, inspector, part file
Offsetppmppm0anyDefault, inspector, part file
Minimum supplyvdd_minV1.6≥ 0Default, inspector, part fileWarns below.
Supply currentiddA5 mA≥ 0Default, inspector, part file
Duty cycleduty0.50.01 to 0.99Default, inspector, part file
Edge timetrs2 ns> 0Default, inspector, part file
Output resistanceroutΩ30> 0Default, inspector, part file
Start-up timestartups2 ms≥ 0Default, inspector, part file
EN modeen_mode0 / 11Default, inspector, part file1: EN high enables, low tri-states. 0: EN ignored.
Sine amplitudevppV0.8≥ 0Default, inspector, part filetcxo.
Pull rangepullppm100≥ 0Default, inspector, part filevcxo.
Period jitterjitters rms0≥ 0Default, inspector, part file

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

35.8Light and field sensors

These sensors have a live input: illuminance lux, irradiance g or magnetic field b. Drag it while the circuit runs. A photodiode or phototransistor can also be lit by an LED in the circuit: set link to the LED's designator and its current adds link_gain lux per amp (10 mA gives 1000 lx by default), which makes a complete optical link.

Light and field sensors
TypePinsVariantsClass
photodiode (D)anode, cathodepin, ir, uv (same physics)approximate, verified ±0 %
Light and field sensors
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Sensitivitys_luxA/lx50 nA/lx> 0Default, inspector, part filePhotocurrent = s_lux x lux, a reverse current.
Illuminanceluxlx100≥ 0Live slider
Dark currenti_darkA2 nA> 0Default, inspector, part fileAlso the diode saturation current.
Junction capacitancecj0F70 pF≥ 0Default, inspector, part fileConstant.
Linked emitterlinkpart idnoneFile or All parametersAn LED or diode in the circuit.
Link gainlink_gainlx/A105≥ 0File or All parameters

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

Light and field sensors
TypePinsVariantsClass
phototr (Q)2pin: collector, emitter. 3pin: plus base.2pin, 3pinapproximate
Light and field sensors
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Sensitivitys_luxA/lx1 µA/lx> 0Default, inspector, part fileCollector light current per lux.
Illuminanceluxlx100≥ 0Live sliderFollowed with the rise time.
Current gainbf500> 0Default, inspector, part file
Dark currenti_darkA100 nA> 0Default, inspector, part file
Rise / fall timetrs15 µs> 0Default, inspector, part file
Linked emitter, gainlink, link_gainnone, 105File or All parameters

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

Light and field sensors
TypePinsVariantsClass
ldr (R)a, bnoneapproximate

R = min(r_dark, r10 · (lux / 10)-gamma): the dark resistance is the ceiling, following light changes with t_rise (brighter) or t_fall (darker).

Light and field sensors
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Resistance at 10 lxr10Ω15 kΩ> 0Default, inspector, part file
Gammagamma0.7> 0Default, inspector, part fileLog-log slope.
Dark resistancer_darkΩ1 MΩ> 0Default, inspector, part file
Illuminanceluxlx100≥ 0Live slider
Response timet_rise, t_falls20 ms, 30 ms> 0Default, inspector, part file

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

Light and field sensors
TypePinsVariantsClass
solar (SC)+, -noneapproximate, verified ±0.03 %

The single-diode model: a photocurrent isc · g / 1000, a diode set by voc and the number of cells, series and shunt resistance. The open-circuit voltage scales with cells, isc is the whole module's current.

Light and field sensors
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Short-circuit currentiscA0.1> 0Default, inspector, part fileAt 1000 W/m².
Open-circuit voltage per cellvocV0.6> 0Default, inspector, part file
Cells in seriescells11 to 1000Default, inspector, part file
IrradiancegW/m²1000≥ 0Live slider
Series resistancersΩ0.1≥ 0Default, inspector, part file
Shunt resistancershΩ1 kΩ> 0Default, inspector, part file
Idealityn1.3> 0Default, inspector, part file

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

Try it
Find the maximum power point
  1. Place a solar cell (cells 36) and a resistor across it. Set up a parameter step of the resistor over 5, 10, 20, 40, 80 with a short transient.
  2. Read the power readout of the cell, or probe the voltage and current.

You should seeThe power peaks at one load value: the maximum power point, near 80 % of the open-circuit voltage.

Light and field sensors
TypePinsVariantsClass
hall (U)VCC, GND, OUTswitch (unipolar), latch (bipolar), omni (omnipolar), linearapproximate

A switch turns on (output low) above bop and off below brp. A latch turns on above bop and off below -bop. An omnipolar switch reacts to either pole. The linear sensor outputs VCC/2 plus sens x B, ratiometric to a 5 V reference.

Light and field sensors
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Magnetic fieldbmT0anyLive slider
Operate pointbopmT10anyDefault, inspector, part file
Release pointbrpmT7 (latch -bop)below bopDefault, inspector, part file
SensitivitysensmV/mT14anyDefault, inspector, part fileLinear.
Supply currenticcA4 mA≥ 0Default, inspector, part file
Open-drain outputod0 / 11 (omni 0)Default, inspector, part fileOpen drain needs a pull-up.

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

35.9LED assemblies and displays

LED assemblies and displays
TypePinsVariantsClass
led_rgb, led_bar, seg7, seg7x4, ledmatrix (LED, DS)led_rgb: r, g, b, com. led_bar: a1, k1, a2, k2 … seg7: a … g, dp, com. seg7x4: a … g, dp, d1 … d4. ledmatrix: r1 … r8, c1 … c8.led_rgb, seg7, seg7x4: cc (common cathode), ca (common anode). led_bar: 10, 8, 4. ledmatrix: row_anode, row_cathodeapproximate, LEDs exact

Arrays of LEDs, each fitted to its forward voltage at the test current, with no series resistance: add the resistors as on a real board. Each LED glows on the canvas in proportion to its current. A multiplexed display works as on hardware: drive the digit commons in turn. The four-digit display (seg7x4) shares its segment pins between the digits, and the digit whose common is driven lights, so a scanned display shows all four digits at once.

The four-digit multiplexed display in its example, with the shared segment lines and one select line per digit.
Figure 35.2The four-digit multiplexed display in its example, with the shared segment lines and one select line per digit.
LED assemblies and displays
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Forward voltagevfV2.0> 0Default, inspector, part fileEvery LED of a bar, display or matrix.
Forward voltage, red / green / bluevf_r, vf_g, vf_bV2.0, 3.1, 3.1> 0Default, inspector, part fileRGB LED.
Test currentif_testA10 mA (RGB 20 mA)> 0Default, inspector, part fileWhere vf is measured, and full brightness.

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

35.10Lamps

Lamps
TypePinsVariantsClass
lamp (LA)a, blamp (incandescent), neonapproximate, verified ±0 %

An incandescent lamp is a tungsten filament: its resistance rises with temperature (about 14 times from cold to hot), and its temperature comes from the power it radiates. It shows the real inrush current. A neon lamp strikes at v_strike and holds at v_maint.

Lamps
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Rated voltagev_ratedV12> 0Default, inspector, part file
Rated powerp_ratedW5> 0Default, inspector, part file
Filament time constanttaus50 ms> 0Default, inspector, part file
Strike voltagev_strikeV90> 0Default, inspector, part fileNeon.
Maintaining voltagev_maintV60> 0Default, inspector, part fileNeon.
Rated currenti_ratedA1 mA> 0Default, inspector, part fileNeon.

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

35.11Addressable LEDs

Addressable LEDs
TypePinsVariantsClass
ws2812 (LED)VDD, DOUT, GND, DINws2812b (24 bits, GRB), sk6812_rgbw (32 bits)approximate

Decodes the first 24 (or 32) pulses on DIN into its colour, then repeats further pulses on DOUT, so LEDs can be chained. A low longer than t_reset latches. The readouts show the latched red, green and blue.

Addressable LEDs
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
LED current per colouri_ledA12 mA≥ 0Default, inspector, part fileAt full brightness.
One-bit thresholdt_ths0.6 µs> 0Default, inspector, part fileA high pulse longer than this is a 1.
Reset timet_resets50 µs> 0Default, inspector, part file
Quiescent currentiddA1 mA≥ 0Default, inspector, part file

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.