connecting transistors

Thread Starter

gerases

Joined Oct 29, 2012
186
No, it won't work at all. All the LEDs in the display have their cathodes connected together. If you connect all the anodes together, then all the LEDs are in parallel, so they'll ALL light at once!

If you connect all the collectors together, then whenever ANY transistor turns ON, there will be a path to 0V and ALL the LEDs will light. You would lose the individual control of the segments.
I'm also happy to share your knowledge in this field, because the learning curve here is so steep. Anyways, after I read your reply, I thought I would try to draw what I meant and post it. But when I started, I quickly realized what the problem was. I.e., controlling individual pins would be impossible. I'm glad we had this discussion. In general though, if I have a choice between common emitter and common collector, what should be my criteria for choosing one over the other?
 

Thread Starter

gerases

Joined Oct 29, 2012
186
Can I ask an unrelated question? Maybe this should be a new thread, let me know. I'm going through the Make Electronics book and the author compares CMOS chips vs. TTL chips. Among their key characteristics he mentions the amounts that CMOS and TTL chips can "source" and "sink". He mentions those terms without any explanation for what it means. But as the book continues, it becomes a little more clear.

As I understand it, "sinking" is putting signal into a pin. Of course the weird part for me is that you might want to put voltage into a pin to read it. Let me explain.

In an experiment he uses a TTL counter chip that is at first connected directly to a group of LEDs. The LEDs are lit up but dimly because the author says TTL output signal is "weak".

Side Note: after that statement, it was strange for me to see 47K resistors with each LED because I thought, if the signal is small, why put such a big resistor next to each LED? My thought it's because it's not the signal that is weak, but that the chip will tolerate a very small current to be flowing through it. Is that correct? Otherwise if we have any voltage on a pin, with a small enough resistor, we can cause any kinds of current to flow.

So, the modification proposed is to connect the "+" of each each LED to the positive rail and the "-" to the output pin. This way when the output on the pin is high, the LED is dim, and when the output is low, the LED lights up. That is the opposite of what we want, so, an inverter is placed between the TTL and the LEDs.

My question is: is that what sinking is and is this how it is usually used? Sorry if my question is vague. It's both a question and a request for verification of my understanding :)
 

wayneh

Joined Sep 9, 2010
17,498
Sink and source generally refer to current, and thus power, as opposed to the relatively much smaller signals required to transmit information. A source can provide current to a circuit that is grounded on the other end. A sink provides a path to ground for a circuit that is attached to V+ at the other end. So the terms just refer to the direction of current flow.

A typical example is a common comparator, which cannot source any current (requiring an external pull-up resistor) but, when it goes low, opens a transistor to complete a path to ground, to sink a small current.
 

Audioguru

Joined Dec 20, 2007
11,248
Ordinary TTL is VERY old. It must use only a 5V supply. It uses a fairly high supply current all the time. Its maximum allowed sinking current (its output goes to near 0V) is 16mA.
Its output sources (goes high) to a minimum voltage of only +2.4V which is not high enough to light a white, blue or some green LEDs. Its sourcing current is very low.

Ordinary CMOS can use a supply from 3V to 18V. It uses almost no supply current when it is not providing an output current. Its output sinking or sourcing currents and voltages are the same. When its supply is only 3V then its output current is very low. With a 9V supply it can light an LED fairly brightly without a current-limiting resistor.
 

wayneh

Joined Sep 9, 2010
17,498
Very confusing.
Guilty. I wouldn't have used the term except for the earlier reference to "opening" a path to ground. [oops, that may have been a different thread] I guess I also tend to think of the water analogy, with the transistor as a valve which you can "open" to get flow. That's what happens when you get a chemical engineer talking about electronics. ;)
 

Thread Starter

gerases

Joined Oct 29, 2012
186
its output goes to near 0V
Is it 0 or is it +2.4, which you mention in the next sentence? I'm a little confused.

Its sourcing current is very low.
Does it mean that it can tolerate only a low current load? I.e., the resistance of the load needs to be rather high?
 

KrisBlueNZ

Joined Oct 17, 2012
111
In general though, if I have a choice between common emitter and common collector, what should be my criteria for choosing one over the other?
That's not a simple question to answer. In this case, either common emitter or emitter follower can be used, because the incoming signal (from the 4026) swings over the full voltage range that you need at the output, to drive the display. In many cases though, the device needs to switch a higher voltage than the signal controlling it, and that's when a common emitter configuration is useful. Google or Wikipedia "open collector" for more.

In this case, the main advantage of the emitter follower is that it is a non-inverting configuration, so a positive voltage from the 4026 causes a positive voltage for the anode of the LED, which is what you want. It also provides high current gain, wastes little power, and requires few components.

In linear applications (i.e. not switching), the emitter follower provides high current gain but no voltage gain, and is often used in audio output stages where high output current is needed to drive a loudspeaker, and where high input impedance is needed, such as buffering applications. It also can be bootstrapped (Wikipedia again). It's also used in a configuration called a long-tailed pair (ditto) which is kind of a combination of emitter follower and common base configurations.

Common base is the third possible topology. It's used mainly in high-frequency circuitry such as RF amplifiers and video output circuits, because it avoids the Miller effect (Wikipedia again). It has a low input impedance.
 

KrisBlueNZ

Joined Oct 17, 2012
111
("Opening" a transistor)
Very confusing.
Agreed.
I've seen the expression used before by non-native English speakers (Germans, I think).
Obviously the analogy is to "opening" a gate (another word with potential for confusion) and allowing the flow of electrons, but to an electronics person, "open" implies open-circuit.
 

KrisBlueNZ

Joined Oct 17, 2012
111
Can I ask an unrelated question? Maybe this should be a new thread, let me know.
It probably should be. The moderators can make it so, if they want.
(Sourcing and sinking)
As I understand it, "sinking" is putting signal into a pin. Of course the weird part for me is that you might want to put voltage into a pin to read it.
Wayne has answered this pretty well.
Sourcing and sinking mainly relate to OUTPUT pins, that are being used to DRIVE something with current. "Putting voltage into a pin" applies to INPUT pins.
In an experiment he uses a TTL counter chip that is at first connected directly to a group of LEDs. The LEDs are lit up but dimly because the author says TTL output signal is "weak".
Yes. "Weak" means high resistance and low current. For example, a dead 9V battery might measure 8V on a multimeter, but if you connect a light bulb across it, the light bulb won't glow at all, and if you measure the voltage across the light bulb, it is nearly zero. You would say the battery is "weak" because as soon as you try to DRAW CURRENT FROM it, the voltage sags to nearly nothing. When you measured it with a multimeter, it seemed to have some energy left, but a multimeter has a high input resistance (10 megohms usually) and draws almost NO current.

Side Note: after that statement, it was strange for me to see 47K resistors with each LED because I thought, if the signal is small, why put such a big resistor next to each LED? My thought it's because it's not the signal that is weak, but that the chip will tolerate a very small current to be flowing through it. Is that correct? Otherwise if we have any voltage on a pin, with a small enough resistor, we can cause any kinds of current to flow.
You're on the right track. The effect of connecting an LED from the output to ground directly, or with a low-value current limiting resistor, depends on the characteristics of the output. In the case of a TTL output, 47K was unnecessarily high, and you would get a brighter LED with no damage if the resistor was lower, say 1K, which would give an LED current of less than 1 mA.

So, the modification proposed is to connect the "+" of each each LED to the positive rail and the "-" to the output pin. This way when the output on the pin is high, the LED is dim, and when the output is low, the LED lights up. That is the opposite of what we want, so, an inverter is placed between the TTL and the LEDs.
Right. That was normal practice back in the dim dark days of TTL and LS. The outputs can sink significant current, but source current only weakly. I think of this as being like a strong spring and a weak spring. (The tension type of spring that pulls its ends together.) When the TTL/LS output is high, it's like a weak spring to VCC, and is easily loaded down (a weak current source). But when it's low, it's a relatively strong spring to GND (a strong current sink).
 

Audioguru

Joined Dec 20, 2007
11,248
If you use an old TTL IC to sink current into the cathode of an LED that has its anode connected to the +5V supply then the TTL IC and the LED will probably get hot then blow up because you must use a series resistor to limit the current so it does not exceed 16mA.

I never tried sourcing current from an old TTL IC into the anode of an LED because I stopped using old TTL ICs about 37 years ago.
 

Thread Starter

gerases

Joined Oct 29, 2012
186
I never tried sourcing current from an old TTL IC into the anode of an LED because I stopped using old TTL ICs about 37 years ago.
OK, I get it, it's old, but I still want to use them. That's part of my learning. And if an LED blows up or even ten of them, that's fine. The way you talk about it is like there should be a funeral ceremony after an LED dies. Lighten up a little, would you?
 
Last edited:

Audioguru

Joined Dec 20, 2007
11,248
OK, I get it, it's old, but I still want to use them. That's part of my learning. And if an LED blows up or even ten of them, that's fine. The way you talk about it is like there should be a funeral ceremony after an LED dies. Lighten up a little, would you?
Why blow up electronic parts? Why do things wrongly?
If you design the circuit properly by not exceeding the maximum allowed current shown on the datasheets then everything works without any smoke.

I have used thousands of transistors, LEDs and ICs in my career and I have NEVER blown one up.
 

Thread Starter

gerases

Joined Oct 29, 2012
186
Sourcing and sinking mainly relate to OUTPUT pins, that are being used to DRIVE something with current. "Putting voltage into a pin" applies to INPUT pins.
But wouldn't connecting the LED with its positive end to the positive rail and the negative end to the output pin constitute putting voltage into an output pin?

Yes. "Weak" means high resistance and low current. For example, a dead 9V battery might measure 8V on a multimeter, but if you connect a light bulb across it...
Is the high resistance because of the internals of the chip or the load?

Back to my original question of connecting the transistor to the 7-segment LED. Last night I tinkered with it and got unexpected results. I connected everything the way you suggested: using the emitter-follower arrangement. The output pin of the 4026 goes to the base, the collector to the positive rail, and the emitter to the the positive of the segment LED. I left a 1K resistor on the common cathode, so the emitter was connected directly to the segment pin. The voltage on the output pin of the 4026 was 8.6V (the power supply is 9V). My transistor has an hfe of at least a 100. So my thinking was, I need 16mA for the LED. If I get 16mA/100 on the base, I'll be good. So, the resistor value on the base is:

(8.6 - 0.6) / 0.00016 = 50K. Sounds a lot but what the heck, I'll try it. When I connected everything together, the segment didn't light up. I measured the BE voltage and it was 0.5V. So, the CE path of the transistor is probably closed (i.e., the CE switch is open). At this point, I'm not really sure what to do. I go for a 33K resistor, then lower, all the way to 1K -- same thing and same voltage drop of 0.5V.

I took an AA batery and biased the BE junction from it. The segment lit up quite brightly.

One last thing I tried was: leaving the output of the 4026 on the base with a 33K resistor, I connected a stand-alone LED using the same arrangement (emitter-follower) and the LED lit up as well.

So, why doesn't the segment light up? I'm thinking that the LED array takes too much voltage somehow and the transistor can't get biased enough. It occurred to me on the way to work that I should have tried upping the supply voltage to 12V.

Thoughts?
 

Thread Starter

gerases

Joined Oct 29, 2012
186
Why blow up electronic parts? Why do things wrongly?
If you design the circuit properly by not exceeding the maximum allowed current shown on the datasheets then everything works without any smoke.

I have used thousands of transistors, LEDs and ICs in my career and I have NEVER blown one up.
Because doing things wrongly is how humans (or most of them) learn and because I don't know enough to avoid making mistakes in this area. If I was en EE major, your exhortations would be appropriate. I'm not. I'm going through a BEGINNING electronics book. At this point, if I see I smoke coming out of a component, I go grab a camera.
 
Last edited:

wayneh

Joined Sep 9, 2010
17,498
It's true that learning from failure leaves a more lasting impression, but one thing I've learned the hard way is how bad it feels to ruin something that you've poured a lot of time into. You have to resist any temptation to make a quick "improvement" at the last minute, without making the calculations. It's like the carpenter's admonition to measure twice and cut once. It may seem to slow things down, but learning to do careful planning and stick to the plans are the most important lessons you can learn. Experts have the know-how to take shortcuts, but often they are the ones that know better than to do so.
 

Audioguru

Joined Dec 20, 2007
11,248
An emitter-follower does not need a series base resistor. The base current is very low because it is the output current divided by the hFE of the transistor. hFE is DC current gain and hfe is AC current gain.

"I left a 1k resistor on the common cathode (of the display)" does not say that the 1k resistor was connected in series from the common cathode to ground. So please sketch a simple schematic of how it was connected. Then we can see if it was wired correctly but the display doesn't light because it is blown up or maybe the collector and emitter pins of the transistor were swapped. Red segments are usually 1.7V to 2.0V.

I calculated the voltages and currents. The LED segment should have lighted but not always with 16mA.
 

Attachments

Thread Starter

gerases

Joined Oct 29, 2012
186
It's not blown out because if I connect the output of 4026 directly to the segment, it lights up. Same if I bias the BE junction with a battery. A quick and dirty drawing attached. The GND from pin 2 of the LED array is the common cathode. Pin 3 is the segment pin. Pin 3 on 4026 is the output of the counter.
 

Attachments

Top