# op amp comparator values.

Discussion in 'General Electronics Chat' started by toffee_pie, Mar 26, 2013.

1. ### toffee_pie Thread Starter Active Member

Oct 31, 2009
162
7
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.!

2. ### GopherT AAC Fanatic!

Nov 23, 2012
6,309
4,030
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).

3. ### MrChips Moderator

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

4. ### toffee_pie Thread Starter Active Member

Oct 31, 2009
162
7
thanks guys,

i will have up to 1A flowing on the 5v rail, so used 5k values?

5. ### GopherT AAC Fanatic!

Nov 23, 2012
6,309
4,030
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.

6. ### Ron H AAC Fanatic!

Apr 14, 2005
7,050
657
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.

File size:
31 KB
Views:
19
7. ### toffee_pie Thread Starter Active Member

Oct 31, 2009
162
7
i know about the zener, its corrected the op amp is a LM393 i got. still testing to room for corrections.

8. ### Ron H AAC Fanatic!

Apr 14, 2005
7,050
657
Just a nitpick - LM393 is a comparator. It is NOT an op amp.