op amp comparator values.

Thread Starter

toffee_pie

Joined Oct 31, 2009
235
hi guys,

can someone tell me if i have the right resistor values here to light up the leds according to the supply voltage, ie 1 led = < 3.5volts, 2 leds 3.5-4.2v, 3 leds = 5volts.

thanks.!

 

GopherT

Joined Nov 23, 2012
8,009
Most everything looks ok. The LEDs will only see 0.6 mAmp (assuming red LED) so they will not be very bright (barely a glow if they are older LED technology). Most comparitors can handle a bit more current (~5 mA). I would push 2 mAmps though them so a resistor in the range of 1500 ohms will work. Check the datasheet for your comparitor to find output drive (mAmps). Most LEDs can handle 20 mAmps (check that datasheet too - if you have one).
 

MrChips

Joined Oct 2, 2009
30,823
5kΩ series resistors are too high in value. Try between 470Ω - 1kΩ.
Your 2.5V Zener diode is pointing the wrong way.
 

GopherT

Joined Nov 23, 2012
8,009
That 1 amp value is what is available for the total load the power supply can serve.

Use ohms law for each path connecting your supply to ground. Use 5 volts, subtract 2 volts for the LED, you get three volts to drop with a resistor. If the target is 10 mA, then 3 volts divided by 0.010 amps yields 300 ohms (330 ohms is a nice standard value to use).

Treat the 1 amp like a reservoir that is available, not like a flow.
 

Ron H

Joined Apr 14, 2005
7,063
It doesn't look OK to me. Remember that, when the LED switches, the voltages on your dividers will equal the reference voltage. See the attachment. Remember that LEDs 2 and 3 are on when the comparator output is low.
Your zener is upside down, and unless you are actually using a reference IC (not a zener), it will not be stable as Vcc changes. Low voltage zeners are poor references.
BTW, use a comparator IC, like an LM393, and not an op amp, unless it has rail-to-rail output swing.
As the others said, you need to lower your LED current limiting resistor values.
 

Attachments

Top