PWM frequency

Post here to get support
Post Reply
Slaxx
Member
Posts: 86
Joined: Tue Mar 03, 2015 11:19 am
Location: Switzerland

PWM frequency

Post 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
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: PWM frequency

Post 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.
Slaxx
Member
Posts: 86
Joined: Tue Mar 03, 2015 11:19 am
Location: Switzerland

Re: PWM frequency

Post 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?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: PWM frequency

Post 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.
Slaxx
Member
Posts: 86
Joined: Tue Mar 03, 2015 11:19 am
Location: Switzerland

Re: PWM frequency

Post 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
Post Reply