walls99 wrote:casainho wrote:Could you please explain your BEMF circuit, logic behind it? How do you use the output of this circuit in the firmware?
The BEMF circuit is a standard voltage divider + low pass filter + virtual neutral comparator for Zero Crossing detection feeding the Input Capture module of the PIC. There is a lot of literature available about the Zero Crossing principles. I suggest you read this 2000+ post thread DIY BLDC controller.
The low pass filter is designed to limit the phase lag to below 30º for the maximum RPM, so it can be compensated for by adjusting the phase advance in software. I also make use of the PIC digital noise filters to reduce the interference from the PWM signal.
See attached, the BEMF filter LTspice:
Thank you for this information. I did read something about using the PWM OFF time to read directly the Zero Crossing.
Right now I am experimenting to learn and be able to detect the rotor position, using the current sensing as you described. Later I need to implement the startup strategy.
I found that one parts of mosfet drivers are not working as expected (much slow turn on) and I need to find why. A big change is that my ARM works at 3.3V and the original controller worked at 5V, so, the drivers may need 5V logic.
Hmm, I don't know about spice simulation... is there any OpenSource software for it? (I am limiting myself to OpenSource software).