Page 1 of 1

PWM frequency

Posted: Wed Apr 01, 2015 1:18 pm
by Slaxx
Hello
I'm trying to measure the trust that a single crazyflie motor can produce. The measurements that you provided seem to be a bit off (at least in my case). What is the PWM frequency that is used onboard?

Thx,
Slaxx

Re: PWM frequency

Posted: Wed Apr 01, 2015 4:52 pm
by tobias
The PWM frequency is ~328kHz.

Would be nice to know your results as well. The measurements I did was a sum of all the motors. The motor winding resistance has a tolerance of up to -+10% which can result in some difference.

Re: PWM frequency

Posted: Thu Apr 02, 2015 8:46 am
by Slaxx
328 kHz is too high for my test equipment. My motor controller allows only up to 50 kHz (http://www.ti.com/lit/ds/symlink/drv8850.pdf) and when I tested it yesterday, the additional equipment seems only to work up to around 10kHz. So I can only deliver test results for around 10kHz. Maybe by next week.

328 kHz seems insanely high. What I found in the internet so far, normally these Coreless DC Motors are used with PWM frequencies around 8-20 kHz. How did you come up with this number?

Re: PWM frequency

Posted: Tue Apr 07, 2015 11:31 am
by arnaud
Hi,

The reason for such an high PWM is to avoid having sound generated by the pwm. I can't remember exactly (Tobias is expert in that domain but he is currently away) but the story was that at 82KHz we could still hear the PWM (I guess non-linearity was generating sound under 20KHz), then we doubled it and that was the Crazyflie 1.0 settings.

For Crazyflie 2.0 we discovered that the PWM was causing instability to one of the regulator so we doubled it again to reach the 'insane' 182KHz.

My understanding is that one of the reason so much quad runs at ~8-20KHz is that they run on AVR processor that have pretty limited PWM max frequency. Also our transistor are quite fast so we could get away with higher PWM for the confort of having less noise comming from the copter. If you need to reduce the PWM the motor driver is design to take care of that: change the pwm settings in motors_f405.c, set MOTORS_PWM_BITS according to the new settings, and the rest of the firmware will continue to work.

Re: PWM frequency

Posted: Mon Apr 27, 2015 6:34 am
by Slaxx
Ok that sounds reasonable.

I plan to use PWM frequencies up to 50Khz since the Motor controller can not go higher. At the same time I plan to use the same LDOs. Which LDO was unstable? Did you for that reason implement the filter for VCCA?

Thanks,
Fabian