You are here

Differential steering with 2 VESC driving 2 BLDC in FOC mode with joystick

11 posts / 0 new
Last post
unimotion
Offline
Last seen: 3 years 8 months ago
Joined: 2018-10-26 22:12
Posts: 6
Differential steering with 2 VESC driving 2 BLDC in FOC mode with joystick

Hello I'm looking for a first advice about how to control my robotic chair project 

Here is what I can do now:

I'm able to move my robotic chair on a tank like mode : 2 BLDC motors each motor connected to it's own VESC, each VESC wired to one channel of an RC receiver that receives signal from a RC transmitter (Flysky FS6) on wich I have setup 2:channels mixing to get differential steering. It works very well !

I would like to replace the RC wireless control by a wired analog joystick connected to an arduino (or any other easy to use controler) running differential steering code.

Can you give me some advice on the best solution to control the 2 VESC from the arduino ? should I use PPM or UART ? Do you know of any project/code/library of this type ?

Thanks for your help, best regards, JM

unimotion
Offline
Last seen: 3 years 8 months ago
Joined: 2018-10-26 22:12
Posts: 6

What's wrong with my request ?

have I made an error choosing the forum ? I really need your help to understand how to begin solving my problem. Thanks for your help.

TechAUmNu
Offline
Last seen: 3 months 1 week ago
Joined: 2017-09-22 01:27
Posts: 575

For simplicity PPM is good, if you want more control then use UART as you can set an exact speed instead of a vague percentage.

This forum is very quiet so it sometimes takes a while for someone to notice.

unimotion
Offline
Last seen: 3 years 8 months ago
Joined: 2018-10-26 22:12
Posts: 6

Thanks for you advice and for your insight on the forum wink

adamdorr
Offline
Last seen: 4 years 11 months ago
Joined: 2019-12-15 06:00
Posts: 4

Hi unimotion,

I am also hoping to build a joystick-controlled robotic chair that steers using differential steering with two motors, and I saw your post here. I would love to avoid having to add an arduino system to my chair and just run everything through VESC alone, but I'm not sure it's possible.

Have you had any luck so far getting differential steering to work on VESC natively?



​Thanks!

pf26
Offline
Last seen: 1 month 8 hours ago
VESC FreeVESC Silver
Joined: 2018-12-04 08:44
Posts: 53

Yes, it is possible without arduino. You need to write a custom application on a "master" VESC, to read the analog voltage(s) from the joystick, and convert to numbers to use to control speed on both the master, and the slave (preferably through the CAN bus).

adamdorr
Offline
Last seen: 4 years 11 months ago
Joined: 2019-12-15 06:00
Posts: 4

Thanks!

Is there already a library for this sort of thing available? I'm guessing I'm not the first person to want to connect an Arduino to a VESC, and - sadly - I'm not the best person to write a custom application!

Mmeecchh
Offline
Last seen: 4 years 11 months ago
Joined: 2020-01-16 02:31
Posts: 1

Coming from a traditional RC perspective; the solution would be to use 2 'servo testers' to convert a wired joystick to pwm servo control signals: Disconnect the built in 5k ohm pots and run 6(?) wires to the 5k pots in a dumb gaming joystick, mount joy stick rotated 45 degrees so that forward is maximum x and y. 

fender90
Offline
Last seen: 3 years 8 months ago
Joined: 2019-06-22 22:37
Posts: 5

The same here. Would love to get rid of an Arduino in the system. I am using the VESC with a paid of a 6.5inch hoverboard wheels to make an RC robotic platform. I was using a reprogrammed hoverboard mainboard which natively allowed to implement differential steering. Would love to have the feature in a VESC as well. 

Gfiuso
Offline
Last seen: 4 years 4 months ago
Joined: 2020-08-14 17:10
Posts: 3

Hi everyone!!!

I’m still at the same point of unimotion’s post, I’m very happy with the smoothness at low speed in FOC mode, but

I would like to know how to configure differential steering with 2 bldc hoveboard motors (2x flipsky in FOC mode), using RC controller stick1 for forward/backward and the stick2 for steering...

...with or without Arduino, CAN ANYONE HELP?

thanks!

mikegrok
Offline
Last seen: 2 years 3 months ago
Joined: 2021-01-29 21:30
Posts: 1

I am going to use this for wheelchair project, so...

get an rc controller that runs opentx

you can configure opentx to perform the differential steering. I am going to remove a single gimbal to use as a wheelchair joystick, and mount it somewhere convenient.

the opentx controllers communicate using sbus to tethered devices, or you can use a module to a remote device. 

If using a remote, it can communicate via ppm directly to the vesc. 

if tethering, get a sbus to ppm decoder, then talk to the vesc via ppm. 

 

-MikeGrok