Blog
Recent Posts
CAN Bus Troubleshooting with the PiCAN HATs: Why the Board Is Probably Not the Problem
Posted by on
The PiCAN product line has become the go-to CAN Bus interface solution for Raspberry Pi developers, system integrators, educators, and industrial engineers worldwide. From entry-level CAN Bus connectivity to advanced dual-channel CAN, CAN FD, GPS/GNSS integration, RS232, RS485, and real-time industrial networking, PiCAN boards combine robust hardware design with seamless Raspberry Pi integration. Whether you are developing automotive diagnostics, industrial control systems, marine electronics, fleet management solutions, or embedded IoT applications, the PiCAN family provides reliable, field-proven connectivity backed by extensive software support and a large global user community. Designed for professional applications yet accessible to hobbyists and researchers, PiCAN products deliver the flexibility, performance, and dependability needed to bring CAN Bus projects from concept to deployment.
One of the most common support requests we receive begins with the assumption that the PiCAN board is defective. In reality, after many years of supporting CAN bus applications, we have learned that almost every communication issue originates outside the PiCAN board itself. Incorrect termination, wiring mistakes, missing grounds, bit-rate mismatches, and connector problems account for the overwhelming majority of CAN bus failures. Before suspecting the hardware, it pays to understand how a CAN network actually works.
Step 1: Verify the CAN Interface Is Running
The first step is to make sure the CAN controller has been configured correctly.
For SocketCAN systems, you can verify operation using:
ifconfig can0
or
ip -details link show can0
A properly configured interface should show:
can0: UP
If the interface is down, no CAN communication can occur regardless of the wiring.
Step 2: Check the CAN Bus Bit Rate
One of the most common mistakes is a bit-rate mismatch.
CAN is not like Ethernet where devices automatically negotiate speeds.
Every node on the network must use exactly the same bit rate.
Common bit rates include:
|
Bit Rate |
Typical Application |
|---|---|
|
125 kbps |
Industrial automation |
|
250 kbps |
SAE J1939 |
|
500 kbps |
Industrial and automotive |
|
1 Mbps |
High-speed CAN |
If one node is operating at 250 kbps and another at 500 kbps, communication is impossible.
The CAN controller will see activity on the bus but will interpret it as errors.
Always verify the bit rate of every device connected to the network.
Step 3: Understand CAN Bus Termination
If CAN troubleshooting had a Hall of Fame, missing termination resistors would be the undisputed champion.
A CAN network requires two termination resistors.
Each resistor has a value of:
120 Ohms
One resistor is installed at each physical end of the network.
The result is a measured resistance between CAN_H and CAN_L of approximately:
60 Ohms
when power is removed from the network.
The CAN bus should look like this:
120Ω 120Ω
| |
Node ---- Node ---- Node ---- Node
Not this:
120Ω
|
Node ---- Node ---- Node ---- Node
And definitely not this:
Node ---- Node ---- Node ---- Node
Without proper termination, signal reflections occur, causing corrupted messages, intermittent communication failures, and endless frustration.
Step 4: Using the PiCAN J1 Termination Jumper
Most PiCAN boards include jumper J1.
This jumper enables the onboard 120-Ohm termination resistor.
The purpose of J1 is to simplify development and testing.
When J1 is installed:
Termination Enabled
When J1 is removed:
Termination Disabled
Whether J1 should be installed depends entirely on the physical location of the PiCAN board within the CAN network.
PiCAN at the End of the Network
If the Raspberry Pi with the PiCAN board is physically located at one end of the bus:
PiCAN ---- Node ---- Node ---- 120Ω
^
J1 Enabled
J1 should be installed.
PiCAN in the Middle of the Network
If the PiCAN board is somewhere in the middle:
120Ω ---- Node ---- PiCAN ---- Node ---- 120Ω
^
J1 Disabled
J1 must be removed.
Installing extra termination resistors is just as problematic as having too few.
Step 5: Measure the Bus Resistance
A simple multimeter can solve many CAN mysteries.
Turn off power to the network.
Measure resistance between:
CAN_H and CAN_L
Expected readings:
|
Resistance |
Meaning |
|---|---|
|
~60 Ohms |
Correct termination |
|
~120 Ohms |
Missing one terminator |
|
Infinite |
No termination or broken wiring |
|
~40 Ohms |
Too many terminators |
|
Very low resistance |
Wiring fault or short circuit |
This single measurement can often identify the problem in less than 30 seconds.
Step 6: Verify CAN_H and CAN_L Wiring
It sounds obvious, but it happens more often than you might think.
Check that:
CAN_H → CAN_H
CAN_L → CAN_L
and not:
CAN_H → CAN_L
CAN_L → CAN_H
Crossed wires will prevent communication entirely.
Some devices label the signals differently:
CANH
CAN-H
H
CANL
CAN-L
L
Always verify the documentation.
Step 7: Check Ground Connections
A CAN bus is designed for differential signaling and is relatively tolerant of noise.
However, devices still need a common reference.
Many CAN communication problems disappear after connecting grounds properly.
A typical connection includes:
CAN_H
CAN_L
GND
Neglecting the ground connection may lead to intermittent operation, especially with longer cable runs.
Step 8: Look for Error Frames
The CAN protocol is exceptionally good at detecting communication problems.
When something is wrong, nodes generate error frames and increment their error counters.
Common causes include:
- Incorrect bit rate
- Missing termination
- Excessive bus length
- Faulty wiring
- Ground problems
The CAN controller is usually trying to tell you something.
Listen to it.
Step 9: Test with a Simple Setup
When troubleshooting becomes complicated, simplify.
Disconnect everything except:
- Raspberry Pi with PiCAN
- One known-good CAN node
- Proper termination at both ends
A two-node network eliminates many variables and often reveals the issue quickly.
The Reality: The PiCAN Board Is Usually Innocent
Engineers often spend hours investigating software settings, drivers, and hardware before discovering:
- A loose connector
- Missing termination
- Incorrect bit rate
- Reversed CAN wires
- Missing ground
The PiCAN series has proven itself in countless applications ranging from industrial automation to vehicle diagnostics and marine systems.
Like any electronic device, hardware failures are theoretically possible.
However, in practice they are exceedingly rare.
When CAN communication fails, the odds overwhelmingly favor an external wiring issue rather than a defective PiCAN board.
In other words:
Before blaming the PiCAN board, grab a multimeter.
The bus is usually trying to tell you exactly what’s wrong.
You just need to listen.
Practical Python Programming for IoT: Build advanced IoT projects using a Raspberry Pi 4, MQTT, RESTful APIs, WebSockets, and Python 3
The Internet of Things (IoT) is transforming the way devices interact, communicate, and automate everyday tasks. Combining the versatility of Python with the power of Raspberry Pi, this practical guide teaches you how to design and build connected systems that bridge the gap between software and hardware. Through hands-on projects and real-world examples, you will learn how sensors, actuators, and cloud services work together to create intelligent IoT applications.
Starting with IoT networking fundamentals, including REST APIs, WebSockets, and MQTT, the book then introduces electronics, GPIO interfacing, and circuit design before moving on to practical projects involving sensors, motors, motion detection, temperature monitoring, and automation. Along the way, you will integrate popular IoT platforms such as ThingSpeak and IFTTT, explore modern Python programming techniques, and develop complete end-to-end IoT solutions. By the end of the book, you will have the skills and confidence to build sophisticated IoT systems using Python and Raspberry Pi. More information...
Why CAN Bus Is One of the Most Reliable Communication Systems Ever Created
When engineers design communication systems for vehicles, industrial machinery, agricultural equipment, marine electronics, and embedded control systems, reliability is often more important than raw speed. A lost message in a music streaming application may go unnoticed. A lost message containing engine speed, brake status, steering angle, or hydraulic pressure can lead to equipment malfunction, downtime, or [...]
Why the Teensy 4.1 Triple CAN-Bus Board with Ethernet Makes an Excellent CAN Data Logger
Modern vehicles, industrial machines, marine systems, and agricultural equipment generate enormous amounts of CAN bus traffic. Capturing, storing, and analyzing this data is essential for diagnostics, performance monitoring, predictive maintenance, fleet management, and product development. While there are many commercial CAN data loggers available, they often suffer from one or more limitations: High cost Limited customization Proprietary software Restricted storage [...]
ESP32-S3 vs. Raspberry Pi + PiCAN: Which Platform Is Better for Cloud-Connected CAN Bus Applications?
The growing popularity of Industrial IoT, fleet management, predictive maintenance, and cloud-based monitoring has created a demand for embedded systems that can bridge CAN networks with modern software platforms. Two popular approaches dominate the market: An ESP32-S3 embedded system with integrated CAN connectivity A Raspberry Pi combined with a PiCAN interface board Both platforms can transmit CAN data to [...]
Programming PiCAN Boards with Python: A Practical Guide for Raspberry Pi CAN Applications
The Raspberry Pi has become one of the most popular platforms for developing CAN bus applications. Whether you are working with industrial equipment, agricultural machinery, marine electronics, automotive systems, or SAE J1939 networks, combining a Raspberry Pi with a PiCAN board provides a powerful and cost-effective development platform. One of the biggest advantages of this setup [...]
CAN, SAE J1939, and NMEA 2000 Development with Raspberry Pi and PiCAN HATs
The Raspberry Pi has evolved far beyond its origins as an educational computer. Today, it serves as a powerful platform for industrial automation, vehicle networking, marine electronics, telematics, data logging, and rapid embedded systems prototyping. When combined with the PiCAN family of Raspberry Pi HATs available from Copperhill Technologies, the Raspberry Pi becomes a versatile CAN [...]
ESP32 TWAI Driver Explained: A Practical Guide to CAN Bus Programming
The ESP32 has become one of the most popular microcontrollers for CAN bus applications. Whether you are building industrial controllers, SAE J1939 devices, NMEA 2000 products, robotics systems, or automotive prototypes, the ESP32 provides a powerful and cost-effective platform with a built-in CAN controller. Yet, many developers are confused when they encounter the term TWAI in [...]
ESP32S3 CAN & LIN-Bus Board – Accelerating CAN-to-LIN Gateway Development
Modern vehicles and industrial machines increasingly rely on multiple communication networks. While CAN Bus serves as the backbone for critical control systems, LIN (Local Interconnect Network) provides a low-cost solution for intelligent sensors, switches, actuators, and body electronics. In many applications, engineers need a reliable method to exchange data between these two networks. The ESP32S3 CAN [...]
Why CAN Bus Refuses to Die: What CAN FD and CAN XL Reveal About the Strength of Classical CAN
For more than 25 years, I have been working with CAN (Controller Area Network) technology. During that time, I have lost count of how many times industry experts, analysts, and technology journalists predicted its imminent demise. First, it was Ethernet. Then came FlexRay. Later, it was Automotive Ethernet. More recently, CAN FD and now CAN XL have been presented [...]
CANPico V2 with Pico WH Pre-Installed: Powerful CAN Bus Development in an Ultra-Compact Form Factor
When developing CAN Bus applications, engineers often face a familiar challenge: balancing processing power, development speed, hardware complexity, and physical size. The CANPico V2 with Raspberry Pi Pico WH pre-installed solves all four challenges in a remarkably compact package. Combining the powerful Raspberry Pi Pico WH with a sophisticated CAN interface, the CANPico V2 provides an [...]
Loading... Please wait...
