Electronic – PWM signal to “real” analog signal with low load dependency

bucklow-powervoltage-regulator

I am designing a circuit that allows me to regulate an Arduino PWM output to a stable voltage reference (PWM to 0-5V ideally) dependent on the duty cycle. So far my approach has been to attach a low pass filter which works ok. However the output voltage, of course, varies depending on load. I've been considering buck converters but I havent found a buck-IC where I can control the output voltage with a PWM signal. Should I design my own buck converter? Or do you know a good component for this purpose?

Summary:

  • Input signal: PWM (0-5V) with different duty cycles
  • Desired output: Analog voltage between 0-5V that I can regulate with duty cycle. As independent on load as possible.
  • PWM frequency ≈500Hz
  • The required output current is 0-10mA.

Best Answer

Consider the below circuit:

schematic

simulate this circuit – Schematic created using CircuitLab

The optional buffer is a single-gate digital buffer such as SN74LVC1G17 which cleans up the PWM signal from the MCU and is powered by a clean ground (connected to the Arduino ground) and to the reference 5.0V. Add a 1K series resistor on the input if it is possible for the Arduino to be powered without the reference being powered.

The low pass filter is designed to achieve your goal of output ripple performance and response time (outside the scope of this answer and your question).

The output amplifier uses the LM7321 a special high-output current capable rail-to-rail input and output op-amp that is stable with capacitive loads. It can thus be powered and will function properly with the single 5V supply. Similarly, adding a 1K series resistor to the non-inverting input can help avoid issues, for example if the output supply was accidentally shorted with a test probe.