Build a Variable Output Voltage Power Supply Circuit by Manipulating the Feedback to a Buck Regulator

MagicDAQ
4 min readJun 24, 2021

Create a variable output voltage (1V to 10V) power supply circuit that can deliver several amps at a voltage specified by PWM or Analog Voltage Input.

Purpose

Let’s say you are building test circuitry and want to simulate a battery voltage anywhere from 1V to 10V. You need to deliver a few amps.

One approach is to manipulate the feedback voltage provided to a buck circuit (U3, AP650) to variably set its output voltage.

Feedback Voltage Resistor Network

Check out resistors R6, R7, and R8 — combined they form a network that is connected to the feedback pin on the buck regulator (pin 5, FB).

Using our control system (a microcontroller or USB DAQ) we can provide a variable voltage (Vout_set) that will control the output voltage of the buck regulator (Vout).

If our microcontroller or USB DAQ has a Digital to Analog converter, we just set the output voltage in code.

If our microcontroller only has PWM output, we can introduce a basic RC circuit to crudely convert the PWM waveform to a variable output voltage.

  • Note that the regulator Vout voltage will be less accurate due to ripple on the Vout_set input
RC Circuit

Choosing Feedback Resistor Values

Typically, the voltage at the feedback pin (FB, pin 5) remains the same. For example, on our buck regulator (U3, AP650) the feedback voltage remains 0.925V. The buck regulator keeps the feedback voltage the same by varying the regulator output voltage (Vout).

Check the data sheet for your regulator to see what it’s feedback voltage is.

If it is not specified, but examples suggesting specific feedback resistors to create specific output voltages are provided, you can calculate the feedback voltage using a simple voltage divider equation.

Now you can use this handy website to calculate the feedback resistor values given:

  • Your intended input voltage range (Vout_set).
  • Your intended buck regulator output voltage range (Vout)
  • The buck regulator’s feedback voltage (for example: 0.925V)
Resistor Values Calculated by the Handy Website

Equation Describing Relationship Between Vout_set and Vout

There will be a linear relationship between the Vout_set voltage and the voltage produced by the regulator (Vout)

For example, for the above schematic the transfer function is:

Vout = (-1.8* Vout_set) +10

You can estimate the transfer function by plotting your Vout_set range and Vout range, and finding the best fit line.

Voltage Output Accuracy

Overall, the accuracy of the buck regulator is quite good. Here are further details provided by the M&A Board data sheet:

The Vout voltage is stable under constant current draw, typically fluctuating within +/- 0.02V.

The Vout equation typically predicts the actual output voltage within +/- 0.3V. The Vout_set to Vout relationship is linear, and a transfer function specific to the individual M&A board may be derived simply by recording several Vout and Vout_set measurements and finding the best fit line. Typically, a transfer function specific to the M&A board can predict output voltage within +/- 0.1V.

If an even greater degree of output voltage accuracy is needed, consider connecting a voltage measurement input from the DAQ to Vout. A closed loop control function can then be implemented in software to set Vout_set.

Supply Voltage to Buck Regulator

The Buck regulator can only regulate down meaning it is only capable of producing voltages that are ≤ to the voltage supplied to it. In our example, we are supplying 12V so the regulator can produce voltages 10V and less.

Review your buck regulator data sheet to see how close to the supplied voltage your regulator is able to produce. For example, if you supply 5V to your regulator, it is possible your regulator will only be able to produce 4.5V and less.

Need Some Help?

We’re always happy to share our knowledge — feel free to email us at:

  • support@magicdaq.com

Working Model

Want to play with a working model? You can find this circuit on the M&A Board at MagicDAQ.com

--

--