For the past couple of weeks I've been chasing myself in circles trying to describe a circuit.. a current regulator (officially called a current source). The trouble is that it uses diodes as voltage references, and trying to explain why that works takes more than a couple of sentences.

I'm not talking about zener diodes by the way.. just a plain old LED and the base-emitter junctions of a couple transistors. They work (and work well) but I couldn't explain why.

Situations like this stop me dead in my tracks. Albert Einstein once said, "If you can't explain it to a six year old, you don't understand it yourself," and learning that quote set me on a permanent collision course with the limits of my understanding. When I find myself not quite able to put something in words, I become obsessed with unpacking the ideas until I can walk step by step through a full explanation.

Having done so, I found myself with upwards of 6000 words on the subject.. hardly surprising I couldn't squeeze it all down to fit between a pair of parentheses.

I now intend to subject you, my innocent readers, to this infodump.

I do have some sense of mercy though, so I'm breaking the mass into a series of smaller pieces.

So, having now stalled for as long as I can,

# Let's talk about diodes

## The simple explanation of diodes:

Most people think of diodes as one-way valves for electrons. Current can flow through them one way, but can't flow through the other.

That's true, but not terribly useful for my purposes. All the diodes in the current source are in the 'current flows through them' position.

## The not-simple explanation of diodes:

Unfortunately, once you get past the too-simple-to-be-very-useful
description, you fall into a thicket of "okay, but ** why?
** " questions that lead all the way down to the subatomic level.

The basic problem is that diodes don't work the way wires do.

### Drift current:

Electrons in a wire (or any normal conductor) move in a way that's called 'drift'.

It's pretty much the same as the motion of soap bubbles in the wind or -- a bit more accurately -- fish in a river: an external force pushes them (or pulls them) and they move in the appropriate direction.

Fish represent electrons better than bubbles because they don't just float along passively. They also move on their own. It would be hard to predict the exact position of any specific fish at any specific time, but over a longer time -- and considered collectively -- the whole school tends to drift downstream with the current.

Make the fish about fourteen orders of magnitude smaller, set them moving at the speed of light, and you have a pretty good first approximation of how electrons move in a wire.

### Diffusion current:

Diodes don't work that way.. or they do, but only halfway through. The other (more interesting) half follows the rules of diffusion.

Diffusion is what happens when you drop ink into water or set an open bottle of perfume on one side of a room with reasonably still air. When you have a high concentration of something in one place, a low concentration somewhere else, and a path connecting the two, the concentrations tend to even out over time.

Heat transfer also works by diffusion, and it's a useful analogy for drift current. Even if you don't know the math that describes heat transfer, most people have an intuitive understanding of how it feels when things get hot or cold.

### Important differences:

Drift and diffusion are different mechanisms. They can both happen at the same time, (sometimes moving in opposite directions) and they obey different rules.

The math that describes drift is 'linear', meaning that if you draw a graph of it, you'll get straight lines. The speed of a drifting particle depends on the force pushing it forward and the number of obstacles the particle has to push out of the way. If you push twice as hard, the particle will move twice as fast, If you put twice as many obstacles in the path, the particle will slow down by half.

The math that describes diffusion is 'exponential'. It's easy to describe in a stepwise fashion, but the results get kind of weird over the long term.

For exponential systems, there are two ways of saying the same thing:

- The rate at which something changes depends on the amount of it you have.
- It always takes the same amount of time to cover half the remaining distance.

Exponential systems gradually (asymptotically) approach their final value in a [1/2, 3/4, 7/8, 15/16, etc] pattern. The resulting curve looks like this:

always getting closer to 1, but never actually getting there.

Mathematicians and physicists love exponentials because A) they're easy
to work with (for appropriate values of 'easy'), and B) they occur **
everywhere.
**

### Diffusion in diodes:

How does diffusion happen in diodes? Through 'minority carrier transport'.. which opens a whole can of worms I'll discuss next time.