MCP2515 CAN Controller Demo CAN BUS Protocol Diagnostic Tool

Опубликовано: 16 Октябрь 2024
на канале: ToyTech Machines
28,035
681

Controller Area Network (CAN) Controller MCP2515 Module demo CAN BUS communication diagnostic tool.
It uses 4 Arduino Nano as CAN transceiver and 1 Controllino Maxi PLC (Arduino compatible) as CAN receiver. The 4 nodes send random numbers to simulate sensor data, and the PLC receive the CAN messages, check CAN ID and send to a HMI (Human Machine Interface) display. The display is a 7 inch Touch Screen running a Windows Winforms app to display the data and for visualization. To simulate a fault device, the power is switched off, the display will update the status accordingly. 5 MCP25515 module are connected to micro-controllers using SPI interface, and a jumper can be attached which will give 120ohm termination. CAN High & CAN Low are the two terminal screws to attach CAN wires over a distance for communicating with other CAN Module. The PC running the Windows diagnostic tool connects to the Serial Port of the PLC which is the CAN receiver to read messages from the 4 nodes / devices.

Download the Arduino CAN library below.
https://github.com/autowp/arduino-mcp...
Arduino MCP2515 CAN interface library
The example uses the sample code provided by the library.