# Pull up resistor question

1. Jan 19, 2010

### mishobg12

Hi,
will I damage the IC (it is 74LS07) if I select a pullup giving 20 mA of current trough the open collector (without any other load)?
I looked at the datasheet but I can't figure which parameter should I be looking at (because they give HIGH-level output current of 250 micro amps. What I "inject" trough the open collector is -20 mA as far as I understand it, so it kind of confuses me)

Here is what I want to do:
http://prikachi.com/files/1299347N.png
(Sorry for the poor drawing)
Not only do I use the transistors to use the bigger current, but I also use it as an invertor.
If I have a zero, the 20 mA go trought the respective LED. Otherwise, they go to GND trought the IC.

Will this work?

Last edited: Jan 19, 2010
2. Jan 19, 2010

### Staff: Mentor

Welcome to the PF. I broke your question off as a separate thread, since the one you posted on the end of was pretty much done 6 months ago.

Look at the Vol spec in the datashet (output low voltage at current). That will tell what output low voltage you can expect at different output (sink) current levels.

http://www.datasheetcatalog.org/datasheets/70/375334_DS.pdf

3. Jan 19, 2010

### Staff: Mentor

And depending on what the following circuit is that you are driving this output into, you will need to judge if the output voltage is low enough for what you want. For example, if you are driving another logic stage with this output, look at the Vil spec for that input to be sure you are at or below that required input low voltage.

4. Jan 19, 2010

### mishobg12

Thank you for your welcome and for answering. I just attached a drawing to my post.
I can not really understand that with the output voltage. Isn't the very idea of open collector ICs that I can use whatever voltage I want to? And I was really asking for the current. These specs sound to me not very different from those of the regular circuit (without the transistors at the outputs). I only wanted to use this circuit so that I could have enough current to drive the LEDs.

Before someone suggests the easy way out - I did draw the other end of the LEDs going to GND, but only to keep the drawing simple. I can not drive them with zeros and constant pluses, because the LEDs are actually connected between two ouputs of two TTL ICs. That is, to have a LED turned on I would need to have TRUE (logic one) to the first output, and FALSE (logic zero) to the second.
Sorry, it is my first time I am using such circuits.

5. Jan 19, 2010

### Bob S

I am not sure I understand what you want to do. If both collectors ar open, both LEDs will light, but share the current from the 22-ohm resistor. If EITHER or BOTH collectors are saturated, NEITHER LED will light. Is this what you want?

Usually TTL open collector buffers are reasonably good current sinks. The 74LS07 hex buffer is rated at ~40 mA (Texas Instruments data sheet).

Bob S

6. Jan 20, 2010

### mishobg12

Thank you, Bob! That was exactly what my question was.

What confused me was that these 40 mA were specified as Low-Level output current. Since the Collector-Emitter circuit is open when the transistor is saturated (at High-level to its base) and consecutively it is then when the current goes trough it, I though it is the other way round - that I should be looking at the High-Level output current. Would you explain, please.

And another question - Actually, I wanted only one LEDs to shine, the one which is in cutoff. But now when I think about it, the other (saturated) transistor will drain all the current to its GND, so I will have neither of them glowing. Can you suggest how to fix this?

7. Jan 20, 2010

### Staff: Mentor

The circuit that you subsequently added to your original post (OP) is incorrect.

http://prikachi.com/files/1299347N.png

The cathodes of the LEDs should each go to a collector of the open collector outputs, not to ground. Each LED should have its own current-limiting resistor connected between the power supply and the LED anode, and each LED anode should go to an open collector output to sink current when the transistor is on.

8. Jan 20, 2010

### Simon.T

I'm not certain what it is you are trying to do, but why not try using the ground through the IC to complete the circuit, like this

9. Jan 20, 2010

### Bob S

The VOL (output low) LS07 maximum output current should be specified as -40 mA because the saturated collector is a current sink. You have two choices.

1) Use a separate series pullup 150-ohm resistor (minimum) tied to 5 volts and to both the LS07 open collector and to the LED anode in parallel (with LED cathode tied to ground). (I personally don't like this).

2) A separate series 100-ohm (minimum) pullup resistor tied to 5 volts and to LED anode. The series LED cathode is tied to the LS07 open collector. (This is inverted logic - Collector low = LED ON).

See above. Use separate pullup resistors.

Bob S

10. Jan 20, 2010

### mishobg12

Here is more detailed drawing of my device:
http://prikachi.com/files/1301415F.png
The idea is following:
Let's say we want to have the second LED to shine. We put 10 to both decoders, which will make the second output LOW and all other HIGH.

So far, I have ground only to the second LED. But I also have one on its anode.
At this point, I could have used just simple inverter after the left decoder, but I didn't because the output current of it (~0.8mA) is far too little to make the LED shine. So I need open collector.
I do not use open collector inverter, but a buffer, because of the way I wire it - it becomes inverter.
Now the "10" from the left decoder saturates the upper transistor and gets into cutoff the middle one, which causes the circuit to complete trough the LED (inverted).
So the second variant proposed by you, Simon T. and I believe it was what berkeman meant doesn't work for me. Because I switch the ground too.
If you are wondering why,it is because I am actually driving a LED Matrix display.
Now, I didn't really understood your first proposal.

And to finish, I'll give the problem in a nutshell.
Only one transistor will be in cutoff at the same time. So the current will go trough every other transistor to GND. And because there are eight of them it is like having 7 150ohms resistors connected to ground in parallel:
http://prikachi.com/files/1301419R.png
Now with that little resistance going to ground directly from the power rail, won't they nearly short-circuit it?

I don't believe this is true?
If the collector is low the (most of the) current will not pass trough the collector-emitter and therefore the circuit will not be completed and the LED will NOT shine.
But if the collector is high the current will pass trough the LED (causing it to shine) and then go trough the collector-emitter to ground.
Inverted logic will be what I am using.

Last edited: Jan 20, 2010
11. Jan 20, 2010

### Staff: Mentor

You don't need two decoders, you only need one. And you don't ground out the pullup resistor to turn off the LED, you ground out the cathode of the LED (with a resistor feeding its anode from the power supply) to turn it ON, and you turn off the output transistor to turn the LED off.

I'm not sure where you got this idea of how to drive LEDs, but it's plain wrong. It's wasteful of power, which is a bad design error. Please look at the way we are telling you that LEDs are driven.

Could you give more details of what you are trying to do? Drive how many LEDs? Using how many outputs from the PIC?

12. Jan 20, 2010

### mishobg12

OK, see this: http://prikachi.com/files/1301433n.png (R1-R8 are resistors - European sign)
I tried explaining why I need two decoders. It is because I am controlling a led matrix (http://www.everlight.com/upload/product_pdf/ELM_2881SURWA_S530_A2.pdf [Broken]). With only one decoder to the cathodes and the anodes all to positive rail I will get a whole row of LEDs shining, not only a specific one. They are controlled like a coordinate system. If I want the second LED on the third row to glow, I would have to give 010 and 011 to both decoders (I do this from the PIC 2x3 = 6 Outputs). Then on their outputs I would receive:
10111111
11011111
So I need to invert the second one:
It becomes:
10111111
01000000

As you can see on the here linked drawing this will cause only the desired LED to be correctly powered. Because every diode attached to the third row has +5V on its anode, but only the second has GND on its cathode.
Every diode on the second column have GND on its cathode, but only the third has +5V on its anode.

Anyway, I tried simplifying as much as I had to avoid these explanations. I am convinced that my idea is correct, but I am not convinced in all the resistor calculations and that is why I am seeking for your help.

Will my power rail be short circuited trough those 150resistors of all saturated transistors?

Last edited by a moderator: May 4, 2017
13. Jan 20, 2010

### Staff: Mentor

When driving an LED matrix like that, you need to time-multiplex the drive signals. You energize a row by driving an anode row line high, and you ground out the appropriate cathodes with your open collector drivers for whatever LEDs in that row you want to appear ON. You then move to the next row and do the same thing. You rotate through the 8 rows at a rate above the "flicker fusion frequency" of the human eye, say at a couple hundred Hz per 8 rows of refresh.

You will have a series current limiting resistor for each of the 8 columns as you go from the cathodes into your open collector drivers. All the current being driven goes into making light, and none is wasted bypassing the ddrive to the LEDs (as it appears to be in your scheme).

EDIT -- note that your row drivers have to be pretty beefy, since a single one may have to supply the current for 8 LEDs.

Last edited by a moderator: May 4, 2017
14. Jan 20, 2010

### Bob S

Mishob-

Thanks for finally explaining what you are doing. Your 8 x 8 LED matrix is very similar to the PROM (programmable read only memories) matrix we used to use. The PROM memory was "burned" in by simultaneously pulling up on an x line and down on a y line, and melting fuse links where the two lines crossed.

You have two 3-line-to-8-line decoders, one for x and one for y. Each decoder is one-of-eight active (active low?). One driver (the pullup) has to be active high, so if you are using the same decoders for x and y, you will need 8 inverters. You will be pulling up only one x line and down only one y line, so only one LED will be lit at any given time.

Bob S

15. Jan 21, 2010

### mishobg12

So what should I be using to power the anodes? I do not have that many available I/Os on the PIC, if you are suggesting to connect them directly.

Since you say I should reverse it all and connect the cathodes of diodes to open collectors. I am thinking, even if stick with my design (because I can't understand yours for the reason given in the upper paragraph), should I be using open collectors on the other end as well to sink the 20mA after the LED?

This is exactly how I initially planned it. But it turned out my 8 inverters weren't powerful enough to make the LED glow, so I decided to use open collector circuit.
But I use buffers, instead of inverters, because the way I connect it, it works as inverter.

Thank you, guys, really, thank you, for keeping replying. I really do understand your point with the anode to 5V and cathode to collector, but I just can't see how it is applicable in my case.

16. Jan 21, 2010

### Staff: Mentor

If you run the LEDs at a target 10mA each, that means that the anode drive buffer gates need to be able to source 80mA each. That's more than any logic family that I know of, so you would need to parallel up several buffer gates per anode line. You could use 4 x 74ACT244 type gates in parallel to be able to drive 80mA:

javascriptpenreq('http://www.datasheetcatalog.org/datasheet/fairchild/74AC244.pdf')

So to drive all 8 anode lines, it will take 32 buffer gates, which fit in 4 IC packages.

17. Jan 21, 2010

### uart

Hi Berkemen. For his particular application only one row and one column can be selected at any time so this (driving 8 at a time) wont happen. He only needs to design for one LED load, approx 15 mA, sink for the coumn decoder and source for the row decoder.

18. Jan 21, 2010

### Staff: Mentor

Really? Well that's no fun! Can't even spell out letters and such...

19. Jan 21, 2010

### uart

Yeah I know, but he's got an active high decoder output driving the rows (anodes) and an active low decoder output driving the columns (cathodes), so it's definitely only one LED at a time. :)

20. Jan 21, 2010

### uart

I suspect you were trying to use one of the TTL families (74, 74LS etc) for the inverter mishobg. TTL families have very asymmetrical output characteristics and generally cant source nearly as much current as they can sink. CMOS families tend to have somewhat more symmetrical characteristics and so would make a better choice for the inverter (row drivers). Use and advanced CMOS part like 74AC04 for the inverter and problem solved ok. You can keep the resistor value at 150 ohms and you'll get approx 14mA, or you could go up to 220 ohms (and about 10mA) if you want to be more conservative of the device capabilities (recommended).