1
\$\begingroup\$

How to find value for both R1 and R2 for Vout=1.23 volts, where Pot=5K, Vin=4.5 - 12 volts?

schematic

simulate this circuit – Schematic created using CircuitLab

In reality, I want to adjust lm2596 buck converter output to 4.5 volts to 12 volts with any potentiometer, by adjusting R1 and R2 value.

For long time, I was using the trial and error method with a calculator to solve that problem :). Hope that someone have easier method to solve it.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ if you have a potentiometer, why do you need R1 and R2? Note - in reality you just can't have 'any' potentiometer. The LM2596 needs less than a specified impedance in order to work correctly. \$\endgroup\$
    – Kartman
    Commented Mar 27, 2022 at 12:48
  • 2
    \$\begingroup\$ Without R1 and R2, output voltage will Vref at minimum to Vin at maximum. R1 and R2 to limit adjustment between range 4.5 volts to 12 volts. \$\endgroup\$
    – Hida
    Commented Mar 27, 2022 at 14:41

2 Answers 2

3
\$\begingroup\$

You can use the straightforward method described in the other answer.

Another approach is to observe that the total resistance of the divider is constant (ignoring the regulator bias current) and therefore the current will be proportional to the regulator output voltage, so we can say that:

\$ \frac{V_{REF}}{R_2} = \frac{12}{4.5}\cdot\frac{V_{REF}}{R_2 + R_{POT}}\$

so

\$R_2= \frac{5\text k \Omega}{(12V/4.5V) -1} \$

whereupon you can easily solve for R1

If this is a real project, I would suggest using an additional parallel resistor to deal with the (usually crummy) pot element tolerance and taking resistor and Vref tolerances into account, as well as selecting standard E96 (1%) or whatever values.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I like this. One might argue that this is just one way to solve the simultaneous equations. (Solve both for (R1+Rpot+R2). What's on the other side of the equal signs must be equal ...) Good observation. \$\endgroup\$
    – Supa Nova
    Commented Mar 27, 2022 at 18:48
  • \$\begingroup\$ @SupaNova Manually, I prefer to re-arrange things to avoid simultaneous equations wherever possible, mostly because I just find it error prone and tedious to do the algebra by hand. Of course with a computer, doing symbolic or numerical calculations, a systematic approach is usually better. It's also possible to just write the equations for the two voltages with a cost function (sum of squares of the two errors, for example) and then let a 'smart' solver do the brain work by varying the two resistor values. \$\endgroup\$ Commented Mar 27, 2022 at 22:58
4
\$\begingroup\$

You have two unknowns so you need two equations.

With 12V the wiper of the pot will be at the bottom. That means the voltage divider will be R1 + Rpot above the output and R2 below.

schematic

simulate this circuit – Schematic created using CircuitLab

With 4.5V the wiper will be at the top of the pot.

schematic

simulate this circuit

No trial and error is required. With the pot at one extreme you'll get 12V as shown in the top schematic. If you understand how to work with voltage dividers, then you can write down an equation for that condition: $$1.23{\rm\,V} = 12{\rm\,V} \frac{R_2}{R_1+R_{pot}+R_2}$$

With the pot at the other extreme you'll get 4.5V as shown in the bottom schematic. The corresponding equation is: $$1.23{\rm\,V} = 4.5{\rm\,V} \frac{R_2+R_{pot}}{R_1+R_{pot}+R_2}$$

You know the value of Rpot. (You wrote 5k in your question, but it could be anything.) That means you have two equations with two unknowns: R1 and R2.

Now you need to solve the simultaneous equations, which I'm not going to do for you and is beyond the scope of this question.

\$\endgroup\$
2
  • \$\begingroup\$ Here, there's some comments before. Where it gone? Something wrong? \$\endgroup\$
    – Hida
    Commented Mar 27, 2022 at 23:52
  • 1
    \$\begingroup\$ @Hida - The previous comments here were either deleted by their authors, or deleted after being flagged as "no longer needed" when the details had been edited-into the answer. After a comment has been replied to, e.g. by editing an answer (or question), it is common for site members to request the removal of the comment as it is then obsolete (because it has received a reply in that edit). If you still require clarification even after the update of the answer, please leave a new comment. Thanks. \$\endgroup\$
    – SamGibson
    Commented Mar 28, 2022 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.