# current sourcing, current sinking

I'm a student studying electronics and I'm having trouble understanding the concept behind current sourcing and current sinking. We've covered it in a lab using a 7404 and an LED and all that. Just having trouble getting an intuitive understanding of what exactly is happening.

If anyone can take a crack at explaining, it would be greatly appreciated.

Just to be sure, I understand what the process is, in terms of current flow and from input to output and vice versa. Just not getting why one is preferred over the other, and what it has to do with having a floating Hi input or why I wouldn't want to have a floating Hi.

Input would be greatly appreciated.

Thanks!

-
This should be tagged 'electronics', which will require creating a new tag. –  Craig Trader Nov 11 '09 at 3:59
Aren't all of the questions on here technically about electronics? –  Amos Nov 11 '09 at 9:36
@Amos, not really. This question is low-level electronics ... really, how transistors work and are used. Most of the questions here are higher level: how can put pieces together to solve a specific problem. That's why I think it needs a specific tag. –  Craig Trader Nov 11 '09 at 23:51
@W. Craig Trader - Wouldn't discrete-electronics be a better tag, then? –  Connor Wolf Jul 16 '11 at 12:37
@Fake - It's not discrete, it's integrated. My first idea was fundamentals, but that's not it either, methinks. I'm still thinking :-) –  stevenvh Jul 16 '11 at 12:44
show 1 more comment

short version: current sources connect things to Vcc, current sinks connect them to ground.

longer version: The following is a practical explanation of current-sources/sinks as used in microcontrollers & TTL logic. For a more theoretical description, see the Wikipedia page on current source.

Some devices are very good at creating a connection to ground. (or whatever the lowest voltage is in the system, e.g. 0V) Other devices are very good at creating a connection to Vcc. (or whatever is the highest voltage in the system, e.g. +5V)

Those devices that are good connecting to ground are called current sinks; those good at connecting to Vcc are called current sources. Until recently (the last decade or so), it was unusual for integrated circuits to be good at being both. Most were good at being current sinks but were terrible at being current sources. So at lot of circuits were designed so all the chip had to do was connect to ground to make the circuit do its thing. Many chips still have an asymmetric current drive ability and function better switching to ground than switching to Vcc.

To me a good example of current source and current since are the standard "switch" configuration of a PNP and NPN transistor. A PNP is a good current source: you almost always connect its emitter to Vcc, and it switches it on/off. A NPN is a good current sink: its emitter is almost always connected to ground and it switches the ground connection on/off.

Why you choose one over the other often depends on the capabilities of the parts available to you. For instance, an RGB LED is often a "common-anode" type where the anode (positive lead) is connected on all three LED elements, so to turn on an element you need to connect its lead to ground. You can use three pins on a microcontroller to do this (or three NPN transistors) and they would be acting as current sinks.

-

Transistors are like water valves. They can either block a flow of water, or allow a flow of water to pass through them.

Current sources and current sinks both have these valves at the output, to either block current or allow current from outside devices. The difference is simple:

• A current sink has a valve that internally connects to a low pressure
• A current source has a valve that internally connects to a high pressure

If you connect a current sink to a component that's connected to a low pressure, nothing will happen. Both sides are at the same pressure, so it doesn't matter whether the valve is open or closed, no current will flow.

-

To start with, the floating input. In TTL floating inputs are the same as high, and they're not bad, as they are in CMOS. If you leave the input floating or make it high the second transistor will get current through the input transistor's base-collector junction, so the second transistor will conduct, and create a voltage drop over the 1k$\Omega$ resistor, which in turn will cause the lower output transistor to pull the output low. So it's indeed working as an inverter.

The output configuration is known as a totem-pole. It's kind of a push-pull, but with a difference: instead of a complementary NPN-PNP pair it uses two NPN transistors, and the diode an 130$\Omega$ resistor make it even more asymmetrical.
As a consequence a TTL totem-pole will be able to sink much more current than it can source, typically 16mA vs 0.4mA. So if you want to use TTL to control LEDs you'll want to connect the LED's anode via a resistor to $V_{CC}$ and sink the current.

-

Adding to todbot's answer. The reason you see thinks better at current sinking was not arbitrary, the transistor is physically one step faster to make with older processes. I also believe it's mobility of electrons is higher, but that is probably a bit too much device physics. -Max

-