[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 594: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 650: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1110: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1110: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1110: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
vedder.se forums • Setting a speed (RPM) using UART
Page 1 of 1

Setting a speed (RPM) using UART

Posted: 14 Jan 2018, 17:14
by andreas_667

Re: Setting a speed (RPM) using UART

Posted: 14 Jan 2018, 17:44
by ThierryGTLTS
14 poles = 7 PP "Pole Pair".

571rpm x 7 PP = 3997erpm.

So that's right !

Re: Setting a speed (RPM) using UART

Posted: 14 Jan 2018, 18:12
by andreas_667
Okay, I did not know that. Many thanks.

I hope it's okay if i I have any further questions in this direction:

1.) as you told me, its the electronic-RPM i have send to the VESC. But I want that the VESC hold a mechanical-RPM.
(the actual revolutions of the outer metal drum)
I know, without hallsensors or incremental encoder it's not possible to get this value but soon i will have a sensored motor.
Do I have to use a different command for this?

2.) Will the VESC use the brake automaticaly, if the motor runs too fast? (e.g. when going downhill)

Or short: I want a fully PID controlled speed (RPM) with brake if the motor gets externally accelerated.

Re: Setting a speed (RPM) using UART

Posted: 14 Jan 2018, 19:52
by Jackl
Hi!

1): You can totally get the mechanical RPM without hall sensors, as it is always directly proportional to the ERPM. ERPM can be estimated from BEMF Zero-crossings, and other methods.

Just multiply your desired mechanical RPM by the number of pole pairs of you motor (7 in your case) and you will get the ERPM to send to the VESC.

2): Assuming all other settings are correct (battery current limits, etc.) the VESC will also apply negative torque ("brake") in order to keep the set rpm.
This is, of course, limited by factors such as motor torque, max battery current, etc.

Remember that regenerative braking feeds back energy to your battery. Two things to consider:
- Set your max battery voltage to the max voltage of the battery
- Braking will not work if the battery is full (have not tested this yet, but I assume...)

Long story short: the integrated RPM Control is exactly what you need :)

Cheers!

Re: Setting a speed (RPM) using UART

Posted: 28 Jun 2018, 21:44
by anttok
Hi all,

I have a similar setup with a VESC connected to arduino over UART using this library
https://github.com/bastianraschke/ESP8266VESC.

The motor was configured using VESC tools wizard and works fine with very smooth rpm with arrow keys, as well as by hitting the play buttons next to current, duty, and position fields. However when i hit play next to RPM, I get same erratic, loud motor behavior and in the rpm real time readout the RPM oscillate +-500 around the entered set point.

I'm using a 75 kv hub motor from link below
http://www.diyeboard.com/dual-hub-motor ... p-617.html

UPDATE: I set max breaking voltage and and wattage to 0, this seems to solve the problem, though I'm guessing this eliminates any ability to use break! Not ideal...

Re: Setting a speed (RPM) using UART

Posted: 17 Jul 2018, 10:47
by rew
The PID values used to control the motor RPM need to change depending on a bunch of factors. So the ones by default in the VESC_TOOL are not that good. You need to tune the PID parameters for the RPM feedback.