Skip to content

craigg96/vesc_can_bus_arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VESC library for CAN bus control using MCP2515 SPI Driver

image

This repo contains the CAN bus protocol for VESC that can be used with arduino and the MCP2515 driver library by Cory Fowler (see credits). The MCP2515 is the most common way to integrate can bus onto the arduino platform. The VESC platform is the gold standard for brushless motor control for skateboards and ebikes. This library allows you to use the can bus instead of UART (see solidgeek vescuart library) to communicate with the VESC which is more reliable and allows the single UART port on most arduinos to be free for debugging.

Realtime Data Messages

Parameter
rpm
inpVoltage
dutyCycleNow
avgInputCurrent
avgMotorCurrent
tempFET
tempMotor
WattHours

Command Messages

Parameter
erpm
dutycycle
current

To use the library out of the box, the vesc tool must be configured as shown in images/vesc_tool_app_settings.png. VESC ID = 10 CAN STATUS_MESSAGE_MODE = CAN_STATUS_1_2_3_4_5 CAN Baud Rate = CAN_BAUD_250K

Place the .h and .cpp file in the same folder as the .ino file to use this library with no changes.

Credits

DEPENDENCIES

LICENSE

MIT - https://opensource.org/license/mit/

About

This repo contains the CAN bus protocol for VESC that can be used with arduino and the MCP2515 driver library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages