I'm working on a project where I have a 12 V voltage supply. I need reference voltages of 4.5 V and 3 V which will be each be used as the Vref for a comparator. I am aware that I shouldn't use a divider to split these voltages. I wanted to use voltage regulators to do so, but I am not sure exactly how to get 2 reference voltages using regulators. I am very much a beginner, so simple explanations/guidance would be appreciated greatly!


First attempt at regulation, resistors not selected correctly

enter image description here

  • \$\begingroup\$ 4.5v and 3v aren't that common, so use an adjustable regulator like the lm317, and dial it to exactly the output voltage you want. \$\endgroup\$
    – dandavis
    Jan 27, 2021 at 3:49
  • \$\begingroup\$ Yes, I plan to use adjustable regulators, but if I need 2 reference voltages, do I need to use 2 regulators? Would these be connected in parallel to the voltage source? \$\endgroup\$
    – acwlgi
    Jan 27, 2021 at 3:52
  • \$\begingroup\$ you could switch a single 317 between 2 voltages by shorting a feedback resistor, but that's going to lower precision. 12 goes into both, gnd goes into both, 4.5v comes out one, 3v out the other. You might want to buy a module that has all the terminals, capacitors and a trim potentiometer in one stable, heatsinked, and easy-to-use piece, they can be had for 1usd... \$\endgroup\$
    – dandavis
    Jan 27, 2021 at 3:55
  • \$\begingroup\$ Hmm, now that i think about it, you actually could use a voltage divider since your comparator draws no current from the inputs. Only downside is that 12v fluctuations will scale down, whereas an LM317 will keep it very stable. \$\endgroup\$
    – dandavis
    Jan 27, 2021 at 3:59
  • 1
    \$\begingroup\$ LM317 is OK, but it is not designed to be a reference. You may also like to consider this:TL431 / TL432 Precision Programmable Reference - TL431 ti.com/lit/ds/symlink/…. I have been using it for a couple of my ADC related projects and need more precise analog voltage references. So far so good. \$\endgroup\$
    – tlfong01
    Jan 27, 2021 at 4:09

1 Answer 1


Okay, 0.1V out of 4.5V is +/-2% or so. So a regulator with a 5% tolerance won't be good enough unless you trim it.

Here is one way (Circuitlab is declining to work, so screen cap will have to do)

enter image description here

R1 can be 5%, the others should be at least 1%. The precision resistor values are from the E96 series, so they can be easily purchased.

U1 is drawn as a zener diode, but it actually is a precision trimmed shunt reference IC.

You could replace R1/U1 with a series 5V regulator or reference provided the performance was good enough when you calculate the error budget.


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.