400+ Vehicles
BMW, Ford, Honda, Toyota, VW, Audi, Mercedes, Volvo, Subaru, Mazda, Hyundai, Kia, Chrysler, and more. Any car with ISO 9141 or KWP2000 diagnostics.
K-Line is an ESP32 library and hardware interface for the single-wire buses found in cars from the mid-90s through late 2000s. It handles two distinct protocols that share the same physical layer:
The hardware uses PC817 optocouplers for galvanic isolation between the ESP32 and the vehicle’s 12V electrical system. The circuit is SPICE-validated — every signal path simulated in LTspice before soldering.
400+ Vehicles
BMW, Ford, Honda, Toyota, VW, Audi, Mercedes, Volvo, Subaru, Mazda, Hyundai, Kia, Chrysler, and more. Any car with ISO 9141 or KWP2000 diagnostics.
SPICE Validated
Eight netlists cover both signal paths, three parameter sweeps, and two bus impedance scenarios. The R2=220 ohm fix for 3.3V ESP32 was found through simulation, not guesswork.
Reviewed and Hardened
Two code review rounds caught ISR race conditions, protocol framing bugs, and timeout underflows. Defensive design throughout — checksums validated, echo verified, sessions kept alive.
Three ESP32 Variants
Builds for ESP32 (Xtensa), ESP32-C3 (RISC-V), and ESP32-S3. PlatformIO project with per-board pin configuration.
Hardware circuit is SPICE-validated. Firmware builds clean across all three ESP32 environments. Next: breadboard prototype, loopback testing, and vehicle testing on BMW E46 K-Bus and Ford Fiesta K-line.
Circuit design based on muki01/I-K_Bus (MIT license). R2 modification, SPICE validation, ESP32 port, and multi-protocol architecture are original work.