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.
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.
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
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.
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
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.
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.
Good news. Now I'm building the encoder on a custom made board, little and circular. I will try in some days.
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
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.
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.
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.