The best RC is infinite, then you have a perfectly ripple-less DC output. Problem is that it also takes forever to respond to changes in the duty cycle. So it's always a tradeoff.
A first-order RC filter has a cutoff frequency of
\$ f_c = \dfrac{1}{2 \pi RC} \$
and a roll-off of 6 dB/octave = 20 dB/decade. The graph shows the frequency characteristic for a 0.1 Hz (blue), a 1 Hz (purple) and a 10 Hz (the other color) cutoff frequency.
So we can see that for the 0.1 Hz filter the 10 kHz fundamental of the PWM signal is suppressed by 100 dB, that's not bad; this will give very low ripple. But!
This graph shows the step response for the three cutoff frequencies. A change in duty cycle is a step in the DC level, and some shifts in the harmonics of the 10 kHz signal. The curve with the best 10 kHz suppression is the slowest to respond, the x-axis is seconds.
This graph shows the response of a 30 µs RC time (cutoff frequency 5 kHz) for a 50 % duty cycle 10 kHz signal. There's an enormous ripple, but it responds to the change from 0 % duty cycle in 2 periods, or 200 µs.
This one is a 300 µs RC time (cutoff frequency 500 Hz). Still some ripple, but going from 0 % to 50 % duty cycle takes about 10 periods, or 1 ms.
Further increasing RC to milliseconds will decrease ripple further and increase reaction time. It all depends on how much ripple you can afford and how fast you want the filter to react to duty cycle changes.
This web page calculates that for R = 16 kΩ and C = 1 µF we have a cutoff frequency of 10 Hz, a settling time to 90 % of 37 ms for a peak-to-peak ripple of 8 mV at 5 V maximum.
edit
You can improve your filter by going to higher orders:
The blue curve was or simple RC filter with a 20 dB/decade roll-off. A second order filter (purple) has a 40 dB/decade roll-off, so for the same cutoff frequency will have 120 dB suppression at 10 kHz instead of 60 dB. These graphs are pretty ideal and can be best attained with active filters, like a Sallen-Key.
Equations
Peak-to-peak ripple voltage for a first order RC filter as a function of PWM frequency and RC time constant:
\$ V_{ripple} = \dfrac{ e^{\dfrac{-d}{f_{PWM} RC}}
\cdot (e^{\dfrac{1}{f_{PWM} RC}} - e^{\dfrac{d}{f_{PWM} RC}}) \cdot (1 - e^{\dfrac{d}{f_{PWM} RC}}) }{1 - e^{\dfrac{1}{f_{PWM} RC}}} \cdot V_+\$
E&OE. "d" is the duty cycle, 0..1. Ripple is the largest for d = 0.5.
Step response to 99 % of end value is 5 x RC.
Cutoff frequency for the Sallen-Key filter:
\$ f_c = \dfrac{1}{2 \pi \sqrt{R1 \text{ } R2 \text{ } C1 \text{ } C2}} \$
For a Butterworth filter (maximum flat): R1 =R2, C1 = C2
Yes, this is very different. PWM drive and voltage drive separately don't really mean that much, but when combined in this way you will get significantly different performance.
Electrically, you can model a motor as an inductor (windings), resistor and a voltage source (the EMF, proportional to the motor speed). When you apply a lower voltage compared to a higher voltage, you will:
- get a slower \$dI/dt\$ through the motor windings, reducing torque
- have a lower maximum speed because of back EMF
With PWM and a higher voltage, you will be able to achieve higher peak speeds and often much higher torque at equal speeds.
There is no real reason that a motor will damage when applying higher voltages. Motor damage is caused by:
- Bearing overload (e.g. pushing sideways on the shaft of a thrust bearing axle)
- Bearing overspeed (depends mostly on the oil used)
- Brush arcing (caused by high speeds and to a much, much lesser extent also higher current)
- deformation and delamination of internal structures due to overheating
Also, overheating or running a motor at very high currents will cause a (significant) reduction in torque because of magnetic saturation.
If you can guarantee that you keep your motor within speed, torque and force limits as well as properly cool it, there is no downside to running it at higher voltages with PWM.
Best Answer
Your circuit will look something like this:
simulate this circuit – Schematic created using CircuitLab
Help understanding how to use a SG3525
And the PWM frequency will depend on \$C_2\$ and \$R_6\$ values.
\$Q_1\$ together with \$R_6 , D_2 , D_3\$ forms a constant current source.
And this current will be around \$I_S = \frac{0.66V}{R_6} = 140\mu\textrm{A} \$
And this current will charge the \$C_2\$ capacitor. And if the voltage across the capacitor reaches the NE555 threshold value (2/3 Vsup). The 555 will quickly discharge the capacitor to 1/3Vsup.
So, the equation for PWM frequency will look like this
\$\Large F \approx \frac{3 \cdot I_S}{C_2 \cdot V_+} \$
So for 5V supply, as you have in your circuit the equation becomes
\$\Large F \approx 0.6 \cdot\frac{I_S}{C_2} \$
In theory, this voltage divider at the input should do the job: