You are here

Questions about encoder on FSesc 6

12 posts / 0 new
Last post
willyfan
Offline
Last seen: 1 month 19 hours ago
VESC Free
Joined: 2018-01-04 14:14
Posts: 7
Questions about encoder on FSesc 6

I want try use encoder on my FSESC, in order to improve low speed (I'm using it on a cablecam). But I have I have a lot of doubts, and I do not find many answers.

I will make a list of the questions, hoping that they can also serve others in the future.

1) I read everywhere about encoder AS5047p. Many people tried other encoder (like AS5048A or AS5047D) but they have some problem, like that the VESC don't read all bit and need to compile a firmware for fix it. Actually is not easy to find the AS5047p, expecially with board. I found some IC and I'm designing a board, but there is many others encoder with similar performance (Ak7452 to say one). Question is, What features must exactly have an encoder to work well with VESC? SPI? ABI? Why around the web all people speak about at AS5047p only?

2) Many people connected the encoder in SPI, some others people speak about ABI. Whats is better?

3) And, I'm using a FSesc 6 from flipsky. In order to use the encoder, need it modification to the input (remove filter -  I found this info only about old hardware)?

4) If I don't want modify the FSESC, canI use other input, using standard firmware? Or in some way?

5) Modification is needed only for SPI or for ABI, too?

Than you in advance for for help.

Danny Bokma
Offline
Last seen: 11 months 2 weeks ago
VESC Original
Joined: 2017-05-24 12:11
Posts: 53

Hi Willy,

They are normally on stock at mouser and digikey, but they run out of them I see. I think the AS5047D would work as well. Where are you located? I can maybe send you a board.

Last week and thus with the most recent version of the VESC and VESC Tool I got the AS5047 to work on a 4.12ESC, it works perfectly.

AS5047 should be connected trough SPI, is has a higher resolution and has no chance of accumulating drift when you stay around the same location (without a full rotation) for long.

To use the AS5047 you have to remove the input filters (on 4.12 at least, don't exactly know about the 6hw), there is no alternative port (you could go for a regular encoder but the AS5047 is smooth as butter and I doubt that a regular encoder could beat that). 

As far as I know the modification is only needed for SPI.

 

willyfan
Offline
Last seen: 1 month 19 hours ago
VESC Free
Joined: 2018-01-04 14:14
Posts: 7

Thank you for your answer.

I'm in Italy, but don't worry: I designed a board and I waiting for expedition from manufacturer. In some days I will have some encoder for test. i found the AS5047p, but at digikey have only some pieces and no board, only the chip   (I bought it a digikey anyway...).

I'll explain the reasons for my questions and I'll put the links, because on the web you read everything and you never know if the infos are reliable.

I asked about other encoder because searching on the web, I found that someone had problem  with AS5047D and AS5048A (in SPI mode). Problem is that they read only 180°, and error is one bit don't read. There is a suggest in order to modify the firmware using only 13 bits, but if I can use regular fw is better. http://vedder.se/forums/viewtopic.php?t=72

About SPI and ABI, In some forum somone tell me that SPi have some latency, more then ABI https://discourse.odriverobotics.com/t/magnet-encoders/337?u=madcowswe

Maybe because SPI is simulated and not hardware? There is also a modification to the fw for use another port for SPI ( I think the controller port) that is hardware serial port. Using this port don't need modification to the hardware but to the firmware. https://hackaday.io/project/72497/logs?sort=oldest&page=4 . 

About the input filter, I will ask to frsky because I'm not sure if also vesc 6 need the modification, i don't know where are the component to remove, I will investigate.

Thank you again

district9prawn
Offline
Last seen: 2 years 1 week ago
Joined: 2018-04-26 12:18
Posts: 123

If you have version 6 hardware, there should be no filters on the pcb. Filtering is done in software. 

The latest firmware should work fine with SPI providing 14 bit resolution without issues. Although I've personally only tried as5048a. I'm sure ABI or SPI will work fine provided your mechanical rpm is not crazy high. According to the data sheet both SPI and ABI benefit from some latency compensation. The pwm output apparently doesn't have latency compensation. SPI has a higher data rate so you will need to make sure signal quality is good. 

VirtB
Offline
Last seen: 4 years 4 months ago
Joined: 2018-08-27 21:44
Posts: 4

willyfan,

I am also using a flipsky V6 board and encoder AMT102 and also having difficulties. My application is also cable pull ( - a winch ) and I need smooth low speed performance, eventually a multi-turn position encoder.

flipky told me to remove the 2K2 pull-up resistors on the Hall inputs, which I did and that allowed me to detect the encoder. I can run with BLDC motor or with FOC but only with duty cycle control. As soon as I try a PID speed control it locks up. Perhaps you can help me. So far I have not attempted firmware changes.

Bruno

 

Bruno

willyfan
Offline
Last seen: 1 month 19 hours ago
VESC Free
Joined: 2018-01-04 14:14
Posts: 7

Thanks to all. good news are that I don't need to remove filters, I have a V6 hardware. i will try it.

Also a good news about issued fixed about bits. My RPM is not very hight because I'm using slow motors (190- 270 KV). I have, with my 6s battery a max ERPM at around 35.000. Also with 8s (max battery  I can use with this motors) maybe I will arrive to 50.000 ERPM, around 8000 RMP mechanical.

@ Bruno: tell my how I can help you. Where are you? In some days I will have some encoders AS5047D with board, dif you want it, but maybe the expedition can be expensive.

Enak
Offline
Last seen: 1 year 3 months ago
VESC Original
Joined: 2017-06-29 19:52
Posts: 20

I'm using the AS5047P-TS_EK_AB which works great in SPI.  Make sure you use twisted pair cable otherwise it does not work well.

On VESC 4 hardware you need to remove the filters but VESC 6 hardware requires no modification.

You can fit an 8 way JST XH connector to the dev board which makes connection easy.

IMG_20180106_153432.jpg

willyfan
Offline
Last seen: 1 month 19 hours ago
VESC Free
Joined: 2018-01-04 14:14
Posts: 7

Good news. Now I'm building the encoder on a custom made board, little and circular. I will try in some days. 

Henriwivani
Offline
Last seen: 6 years 2 months ago
Joined: 2018-08-30 09:09
Posts: 1

Hi!

I'm working with an AS5047D Board and was wondering why you had wired the MOSI pin to the 5V jumper? 

I have seen a couple examples including on the rover project (See picture) where this hasn't been done.

Are there any noted changes in performance/reliability between the 3.3V and 5V modes?

If anyone could clarify for me that'd be great. It's my first try doing anything like this so sorry if somethings gone over my head.

 

Henri

Regelink
Offline
Last seen: 3 years 4 months ago
Joined: 2018-03-08 17:08
Posts: 2

Hi Henri,

You probably figured it out already, but I had this question as well. The AS5047P board is powered from the VESC through the MOSI pin (either 3.3V or 5V). JP1 selects which pin on the header to connect to the chip's VDD. Enak has soldered it so it uses whatever voltage is supplied to the MOSI pin by VESC.

frank
Offline
Last seen: 1 day 19 min ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 847

This is the AS5047P to VESC motor controller manual: https://trampaboards.com/resources/manuals/207.pdf

Make sure to use 3.3V operation, as it creates less noise in the signal.

Vedderfanboy
Offline
Last seen: 1 year 11 months ago
Joined: 2023-01-13 14:11
Posts: 1

is it possible to share the FSESC reisitor location? I have a DUAL FSESC 4.2

I have a AS5047 encoder correctly wired up. The motor parameters are properly received with the FSESC. I get blinking RED LED with fault code ENCODER_SPI.

I have written FS and I hope this community can help faster.

Always buying Trampa boards, but need it urgently and they are out of stock for the dual ones.