Originally Posted by O2surplus
If I'm not mistaken, I believe the normal default setting for the PWM frequency coming from the Atmega chip is set at 5KHz. The Pwm frequency can be adjusted from there- using the programming software. It's just a matter of plugging in the appropriate numbers to the programming code.
I'm saying that I think the approach that most of the servo control guys take is simply to do something like:
Set N = 1.5ms (servos typically receive signals in the 1-2ms range @ ~60Hz)
Output a N ms pulse
Delay 18 ms
So, if you adapted it to your purposes, you could do something like:
Set DutyCycle = 0.2
Output a (DutyCycle * 7) ms pulse
Delay for [(1 - DutyCycle) * 7] ms
Obviously, you'd have to account for everything else you wanted the controller to be doing... but with low PWM's everything happens slowly enough that you can just manually program the pulse widths and delays.
I don't know much about Aurdino, so I'm not sure how tricky it will be to get all of the multitasking right... especially when you want to be able to vary all the way from 0 to 100% duty cycle. with servo control, you can count on having at least 18ms between pulses... with a fully variable duty cycle you have to adjust where you get your extra clock cycles depending upon the desired duty cycle.