I am working on a project where I would like to set the max rpm and max current. I was testing using the SolidGeek VescUART library. I was commanding setCurrent and then SetRPM in the main loop. it seems that when using setRPM the motor vesc defaults to its motor current max and overrides the setCurrent command.
Do you guys have any thoughts on how to make this happen?
I'm interested too! More for setting ramp up and down for ppm input, but will result in alike commands.
Did you find anything yet?
At the moment you send setCurrent, i asume VESC will try to make the motor accelerate until the Current (Amps) match to the value, that you sended to it. It will stop after the set timeout or when receiving another command. So setCurrent does not mean setMaxCurrent.
Are you talking about modifying the Max Current in the configuration? If so, you would need to read the mc_conf completely, change the max current setting and write it back to VESC.
NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)
I don't want to change the configuration. I would just like to be able to have the max torques(current) set and then set the speed at which I want the motor to go to. if the load is too high the motor may not hit it RPM set point due to the user max torque(current).
Currently you can do current control or speed control but not a hybrid both.
-Matt
Still haven't figured out how to make this work the way I want.
I would like to be able to use setRPM to control the motor speed but also be able to limit the motor current. its basically a power limiter.
I have tried to do speed control by using a PID loop using setCurrent and then UART.data.rpm and my PID input parameter.
Is there a way I could send a setRPM and setMaxCurrent command? I am open to suggestions too.
-Matt
You can find the source code for the VESC on github and make changes to the RPM from there. Build the code and flash your vesc. Hopefully that works for you. I have tried editing the battery level and made that work
Dave