Controlling 6 VESC's

General topics and discussions about the VESC and its development.
skipper762
Posts: 10
Joined: 13 May 2017, 06:08

Controlling 6 VESC's

Postby skipper762 » 28 May 2017, 07:55

Hi Guys,

I am building a 6 wheeled robot, each of the wheels is driven.

I want to control 6 of the VESCs with a microcontroller, interfacing via USB to the onboard PC (running ROS).
I also want to be able to get measurements from the VESCs: current, rpm, duty cycle, bat voltage etc.

Running 6 PPM and serial lines on a single micro could be a bit taxing, does anyone have any advice on how to get the VESCs running daisy chaining over the CAN bus.

Or any other ideas for that matter.

Cheers,
Nick

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

Re: Controlling 6 VESC's

Postby rew » 28 May 2017, 11:18

The canbus is a BUS. So you simply connect you 6 VESCs to the bus and have some busmaster send the vesc their setpoints and ask for their stats.

I can run 7 PWM signals on one attiny44 with microsecond precision. I'd say that running 6 should not be a problem.

arvidb
Posts: 234
Joined: 26 Dec 2015, 14:38
Location: Sweden, Stockholm

Re: Controlling 6 VESC's

Postby arvidb » 28 May 2017, 11:21

CAN is a bus, so you should be able to just hook all the VESCs onto one bus, no need for daisy chaining. Also see this.

Edit: haha, rew beat me to it!

skipper762
Posts: 10
Joined: 13 May 2017, 06:08

Re: Controlling 6 VESC's

Postby skipper762 » 28 May 2017, 22:37

Ahh that'll make life easier, is there a pre-defined protocol on the VESCs for the CAN bus communications, or would I have to write a custom application.

From my understanding, I'd still have to use PPM for control and the CAN would just provide debug information.

Cheers,
Nick

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

Re: Controlling 6 VESC's

Postby rew » 29 May 2017, 06:15

No, there is a predefined canbus protocol that allows setting of the operational parameters like "current" or "target RPM". It also allows questioning measurements as you already know.


Return to “General”

Who is online

Users browsing this forum: No registered users and 7 guests