Site Information

 Loading... Please wait...

Blog

CAN Bus And SAE J1939 Recording and Simulation Using the Raspberry Pi

Posted by Industry News on

SAE J1939 Turbo Interface for Raspberry PiThe Raspberry Pi is a series of small single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and in developing countries. The original model became far more popular than anticipated, selling outside of its target market for uses such as robotics. Peripherals (including keyboards, mice and cases) are not included with the Raspberry Pi. Some accessories however have been included in several official and unofficial bundles.

According to the Raspberry Pi Foundation, over 5 million Raspberry Pis have been sold before February 2015, making it the best-selling British computer. By November 2016 they had sold 11 million units.

The Raspberry Pi is undoubtedly the perfect embedded system to read and simulate CAN Bus and J1939 data streams for communication with a vehicle bus. The Linux operating system provides comfortable means of an established file management system combined with great speed, and these days there are multiple choices for the appropriate RPi CAN or SAE J1939 hardware interface.

CAN Bus Interfaces

PiCAN2 - CAN Interface for Raspberry Pi With SMPS

The PiCAN2 board series provides Controller Area Network (CAN) Bus capabilities for the Raspberry Pi. It uses the Microchip MCP2515 CAN controller with MCP2551 CAN transceiver. Connection are made via DB9 or 3-way screw terminal.

There is an easy-to-install SocketCAN driver, and programming can be accomplished in C or Python.

The boards are offered with various options, including SMPS (Switch-Mode power supply for extended input power), one or two CAN Bus ports, isolated CAN Bus ports, GPS, and more.

Features

  • CAN v2.0 A/B at 1 Mb/s
  • High speed SPI Interface (10 MHz)
  • Standard and extended data and remote frames
  • CAN connection via standard 9-way sub-D connector or screw terminal
  • Compatible with OBDII cable
  • Solder bridge to set different configuration for DB9 connector
  • 120Ω termination resistor
  • Serial LCD ready
  • LED indicator
  • Foot print for two mini push buttons
  • Four fixing holes, complies with Pi Hat standard
  • SocketCAN driver
  • Interrupt RX per GPIO
  • More Information...

SAE J1939 Interface

jCOM.J1939.RPi SAE J1939 Turbo Interface For Raspberry Pi 3

While it is definitely possible to run an SAE J1939 protocol stack on the Raspberry Pi, there are some obstacles, one of them being the lack of availability of appropriate software in the marketplace. Also, despite the RPi's powerful processor, there can be timing performance issues, which primarily depend on the actual application and its load on the CPU (e.g. video processing).

The solution comes in form of the jCOM.J1939.RPi interface, which allows the Raspberry Pi to run a J1939 application comfortably even at high bus load, without slowing down application responses. All this is supported by an extensive programming library (in C source code) and sample code.

The jCOM.J1939.RPi integrates an 100 MHz ARM Cortex-M3 with a CAN transceiver and a fast serial connection to the Raspberry Pi. The processor, acting as an SAE J1939 gateway, receives and processes all J1939 data frames, including filtering of PGNs, thus reducing the processing burden on the RPi CPU. The processor also manages all timing requirements according to the SAE J1939 standards, which eliminates any impact on protocol performance due to high RPi CPU loads.

The processed data delivered to the application includes the PGN, data, and priority. Any data length, either the standard 8 bytes or up to 1785 bytes (TP = Transport Protocol) are supported, freeing the application engineer from managing tedious protocol features.


Electronics Cookbook: Practical Electronic Recipes with Arduino and Raspberry Pi

Electronics Cookbook: Practical Electronic Recipes with Arduino and Raspberry Pi by Simon Monk

If you’re among the many hobbyists and designers who came to electronics through Arduino and Raspberry Pi, this cookbook will help you learn and apply the basics of electrical engineering without the need for an EE degree. 

Through a series of practical recipes, you’ll learn how to solve specific problems while diving into as much or as little theory as you’re comfortable with.

Author Simon Monk (Raspberry Pi Cookbook) breaks down this complex subject into several topics, from using the right transistor to building and testing projects and prototypes. 

With this book, you can quickly search electronics topics and go straight to the recipe you need. It also serves as an ideal reference for experienced electronics makers.

This cookbook includes:

  • Theoretical concepts such as Ohm’s law and the relationship between power, voltage, and current
  • The fundamental use of resistors, capacitors and inductors, diodes, transistors and integrated circuits, and switches and relays
  • Recipes on power, sensors and motors, integrated circuits, and radio frequency for designing electronic circuits and devices
  • Advice on using Arduino and Raspberry Pi in electronics projects
  • How to build and use tools, including multimeters, oscilloscopes, simulations software, and unsoldered prototypes
  • More Information...

SAE J1939 Data Stream Recording With Raspberry Pi

The Raspberry Pi is undoubtedly the perfect embedded system to read and record data streams from a vehicle bus. The Linux operating system provides the means of an established file management system, and these days there are multiple choices for the appropriate RPi CAN or SAE J1939 hardware interface. In the following project, I am using the Copperhill [...]

Read More »


SAE J1939 Turbo Interface for Raspberry Pi - Firmware Update

The jCOM.J1939.RPi, an SAE J1939 interface for the Raspberry Pi, is not an RPi HAT in the common sense. The board incorporates an ARM processor with CAN transceiver for use on the Raspberry Pi while allowing the operation with any other RPi-compatible board.By combining our J1939 port interface, the Raspberry Pi, an SAE J1939 cable, and [...]

Read More »


Learn All About The Raspberry Pi3 And What You Can Do With It

The Raspberry Pi 3 is a powerful minicomputer that has gained popularity for its versatility with hobbyists, DIYers, students, and digital engineers. More than just a tiny computer, the RPI is also a microcontroller that can light LEDs, spin motors, obtain sensor input, and much more.This book serves as a beginners guide to the RPI [...]

Read More »


"C" Programming The SAE J1939 Turbo Interface for Raspberry Pi

The jCOM.J1939.RPi, an SAE J1939 interface for the Raspberry Pi, is not an RPi HAT in the common sense. The board incorporates an ARM processor with CAN transceiver for use on the Raspberry Pi while allowing the operation with any other RPi-compatible board.By combining our J1939 port interface, the Raspberry Pi, an SAE J1939 cable, and [...]

Read More »


Raspberry Pi - Interfacing To The Real World With Embedded Linux Through Applying Fundamental Engineering Principles

Exploring Raspberry Pi is the innovators' guide to bringing Raspberry Pi to life. This book favors engineering principles over a 'recipe' approach to provide you the skills you need to design and build your own projects. You will understand the fundamental principles in a way that transfers to any type of electronics, electronic modules, or external [...]

Read More »


Raspberry Pi With Java To Create Innovative Devices That Power The Internet Of Things (IoT)

This book, Raspberry Pi with Java: Programming the Internet of Things (IoT), fills an important gap in knowledge between seasoned Java developers and embedded-hardware gurus, taking a project-based approach to skills development from which both hobbyists and professionals can learn. By starting with simple projects based on open-source libraries such as Pi4J, hobbyists can get immediate results [...]

Read More »


SAE J1939 Turbo Interface Board for Raspberry Pi

A note upfront: The CAN interface board for the Raspberry Pi as described in the following, specifically the firmware code, is under current development. The hardware is ready for production, and the release is targeted for end of February 2017.This post is a follow-up on a previous post Raspberry Pi With CAN Bus Or SAE J1939 [...]

Read More »


Raspberry Pi With CAN Bus Or SAE J1939 Turbo Interface Board

A note upfront: The CAN interface board for the Raspberry Pi as described in the following, specifically the firmware code, is under current development. The hardware is currently in production, and the release is targeted for the end of February 2017. If you have a special interest in running the SAE J1939 protocol on the Raspberry [...]

Read More »


CAN Bus Interface For the Raspberry Pi 2/3 Comes With Various Options

The PiCAN2 board series by Copperhill Technologies provides CAN Bus capabilities for the Raspberry Pi 2 or 3. The boards (with the exception of the dual isolated interface) use the Microchip MCP2515 CAN controller in combination with the MCP2551 CAN transceiver. There is an easy to install SocketCAN driver, and programming can be accomplished in C [...]

Read More »