You are here

Add support for AS5x47U encoder

2 posts / 0 new
Last post
ZachOB
Offline
Last seen: 2 months 3 days ago
VESC Free
Joined: 2022-01-27 17:19
Posts: 2
Add support for AS5x47U encoder

I've been working to add support for AMS's AS5147U magnetic encoder.

It is similar to the already supported AS504x, but has internal redundancies and diagnostics allowing it to meet ISO26262 ASIL-D safety requirements. This includes an 8 bit crc on each message for integrity verification and internal diagnostics to hall sensor failures.

As implemented now, it connects to the COM port and uses hardware SPI because bi-directional communication is a requirement for diagnostic feedback. Other than that it works almost exactly the same as the AS504x just with additional data integrity verification and failure detection.

Is this something anyone is interested in? 

 

I should note that I haven't been able to get the VESC tool to build, so as of now I'm not able to add the new sensor to the configurations. I have also added an additional fault to indicate sensor failure which would need to be added to the VESC tool. I was also unsure if / how it should be added to conf_general_autodetect_apply_sensors_foc(). I assume it's fine to leave as is since the AS504x is the only supported sensor, but let me know if it should be added.

ZachOB
Offline
Last seen: 2 months 3 days ago
VESC Free
Joined: 2022-01-27 17:19
Posts: 2

A quick update on this: I've gotten SPI working using DMA, which has freed up a decent bit of CPU time.

I've also gotten the VESC tool building and added the AS5x47U encoder to it.

I've been testing using a 14 pole-pair outrunner motor and have gotten very good low-speed performance, and have made sure the SPI and DMA is able to recover from all error conditions I can throw at it.

As for my question about conf_general_autodetect_apply_sensors_foc(), I feel like not adding this sensor is probably the best decision (because it uses a different port, requires the serial app to be disabled, and is likely only being used by me and maybe Axiom), but let me know if that's incorrect.