Site Information

 Loading... Please wait...

Blog

ESP32 with Dual Isolated CAN Port Controls Thomson Electrac Linear Actuator

Posted by Wilfried Voss on

The above image shows part of a hardware setup for a customer project to control and synchronize two Thomson Electrac linear actuators. See also my posts:

The above-listed posts reflect part of my experience during the development process. I summarized the knowledge gained in my application node Thomson Electrac HD Linear Actuator Motion Control per CAN Bus.

For the original hardware I used our Arduino-Based ECU Development Board with Dual CAN Bus Interface. However, while the board was perfect for the software development phase of the project, I decided to go with galvanically isolated CAN ports to assure highest system reliability.

Note: The application required the control of two actuators per CAN Bus (SAE J1939). It is theoretically possible to incorporate two actuators into one network. However, since the setup is powered by batteries, we needed to assure that the actuators switch into sleep mode when there is no CAN Bus traffic. That feature is not possible with two or more actuators on the same network (as explained in my application note). Consequently, I chose to go with two separate CAN ports.

For the final hardware design, I chose to create a derivative of our newest development, the espBerry. The espBerry DevBoard combines the ESP32-DevKitC development board with any Raspberry Pi HAT by connecting to the onboard RPi-compatible 40-pin GPIO header. For the two isolated CAN ports, I chose the Dual Isolated CAN Bus HAT for Raspberry Pi. I extended the original espBerry baseboard, adding some digital and analog IO plus a serial connection for an external display (as shown above).

The espBerry uses the ESP32-DevKitC development board, which is supported by the Arduino IDE that we used for the original control software. Porting the code to the new processor was fairly easy, since it required only changing the CAN Bus driver software. 

The above-mentioned application note explains the basics of the application, i.e., the functionality and code needed to control one actuator per CAN Bus. Furthermore, there are download references for the code (written in the "C" programming language).


Thomson Electrac HD Linear Actuator Motion Control per CAN Bus

Thomson Electrac HD Linear Actuator Motion Control per CAN Bus

The Electrac series of actuators supports two higher-layer protocols based on Controller Area Network (CAN): CANopen, and SAE J1939. You can control the actuators merely with hardware switches (Start, Stop, Forward Motion, Backward Motion), but, in addition, both CAN protocols allow to regulate the linear speed.

I dare say, in view of various undocumented eccentricities, I cannot recommend programming the Electrac per CAN/J1939 without reading this document.

More Information...

Know OBD2 Before You Start That Development Project

We at Copperhill Technologies offer a variety of CAN (Controller Area Network) devices for developing automotive and industrial embedded systems. In that capacity, we receive frequent inquiries regarding OBD2 (Onboard Diagnostics).  OBD2, or Onboard Diagnostics Second Generation, is a vehicle diagnosis system found in modern cars and trucks. The OBD2 system collects data from sensors and [...]

Read More »


SAE J1939 250k/500k Baudrate Converter with Arduino Due - Source Code Included

The introduction of 500 Kbps (see SAE J1939/14) as an alternative to 250 Kbps, required clarifications on how to solve problems that come with incorporating devices supporting different baud rate settings in the same network. One solution comes with automatic baud rate detection. The SAE J1939/16 document outlines the methods used to detect the baud rate [...]

Read More »


Programming the Thomson Electrac Linear Actuator - ACM and AFM Data Frames

This post represents an excerpt of  Thomson Electrac HD Linear Actuator Motion Control per CAN Bus. The application note is available in eBook and Kindle format, and it includes a free downloadable source code. More Information... In this post, I am explaining the Actuator Control Message (ACM) and Actuator Feedback Message (AFM).Thomson Electrac Linear Actuator - ACM Design The [...]

Read More »


Programming the Thomson Electrac Linear Actuator - Sleep Mode

This post represents an excerpt of  Thomson Electrac HD Linear Actuator Motion Control per CAN Bus. The application note is available in eBook and Kindle format, and it includes a free downloadable source code. More Information... In this post, I am explaining the actuator's sleep mode, which, if not fully understood, may cause some headache during the development [...]

Read More »


SAE J1939 Display Units for Off-Highway Industrial Engines

The  Enginemonitor displays by B-Plus are expansion tools, especially for industrial engines with SAE J1939 interfaces. They enable users to retrieve information from mobile machines and communicate commands directly. Thanks to their robust housings and protection level, the devices can operate directly in the cab and the outdoor area of mobile machines. Due to various device versions, the [...]

Read More »


CANCrocodile - Contactless CAN Bus, SAE J1939, OBD-II, And SAE J1708 Reader

CAN (J1939) and J1708 networks transport multiple valuable information for telematics of vehicles and stationary objects, such as engine parameters, ABS, EPS, diagnostic codes (DTC), and much more. Crocodile contactless readers are used in telematics systems to gather data from digital buses without breaking the insulation of wires and electrical contacts and without sending active requests [...]

Read More »


Under Development: Programmable CAN Bus to USB, Bluetooth, BLE, WiFi Gateway

For the longest time, I had resisted the idea of creating my version of a CAN-to-USB gateway, primarily due to the vast competition. A professional CAN/J1939 development requires a professional CAN-to-PC solution to monitor data traffic. I am pleased with the PEAK PCAN-USB device, as shown in the above image. However, not everybody is willing [...]

Read More »


Selection Criteria and Requirements for a Telematics Gateway

The  March 2023 issue of the CAN Newsletter, a CiA (CAN-in-Automation) online publication, posted an article on the selection criteria and requirements for a Telematics gateway. With cars evolving towards network technologies, OEMs (Original Equipment Manufacturers) require telematics solutions that boost seamless communication within and outside the vehicle. The device should be cloud-enabled, connectable to servers for real-time [...]

Read More »


SAE J1939 Protocol Stack Sketch for ESP32 Using the Arduino IDE

The ESP32 is a series of low-cost, low-power system-on-chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth. The ESP32 series employs a Tensilica Xtensa LX6 microprocessor in both dual-core and single-core variations and includes built-in antenna switches, RF balun, power amplifier, low-noise receive amplifier, filters, and power management modules. Furthermore, the processor provides the means to easily [...]

Read More »