Site Information

 Loading... Please wait...

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...