velxio/frontend/src/simulation/parts
David Montero Crespo d4ec4fe04d fix(ntc): the temperature sensor read wrong on 3.3V boards, and three examples decoded backwards
Two independent defects, both visible as "the NTC reports the wrong
temperature" (issue #233).

1. The part built its divider against a hard-coded 5 V rail, while the SPICE
   path used the board's real rail. They only agreed on AVR. On a 3.3 V board
   the injected node sat above the ADC's full scale: the slider at 25 C read
   ~1.4 C, and every slider value below ~11 C saturated to the same number, so
   -40, 0 and 10 C were indistinguishable. The rail now comes from the board
   (analogRailVolts), matching setAdcVoltage's own AVR/RP2040/ESP32 split.

2. The divider convention was corrected in 608c2538 (VCC -> R_pull -> OUT ->
   R_NTC -> GND) but data/examples.ts was not updated with it, so three of the
   four bundled NTC sketches still decoded the OTHER topology. Their readings
   came out mirrored about 25 C: the uno-ntc example printed -3.42 C with the
   slider at 60 C - the exact symptom dd22bcfe had recorded as the bug. Fixed
   in uno-ntc, pico-ntc and attiny85-ntc-sensor; examples-circuits.ts was
   already right.

The sibling analog sensors (gas, flame, heart-beat, sound) map their sliders
0..1023 onto the same hard-coded 5 V and will saturate the same way on 3.3 V
boards. Left alone here: that is not what #233 reports, and each one needs its
examples re-checked before changing.
2026-08-03 07:33:20 +02:00
..
ActiveParts.ts
…
BasicParts.ts feat(esp32): drive digital inputs from the solved circuit (real-wiring fidelity) 2026-06-24 22:52:52 +02:00
ChipParts.ts fix(7segment): rebuild per-element sim state when the digit count changes 2026-07-21 15:16:56 +02:00
ComplexParts.ts fix(sim): monophonic buzzer guard — replace note on pitch change (no stacking) 2026-06-11 02:35:33 -03:00
CustomChipPart.ts feat(chipbus): Galaksija keyboard - type BASIC over the bus 2026-06-05 14:37:42 -03:00
EPaperPart.ts feat(epaper): decode the UC8179/GD7965 7.5" panel + fix its BUSY polarity 2026-06-04 23:45:37 -03:00
GpsParts.ts feat(components): DS3231 RTC module + GPS NEO-6M NMEA talker 2026-07-31 20:38:06 +02:00
LogicGateParts.ts
…
MotorDriverParts.ts feat(motors): fix stepper rotation + add A4988 driver (real Fritzing SVG) 2026-05-31 16:28:34 -03:00
PartSimulationRegistry.ts
…
ProtocolParts.ts feat(components): DS3231 RTC module + GPS NEO-6M NMEA talker 2026-07-31 20:38:06 +02:00
SensorParts.ts fix(ntc): the temperature sensor read wrong on 3.3V boards, and three examples decoded backwards 2026-08-03 07:33:20 +02:00
index.ts feat(components): DS3231 RTC module + GPS NEO-6M NMEA talker 2026-07-31 20:38:06 +02:00
partUtils.ts fix(ntc): the temperature sensor read wrong on 3.3V boards, and three examples decoded backwards 2026-08-03 07:33:20 +02:00
runtimeBurnout.ts feat(sim): P4 runtime burnout for resistors + electrolytic capacitors 2026-06-18 04:35:56 +02:00