Press "Enter" to skip to content

CAN Bus Programming With The Arduino Due – Overview

<- Table of Content

The prototyping of Controller Area Network (CAN) interfaces used to be a tedious task, but the recent years have seen the emergence of low-cost, yet easy-to-use embedded development platforms such as the Arduino, BeagleBone, Raspberry Pi, and others. This opened the door to a myriad of applications for budget-sensitive engineers and hobbyists.

For the longest time the major misconception about Controller Area Network (CAN) was that it is merely used in automobiles. The truth is, CAN, since its introduction in 1986, proved to be a robust, simple and versatile technology and, consequently, CAN found its way into all areas of applications where microprocessors need to communicate among each other.

Along with its undeniably dominant use in automobiles, CAN applications do not only include industrial automation tasks, but any application where distributed control is advantageous and/or a serial bus system will eliminate excessive wiring. CAN proved to be superior to any other field-bus system in regards to low cost, the ability to function in a difficult electrical environment, a high degree of real time capability, excellent error detection and fault confinement capabilities and, almost contradictive to the previously mentioned features, ease of use.

Nowadays there is no special niche for CAN; its use is universal from any industrial application, space and aviation, maritime, medical, down to household appliances such as washers, dryers and even coffee machines.

The performance as well as the price tag of such CAN applications depends primarily on processor power and memory resources. An 8-bit system such as the Arduino Uno may be sufficient for simple CAN applications, but the core question is, why limit the project’s performance from the get-go?

After all, the 32-Bit ARM Cortex-M3 processor series is the preferred choice for Controller Area Network applications due to its internal CAN controllers, sufficient memory (Flash and SRAM) and great CPU clock speed. And yet, ARM prototyping boards are very affordable and most IDEs are free-of-charge.

For this book, I have chosen one very popular system that matched my selection criteria, which are low-cost and ease of programming:

The Arduino Due is the first ARM-based Arduino development board. The programming of the microcontroller is accomplished through the familiar Arduino IDE (Windows, Mac), keeping the programming as backward compatible to other Arduino systems as possible, thus allowing a smooth migration between processor systems.

In the following, I will address the aspects of Controller Area Network (CAN) prototyping using the Arduino Due. My focus will be primarily on providing the basic means to the reader, which includes the description of available resources, hardware and software, and some special insights.

I will explain the basic technical aspects of Controller Area Network and higher-layer protocols such as CANopen, DeviceNet and SAE J1939, the ARM Cortex-M3 Processor, and the Arduino Due. While a detailed of all these technologies is out of the scope of this book, I will provide references in each chapter that will enable you to gather further details.

All in all, the information as provided will enable you to write your CAN applications within shortest time.

© 2018 Copperhill Technologies Corporation