Maximum refresh rate of torque commands via uart?

General topics and discussions about the VESC and its development.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Jackl
Posts: 10
Joined: 12 Mar 2017, 22:23
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Maximum refresh rate of torque commands via uart?

Postby Jackl » 12 Mar 2017, 22:30

Hi everyone!

I am using the VESC for quite some time and now, and it really is one great motor controller!

For my current project, I need to control the VESC as fast as somehow possible, because I need to control a basically unstable mechanic system. Think of something similar to a hoverboard.
I am controlling the VESC via UART from a STM32F3 with 115200 Baud.

I am wondering, what the maximum rate of updates ist, that I can send to the VESC? Is it possible to get up to 400Hz? What is the maximum Baudrate, the VESC can handle, provided the signals are "clean"?

All the best and thanks for your Input,
Jackl

Nate711
Posts: 4
Joined: 08 Jan 2017, 03:22
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: Maximum refresh rate of torque commands via uart?

Postby Nate711 » 12 Mar 2017, 23:31

To give you ballpark numbers, I vaguely remember reading that the current control is updated at half the switching frequency, so 10kHz by default. In practice the refresh rate will be limited by your communication method. I'm doing bi-directional communication for off-board PID position control over CAN at 500kbit/s sending current commands to the VESC and receiving position updates at 1000Hz intervals. I'd recommend you switch over to using CAN for your balancing robot application because it will be easier to extend to multiple motors.

pf26
Posts: 310
Joined: 28 Mar 2016, 14:37
Location: FR Valence
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: Maximum refresh rate of torque commands via uart?

Postby pf26 » 13 Mar 2017, 09:14

You could also code the control in a VESC customs app, and just send the sensor measurements via UART or CAN (better), or even communicate with your sensor directly from the VESC if the pinout allows.
From my experience, the UART protocol has it hard to recover from errors at fast throughput because the end frame symbol can also be seen as a long frame start symbol, which makes it difficult to resynchronize the UART reception.


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Return to “General”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests