You are here

Multi-turn position control with ABI encoder

2 posts / 0 new
Last post
vpl
Offline
Last seen: 4 years 7 months ago
Joined: 2018-09-21 13:03
Posts: 5
Multi-turn position control with ABI encoder

I need continuous incremental position control for my robot. I'm using this fork of vesc-FW, where tlalexander, raess1, and greymfm have added support for position control with AS5047P absolute encoders.

I would like to do the same with incremental ABI encoders. I tried a simple approach to cumulate the HW_ENC_TIM->CNT into the cumulative_encoder_counts variable (see the patch here) but I didn't get satisfying results. When hand turning and at slow sensorless commutation, the position is tracked correctly and continuously over multiple rotations. But I have two problems:

1. The Vesc tool seems to saturate the count at around -21000 and +21000 (I don't recall the exact number). Is that a purely visual bug in the Vesc tool? Or is there some other place in the firmware that clips encoder values?

2. With my patch, position control doesn't work yet, because the encoder value loses counts at higher speeds. I'm guessing it must be some race condition when the FOC control needs a lot of motor position readouts and the index pulse increments the cumulative count?

Does anybody have experience with this topic? What do I need to change to successfully use the ABI encoder for multi-turn position control?

Gas_Sn4ke
Offline
Last seen: 5 years 1 week ago
Joined: 2018-10-23 05:17
Posts: 5

Hi

It looks that I'm in similar circumstances where I would like the VESC Tool to be able to do multi-turn position control or just detect when the motor has gone above 360 degrees. I, however, have not been able to get it to even do the former. 

I'm running VESC Tool on Windows 10 and have gotten your patch from GitHub loaded into the VESC Tool. However, in both sensorless and encoder detection modes, it behaves as per normal without acknowledging anything more than 360 degrees. Could this an OS issue or something else? I appreciate the help.

Shaik