Electrical – Electronically adjustable PWM with 555 timer


I would like to create a PWM generator with a 555 timer (like suggested here), but I would like to be able to adjust the duty cycle with a microcontroller. I would simply use PWM from the microcontroller, but I need a high frequency as I am driving motors and they produce a tone with the frequency of the PWM. This happens to be audible when using PWM from the microcontroller. (The frequency is only 490Hz)

Please note that this signal will not directly drive the motor, as it will be fed into a controller which drives the motor.

What would be the best way to accomplish this?

Best Answer

Linear's LTC6992 might be what you want.

enter image description here

Figure 1. The LTC6992 gives a PWM output at a set frequency up to 1 MHz for an analog input signal of 0 to 1 V.

You could then use your low frequency PWM and low-pass filter to generate an analog voltage, scale this down to 0 to 1 V and generate your high-frequency PWM with the LTC6992.

There will be a response time penalty with this approach and this can be calculated based on the RC time-constant of your filter.