You are here

Control singular VESC using CAN-BUS and Arduino

5 posts / 0 new
Last post
Cam
Offline
Last seen: 3 years 10 months ago
Joined: 2021-01-06 10:06
Posts: 1
Control singular VESC using CAN-BUS and Arduino

Hello, I am new to VESC and currently have troubles controlling my VESC with the CAN-BUS. I am using a sparkfun CAN-BUS Shield connected to an Arduino to send CAN messages to VESC for it to move the FOC motor.The arduino is able to send CAN messages to the VESC. On the VESC tool, the CAN analyzer idicates that the VESC is receving the CAN message. However, the motors don't move at all. An example of a CAN message I am sending over to the VESC is:

Extended ID: 0X00000900 , Data: FF FF F1 A6 0 D 0 B4 

Are there any examples of the format of the CAN message?

doctarr
Offline
Last seen: 3 years 1 month ago
Joined: 2020-12-29 15:23
Posts: 13

Where did you find any information regarding the format of messages to send?  I can't find any documentation on CAN.

 

Also, if you have an Arduino, why not use UART?

a.dahhak
Offline
Last seen: 8 months 1 week ago
Joined: 2020-02-27 12:04
Posts: 17

 

WhatsApp Image 2020-04-21 at 12.25.07.jpeg

Abdelilah

a.dahhak
Offline
Last seen: 8 months 1 week ago
Joined: 2020-02-27 12:04
Posts: 17

Hi,

First check if you have same CAN baudrate,  if your CAN ID is 10 for example : Send  0x000000A 00 00 27 10 and your motor will run at 10% Duty Cycle

Abdelilah

craiggault
Offline
Last seen: 10 months 1 week ago
Joined: 2020-12-16 17:52
Posts: 1

You can use the MCP2515 module and this library to communicate with the vesc over CAN bus.

https://github.com/craigg96/vesc_can_bus_arduino