You are here

Trying to make motor-control work for predetermined motions, could use some help

2 posts / 0 new
Last post
Davideo
Offline
Last seen: 1 year 9 months ago
Joined: 2017-09-19 15:38
Posts: 21
Trying to make motor-control work for predetermined motions, could use some help

I'm building a project where I use an Arduino to control a single HAL-sensored outrunner motor through a VESC. The interface program I wrote sends a number of 'moves' to my device, which are then supposed to be executed one by one.

These 'moves' consist of a start-time, end-time, up-ramp-time, a down-ramp-time, a top speed in RPM, and a final tachometer position (the destination). Additionally, my program is aware of the minimum RPM I need to send to make the motor move. I also have access to current tachometer position and current RPM.

While the interface with the VESC is going well, as it dutifully runs at the RPM I tell it to run at. I'm having a lot of trouble writing a function that ends the movements at (or really close to) the destination tacho.

Is there a standard function I can find for this or does anyone have an idea about how to approach this?

s0313045
Offline
Last seen: 9 months 3 weeks ago
Joined: 2018-09-23 11:29
Posts: 15

I think you are looking for position mode with velocity control
I personally tested this https://github.com/raess1/vesc-FW version of position with velocity and it kinda works
but it still don't have the ramp up ramp down implementation