Application Note with Free Downloadable Source Code
The Electrac series of actuators supports two higher-layer protocols based on the Controller Area Network (CAN): CANopen and SAE J1939. While you can control the actuators using simple hardware switches (Start, Stop, Forward Motion, Backward Motion), both CAN protocols also enable linear speed regulation.
If your application requires only basic motion control (Start, Stop, Directional Motion, and Speed Control), SAE J1939 is the better choice since it eliminates the need to install a protocol stack. The Electrac actuator implements some SAE J1939 features (e.g., the address claim procedure), but you can bypass full protocol compliance and control linear motion directly via CAN Bus data frames using a 29-bit message identifier. This makes “CAN Bus communication” a more accurate description of the operation mode.
The CAN/J1939 approach significantly shortens the development cycle, which is why this application note focuses on SAE J1939 rather than CANopen.
However, due to various undocumented peculiarities, I strongly advise against programming the Electrac via CAN/J1939 without reading this document. The Electrac user manual was not written with programmers in mind.
The application note is currently available in Kindle and eBook formats, with a printed version in development.
Contact us for more details.
Introduction
As part of a customer project, I was tasked with developing a hardware system to control a linear actuator—specifically, the Thomson Electrac HD model with an SAE J1939 interface. The Electrac series supports two higher-layer protocols (HLP) based on the Controller Area Network (CAN): CANopen and SAE J1939. While CANopen is optimized for industrial automation, SAE J1939 was designed for diesel-powered vehicles and machinery, including trucks, trains, ships, tanks, and tractors.
These actuators can be controlled via simple hardware switches (Start, Stop, Forward Motion, Backward Motion), but both CAN protocols also enable linear speed regulation.
At first glance, CANopen may seem like the better choice for industrial applications—provided you’re already familiar with implementing a CANopen protocol stack, which is no trivial task. However, if your application only requires basic motion control (Start, Stop, Directional Motion, and Speed Control), SAE J1939 is the more practical option since it eliminates the need to install a protocol stack. While the Electrac actuator supports some SAE J1939 features (e.g., the address claim procedure), you can bypass full protocol compliance and control motion directly via CAN Bus data frames using a 29-bit message identifier. Thus, “CAN Bus communication” better describes the operation mode.
The CAN/J1939 approach significantly shortens the development cycle, which is why this application note focuses on SAE J1939 rather than CANopen.
Before You Begin Development…
This section is designed to help you determine whether the Electrac Linear Actuator is the right fit for your project and what parameters to consider. Throughout this application note, you’ll encounter several undocumented side effects that affected and delayed my development process. My findings are based on one specific version of the Electrac actuator, but the code and insights should apply to other Thomson actuators supporting CAN/J1939.
The first step in your development process will likely be selecting an actuator based on required stroke length and speed. However, there are less obvious parameters that newcomers to this technology should be aware of.
For example, you might assume that you can control a linear actuator across the entire speed range, from zero to maximum. That is not the case. According to the Thomson Electrak user manual, the PWM driver does not supply sufficient voltage below 20% utilization, making 20% the lower speed limit. Additionally, speed control resolution is limited to 5% increments, leaving you with 16 distinct speed levels.
Beyond that, there’s an undocumented speed limit—a “threshold speed” at which the motor can run but cannot start if applied from a stationary position. This threshold varies based on gear condition, meaning older gears require a higher startup speed due to mechanical wear. (See the chapter Managing the Threshold Speed for a workaround.)
Another key limitation: the actuator never reaches the exact minimum or maximum positions listed in the datasheet. For example, while my actuators were specified for a 4000 mm stroke, the real-world range was ~20 mm for the minimum (null) position and ~3980 mm for the maximum position. If precision is critical, consider selecting a slightly longer stroke length than required.
Using Multiple Actuators in the Same Network
The most significant issue with Electrac actuators arises when using multiple units on the same network, particularly in battery-powered applications (e.g., trucks, trains). If two or more actuators share a CAN/J1939 network, they generate excessive data traffic, preventing the system from entering sleep mode and draining the battery.
To avoid this, each actuator should be controlled via a separate, galvanically isolated CAN/J1939 port. (See Multiple Actuators in the Same Network for a detailed explanation.)
Testing Considerations
Refer to Testing Approach for critical insights into what factors impact the development process. Before working with a linear actuator, consider how these technical limitations affect your application. I strongly recommend studying the user manual and carefully reviewing this application note before beginning development.
Scope of This Application Note
This application note focuses on the Thomson Electrac HD model with an SAE J1939 interface. While the actuator supports both CAN Bus and SAE J1939, this document simplifies implementation by utilizing direct CAN Bus control, reducing coding complexity.
The control hardware is an Arduino Due ECU development board with a CAN Bus interface. However, the provided C code can be adapted for any embedded system—including Windows/Linux PCs—so long as a compatible CAN Bus interface with appropriate drivers (API) is available.
The included demo code covers fundamental motion control functions: Start, Stop, Forward Motion, Backward Motion, and Speed Control via potentiometer. Two versions are presented:
- Basic Version – Fully functional but lacking advanced features.
- Extended Version – Includes minimum and maximum position detection and addresses various actuator quirks and limitations.
This document does not cover safe operation techniques for multiple actuators. While the basic sample code can operate two actuators, this is for demonstration purposes only. Synchronization of speed and position is not addressed.
The development environment used is the Arduino IDE (Integrated Development Environment).
Table of Content
The Thomson Electrac HD Linear Actuator
What is a Linear Actuator?
Download the User Manual
A Brief Introduction to CAN Bus and SAE J1939
Controller Area Network
SAE J1939
Controlling the Thomson Actuator
Manual Control
Software Control
Node Address Configuration
Sleep Mode
Actuator Control Message (ACM)
Actuator Feedback Message (AFM)
Safety Considerations
Testing Approach
Programming Hardware & Software
Arduino Due & Arduino IDE
Dual CAN Bus Interface
Control Connections
CAN Bus Connection
ARD1939 – SAE J1939 Protocol Stack for Arduino
CAN Bus & SAE J1939 Communication Protocol
Designing the ACM
Interpreting the AFM
Example Programs – Basic & Extended
Basic Version
Extended Version
Download Links
Hardware Connections & Programming Notes
General Aspects
Timer Control
Reading an Analog Signal from a Potentiometer
Reading Digital Signals (Switches, Pushbuttons)
Building the Actuator Control Message (ACM)
Handling the Actuator Feedback Message (AFM)
The Startup Sequence
Checking the CAN Bus Connection
Managing the Threshold Speed
Checking Motion End
Thomson Actuator – Oddities
CAN Bus Termination
Fatal Error Flag at Low Speed
Overload Flag at Power-Up
Multiple Actuators in the Same Network

