Skip to main content
V2 "Kanzagroth" · 12 servos Build reference

7-Layer Phantom-Jam Resolution & Per-Joint I²t Servo Winding Thermal Fuse

How Ainekio V2 prevents micro-servo burnout while eliminating false carpet jams: 7-layer phantom-jam safeguards across firmware and NeuralPose, 1.8 s walking reverse unsnag, full-span [1..4094] ADC stall sensing, and an 8–10 s per-joint I²t thermal fuse.

On this page (4 sections)
  1. 1. Seven-layer phantom-jam safeguards
  2. 2. Walking reverse unsnag (1.8 s) & full-span [1..4094] ADC sensing
  3. 3. Per-joint I²t winding thermal fuse & selective PCA9685 cutoff
  4. 4. Hardware-in-the-loop, calibration & simulator verification

At 5.0 V, a stalled MG90S micro servo draws 700–850 mA (3.5–4.25 W) into a tiny rotor with almost no thermal mass—heating the copper winding at ~2.5–2.8 °C/s. During early bench testing, a single blocked shoulder joint pushed against a mechanical stop outside its nominal [500, 2800] µs calibration range while waiting on an unbounded arrival check, burning out over ~156 s. Conversely, cutting global PCA9685 OE power whenever a foot brushes a chair leg would drop the robot onto its belly on every minor snag, and overly sensitive software recoil heuristics falsely clamp fast swings on carpet.

To solve both sides, Ainekio V2 pairs an 8–10 s hardware-enforced per-joint I²t winding thermal fuse on the ESP32-P4 with seven anti-phantom-jam safeguards across firmware, NeuralPose, NeuralPosePresence, and the Host Gateway—eliminating false carpet trips and mid-air limb freezes while keeping genuine locked-rotor protection active.

Physical floor jam check on Ainekio V2: the robot stands, greets the room, catches a stalled joint during its stretch via 4th-wire feedback, protects the winding without collapsing healthy legs, and asks for help.

Eight-frame annotated sequence of physical Ainekio V2 on carpet booting, standing, greeting, detecting a stalled joint during stretch via 4th-wire feedback, protecting the winding, and asking for help.
Floor trace from the test above: Boot → Stand → Greet & observe → Stretch → Stall detected via 4th-wire wiper lag → Winding protected & verbal fault report.

1. Seven-layer phantom-jam safeguards#

Fast carpet swings and wave transitions exposed seven interacting causes of false leg jams, inverted-carrier over-retraction, and competing recovery loops. Each layer is resolved cleanly without weakening the hardware I²t fuse:

  1. Streaming reversal unlock (firmware): During cyclic 50 Hz direction reversals, stall tracking enforces an 80 µs deadband, resets on 80 µs/s slewing, unlocks on 25 µs target shifts, and ignores clipped or extrapolated ADC samples for reversal progress (while full-span [1..4094] thermal protection stays active).
  2. Bounded stand recovery & arrival timeouts (firmware): Firmware gates stand recovery behind !actively_leveling so continuous 208 Hz IMU balance trims never masquerade as posture drift. Unloaded replans cap at 2, and every motion arrival check escapes after 0.8 s so limbs never freeze mid-air (while inactivity rest always reaches PCA9685 OE = 1).
  3. Single posture-recovery owner: Whenever host 50 Hz NeuralPose owns the body, firmware disables its own stand-hold recovery loop (stand_enabled: false) while keeping 50 Hz 4th-wire telemetry and the I²t thermal fuse (jam_enabled: true) active.
  4. Learned compliance & terminal stance settling: Hardcoded 280 ms software recoil clamps (which mistook normal MG90S tracking lag for jams) are replaced by NeuralPose’s learned carpet-relock compliance plus terminal stance settling—waiting until stance error settles <= 5.5° and shoulder error <= 3.5°, safely inside the 7.0° zero-heat deadband.
  5. Carrier home margin: Clamping the upper-carrier floor 3.0° inside its -30.87° Home stop (>= -27.87°) and keeping carpet step lifts at 18–20 mm prevents carriers from over-retracting into the inverted above_calibration zone where they look identical to a mechanical jam.
  6. Single authoritative abort signal: Event-driven LLM recovery synthesis is removed; the host bridge interrupts an active motion job only when firmware reports a real hardware thermal cutoff (outputs_released: true).
  7. Carpet-safe 50 Hz presence: NeuralPosePresence stays motor-silent during speech capture without sending disruptive stop commands and keeps speech nods purely sagittal (0.0° shoulder target) so feet never scrub sideways into carpet (3-system neural motion).

2. Walking reverse unsnag (1.8 s) & full-span [1..4094] ADC sensing#

Autonomous 1.8 s reverse unsnag#

When a foot hooks a power cord or rug edge during forward walking (> 0.05 m/s), both on-chip and host MicroDuck controllers trigger the same reverse-unsnag reflex:

  • On-chip ESP32-P4: Integrates snag time whenever joint error exceeds 14.0° while shaft velocity stays below 10.0 deg/s. After 1.8 s, firmware overrides velocity to -0.45 m/s straight backward at full stride scale for 1.8 s, backing the foot clear before resuming forward walking (2.5 s cooldown).
  • Host neural gait: Triggers the identical 1.8 s reverse maneuver on either 4th-wire joint lag (>= 14.0° at < 10.0 deg/s) or zero ground-plane odometry progress (< 25 mm over 1.8 s while lagging >= 10.0°).
  • Ainekio OS goal alignment: Locomotion progress tracking uses a 5.5 s cognitive stall window so a full snag-detect + reverse-unsnag + re-attempt cycle (~4.5 s) completes before Goal Review flags a blocked path.

Full-span [1..4094] 12-bit ADC jam measurement#

The 156 s bench burnout happened because ADC readings outside the [500, 2800] µs calibration interior were previously discarded. Firmware now linearly extrapolates each joint’s 3-point CD74HC4067 calibration curve across the entire non-railed 12-bit span (raw ∈ [1..4094]), catching hard mechanical stops near 0° and 180° while still rejecting open/short wire faults (0 or 4095).

Quantitative time-domain chart of per-channel MG90S winding thermal_load[j] over 0 to 24 seconds comparing hard end-stop rotor lock (8.0-9.0 s selective LEDn_OFF_H = 0x10 cutoff and 12.0 s cooldown to 0.35 rearm) against zero-heat standing sag (<=6.5 degrees) and fast carpet swings (>12 deg/s).
Per-joint I²t winding thermal accumulator over 0 → 24 s: hard rotor locks trip selective LEDn_OFF_H = 0x10 cutoff in 8.0–10.0 s while 11 healthy channels hold stance; standing sag (<= 6.5°) and fast swings (> 12°/s) accumulate zero thermal load.

3. Per-joint I²t winding thermal fuse & selective PCA9685 cutoff#

If a wedged limb stays physically pinned past NeuralPose compliance or MicroDuck’s 1.8 s reverse unsnag, ESP32-P4 firmware protects the motor winding directly with a per-joint I²t thermal accumulator:

Constants:
  DEADBAND      = 7.0°       # Normal standing gravity sag (<= 5.5° settled) generates ZERO heat
  SLEW          = 12.0 deg/s # Moving shafts (>= 12°/s) do not accumulate locked-rotor heat
  FULL_SPAN     = 11.0°      # 18.0° stalled error = 1.0× nominal stall dissipation
  MAX_DUTY      = 1.25       # Caps extreme angular error at 1.25² = 1.56× heating rate
  TRIP_SECONDS  = 9.0 s      # Trips in 8.0–10.0 s under hard rotor lock
  COOL_SECONDS  = 12.0 s     # Linear cooldown retaining thermal memory across re-jams
  REARM_LOAD    = 0.35       # Channel stays masked (0 µs) until cooled below 35%

When thermal_load[j] reaches 1.0:

  1. Selective single-channel cutoff: Firmware masks only the tripped channel (0 µs via PCA9685 register LEDn_OFF_H = 0x10), leaving global PCA9685 OE enabled so the 11 healthy servos hold stance without a belly-flop collapse.
  2. Authoritative cancellation: Firmware aborts the active motion and emits {"t":"event","name":"servo_stall","joint_mask":...,"outputs_released":true}. That single outputs_released: true contract cancels active gateway and Freestyle jobs cleanly (while explicit operator stop with detach: true still disarms all PWM outputs on demand).
  3. Cooldown & smooth re-seeding: Masked channels remain unpowered until thermal_load[j] < 0.35, then re-seed from the live 4th-wire shaft reading so re-engagement never snaps abruptly.

4. Hardware-in-the-loop, calibration & simulator verification#

Three harnesses verify stall sensing and thermal cutoff without risking physical windings:

  • Native C + Python HIL suite: Compiles production ESP32-P4 motion and feedback C modules against a simulated PCA9685 register bank and 12-bit CD74HC4067 ADC.
  • Interactive simulator.ainek.io fault injection: Runs the same compiled ESP32-P4 C firmware atop 500 Hz MuJoCo WASM across V1, V2 “Kanzagroth”, and V3 “Killdozer” with per-servo pin/jam controls so operators can lock any joint mid-walk and watch LEDn_OFF_H = 0x10 trip in 8–10 s while healthy joints hold stance (simulator guide).
  • Automated bench calibration tilt guard: During automated 3-point potentiometer sweeps, the calibration runner monitors the LSM6DS3 IMU and immediately aborts if body tilt exceeds 25.0° (catching a robot slipping off its stand).
Test SuiteSimulated ConditionVerified Outcome
1A · Standing Gravity Sag60 s continuous Stand hold at 6.5° steady load sag (<= 7.0° deadband)thermal_load == 0.0, 0 false trips
1B · 50 Hz Neural Streaming60 s cyclic 50 Hz MicroDuck / NeuralPose reversals (80 µs deadband, 80 µs/s slew, 25 µs shift)Reversal tracking unlocks cleanly; 0 false trips
2 & 3 · Hard End-Stop LockJoint 0 pinned against stop outside [500, 2800] µsTrips in 8–10 s, sets LED0_OFF_H = 0x10, keeps ch 1..11 live, emits outputs_released: true
4A–4C · Deadlock BoundsBlocked Freestyle frame, blocked Stand (!actively_leveling), blocked lay_downFreestyle escapes at 800 ms; Stand caps at 2 replans; lay_down reaches PCA9685 OE = 1
5 · On-Chip MicroDuck SnagForward twist (> 0.05 m/s) with > 14° swing snagDetects snag in 1.76–1.90 s and drives -0.45 m/s reverse unsnag for 1.78–1.84 s
7-Layer Phantom-Jam Resolution & Per-Joint I²t Servo Winding Thermal Fuse
https://ainek.io/posts/jam-protection-and-thermal-safety/
Author
Ainekio
Published at
2026-11-16
License
CC BY-NC-SA 4.0