The 2-Channel CAN FD Shield for Raspberry Pi is an expansion board that enables two-channel Controller Area Network with Flexible Data-Rate (CAN FD) communication for Raspberry Pi computers. This shield allows Raspberry Pi users to communicate with CAN FD networks, which are commonly used in automotive and industrial applications due to their high reliability and speed. The shield is particularly useful for developing telematics applications, automotive diagnostics, industrial automation systems, and for integrating Raspberry Pi into existing CAN FD networks.
Pin Number | Function | Description |
---|---|---|
1 | VDD | Power supply for the module (3.3V from Raspberry Pi) |
2 | GND | Ground |
3 | SO | SPI MISO (Master In Slave Out) |
4 | SI | SPI MOSI (Master Out Slave In) |
5 | SCK | SPI Clock |
6 | CS | SPI Chip Select |
7 | INT | Interrupt pin (active low) |
8 | CAN_RX1 | CAN 1 Receive |
9 | CAN_TX1 | CAN 1 Transmit |
10 | CAN_RX2 | CAN 2 Receive |
11 | CAN_TX2 | CAN 2 Transmit |
Hardware Installation:
Software Configuration:
sudo raspi-config
.Interfacing Options
and enable SPI
.sudo apt-get update
and sudo apt-get upgrade
.Driver Installation:
sudo apt-get install can-utils
.dtoverlay=mcp2517fd-can0,oscillator=4000000,interrupt=25
to /boot/config.txt
for the first channel.dtoverlay=mcp2517fd-can1,oscillator=4000000,interrupt=24
.CAN Interface Not Found:
dtoverlay
lines are correctly added to /boot/config.txt
.CAN Communication Errors:
Q: Can I use this shield with any Raspberry Pi model? A: The shield is compatible with Raspberry Pi models that have the 40-pin GPIO header. Check the pinout and physical dimensions to ensure compatibility with your specific model.
Q: How do I know if the shield is working correctly?
A: After setting up the hardware and software, you can use candump can0
or candump can1
to monitor the traffic on the CAN network. If you see data being received, the shield is functioning correctly.
Q: What is the difference between CAN and CAN FD? A: CAN FD (Flexible Data-Rate) is an extension of the original CAN protocol that allows for higher data rates and larger data payloads. It is backward compatible with classic CAN networks.
Q: How do I send CAN FD messages from the Raspberry Pi?
A: You can use the cansend
utility to send messages. For example, cansend can0 123#1122334455667788
sends a message with identifier 0x123 and data payload to the first CAN channel.
For further assistance, consult the Raspberry Pi community forums or the manufacturer's support resources.