Electronic – Beginner Question: Get 2 Reference Voltages for Comparator using Voltage Regulators

comparatorvoltage-referencevoltage-regulator

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!

Edit:

First attempt at regulation, resistors not selected correctly

enter image description here

Best Answer

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.