Community project

Create Me Good Schematic This Bread Board Setup

ESP32
Photo of Create Me Good Schematic This Bread Board Setup
Generated with AI

Sky Sy

Last updated September 22, 2026

This breadboard setup connects an ESP32 microcontroller to a vehicle's OBD-II diagnostic port using the ISO 9141 K-line protocol. The project bridges automotive diagnostics with modern microcontrollers, enabling real-time communication with engine control units for reading fault codes, sensor data, and vehicle parameters.

The guide provides a complete wiring diagram, full parts list with sourcing information, ready-to-use Arduino firmware, and step-by-step assembly instructions. The build uses an L9637D K-line transceiver for protocol compliance, a 74AHCT125 level shifter for signal integrity, and a regulated 5 V supply with automotive-grade protection. After assembly and inspection, the transparent serial bridge firmware lets you interact directly with your vehicle's diagnostics system.

Wiring diagram

Wiring diagram for Create Me Good Schematic This Bread Board Setup

Gather all the parts

QtyComponent
1

L9637D ISO 9141 K-Line Transceiver

L9637D SO-8 IC

STMicroelectronics L9637D monolithic bus driver IC implementing the ISO 9141 / ISO 9141-2 / ISO 14230-4 (KWP2000) K-line serial interface used by legacy OBD-II diagnostic protocols. Packaged in SO-8. The IC has an MCU side (5V Vcc, logic-level Tx input from the MCU UART TX, Rx output to the MCU UART RX) and a vehicle side (12V battery Vs, bidirectional K-line, optional L-line). Provides the open-collector pull-up driver, slew-rate control, and input comparators required to interface a 5V UART to the 12V K-bus on the OBD-II connector (J1962 pin 7 for K, optional pin 15 for L). The Rx pin is a 5V CMOS output — when driving an ESP32 (3.3V tolerant only) UART RX it must be voltage-divided or level-shifted. No firmware library required; the K-line / KWP2000 / 5-baud or fast-init protocol stack is implemented in user code on top of HardwareSerial.

1

74AHCT125 Quad Buffer / Level Shifter

SN74AHCT125N DIP-14

Quad non-inverting buffer/line driver with 3-state outputs and active-low output-enable pins. In 5 V AHCT/HCT designs, 3.3 V MCU outputs are high enough for the TTL-level inputs, making it a common one-way 3.3 V to 5 V level shifter for WS2812/NeoPixel data and other fast digital lines.

1

J1962 OBD-II Female Connector with Breakout Leads

J1962 female breakout

The 16-pin vehicle diagnostic connector that brings out battery power, ground, and the K-line.

1

Pololu D24V5F5 Fixed 5 V Step-Down Regulator

Fixed 5 V, 500 mA (D24V5F5)

A small fixed-output regulator board that safely converts the vehicle’s 12 V supply into 5 V for the interface circuit.

1

1N4148 Signal Diode

1N4148

Fast small-signal switching diode in DO-35 glass package. Forward voltage ~0.6–0.7 V at low current, reverse breakdown 75 V, max forward current 300 mA, reverse recovery time 4 ns. Used here in an anti-parallel pair across the TL072 op-amp feedback loop (D1: anode→OPAMP_OUT, cathode→OPAMP_IN_NEG; D2: anode→OPAMP_IN_NEG, cathode→OPAMP_OUT) to provide soft audio clipping.

1

Resistor

510 Ω, 1/4 W

Through-hole resistor (current-limiting in series with an LED)

1

100 nF Ceramic Capacitor

100 nF, 50 V ceramic

A small bypass capacitor that keeps electrical noise away from the L9637D supply pin.

1

Resistor

12 kΩ, 1/4 W

A through-hole resistor that reduces the L9637D receive signal to a safe level for the ESP32 input.

1

Resistor

20 kΩ, 1/4 W

Through-hole resistor (current-limiting in series with an LED)

1

Inline 500 mA Automotive Fuse Holder

500 mA fast-blow fuse

A replaceable fuse that limits damage if the OBD-powered circuit develops a short.

1

100 nF Ceramic Capacitor

100 nF, 50 V ceramic

A small non-polarized capacitor that filters noise from the L9637D 5 V supply.

Assemble it in 7 steps

1. Place the two interface chips

Put the L9637D adapter or SO-8-to-DIP breakout across the centre gap of the breadboard. Put the 74AHCT125 DIP-14 across the centre gap too, with both chip notches facing the same way. The bare L9637D chip is too small for breadboard holes, so it needs a breakout board.

  • The tiny dot or notch marks pin 1; check this before connecting any power.
  • Putting a chip in backwards can send power into the wrong legs and damage it.

2. Add the fixed 5 V regulator

Use the small Pololu D24V5F5 fixed-output regulator board in the breadboard setup. Connect its GND pad to the ground rail. Connect its VOUT pad to the 5 V rail. This module has no adjustment screw: it makes 5 V automatically from the vehicle supply.

  • This is the built-in power-conversion part of the interface circuit, not a separate adjustable bench converter.
  • Do not connect the 5 V rail to the ESP32 3V3 pin; that can damage the ESP32.

3. Wire protected vehicle power

Connect OBD-II pin 16 to the IN side of the 500 mA fuse. From the fuse OUT side, connect one wire to the regulator VIN pad and another wire to the unbanded end of the 1N4148 diode. Connect the striped end of that diode to L9637D pin 7, VS. Connect OBD-II pins 4 and 5 to the shared ground rail.

  • OBD pin 16 → fuse → regulator VIN (power); regulator GND → ground rail (ground); regulator VOUT → 5 V rail (power).
  • The striped band on the 1N4148 faces the L9637D VS pin.
  • OBD pin 16 can be live battery power even with the ignition off; never connect it to an ESP32 GPIO or its 3V3 pin.
  • A short on a breadboard connected to a car can damage wiring; use the fuse and inspect for stray wire strands.

4. Power and filter the interface chips

Connect the 5 V rail to L9637D pin 3 VCC and 74AHCT125 pin 14 VCC. Connect L9637D pin 5 GND and 74AHCT125 pin 7 GND to the ground rail. Add the new 100 nF ceramic capacitor directly from L9637D pin 3 VCC to the ground rail, with its two leads as close to the L9637D as the breadboard allows. Connect ESP32 GND to that same ground rail. Keep the ESP32 powered through its USB connector during testing.

  • L9637D VCC → 5 V (power), L9637D GND → GND (ground), 74AHCT125 VCC → 5 V (power), 74AHCT125 GND → GND (ground), ESP32 GND → GND (ground).
  • Ceramic capacitors have no positive or negative side, so either lead can go to 5 V.
  • Never put 5 V onto the ESP32 3V3 pin; swapped or excessive power can permanently damage it.

5. Wire the vehicle K-line

Connect the 510 Ω resistor from L9637D pin 7 VS to pin 6 K. Connect the original 100 nF ceramic capacitor from pin 7 VS to the ground rail. Connect OBD-II pin 7 to L9637D pin 6 K. Leave L9637D pins 2 LO and 8 LI empty because this build uses K-line only.

  • 510 Ω resistor: VS → K (keeps the vehicle data wire at its normal high level).
  • 100 nF capacitor: VS → GND (reduces electrical noise).
  • Do not connect OBD-II pin 7 to an ESP32 pin: it uses vehicle-voltage signals and can destroy the ESP32.

6. Wire the ESP32 send and receive signals

On the ESP32 DevKit V1 right-hand header, use the hole labeled TX2 / GPIO17 for the send wire and the hole labeled RX2 / GPIO16 directly below it for the receive wire. Connect GPIO17 to 74AHCT125 pin 2, 1A. Connect 74AHCT125 pin 1, 1OE, to ground, then connect pin 3, 1Y, to L9637D pin 4 TX. For received data, connect L9637D pin 1 RX to the 12 kΩ resistor. Join the other end of that resistor to ESP32 GPIO16 and to one end of the 20 kΩ resistor. Connect the other 20 kΩ resistor end to ground.

  • GPIO17 / TX2 → 1A (send data), 1OE → GND (turns the buffer on), 1Y → L9637D TX (safe 5 V send signal).
  • L9637D RX → 12 kΩ → GPIO16 / RX2 (data); GPIO16 junction → 20 kΩ → GND (reduces 5 V received data to about 3.1 V).
  • Do not use TX0 or RX0 near the top of the ESP32 header; those pins are used by the USB programming connection.
  • Never connect L9637D RX straight to GPIO16; its 5 V output can damage the ESP32 input.

7. Inspect before plugging into the car

Before inserting the OBD connector, check that only pins 16, 4, 5, and 7 are used. Check that the fuse is between pin 16 and the circuit, the diode band faces L9637D VS, and the regulator VOUT only reaches the 5 V rail. Then plug the ESP32 into USB and use Schematik’s Deploy button to flash the serial-bridge firmware.

  • The intended OBD wiring is pin 16 → fuse (power), pins 4 and 5 → ground rail (ground), and pin 7 → L9637D K (data).
  • Do not use a loose breadboard circuit while driving; it can short or distract the driver.
  • Pins 6 and 14 are CAN wires, not part of this K-line circuit.

Review all connections

1. Connections between "obd2_socket" and "ESP32"

Functionobd2_socketESP32
powerPin 16 +12V → Inline 500 mA Automotive Fuse Holder INEXT
groundPin 4 chassis GNDGND
groundPin 5 signal GNDGND
dataPin 7 K-line → L9637D ISO 9141 K-Line Transceiver KEXT

2. Connections between "vs_diode" and "ESP32"

Functionvs_diodeESP32
dataCATHODE → L9637D ISO 9141 K-Line Transceiver VSEXT
dataANODE → Inline 500 mA Automotive Fuse Holder OUTEXT

3. Connections between "k_pullup" and "ESP32"

Functionk_pullupESP32
digitalP1 → L9637D ISO 9141 K-Line Transceiver VSEXT
digitalP2 → L9637D ISO 9141 K-Line Transceiver KEXT

4. Connections between "vs_capacitor" and "ESP32"

Functionvs_capacitorESP32
powerP1 → L9637D ISO 9141 K-Line Transceiver VSEXT
groundP2GND

5. Connections between "kline_transceiver" and "ESP32"

Functionkline_transceiverESP32
powerVCC5V
groundGNDGND
uartTX → 74AHCT125 Quad Buffer / Level Shifter 1YEXT
uartRX → Resistor P1EXT

6. Connections between "tx_buffer" and "ESP32"

Functiontx_bufferESP32
powerVCC5V
groundGNDGND
digital1AGPIO 17
ground1OEGND

7. Connections between "rx_bottom_resistor" and "ESP32"

Functionrx_bottom_resistorESP32
groundP2GND
digitalP1 → Resistor P2EXT

8. Connections between "rx_top_resistor" and "ESP32"

Functionrx_top_resistorESP32
digitalP2GPIO 16

9. Connections between "input_fuse" and "ESP32"

Functioninput_fuseESP32
powerOUT → Pololu D24V5F5 Fixed 5 V Step-Down Regulator VINEXT

10. Connections between "buck_5v" and "ESP32"

Functionbuck_5vESP32
groundGNDGND
powerVOUT5V

11. Connections between "vcc_capacitor" and "ESP32"

Functionvcc_capacitorESP32
powerP1 → L9637D ISO 9141 K-Line Transceiver VCCEXT
groundP2GND

Deploy the firmware

#include <Arduino.h>

// ESP32 UART2 connects to the L9637D K-line transceiver.
constexpr int KLINE_RX_PIN = 16;
constexpr int KLINE_TX_PIN = 17;
constexpr uint32_t KLINE_BAUD = 10400;

HardwareSerial KLine(2);

void setup() {
  Serial.begin(115200);
  KLine.begin(KLINE_BAUD, SERIAL_8N1, KLINE_RX_PIN, KLINE_TX_PIN);
  Serial.println();
  Serial.println("ESP32 K-line interface ready.");
  Serial.println("UART2: 10400 baud, RX GPIO16, TX GPIO17.");
}

void loop() {
  // This is a transparent bridge: bytes typed on USB serial are sent to K-line,
  // and bytes returned by the vehicle are printed on USB serial.
  while (Serial.available() > 0) {
    KLine.write(static_cast<uint8_t>(Serial.read()));
  }

  while (KLine.available() > 0) {
    Serial.write(static_cast<uint8_t>(KLine.read()));
  }
}

Remix this project

Make it yours in one click

Open a full copy of this project in your own Schematik workspace — diagram, code, parts, and assembly steps included. Swap the sensor, add features, or redesign the whole thing with AI. The author's original stays untouched.

Open in Schematik