DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: poiureza on February 04, 2021, 05:23:49 PM

Title: LM3914 and LED bar
Post by: poiureza on February 04, 2021, 05:23:49 PM
Hello,

I tried to a make an input meter using the LM3914 LED driver
https://www.ti.com/lit/ds/symlink/lm3914.pdf (https://www.ti.com/lit/ds/symlink/lm3914.pdf)
and one of these chinese 10-segment LED bars
https://www.ebay.com/itm/10-Segment-4-Color-5V-LED-Battery-Bar-Graph-Light-Display-Indicator-DIP/265021095561 (https://www.ebay.com/itm/10-Segment-4-Color-5V-LED-Battery-Bar-Graph-Light-Display-Indicator-DIP/265021095561)

Turns out the LED bar goes reverse i.e. goes from red to green when the input voltage goes from say 0V to 5V.
I understand that's because the LED's are connected to the comparator ouputs which act as current sink, unlike as if the chip output some positive voltages and the LED cathodes were grounded.

The easiest solution would be to find reverse colored LED bars.
Do you know of any ?
Or a workaround ?

(I have yet to try with negative input voltages and negative supply voltage to solve the issue but I doubt the chip will like it)

Thanks
Title: Re: LM3914 and LED bar
Post by: iainpunk on February 04, 2021, 08:32:49 PM
welcome to the forum

you can use a single op amp to invert the input signal, so a low signal will be what used to be high.'
(https://i.postimg.cc/wygKSPF8/inverter.png) (https://postimg.cc/wygKSPF8)

cheers, Iain
Title: Re: LM3914 and LED bar
Post by: antonis on February 05, 2021, 05:44:18 AM
I shouldn't use μA741 fed from +5V single supply.. :icon_wink:

It needs a commmon mode input of, at least VCC -3V / VEE + 3V, so for a full 5V output swing in has to be powered from minimum 11V single supply..
Title: Re: LM3914 and LED bar
Post by: poiureza on February 05, 2021, 06:43:24 AM
I'll try a negative input (from an inverting op amp fed by bipolar supply  :icon_wink:) and see what happens.

New day, fresh brain
I think there is no real problem : the LED bar is certainly intended to be soldered on the bottom side of a PCB (just like PCB mounted pots).
And in this case the color sequence would be OK.

Though I'll gladly hear any additional workaround in case I'd want to put the chip and bar on the same PCB side
Title: Re: LM3914 and LED bar
Post by: anotherjim on February 05, 2021, 10:34:05 AM
If the chip requires common cathode LED's, will inverting the audio signal change anything?
All the LED's are fully wirable, so you can decide to make anode or cathode common.
You can decide which comparator output feeds which LEDs.
And if you solder it all the wrong way around, it looks like you can swap the high and low voltage ends of the comparator resistor chain in the LM3914 (pins 4 & 6).

Title: Re: LM3914 and LED bar
Post by: poiureza on February 05, 2021, 11:13:50 AM
Oh yes of course, inverting the Hi and Lo voltages at pin 4 & 6 !!!
It's just a resistor chain and I bet all comparators are identical.
Dooh why didn't I think of that
I'll try that ASAP


The chip requires common anode, all tied to the PS.  I have no option there
Sure I can wire it up so that it works the way I want it (crossing all 10 wires/traces) but I would really prefer to have each LED in front of its comparator.


Title: Re: LM3914 and LED bar
Post by: poiureza on February 05, 2021, 11:21:06 AM
I switched the Hi & Lo voltages
Works perfectly

Case closed  8)
Title: Re: LM3914 and LED bar
Post by: iainpunk on February 05, 2021, 11:31:06 AM
Quote from: antonis on February 05, 2021, 05:44:18 AM
I shouldn't use μA741 fed from +5V single supply.. :icon_wink:

It needs a commmon mode input of, at least VCC -3V / VEE + 3V, so for a full 5V output swing in has to be powered from minimum 11V single supply..
yes you are right, i shouldn't PUI (post under influence)
a CA3130 or CA3140 or CA3160 would be a better suited IC here, or a TL071

cheers