That image with the 49E sensors is wrong. The HallSensor class is for digital/latching halls like 41F or U1881 (which both require at least 5V power, but are open-drain so they never apply 5V to the CPU pin). I’ve had better results with U1881, but they need capacitors whereas 41F do not. But I’m using the CPU internal pullups, so I need to try 41F with external pullup resistors and see if that helps.
That said, I actually prefer 49E linear halls now. But SimpleFOC is not quite ready for them yet.
https://community.simplefoc.com/t/40-cent-magnetic-angle-sensing-technique/1959/21
https://github.com/simplefoc/Arduino-FOC-drivers/pull/12
It turns out analogRead is mega-slow on STM32, and properly configuring the ADC is not friendly to cross-platform libraries. You can probably get it going with some custom HAL code for whatever platform you’re running on, but to get it into the library will require an overhaul of the current sense ADC code.
As for sensor placement, for digital halls, 2/3 or 4/3 spacing is best. 1/3, 5/3, etc. work too, but you have to invert the polarity of one sensor, and the HallSensor class doesn’t have code for that so you have to modify it.
Linear halls need 1/2 magnet spacing (or 3/2, 5/2, etc.). i.e. when one sensor is centered on a magnet, the other should be half way between magnets. This produces a sine and cosine wave pair which can be converted to an angle with atan2. Totally different approach than digital halls.
Open loop mode isn’t good for much of anything besides testing, or situations where you need maximum smoothness of motion and don’t care about torque or energy efficiency.