I am also trying to use this small dji gimbal with simpleFOC. I arrived to the same state has you which is the dual linear hall sensor and the MP6536 to drive the motor.
Did you make any breakthrough lately ?
Hey. As I understand the hall sensor current code - it does not attempt to estimate the position more accurately than 60 degree electrical angle. This was previously discussed in this thread to make a more accurate.
Did you feel that the code became too complicated if you tried to use the time information and speed to infer an optimised estimate? Did you face some non-obvious problems?
I’m just following up to give a quick update.
I stumbled across a project page (Link below)
he was able to achieve exactly what I imagined being able to do with the cheap oem DJI Gimbal/Motors that are cheap & widely available.
**FYI from what I understand, the way these motors & hall sensors differ from the one you mentioned is that these are
(BI-POLAR LINEAR HALL SENSORS (Not Hall Switches) that implement a ratiometric calculation for angle.
I was actually pleasantly surprised when I realized @lurenaud is actually the same guy who replied to my original post on here a while back!
It appears @lurenaud & I are the only ones in the world who saw the potential of hacking/retrofitting these beautiful stock DJI Micro Gimbals haha!
It looks like you just need to write a new sensor class for linear hall sensors - it looks like you have all the math in the link you shared.
The current hall sensor implementation in simpleFOC is I believe created for bipolar hall sensors (ie the ones from hoverboard motors) - you won’t be able to just modify it since the operating principle is different (bipolar halls create pulses, while linear halls create sine wave signals).
On that topic I believe we have 2 pull requests waiting on GitHub for Linear Halls - one on the main repository, and one on the drivers repository:
You might want to give them a try…