I'm looking for a magnetic encoder solution that works from 0 speed and is robust to EMI for a combat robot. I think the PWM signal from an AS5047U will work for this. I'm interested in implementing the code for this and contributing it. I'm looking for some feedback on how to implement that.
Reasons I'm doing something new: With ABI you have to spin the motor open-loop after power-on or reset, which interacts poorly with drivetrains (jerkiness at the start) and flywheels (hard to make it move open loop). I'm also seeing a lot of noise (usually not enough to have trouble spinning up enough to switch to sensorless, but it's still concerning). This is with shielded sensor cables; unshielded ones don't work at all. I've seen enough reports of noise problems with SPI I'm ruling that out. My VESCs end up fairly far from the encoders for space reasons, and the EMI inside these robots is terrible.
TIM3 (the one used for ABI when that's enabled) supports measuring the on time and period of a PWM signal. I'm planning to use that on the A encoder input pin.
The PWM signal from this encoder is effectively a duty cycle, which is capped at under 100% (so you can always find the beginning), and has a lower bound for error detection. It has a nominal period of around 1.8 ms. How should the encoder code handle receiving a pulse length indicating an error, or not receiving any pulses for some timeout?
Any interest in adding parameters for nominal period, minimum duty cycle, and maximum duty cycle to make this configurable for other absolute PWM encoders? For example, the US Digital M3K could be used with different values for those numbers.
AS5047 is supported already.
I only see support for the AS5047 over SPI. Which sensor port mode are you thinking of for PWM support?
I saw https://github.com/vedderb/bldc/commit/c249d0affe7dcaacb8b7a43cd288a2b2f024449e#diff-1bc88b0bde7d6f755af2b914747a4e5ae8fb6e2bbd2bbf35e5f0fa28fe8d2b6d PWM encoder commit.
But zero information about connection and specially ABI + PWM encoder connection. This encoders installed by default into Taizhou Quanshun motors.
Please share some information about connection pins.
Look at a standart Trampa VESC 6 for example and you will know.
Link to forum post: VESC help offered for private persons and companies
Website: www.electricfox.de