bldc icon indicating copy to clipboard operation
bldc copied to clipboard

[Question] Using two encoder on VESC, one for motor control, one for passthrough

Open supercrazysam opened this issue 4 years ago • 4 comments

So the equipment I have here is vesc hw410 hardware, flipsky v4 VESC.

I wonder if it is possible to use the hall sensor on hall sensor/encoder port, while having another ABI encoder to only read angle and pass the data to CAN bus, at the UART/ADC 7-pin port?

The idea is to eliminate another addition MCU just for reading the ABI encoder and passing the data. I want to do it inside VESC.

I have seen someone did something similar in https://github.com/dongilc/bldc-mjvesc_v01_3.40. I tried modifying the fw to their style and it didn't work.

Anyone have any idea on how to do this? Please point me to where and how to modify the fw to achieve this.

Thank you in advance.

supercrazysam avatar Oct 26 '21 17:10 supercrazysam

Another direction is to use hall sensor at hall sensor/encoder port, and AS5047D at UART/ADC 7-pin port using hardware SPI.

In this case if I use hall sensor for motor control, even if I modified the firmware to init and read AS5047D to just pass the angle data to can bus, will it work?

supercrazysam avatar Oct 26 '21 20:10 supercrazysam

I have a similar usecase with an encoder for motor commutation and a seperate encoder for position controller. so +1 for Dual encoder support :P

Shackmeister avatar Nov 01 '21 22:11 Shackmeister

The encoder driver needs some refactoring to make that clean, I will hopefully get started on that for the next release. I also had some applications where it would be useful to have two encoders.

vedderb avatar Nov 06 '21 15:11 vedderb

Hi Benjamin, did you ever got to implementing the dual encoder functionality?

wlamers avatar Aug 25 '23 08:08 wlamers