CAN Bus Monitor

David Johnson-Davies' breadboarded CAN bus setup monitors packets with an ESP32.

Jeremy Cook
1 year ago

The Controller Area Network (CAN) bus protocol is, as explained in this Technoblogy post, “a communications interface widely used in the automotive industry... Like I2C it uses two wires and ground, but it uses differential signals enabling it to communicate reliably at a faster data rate over longer distances, typically up to 1000 meters with suitable cabling.”

The CAN bus protocol was originally developed for vehicular usage, but it’s also seen widespread use in industrial automation, and can be employed for home automation, irrigation, model railways, and more. While less implemented in the maker world than protocols like SPI and I2C, given its speed and transmission capabilities, it’s certainly worthy of consideration.

Technoblogy’s David Johnson-Davies has been experimenting with this protocol, and developed a handy monitoring device for CAN bus packets.

Hardware-wise, the build consists of an Adafruit ESP32 Feather as the controller, along with an Adafruit 240x135 TFT display, and an Adafruit CAN Pal to transfer signals between the CAN bus and the Adafruit ESP32 board. Although the ESP32 supports the CAN bus protocol, it still needs an external transceiver to physically connect its 3.3V pins to the 5V CAN bus. Alternatively, if a chip doesn’t support CAN, it can still communicate on this type of bus via chips like the MCP2515 and MCP25625 that translate between SPI and CAN signals.

The setup was tested by sending packets from an ATSAME51-based Adafruit Feather M4 CAN Express board, which natively supports CAN and includes the needed 5V conversion hardware onboard. More details on the project, as well as links to the monitor and sender programs, can be found in the Technoblogy write-up.

Jeremy Cook
Engineer, maker of random contraptions, love learning about tech. Write for various publications, including Hackster!
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles