3-bar led meter in dot mode

Thread Starter

Salomonander

Joined Mar 31, 2022
40
Hey there,
maybe you guys could be so kind and solve another riddle for me. Im an engineering noob.
im using the attached circuit in order to trigger three leds in relation to an analog 0-10v signal. Its basically a three bar meter in dot mode with freely adjustable scale. By adjusting the trim pots before the opamps i can set the voltage point for each led. Works great. I do have a few questions though if you dont mind:

- my green led is always out of balance (too bright). could i adress this by simply increasing the trim pot feeding in to it?

- how could i implement a global dim pot (dimming all three leds simultaniously)?

- any chance this could be modded in a way that allows me to use a single tri-color led with common cathode and still work as intended?

cheers!
 

Attachments

Thread Starter

Salomonander

Joined Mar 31, 2022
40
♂ My drawing is wrong. All 10k „resistors“ feeding into the leds are trimpots.
Also, in case a tri-color works, i do have them in RGY. So ne need for any combination in order to get yellow.
 

ericgibbs

Joined Jan 29, 2010
18,051
Hi Salo,
If you are using a Tri Colour LED, why is necessary to have R, Y, G colours for the different voltage levels.>
By switching the R, G, B, ON in sequence, you can still get 3 unique colours from the One LED.

E
 

dl324

Joined Mar 30, 2015
15,840
Its basically a three bar meter in dot mode with freely adjustable scale.
A more appropriate way to do this is to have each opamp have a different voltage on it's inverting input and when the voltage on the non-inverting input is greater, that output would be as close to the supply voltage as it can get. You should be using LM339 comparators so the outputs can get closer to the supply voltage.
  1. What is the power supply voltage?
  2. What voltage do you want each LED to turn on at?
green led is always out of balance (too bright). could i adress this by simply increasing the trim pot feeding in to it?
Increase the resistance on the bottom opamp.
how could i implement a global dim pot (dimming all three leds simultaniously)?
There's no easy way with the circuit you've drawn.
any chance this could be modded in a way that allows me to use a single tri-color led with common cathode and still work as intended?
Probably. Is the LED RGB? Do you have the option of using a common anode LED?
 

Thread Starter

Salomonander

Joined Mar 31, 2022
40
Thanks. I really am not good at all of this…. so unless there is a real problem with the opamps, id just stick to it. It works as it should. Im not educated enough to move things around without clear instructions/schematic. Only issue i see, is that the first led starts only at 0.470mV. But that doesnt matter in my application. Supply voltage is either single 24v or +-15v. If you know another better working circuit please send me a link. But this does the job.

i do have rgy leds here with real yellow. both common anode and cathode version.

when you say increase resistance on the bottom opamp, do you mean increase the right trim pot (10k) feeding into the green led?
 
Last edited:

dl324

Joined Mar 30, 2015
15,840
I really am not good at all of this…. so unless there is a real problem with the opamps, id just stick to it.
LM339 have the same pinout as LM324 and only require the addition of resistors to the power supply. This is what lets them pull closer to the positive supply.
Only issue i see, is that the first led starts only at 0.470mV.
What voltage do you want each LED color to turn on at?
Supply voltage is either single 24v or +-15v.
A single 15V supply would be sufficient.
If you know another better working circuit please send me a link. But this does the job
The circuit you have can't work with a 3 color LED. I'm thinking it would require 3 window comparators. With each window comparator requiring two comparators.
 

Thread Starter

Salomonander

Joined Mar 31, 2022
40
Thanks Dennis,
cool, ill give these amps a try then.
im monitoring a co2 sensor. Its lowest voltage output is 1.75v - so the starting point is not a problem at all. And actually its 470mV not 0.470mV ‍♂
bummer with the tri-colored led. at least i know it now… guess ill try to fit three single ones (smd maybe).
 

Thread Starter

Salomonander

Joined Mar 31, 2022
40
Thanks Dennis,
what a kind offer. Ill only take you up on it, if it isnt too much work for you. Id need the following voltages:

green = 0v-3v
yellow = 3v-4v
red = 4v-5v

if there is an easy way to get the red led pulsing above 5v it would be awesome. Otherwise just plain red from 4v-10v.
if a global dim would work - please dont hesitate :)
leds are rgy with either common anode or cathode.
and the easiest supply is 24v single. but i could go anywhere with a small dc/dc converter.

only if you have the time though…. Thanks!
 

dl324

Joined Mar 30, 2015
15,840
Id need the following voltages:

green = 0v-3v
yellow = 3v-4v
red = 4v-5v
1648959081107.png
The voltage divider resistor values will likely need to be tweaked. The values I used will give the voltages you wanted. Note that I used a 6.2V zener diode and made the total resistance in the divider 62k to make it easy to calculate the appropriate values. If you really want 4-10V for the red LED, you'll need to use a different zener; 1N5241 is 11V.

I assumed a common cathode LED.

The comparators have to sink the LED current and are only guaranteed to sink 6mA, but they might work at 16-20mA if the output voltage is low enough to turn off the LEDs. Observe the absolute maximum cautions if you decide to try to operate at 20mA.

Since only 5 comparators were needed, you could replace one of the LM339 with an LM393 (the dual version).

Decoupling capacitors not shown. You should put a 0.1uF ceramic across the power pins of each IC.

EDIT: LM339 doesn't have the same pinout as LM324. LM393 and LM358 have the same pinout...
 
Last edited:

Thread Starter

Salomonander

Joined Mar 31, 2022
40
Thanks Dennis!
this awesome. i will use the 1N5241 then.
i assume r6-r8 are trimmers for brightness? If so, what value do you suggest?
would a global dim be possible easily?
thanks, i really appreciate you help.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,587
Post #11 schematic:

I think two diodes (1N914, 1N4148, etc.) and two resistors will eliminate two comparators, eliminating one entire IC.

Another approach is to drive the LEDs with PNP transistors (2N4403, 2N3406, etc.). Now the circuit reduces to two just comparators and two transistors for three LEDs. Power consumption is much less because LEDs are not turned off by shunting their current to GND. However, with this minimal circuit you lose an individual current adjustment for the green LED.

TS: I don't think this was answered: Is a two-color (red-green) LED, turning on both elements to approximate yellow, acceptable? And of course, is a two-color common-anode LED acceptable?

ak
 
Last edited:

dl324

Joined Mar 30, 2015
15,840
this awesome. i will use the 1N5241 then.
If you use a higher voltage zener, you need to change the resistor values in the divider.
1648995137243.png
i assume r6-r8 are trimmers for brightness? If so, what value do you suggest?
I'd use fixed resistors. Values depend on the current/relative brightness you want. You may want to increase the zener current to 20mA. I used 10mA to simplify the calculations.
would a global dim be possible easily?
You could add a voltage regulator to vary the voltage on the high side of R6-8 or use PWM and switch the common cathode. I'd take the latter approach, but that would require 2 opamps and a comparator.

EDIT: You could also use a pot, but I'm not a fan of using them that way.

To implement flashing for the red LED when the voltage is over 5V, you could use another comparator with an oscillator that drives the gate of a P channel MOSFET inserted between R8 and the power supply.
 
Last edited:

Alec_t

Joined Sep 17, 2013
13,793
would a global dim be possible easily?
Here's one way, if you are using a common-anode RGY LED.
This circuit enables the use of just one quad comparator, provided any input voltage above 4V (and < the op-amp supply voltage) lights the red LED.
3-LEDdisplay.jpg

R1 is chosen for maximum LED brightness required (and within the comparator dissipation limits), with the brightness pot set to zero resistance.
 

Attachments

Last edited:

AnalogKid

Joined Aug 1, 2013
10,587
First pass at a 2-comparator version using a dual-color, red-green, common cathode LED. Because the LEDs are driven by discrete transistor switches, this circuit is capable of much greater brightness compared to ones that drive the LEDs with opamp or comparator outputs.

Ideal trip points are within 2% of post #10. For tighter transition level tolerances, there are zillions of 1% resistor combinations that will work for R2 - R4.

The diagram shows the red-green overlap to produce yellow. The red LED is on for all input voltages above +5 V. R7 and/or R8 can be adjusted to match brightnesses. If you go with this type of LED, check the pinout carefully; there is no standard.

For other values for D1, adjust R2 to have 4.0 V at U1A pin 2. For 24 V operation, increase R1, R7, and R8.

With a common-anode LED, R5, R6, Q1, and Q2 are eliminated. The comparator inputs have to be rearranged, but the input components are unchanged.

ak

Volt-Mon-3-LED-1-c.gif
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,587
if there is an easy way to get the red led pulsing above 5v it would be awesome.
For the circuit in post #11, the easiest way is to buy a flashing LED. It looks like a normal LED, but has a flasher circuit built in.

If you mean you want the red LED to be on steadily from 4 V to 5 V, and flash for inputs above 5 V, that takes one more opamp or comparator stage acting as an oscillator.

Also, what LED current do you want?

ak
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,587
the easiest supply is 24v single.
24 V supply. check.
i do have rgy leds here with real yellow. both common anode and cathode version.
Common anode. Check.
how could i implement a global dim pot (dimming all three leds simultaniously)?
Global dimming. Check - but it will cost you individual brightness adjustments.

This circuit uses a trick of having one LED starve current away from another. Green is on all the time, until it is starved off by yellow at 3 V, which is then starved off by red at 4 V. It works very well, and with a high supply voltage like 24 V, the differences in the three LED currents are relatively small.

For tighter transition level tolerances, there are zillions of 1% resistor combinations that will work for R2 - R4.

ak

Volt-Mon-3-LED-2-c.gif
 
Last edited:

Thread Starter

Salomonander

Joined Mar 31, 2022
40
This forum is really awesome! You guys are too! Thanks you so much. Ill give them all a try, just to learn a bit more. Im just not certein about voltage regulator in post #15. what part to use there
 
Last edited:
Top