Hi,
the title almost describes it all.
I have 8 pole BLDC motors with an external 8_magnets rotor and 3 digi halls. Easiest hack would be to replace them with linear halls.
I could also rip the rotor off and replace it with a mag sensor like AS5048, but then the cover wouldn’t fit anymore.
Third option came up, while writing this: make a new hall pcb with 90° or any other angle you’d think will fit a 4PP motor.
2 Answers
2
lol, you keep finding everything I’ve written code for but haven’t tested yet. Here you go: Arduino-FOC-drivers/src/encoders/linearhall at dev · dekutree64/Arduino-FOC-drivers · GitHub
It only uses two of them, but applies a correction factor for 120° spacing. I also added a correction factor for difference in amplitude of each sensor’s sine wave for improved accuracy.
Before you desolder the digitals, try holding a linear about the same distance from the magnets and make sure the value doesn’t saturate. If it does, you could probably make it work by soldering them not quite flush with the board so you can bend them away a little bit, which will reduce the sensed field strength due to angle and distance.
How do I set 120° angle?
class LinearHall: public Sensor{
public:
// Note: With sensor_spacing_120 you may need to swap hallA and hallB (one way is effectively -240 degrees apart and won't work).
LinearHall(int hallA, int hallB, int pp, bool sensor_spacing_120 = false);
Do I have to modify LinearHall.h to true or can I set sensor.sensor_spacing_120 = true before I init the sensor?
That's an argument to the constructor which defaults to false. You can either pass in true when creating it or set it before calling init, whichever you prefer.
– dekutree64