I am aiming at precise speed control of this BLDC motor: it has an integrated controller, outputting digital Hall signal (period 20.8ms on oscilloscope, w/o load) and taking PWM as input for speed regulation.
As far as my knowledge goes, this is a task for PID: measure Hall pulses at input, adjust duty cycle of the PWM based on target period/frequency of the Hall output.
The speed should be controlled with <1% error (even less is better).
- Is this goal realistic with this particular motor?
- How should I measure pulse duration?
- Is
pulseIn
(with interrupts disabled) going to be sufficiently precise? Should I measure lows or highs? - Should I measure several pulses instead (and how)? Or should I accept imprecision in the pulse period and compensate (smooth) it using integral/derivative terms?
- Do I need more than 8-bit PWM resolution for this task? (I will use Nano at first, but might switch to Nano Every, which has 10-bit PWM).
Any other comments/suggestions are welcome.