SAE J1939 Turbo Interface for Raspberry Pi
Raspberry Pi is not included!
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 Cortex-M3 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 open-source software libraries, you are ready to go with a powerful turn-key RPi-based J1939 bus solution. Leverage the vast processing capability of the Raspberry Pi plus the built-in CAN port for your next prototype.
In order to more efficiently serve automotive applications, the jCOM.J1939.RPi board supports an optional extended input power range of 7 to 36 VDC to power the entire system, i.e. including the RPi itself.
Possible applications include:
- SAE J1939 Gateway and Protocol Converter
- SAE J1939 Bridge (connecting 2 J1939 networks)
- SAE J1939 Analyzer (in combination with a suitable Linux GUI)
- SAE J1939 Data Monitoring
- SAE J1939 ECU Prototyping
- CAN port with three-pin terminal connector
- Extended input power range of 7 VDC to 36 VDC (optional)
- 2 LEDS (Power, CAN Activity)
- Termination resistor switchable per jumper
- Full on-chip SAE J1939 Protocol Stack according to SAE J1939/21 and SAE J1939/81
- Automatic CAN baud rate detection according to SAE J1939/16
- Well documented library and sample code
Supported SAE J1939 Features Include:
- Hardware is fully SAE J1939/1x compliant
- Switchable termination resistor
- SAE J1939/21 - Data Link Layer
- SAE J1939/81 - Network Management
- Setup of Preferred Node Address
- Adjustable Node Address Negotiation Range
- Message Filters
- Full Network Communication incl. Transport Protocol
- Design Tx Messages Incl. Transmission Rate
- Configuration of Request Responses
- Configuration of Request Messages
- Network Scanner (Creates a list of all nodes in the network)
- J1 - Firmware Programming Header
- J2 - CAN port
- J3 Additional CAN port (for future extensions)
- J4 - External power connection7 to 36 VDC (optional)
- J5 - 40-pin header to connect to the Raspberry Pi
- PWR - Power LED
- TERM - Termination resistor jumper
- RST/ISP - Reset and ISP (In-System Programming) jumpers used to initialize firmware update
What is the "Turbo" Aspect?
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.
The jCOM.J1939.RPi allows the Raspberry Pi to run your J1939 application comfortably even at high bus load, without slowing down your application responses. All this is supported by an extensive programming library (in C source code) and sample code.
SAE J1939 Turbo Interface for Raspberry Pi - Setup
The SAE J1939 Turbo Interface for Raspberry Pi (jCOM.J1939.RPi) uses the RPI's serial port for the communication between the two processors. The CAN Bus interface translates received J1939 data frames into a serial string and sends it to the RPi's CPU for further processing. In turn, the RPi sends serial data to the jCOM board where it is being translated into a J1939 data frame. The protocol used for the data exchange is described in our jCOM.J1939 Serial Communication Protocol.
However, the RPi's serial port is per default used by the Linux console, and you need to disable it as follows:
It is highly recommended that you use the latest Debian version:
To upgrade use:
sudo apt-get update
sudo apt-get upgrade
Once the newest version is installed, use the command line window and type: sudo raspi-config
NOOBS/Raspbian Version July 2017 and later:
Go to Interfacing Options/Serial and set No at “Would you like a login shell to be accessible over serial?” Then set Yes to "Would you like the serial port hardware to be enabled?", validate and reboot, that's all.
NOOBS/Raspbian Version before July 2017:
Go to Advanced Options/Serial and set No at “Would you like a login shell to be accessible over serial?”, validate and reboot. Also, check the /boot/config.txt file for the line enable_uart=0, and if it exists change it to enable_uart=1 and reboot with sudo reboot.
All this will work smoothly with the Raspberry Pi 3 V1.2 and newer. For any older version, the setup procedure will be a bit more complex.
For more information on how to enable the serial port on the Raspberry Pi, see:
- V 1.00.01 - Release Version
- V 1.01.00:
- Added periodic transmit messages
- Added CAN baud rate switching 250/500 kbps
- PGN 0x0000 did not allow a destination address
- How To Determine & Update the jCOM.J1939.RPi firmware
- jCOM.J1939 Serial Communication Protocol
- "C" Programming The SAE J1939 Turbo Interface for Raspberry Pi
- How To Update the jCOM.J1939.RPi firmware
Exploring Raspberry Pi: Interfacing to the Real World with Embedded Linux
Exploring Raspberry Pi is an innovators guide to bringing your Raspberry Pi to life. The book favors engineering principles over a 'recipe' approach to give 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 peripherals, using a "learning by doing" approach that caters to both beginners and experts.
The book begins with basic Linux and programming skills, and helps you stock your inventory with common parts and supplies. Next, you will learn how to make parts work together to achieve the goals of your project, no matter what type of components you use.
The companion website provides a full repository that structures all of the code and scripts, along with links to video tutorials and supplementary content that takes you deeper into your project.
The Raspberry Pi's most famous feature is its adaptability. It can be used for thousands of electronic applications, and using the Linux OS expands the functionality even more. This book helps you get the most from your Raspberry Pi, but it also gives you the fundamental engineering skills you need to incorporate any electronics into any project.
- Develop the Linux and programming skills you need to build basic applications
- Build your inventory of parts so you can always "make it work"
- Understand interfacing, controlling, and communicating with almost any component
- Explore advanced applications with video, audio, real-world interactions, and more