I am building a sensorless BLDC driver development board using an RP2040 chip and I plan on detecting the back-EMF using comparators. After reading quite a bit about the BLDC phases and methods to detect rotor position, I am still a bit confused about this method.
Using 3 comparators for each phase line, we can detect the position of the floating phase when it lines up with the winding, so we can then energize and properly commutate. It is recommended to define the virtual neutral point using a resistor network.
In a perfect world, can’t we detect the back-EMF by comparing the scaled-down floating voltage to 0 or ground? I assume there is noise and the voltage is probably never 0 even when out of phase, so that is not likely. However, here is a TI article that suggests to compare it to ground for zero crossing events.
My questions and confusions:
For the virtual neutral resistor network (R4, R5, R6), I am unsure what resistor values to use. I do not understand what the voltage of the neutral point is supposed to be or what we are comparing. The comparator is of course limited to 6 V, so it must be scaled down. I have read that the floating voltage or back-EMF is half the bus voltage. So if my battery is 52 V and at max. load, the floating phase can reach +/-26 V? Seems so high. So I just use a divider to scale that down I assume; I have 47 kΩ and 2.7 kΩ (R1/R2) which would be about 1.4 V at half the bus voltage under max. load. For sake of simplicity, if I sample the floating phase line and read a voltage of 1.4 V, then I can safely assume the winding and rotor are aligned and to energize the next step. But that would be slow on the MCU side, hence why we use comparators I suppose.
So if the floating phase line voltage > the neutral point voltage then the comparator will output HIGH. Turn off the PWM that drove the high-side MOSFET and immediately sample the output to detect the HIGH and then turn on the corresponding MOSFET. I assume we sample after PWM is off to avoid interference.
Also, the documentation for comparator recommends some hysteresis, is my resistor correct there? Just a light resistor from output to IN+.