Current Sources

February 6, 2013 12:08:35 AM CST

A while back I showed some of the layout process for this circuit board:

pcb layout

Since then I've etched, built, and tested it.

Here's the board prior to etching. I did a few boards for this circuit along with another one I wanted to test:

toner on 

Here's the blank after etching:


And here's a populated board.. the etching and soldering are both a bit rough, but I've done worse:

closeup of the populated board

In the larger version of the photo you can see the markings on almost all the components, and even the little block of gallium arsenide sitting on its pad in the LED.

The circuit itself is a current source.. sort of like a voltage regulator, except that it regulates current. The schematic looks like so:

schematic for the current sink

Ambiguity of terms:

Now, some people might call this a 'current sink' instead of a 'current source'. The word 'source' has conflicting meanings when it applies to current, depending on whether you use it as a verb or a noun.

A circuit that 'sources current' provides a path to Vcc and one that 'sinks current' provides a path to GND. Thing is, the notions of 'sourcing' or 'sinking' current don't include any concept of regulation. It's perfectly fine to say a power supply "can source current up to 3.2 amps" or whatever.

All devices that regulate current are called 'current sources', because the 'sourcing' or 'sinking' depends on which end you're looking at. All current sources 'sink current' from anything between them and Vcc, and 'source current' to anything between them and GND.

The circuit above provides a regulated current path to GND, and its output line sits between the transistor and Vcc. To be strict about the usage, it's a current source configured to sink current from some external source. What you choose to call it is entirely up to you.

Here's the schematic for an equivalent circuit that provides a regulated current path to Vcc for some external load.. a 'current source' by either definition:

schematic for the current source

Circuit description:

To make things even more confusing, there are actually two subcircuits that control current at work in this design, one that sinks current and one that sources it.

The green part (first stage current source):

If you've read the last few posts, the part shaded in green should look awfully familiar.

LED1 and the base-emitter junction of Q1 are both diodes. They have different forward voltages, and the difference between them shows up across R3.

Since the voltage across R3 is defined by two diodes, it will stay reasonably stable. That means the current flowing through it will also remain stable. The vast majority of current flowing through R3 comes through Q1's collector though, so Q1 sinks a more or less constant current.

two current 

The blue part (second stage current source):

R2 and the base-emitter junction of Q3 form another resistor-and-diode-in-series pair.

Q2 and Q3 control each other's bases, and form a negative feedback loop. Q2 does most of the interesting work, and acts as what's called a 'shunt' between Q3's base and VCC.

Without Q2, Q3's base would be tied to Q1, which wants to sink a more or less constant current. Q3's base can supply current, so Q1 would pull Q3 open. Transistors have current gain, so the current through R2 would end up being 50-100 times the amount flowing from Q3's base into Q1.

Putting Q2 in the circuit changes that.

Q2 allows Q1 to control Q3's base until the voltage across R2 reaches about 0.6v. Once that happens, Q2 starts feeding current to Q1.

Q1 only wants a fixed amount of current though. As Q2 provides more and more current, it chokes off the current flowing from Q3's base. The whole system comes into balance when the sum of the currents flowing through Q2's collector and Q3's base is exactly equal to the amount of current Q1 wants to sink.

Q3's base is sensitive to small changes, Q2's collector changes dramatically when the voltage across R2 changes, and Q1 doesn't want to change at all. Putting them all together, you get a feedback loop that really tries hard to stay at a fixed point.

That fixed point controls the base of Q3, which controls the current through R2. That means the current through R2 wants to remain very stable, and 98-99% of it passes through Q3's collector out to the load.. whatever that happens to be.


I know from prior experience that the blue section's output has excellent 'load rejection'.. changing the resistance of whatever circuit comes next has very little effect on Q3's output.

I wasn't so sure about the circuit's 'supply rejection' though.. changes in output that occur when you change VCC. I know diode-resistor pairs minimize such changes, but wanted to see how well the two-stage circuit would perform.

Here's a sketch of the test circuit:

the test setup

The part to the left is a really bad voltage regulator.

The square wave generator toggles one end of the voltage divider between Vcc and GND. The voltage where the resistors meet will depend on the ratio of the resistances.. if you want the full jargon, the resistors are a 'weighted adder' and the spot where they meet is the 'summing node'. When the square wave is HIGH, the voltage at the summing node will be Vcc. When the square wave is LOW, the voltage at the summing node will be:

(Vcc x R2) / (R1 + R2)

Where R1 is the 100 ohm resistor and R2 is the one with the question mark (for the tests, the values were 330 and 3300 ohms).

The NPN transistor is set up as an emitter follower, also known as a voltage buffer. The voltage at its emitter will be about 0.6v below the base, and the base is tied to the middle of the voltage divider.

The upshot is that the supply voltage going into the current sink swings up and down pretty hard (1v for the first test, .1v for the second test). The point is to see how well the current sink can ignore those changes.

The 1k resistor over on the right measures the supply rejection. A milliamp of change through the current sink would produce a volt of change across the resistor, but the actual changes are in microamps and millivolts.

Here's a shot of the circuit set up for testing:

The setup:

the test 

The board with the yellow LED is the square wave generator, the one with the red LED is the current sink. The NPN transistor is that thing in the middle with the blob red paint on top (I always paint my prototyping transistors.. it's much easier to find 'the red NPN' in a pile of 'blue PNPs' than it is to read the markings on every single device).

The probe coming in from the lower left measures the voltage across the 1k resistor (blue trace), the one coming in from upper right measures the supply voltage (yellow trace).

Everything else is there to keep the square wave generator from pumping noise into the VCC and GND rails. Digital signals are noisy .

First test:

Here's how the current sink handles a supply ripple of 1v:

traces for 1V of 
supply swing

Given that the whole thing is driven from a 3-AA battery pack with a maximum voltage of 4.5v, that's some pretty serious swing.. the change is 20-25% of the total. The output shows spikes of about ten millivolts either way, which corresponds to ten microamps of change in the current.

Comparing changes in voltage to changes in current is messy, but it's easy to convert current to voltage. To calculate supply rejection, you compare the voltage change at the input to the change in voltage that would appear across a 1 ohm resistor. In this case, that would be 10 microvolts, but let's call it 15 to leave room for error.

We usually express ratios in terms of decibels, so in this case:

  • 15uV / 1V = 0.000015
  • 20 * log( 0.000015 ) =~ -96db

Another way to express rejection is to imagine a voltage divider with the change in input voltage at the top and a 1 ohm resistor showing the change in output voltage at the bottom:

something like this

In this case, the upper resistor would have to be about 68k.

They aren't amazing results, but they aren't bad.

Second test:

Here's how things look for a 0.1v change in the supply voltage:

traces for 
100mV of supply swing

I'm going to call that 5mV of swing from peak to peak on the blue trace, or about 2.5 microamps of change. Doing the decibel thing again, that comes out to about -92db of rejection, or a 40k resistor.. slightly worse than for the large change.

I don't have a good excuse for that loss of quality, but would guess that the breadboard and the generally bad quality of the test circuit plays a part. I'll have to try again with a test circuit built on copper, with an op amp for the buffer and better isolation for the square wave generator.

I want to kick this circuit around a bit more before I publish a full design. Still.. taking this as a worst case, a supply rejection of -90db or better doesn't suck.

Random brain cookies:

Forms follow function, and often obliterate it.