SAAYA Node · hardware simulator
The whole circuit, running live
Every part of the node, wired as built. The fan, help and fault rules are the firmware’s own C++ (controller.h), compiled to WebAssembly, so what you see here is what the ESP32 decides.
What happened
Live trace
Seat air (20–45 °C, left axis) Fan duty (0–100 %) Fan speed (0–3,000 rpm)
Serial monitor 115200 baud · one JSON record per second, exactly as the firmware prints
What is real and what is modelled
Real: the control rules (help latch, manual 70 %, automatic 50 % between 32 °C and 39 °C with hysteresis, fan-feedback fault after 3 s, sensor-fault inhibit) are the unmodified controller.h compiled to WebAssembly; a test compares it with the natively compiled C++ on 5,000 random cases. The loop around them follows main.cpp: 35 ms button debounce, 1 s sampling, rpm from 2 tach pulses per revolution, PWM inverted through the 2N3904, the help latch restored from flash after a reboot, and the same JSON keys and OLED lines.
Modelled: the sensors return the slider values with small noise; the fan follows a first-order speed response (0 rpm below 5 % duty, about 3,000 rpm at 100 %) and draws 12 V × (0.03 + 0.30 × (rpm/3000)²) A, read by the INA219. The full firmware can also be run on an emulated ESP32 in Wokwi (see firmware/wokwi-full/).