VESC BLDC controller CAN bus tests

VESC BLDC controller has implemented CAN bus and defined a command set. This allow to control propulsion brushless motors in almost real time and in a secure way. However, the documentation of the BLDC CAN bus implementation is hard to find.

After the initial tryouts, we are now going to test it with CAN bus. We will test CAN bus command set.

As defined in wikipedia, the Controller Area Network (CAN bus) is a robust vehicle bus standard designed to allow micro controllers and devices to communicate with each other without a host computer. It is a message-based protocol, designed originally for multiplex electrical wiring within automobiles to save on copper, but is also used in many other contexts.


For the first tests, we used CABUSB. That allows to use our Ubuntu 16.04 workstation. We installed SocketCAN as driver.



I’m using SocketCAN to test CAN communication with VESC BLDC controller. There are several sites describing how to install and use it. However, I added a post on installing and configuring SocketCAN the way I tested it.

Testing BLDC controller CAN bus

The VESC documentation on CAN is rather difficult to find. In fact, is is documented in the code. In order to simplify my life, I looked for a library that already implement most of the commands.That’s what I discovered:

  • bldc-can, which is a c library
  • vesc, which is a c++ library. I did not test it at the time being.
  • vesc socket can, which is a c++ i’m trying to test.

I started my tests with bldc-can. Unfortunately, when I used “bldccantest” command, the vesc controller completely crashed: it seems that this command corrupted the firmware. Unfortunately, I have to re-install the firmware.

Result of tests

After weeks of VESC BLDC controller CAN bus tests and tryouts, I got to the conclusion that it is much too difficult to use with CAN bus for the time being. I did some additional researches and found cheaper BLDC controller that fulfill CANOpen stantard. The good point is that">ROS already has an CANOpen package. I will write another post on that subject.



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.