Skip to main content
edited body
Source Link
Kevin Vermeer
  • 20.2k
  • 9
  • 58
  • 102

The RC Low-pass filter would be the natural solution, but you can also use a microcontroller to measure the duty cycle and use that value to control a DAC. To measure duty cycle you need a timer with input-capture capability. The higher your timer clock, the more accurate your measurement. If the microcontroller doesn't have on on-chip DAC you can use an extrenalexternal one.

The RC Low-pass filter would be the natural solution, but you can also use a microcontroller to measure the duty cycle and use that value to control a DAC. To measure duty cycle you need a timer with input-capture capability. The higher your timer clock, the more accurate your measurement. If the microcontroller doesn't have on on-chip DAC you can use an extrenal one.

The RC Low-pass filter would be the natural solution, but you can also use a microcontroller to measure the duty cycle and use that value to control a DAC. To measure duty cycle you need a timer with input-capture capability. The higher your timer clock, the more accurate your measurement. If the microcontroller doesn't have on on-chip DAC you can use an external one.

Source Link
stevenvh
  • 146.6k
  • 21
  • 460
  • 669

The RC Low-pass filter would be the natural solution, but you can also use a microcontroller to measure the duty cycle and use that value to control a DAC. To measure duty cycle you need a timer with input-capture capability. The higher your timer clock, the more accurate your measurement. If the microcontroller doesn't have on on-chip DAC you can use an extrenal one.