This code is for reading the K-Linke in Cars. With this code you can read sensor values, troubleshoot codes and more. It is compatible with ISO9141 and ISO14230(KWP slow and fast) protocols. I have shared schematics to communicate with the car. You can use these schematics or you can make another one. I used Arduino nano and ESP32 C3 as microcontrollers, but you can use another microcontrollers like STM32, ESP8266 and much more.
I will share more information about K-Line protocols and communication later. Stay tuned 😉.
You can also see my other car projects:
- Тhis project is for BMW with I/K bus system.
- Тhis project is for Cars with CAN Bus.
- Тhis project is for Cars with ISO9141 and ISO14230 protocols.
- Тhis is my OBD2 CAN Bus Communication Library for Arduino IDE.
- Тhis is my OBD2 K-Line Communication Library for Arduino IDE.
- Тhis project is for VAG Cars with KW1281 protocol.
- If you just want to test, you can use the Basic_Code. This code extracts the data to the serial monitor. It is compatible with Arduino and ESP32. Here are the instructions on how this code works and how to install.
- If you want to see the retreaved data in the Web Site you can use WebServer_Code. It is compatible with All ESP32 and ESP8266 board. Here are the instructions on how this code works and how to install.
Warning
I am not responsible for any issues or damages that may occur during your testing. Please proceed with caution and at your own risk.
These schematics are essential because K-Line communication operates at different voltage and signal levels than microcontroller pins. The circuits ensure proper level shifting and protection for safe, stable operation.
You can choose one of the following approaches depending on your project:
This schematic uses a discrete transistor-based approach to interface the K-Line with a microcontroller. It is a simple and low-cost solution suitable for basic implementations and prototyping.
The R6 resistor in this schematic is designed for 3.3V microcontrollers. If you are using a 5V microcontroller, you need to change the R6 value to 5.3kΩ.
This design uses a low-cost comparator IC to process the K-Line signal and convert it into a clean digital level for the microcontroller. It offers a good balance between cost, simplicity, and signal reliability.
- Can be implemented using cheap and widely available comparators such as LM393
- Better noise immunity than discrete transistor-based designs
- Provides well-defined logic thresholds
- Suitable for low-budget projects that require improved signal stability
- Slightly higher component count compared to the transistor solution, but still cost-effective
This schematic category uses dedicated automotive communication ICs (e.g. L9637D, MCZ33290, Si9241, SN65HVDA195 etc.) specifically designed for K-Line / ISO 9141 applications.
- Built-in voltage level shifting and protection
- Fully compliant with automotive communication standards
- Highest reliability and signal stability
- Recommended for production-grade and long-term use designs
The custom-designed PCBs used in this project were manufactured with sponsorship from PCBWay. PCBWay is a well-established company that provides high-quality and reliable PCB manufacturing services to electronics developers worldwide.
I was thoroughly satisfied with the board quality and customer support throughout the production process. I'd like to thank PCBWay for their excellent manufacturing, fast delivery, and affordable pricing that truly added value to this project.
👉 If you're looking for professional PCB manufacturing for your own projects:
🔗 Check out PCBWay
In the future, I may also design new versions of the PCB or explore alternative microcontrollers, depending on the project's evolution.
If you enjoy my projects and want to support me, you can do so through the links below:
For information, job offers, collaboration, sponsorship, or purchasing my devices, you can contact me via email.
📧 Email: muksin.muksin04@gmail.com





