Skip to the content
2 layers50.8 × 28.6 mmBeaglebone obd, the printed circuit board in 3D

Access your car's diagnostics with a BeagleBone Blue and Rust.

Size
50.8 × 28.6 mm
Copper layers
2
Thickness
1.6 mm
Parts
20
Nets
12
Pads
66
Tracks, vias
69, 0
Pours
1
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
2 Sep 2020
Updated
17 Jul 2026

Overview

Beaglebone obd is an open-source printed circuit board by KoffeinFlummi, from the KoffeinFlummi/rustbucket repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 50.8 × 28.6 mm with 20 parts on 12 nets, routed with 69 tracks and 0 vias.

It is built around the IRLB8721PBF. Its parts include 7 resistors, 6 transistors and 1 capacitor.

Main components

1

README

README.md

rustbucket

Access your car's diagnostics via the OBD2 connector with a BeagleBone Blue and Rust (and maybe some MOSFETs). This was inspired by Marcelo Sacchetin's post about using the BeagleBone Blue's integrated CAN bus transceiver. If you want to read the diagnostics for older vehicles, things are a bit more complicated than that. For older VWs for instance, you will need to talk to the vehicle's K line using the KWP1281 protocol. This requires additional hardware to convert the BeagleBone's 3.3V logic level to 12V.

This was developed on/for the BeagleBone Blue, but the K & L line protocols should be just as usable on a BeagleBone Black. As far as I know, accessing the CAN bus on the Black requires the addition of a CAN transceiver.

Disclaimer

Hooking stuff up to your vehicle's OBD2 connector can lead to anything from blown fuses to broken hardware. There are reports online of attempting to communicate with certain VW airbag controllers via KWP1281 bricking them. There are also apparently instances of clearing the fault codes using KWP1281 leading to deployed airbags for certain errors.

I have tested the software and hardware described here successfully on some vehicles/ECUs (see below). However, I cannot provide any guarantee that using this will not cause permanent damage to you or your vehicle. Proceed at your own risk. Also, don't fuck with airbags please.

Protocols

ProtocolUsed LinesImplementedNotes
CAN Bus / ISO 15765CAN High & CAN Low✓Used by almost any modern vehicle. No additional hardware needed; The BB Blue's CAN transceiver can be connected directly to the OBD port's CAN lines.
KWP1281K Line✓Not an official OBD2 protocol, used on older VAG (VW & friends) cars. Returned codes are not official OBD2 DTCs.
ISO 9141K & L Line✗Apparently similar to KWP1281, but an official OBD2 protocol. Not implemented, but technically supported by hardware described below.
KWP2000 / ISO 14230K & L Line(✓)Implemented at least partially (K line init only, no fast init). OBD2 commands not implemented, but some VAG specific stuff has been tested (see below).

There are some more OBD2 protocols, that apparently are mostly used on American vehicles. I have not considered these, and the hardware required seems quite different.

Note that the above is my understanding, this whole field is a giant mess of standards and acronyms.

Features

  • Read Diagnostic Trouble Codes, stored and pending
  • Clear Diagnostic Trouble Codes
  • Read diagnostic data, current and from freeze frame
  • Log diagnostic data to CSV for plotting
  • Read and write adaptation values, e.g. to reset the service interval (KWP1281 only, no login functionality yet)
  • Perform basic settings, such as throttle body alignments (KWP1281 only)

Tested Vehicles/ECUs

Vehicle/ECUProtocolBaud/Bit RateNotes
VW Golf Mk4 (1J), 2001KWP128110400,9600,1200All ECUs except ESP and airbag controller. See script and sample output.
VW Golf Mk4 (1J), 2001KWP200010400ESP Mk60 controller. Reading & clearing DTCs only.
VW Golf Mk7 (AUV), 2014CAN500000Most things work, but multi-frame messages (VIN, more than 2 DTCs) do not. Might require modifications to flow control messages.
Renault Zoe (AGVYB0), 2015CAN500000CAN bus is active, but does not respond to OBD2 queries. I did not spend much time on this, might require some sort of initialization.
Siemens SIMOS2.1B ECUKWP12819600Pinout (also has a 500kbps CAN bus on pins 29 (L) & 31 (H), but this is not used for diagnostics and does not respond to OBD2 queries)
Bosch EDC16U34 ECUCAN500000Pinout

Compiling & Usage

You can compile this directly on the BeagleBone, but the compilation times can be annoying, so the project is set up for cross-compilation. You will have to add the armv7-unknown-linux-gnueabihf target using rustup (You'll also need a version of GCC compiled for arm-linux-gnueabihf for linking. Consult your OS' package manager.):

text
$ rustup target add armv7-unknown-linux-gnueabihf
$ cargo build --release

Then, copy the executable to the BeagleBone.

See rustbucket -h for usage.

Testing

The program contains modes for testing the hardware and simulating a car so you can test your hardware using two BeagleBones instead of a car. However, the best way to test is to get yourself a used ECU off of eBay. These can be bought relatively cheaply for older cars (I paid less than 20€ for each of the ECUs I tested with). See references below for some ECU pinouts.

When testing the CAN protocol with two BeagleBone Blues, you should add a terminating resistor (I used 100Ω) between the CAN lines. The R104 120Ω terminating resistor is not populated from the factory on the BB Blue, and with an unterminated CAN bus you will have problems with the higher bit rates (such as the default 500kbps). This may also apply to some desktop ECUs, but the ones I tested with had 66Ω internal resistors.

Hardware

For the CAN bus, you can simply connect the BeagleBone Blue's CAN lines directly to the OBD2 connector (On the BeagleBone Black, you'll have to connect a CAN transceiver). For the K Line, the 3.3V logic level of the BeagleBone's UART1 bus will have to be converted to the 12V used on the K line, and vice versa.

I tried to implement this design for a bi-directional logic level converter using a single N-channel MOSFET, but I couldn't figure out how to do so while making sure that the BeagleBone pins don't sink too much current. Since I had a bunch of N-channel MOSFETs lying around anyway, I just went with this horrendously inefficient design using 2 MOSFETs for reading and writing respectively:

The BeagleBone's UART1 bus (TX: P9.24, RX: P9.26) is used for writing and reading the K line. The schematic also includes the same setup for writing to the L line, but this is not used in software ATM. Q3 has a gate voltage of 12V, the rest is 3.3V.

If you actually know what you're doing electronics-wise, you can probably come up with something better/more efficient. Contributions appreciated.

I used an IRFZ24NPbF for Q3 and IRLB8748PbF for the others since I had them around. If you're buying components specifically for this there are probably better options, and you may want to go with SMD stuff (or just a better design in general). If you are using TO-220 (G-D-S) components like I did, you may also find the terrible PCB I designed useful. I also have some left over, so let me know if you want one.

KiCAD project (schematic + PCB + Gerber files) can be found here.

References

Parts

20
QtyValueFootprintReferences
61KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R2, R4, R5, R6, R7
6IRLB8721PBFPackage_TO_SOT_THT:TO-220-3_VerticalQ1, Q2, Q3, Q4, Q5, Q6
110KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR3
147uCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC1
1LOGOkicad:ferrisG***

The 15 most common of 20 parts.

Similar boards

  • 2 layers99.1 × 99.1 mm3D Scanner, the printed circuit board in 3D

    3D Scanner

    nazzrim/Open3DScanner

    Open3DScanner 3D Scanner design

    33 parts60
  • 2 layers36 × 31 mmESPDimmer, the printed circuit board in 3D

    ESPDimmer

    stelioskat/esp8266-led-dimmer

    Wifi enabled LED strip dimmer that is controlled using MQTT messages.

    11 parts20MIT
  • 2 layers70.3 × 30.2 mmControl pcb, the printed circuit board in 3D

    Control pcb

    kbob/filabilly-humidor

    Dehumidifier cabinet for printer filament

    16 parts9
  • 4 layers104.2 × 77.7 mmDc26, the printed circuit board in 3D

    Dc26

    dodgymike/dc26-monero-badge-pcb

    Defcon 26 Monero badge PCB

    714 parts6
  • 4 layers69.9 × 44.5 mmDoughLee2, the printed circuit board in 3D

    DoughLee2

    chl33/Dough133

    A temperature-controlled container for proofing and fermenting soughdough

    62 parts3MIT
  • 2 layers61 × 78.7 mmESP RGB LED, the printed circuit board in 3D

    ESP RGB LED

    Sean-AP/ESP-RGB-LED

    MicroPython module for controlling an RGB LED strip

    10 parts2
  • 2 layers33.8 × 49.5 mmEspAtomizerpcbv3rev1, the printed circuit board in 3D

    EspAtomizerpcbv3rev1

    Adamibus/ESPAtomizer-iOS

    This is a minimal KiCad 6/7 project skeleton. Open ESPAtomizer.kicadpro in KiCad.

    21 parts1
  • 2 layers116.1 × 85.3 mmCar control, the printed circuit board in 3D

    Car control

    andieh/carpc

    digitalization of an old VW T3 Bulli

    57 parts1

Questions

How big is the Beaglebone obd PCB?

It measures 50.8 × 28.6 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Beaglebone obd use?

20 parts, built around the IRLB8721PBF. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Beaglebone obd KiCad files?

From the KoffeinFlummi/rustbucket repository on GitHub, at the commit this page was made from: the board is kicad/beaglebone_obd.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Beaglebone obd design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).