On that note I'm still a little unclear about what happens if you have two different voltages in your device (such as a microcontroller switching high power via MOSFETs), obviously separate from each other in main circuit from PSU onwards, but which will have to meet at a common ground to work... is that right? They must meet, and only once at the end?
Yes, they must meet. Though preferably, they should meet many times, a continuous number of times -- like on a ground plane.
Do I have to make sure both end up at 0V at the ground plane? That might sound dumb... most components will "use up" all voltage provided obviously and simply explode if the power is too much, but what about non-resistive components such as an LED, or an accidental short of high volts into ground? I just have to be careful not to do that I suppose?
They will. Consider a constrained geometry problem:
Suppose you have a slot that's just wide enough to hold a rectangular bar. The bar has two holes, one in each end.
Suppose there are two bars, in facing slots, so they can both slide independently, like sashes in a double-hung window frame.
A pin can be placed through the holes, when the holes in the bars line up with each other. When this is done, they will not move independently. The pair will move independently, as a set, but will not move relative to each other.
Finally, suppose you have a pair of dividers (no relation to the "voltage divider", this is a geometric tool that looks like a compass), marked with a scale. One leg is labeled "+" and the other "-". You can set the legs of the dividers to any distance, and measure that distance. The tips fit particularly well into the holes in the bars...
Now. If we pin the bars together (pick any pair of holes), the pair will slide independently. Suppose we grab onto the "-" leg of the divider, to fix it in place, and measure distance to one of the holes. This distance is meaningless, because -- what are we grabbing? It has no relation to the position of the bars: they can slide anywhere we want, so there is no correct answer. It's an arbitrary floating measurement!
Okay, so let's place the "-" leg in one of the holes. Now we can, say, measure the length of one bar, from hole to hole. No matter where each bar is positioned, we measure this consistently.
This is identical to measuring a supply's voltage, with a meter, and not caring what common mode (or absolute) voltage it has relative to its surroundings. A 9V battery is still a 9V battery, whether it's sitting on the table, or one leg is grounded to Earth, or it's sat on top of a Tesla coil!
When we pin the bars together, we have three options:
- Bar 1 'finish' to bar 2 'start'. The bars are in series, and the total length adds.
- Bar 1 'start' to bar 2 'start'. The bars are in series, and the total length subtracts. (Or finish to finish, which flips the sign. If the total is zero, then it doesn't matter which hole is pinned: a degenerate case. You can intuit that, if they are slightly mismatched, then any "slop" to the pin in the hole allows them to be connected in parallel (two pins, one each end) without too much trouble...)
- Bar 1 'start' to bar 2 'finish'. They're backwards; we've flipped the polarity from the first case. The total length adds, but it's going the opposite direction (if we label the holes, and keep the measurement +/- matched up accordingly, we have to flip the dividers so they read negative).
When the bars are in series (adding), we have three choices where to place the dividers: start, middle or finish. If we put "-" on the start, then we measure two different positive distances at the remaining hole positions. This is using the 'start' as common ground reference.
If we put "-" in the middle, we measure one positive and one negative distance. This is using the 'middle' as common ground. This is a bipolar supply. (These are handy for circuits that need to drive symmetrical signals, like audio amplifiers. If the distances aren't equal, we will probably call this an "unsymmetrical bipolar supply"; these are handy for some op-amp and logic circuits.)
If we put "-" on the finish, both are negative. Same thing as before, just backwards.
About connecting things in parallel. If the bars are very stiff, and the holes are very tight, it takes very little mismatch to make it impossible to pin them together. The mechanical reason is that it will take a lot of force to pin them together. Whereas if the setup is much more flexible, they can be connected with little force.
This is analogous to connecting power supplies in parallel, given differences in output voltage, and equivalent output resistance. Two sources of different voltage will draw a current between them, and if they are very low resistance, the current can be very high indeed.
Now, speaking of current, let's also consider a load. In this mechanical analogy, if we stretch a spring across one bar (hooking the ends into the holes), it carries some tension (current). If we stretch it across the other bar, same again (proportional to length, that is). Or if the bars are in series, it stretches even further, and carries even more tension.
That's all your circuit will do: you don't have to worry about it stacking up correctly, it will find its own balance.
Bad circuit designs can suffer from this, though, so be careful. Example: using zener diodes in series to create a midpoint voltage. Zener diodes exhibit a ~constant voltage drop, so if the total voltage imposed on a chain of zeners is more than the total, current skyrockets. (The usual design approach is to use a series resistor, limiting current to a reasonable value. Inefficient, but it works well.)
What about ground bounce? I assume with only one source and one ground (but different voltages used at different parts of the circuit - high side and low side I think is the term) you will still get everything 0V at the ground plane naturally when they meet right?
Bounce! Ah, you're ahead of yourself!i
Now let's go through all that again, but instead of leaving the bars sitting there, we're tapping them with hammers, and instead of one hole at one end, there's a bunch of holes in a row, across the bar. Give or take angle, the holes are all the same distance to the far end; but if we start tapping on the bar with a hammer, it vibrates, and each hole has a slightly different position during that vibration!
Clearly, if we built the bar out of a wire frame, the vibrations could be very large; and if we use solid metal, it's much reduced. Alternately, we could use large chunks of metal, separated by wire frames, so that local areas are stiff, but allowed to flex with respect to other local areas.
In this way, we can see that ground plane under a circuit provides a stable (but not perfect) reference for all the signals in the circuit; that signals are only referenced to their local environments; and that, if we should connect local areas together, we must be mindful of the voltage drop that may exist between their grounds (which is called a common mode voltage).
Tim