# Indicator LED pulling up line

I have a simple circuit: (Note: RN4 is currently 180 ohms. The label got left off the image.)

When the 339 is setting an output low, the output is only dropping to about 2.3v, and not 0. Not low enough for the 74LS240 to recognize it as low. If I short the cathode of an LED to GND, then the 74LS240 works as intended, obviously.

At first, I realized that my pull-up resistors (RN5) may not even BE needed, thanks to the LEDs. However, removing it from the circuit drops the output to about 1.5v.

The LEDs have a forward voltage of 2v, and use 20mA. (Part: https://www.digikey.com/product-detail/en/kingbright/APT1608SYCK/754-1124-1-ND/1747841 )

Am I trying to overdrive the LEDs? Would increasing the resistance of RN4 help? And is RN5 even necessary?

• Can you please update your question to include the value of resistor network RN4? Is it 10K also? Or if not what is it? – mkeith Apr 30 '18 at 0:33
• Done - sorry, didn't realize the label didn't make it into the image. – Coyttl Apr 30 '18 at 1:07
• Why do you need 20 mA for LEDs? The led brightness is 150 mcd typical; at 1/10 of that you will be still blinded by light. Use 3k3 for RN4, everything will be all right. – Ale..chenski Apr 30 '18 at 2:13
• I don't - when I threw this together, I used what I had on hand. (Mistake on my part - should have just ordered what I needed..) – Coyttl May 1 '18 at 13:27

Looking at the BA10339 datasheet, it is not capable of sinking 20mA.

You should not attempt to sink more than 6mA unless you are selecting parts, and it is doubtful you could ever sink 20mA on even the best selected devices.

RN5 would appear to be unnecessary, but you'd only get a pullup to about 2-2.5V so I'd suggest you leave it in.

• To the OP: To add to what Jack is saying, I suggest that yes, choosing RN4 based on 6mA would be a good idea. (around 500 Ohms). Even though the LED can handle 20mA, it may very well be bright enough with 6mA or even less (depending on many details). – mkeith Apr 30 '18 at 0:42
• The 339 has very low leakage current. So I suspect that it will pull up higher than 2.4 even without RN5. But it certainly won't hurt to keep it there. – mkeith Apr 30 '18 at 0:46
• Thanks guys - I was basing off of the 16mA and not the 6mA. And now I feel like (more?) of an idiot type I thought 'typical' in this sense was pretty much the max current. – Coyttl Apr 30 '18 at 1:05

The comparator is open-collector so the output voltage is dependent on the pullup. The LEDs you have (in series with the resistors) will probably pull the outputs up high enough without RN5 (2.4V for 400mV of noise immunity) but if you were to switch to an HC240 or a different color of LED it might not be enough under all conditions (maximum input current required is 100uA). Personally I would leave them in there, though perhaps you could increase the value to 20K.

To get standard LSTTL 400mV noise immunity under the low condition you must limit the current to a maximum of 4mA at 25'C- the worst-case Vce(sat) is 700mV over temperature which is really marginal - 100mV of noise immunity.

Let's say you limit it to 3.5mA total nominal, and allot 250uA for R5 (20K). You need another 200uA for the LSTTL input in the low state, so that leaves us with about 3mA for the LED, so about 1K for RN4. That may or may not be bright enough for your purposes, but you can give it a try.

Switching the LS240 to an HC240 would probably make things better, but you'd definitely need RN5.

• One other comment. Red LED's in particular will turn on with very low current. 100uA will definitely make a red LED glow visibly. So this is another reason to keep RN5. RN5 will prevent the leakage current from flowing through the LED and causing it to glow faintly when it is supposed to be off. In my previous comment I did not consider input leakage into the digital input. I only considered off state leakage of the 339. – mkeith Apr 30 '18 at 1:28

The LM339 specifies an output low voltage of 0.7 V max, at a current of 4 mA. It also lists a typical output low voltage of 1.5 V at 6 mA, so theLM339 is not capable of driving the LEDs with 20 mA while producing an output voltage of 0.8V, as required by a TTL input.

Did you not read the datasheet specs?

Output Saturation Voltage
(Low Level Output Voltage)

I SINK =4mA

temp  typ max Vol
25°C  150 400 mV
Full    - 700 mV


RN5 array is not needed or used.

74LS240 specs: Iin= –0.2 mA @ Vin = 0.4 V    Vcc = MAX,


RN4 array may be >= (5V-2V)/(4-0.2)mA = 790 Ohms (min)

For a LED with 150 mcd brightness you don't need 20 mA, 1/10th or even 1/20 of that will be just fine for board indicator purpose. Use 3.3k for RN4, and something like 47k for RN5 to keep inactive output in high state. And stop using 74LS, use something newer, LVC.