Site Information

 Loading... Please wait...

Blog

ESP32 with Dual CAN Port Controls Thomson 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...

Programming 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 »


Programming Electrac Linear Actuator - ACM, 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 »


Thomson Electrac HD Linear Actuator - Fatal Error Flag at Low Speed

As part of a customer project, I was asked to develop a hardware system to control a linear actuator, specifically the Thomson Electrac HD model with SAE J1939 interface. The Electrac Linear Actuator is a great product, and it is always rewarding to see the application move. Yet, working on this application was, at times, [...]

Read More »