I had a quick question after running some initial test.
It looks like the Navio2 PWM output is limited at 400Hz regardless of setting the ESC frequency above 400Hz.
As you can see below, I have captured the PWM (for a hexa) at several different frequencies and they seem to match pretty well from 50Hz up to 400Hz by adjusting the APM RC-SPEED setting
PWM Output 50Hz with RC-SPEED = 50Hz
PWM Output 250Hz with RC-SPEED = 250Hz
PWM Output 400Hz with RC-SPEED @400Hz
PWM Output 400Hz with RC-SPEED = 490Hz
As you can see from the above captures, the output of the PWM is limited at 400Hz output regardless of the RC-Freq output > 400Hz.
Is there a way to increase the limit? When will the PWM examples be released and will the ARM ST32F code be released into the public domain?
This is a known limitation at the moment, we are working on an updated firmware. PWM examples are in the navio2 repo. Code will be released eventually, but I do not have an exact date.
Actually after looking through the APM repo, I noticed that the INS (IMU sampling) as well as the rc-output are on 400Hz loops, so even a firmware update will not add any benefit unless the loops are also sped up.
I was wondering, do you have plans on updating the NAVIO2 firmware to support higher PWM frequencies? Is there an approximate timeline for this?
We have a plan to work our firmware but supporting frequencies higher than 400 Hz wasn’t on the list. Is there any demand?
I’m working on a small indoor rover and wish to drive four motors with drivers using NAVIO’s PWM.
I’m using 400Hz currently, but ideally I’d like to have supersonic frequencies (e.g. >20kHz). I’ve seen this thread, according to which it seems possible.
Hi. I’m working on a rover project and planning to modulate DC motors by Navio2’s PWM outputs.
To avoid the PWM noise, I’d like to use ultrasonic frequency (like > 20 kHz) as well.
I observe 400 Hz limit for PWM frequency even on the latest version (20170323) of Emlid Raspbian.
I suppose supporting higher PWM frequency is not very difficult task because Navio2 have a nice processor chip to do PWM.
Could you update the firmware in the near future?
Hi, Navio2 PWM is meant for controlling servos, not to drive motors. Please use a specialized DC motor driver.
Is this problem still actual?
Don’t know if they fixed this. I have moved on to another controller.
The 400 Hz update had nothing to do with driving servos, to suggest that is just crazy. The PWM out is to drive ESC and the > 400 Hz is so they can have a fast update to adjust the motors at a high cyclical rate
At the moment, we don’t have plans on supporting frequencies higher than 400 Hz on PWM outputs.
Is there any update on maximum PWM frequency? I’d like to control BrushedWithRelay motors but it seems like it is not possible with Navio2 as the minimum PWM frequency there is 1kHz (normal 20kHz)?
We haven’t changed the maximum PWM frequency since that.
Thank you Tatiana,
Could you make a note somewhere in documentation please that BrushedWIthRelay and BrushedBiPolar motor modes are not supported? I’ve spent quite some time trying to investigate this issue…
Also is the motor driver firmware available as Open Source? Maybe I could fix this issue myself and submit a patch?
The STM controller uses the RCIO code for generating PWM impulses. RCIO code is not open-source so there’s no possibility to edit it.
Navio2 output mostly used to directly maintain servos or ESC. Is there any specific reason that you don’t want to use ESC controller for your motors?
Well, I just purchased a motor controller after reading the https://ardupilot.org/rover/docs/common-brushed-motors.html?highlight=brushed
Assumed it is a standard feature of ArduPilot, 400Hz limitation for a hardware PWM came a bit unexpected, had even to purchase an oscilloscope to understand what’s going on
Glad that you’ve sorted it out.
If you experience any other difficulties let us know.
Well, it wasn’t really sorted - I just had to spend significant time debugging the issue because of poor documentation and invest in new hardware again because the standard ArduPilot functionality is not supported.
And given that the problem was raised a few years ago - I don’t have much faith in Navio2 now.
I would also appreciate if Navio2 had a proper support for the “Brushed With Relay” motor driver type https://ardupilot.org/rover/docs/common-brushed-motors.html.
Duty cycle controlled H bridge motor drivers are reasonably priced and they suit well for running electric outboard motors which can be used for powering large scale autonomous boats.