How to calculate frequency for PWM design

pwm

I would like to create a PWM controller for an open loop galvo-mirror. The similar questions involve motors and I can not directly use that approach to galvo-mirror which only deflects, not rotates.

It should deflect at +-1023 discrete angles, where the |1023| value would represent the maximum deflection. A particular period would start from -1023, -1022 …0 … 1022, 1023, 1022… -1023. So, the angular rotation would look like a triangular wave.

If I understand correctly, for a particular deflection angle I must have pulses of particular length. Thus, for 1023 angles there should be 1023 pulse width variations.

Now, the time between two successive consecutive positions is 100us. How to calculate the number of pulses within the 100us period (PWM frequency, switching) necessary to maintain that particular deflection angle, so the mirror does not jitter?

If I use the suggestion f>R/L from this question, then the minimum switching frequency is 1400Hz. But that does not look right, since I must have at least 10kHz switching frequency. In the 10kHz case, there will be only 1 pulse to support a 100us period deflection. What am I missing here?

Best Answer

If you need between 1 and 1023 pulses in a ~100usec period, then your PWM clock needs to be 10.24MHz (10MHz should be fine).

The frequency would thus be fixed (9.766kHz) but the width (that's the 'W' in PWM) of the pulses would vary from 0 to 1023 x 100ns units wide in a 1024ns total mark + space width.