# How to determine resistor values for adjustable voltage regulator with potentiometer for upper and lower limits?

I want to use a MT3608 and be able to adjust the output from 8V to 12V using a 20k potentiometer. The equation to determine the output voltage is:

Vout = Vref*(1+(R1/R2))

Where Vref = 0.6V

I could brute force it and select every combo of R1 and R2 + upper/lower limits of the pot but there must be a better way. The more critical output voltage is the 12V so the lower limit can be less than or equal to 8V.

Is there a fancy math way to know if these values would ever converge? Or a way to get really close?

Fancy math is not necessary. Regular math will do.

One potential problem with this arrangement that many DC supplies have as well...if the pot wiper lifts from the surface, or makes poor contact with the surface, output voltage tends toward the high end - in this case +12V.

simulate this circuit – Schematic created using CircuitLab

$$\{{R_2}\over{R_1}}={{7.4}\over{0.6}}\$$

$$\{{R_2+R_3}\over{R_1}}={{11.4}\over{0.6}}\$$

On the right is a version with trim pot. The critical resistor value is R4. Its error blows up by a factor ranging from about 12 to 19 times with respect to V_out.
A 100 ohm trimmer (about the smallest easily-obtained value available) only varies the 3K value of R4 by 3.3%...when V_out is 12V, the adjustment of R7 through its range will vary V_out from +11.6V to +12.02V.
But, 3K resistors are rare - nearest standard 1% value is 2.94k for R4. This value nicely brackets a +12V output, allowing a trim range of V_out from +11.85V to +12.25V.
Am not factoring in tolerance for R5, R6. If these are not accurate, increase trimpot to 200 ohms.

• Well, one more problem? 2% tolerance resistors would allow that to reach 12.5 V, approx. (I'm assuming that the pot is also 2%, which in my experience is overly optimistic.) Since the OP wants 12.0 V as the absolute max under all variations.... I fear that there will need to be a calibration step and an added calibration resistor in order for any circuit to guarantee no higher than 12 V. I don't think this can be done just 'out of the box.'
– jonk
Commented Oct 13, 2022 at 20:25
• @jonk yes, your concern for trimming is valid. R1 would be the place I'd add a trimmer to keep output under +12V. Commented Oct 13, 2022 at 20:40
• Yup. That's where my eye went, too! Perhaps you could say a little something about it? (Already did the +1, though. So I can't boost further if you do add anything.)
– jonk
Commented Oct 13, 2022 at 20:43

You know min/max range of one resistor (the 20K pot) and min/max range of voltages. Solve the equation for the other resistor and plug in the numbers. As a hint, one of the resistances need to be a fixed resistance X in addition to the variable resistance to achieve X+20K.

Then round the numbers up or down to closest existing resistance value you can buy, to achieve the voltages within the tolerances you require.

The only problem is, even if you used 1% or 0.1% resistors, the 20K potentiometer will not be accurate or precise, it surely will be 20K plus/minus a lot of tolerance. So if you really need to limit the 12V to some arbitrary precision regardless of the likely inaccurate 20K pot, you may want to add a trimpot for calibration or something else for precise limit.