# Computing stuff tied to the physical world

## The water analogy

Once upon a time, a physicist named Alessandro Volta discovered that two different metals with a salty liquid in between generate an electric potential (i.e. a voltage). He combined these “electric cells” into a stack, called a “voltaic pile” to generate much higher voltages. It’s hard to imagine nowadays how the research into all this went – it must have appeared pretty magical at the time.

In a way, some of that magic still persists today, since you can’t see voltage or current directly – only its effects can be made visible or sensed in some other way.

Fortunately, we don’t have to understand what voltage is – as long as we have a sufficiently practical model in our mind of what it does so that we’re able to predict, or at least make an educated guess, of what will happen when applying a voltage to a circuit.

With an apology if you already know all this: dealing with electricity requires a basic but essential intuition about how voltage “works”. Without it, creating circuits is just a waste of time (and expenses, since you’re quite likely to cause permanent damage). Feel free to fast forward through this article if you’ve heard it all before. The following notes are to help everyone else get a feel for the analogy between voltage and pressure.

Ok, so here’s the point: electricity can be compared to water. Voltage is water pressure. There is a lot of written material about this – here’s a nice diagram from the All You Need Is Solar site, found via a Google search:

There’s a small confusing point here, in that the water tank is drawn at a higher level. Just keep in mind that voltage is not analogous to height, but to pressure. Due to the effect of gravity on water, it is somewhat related in this analogy. When pumping water up, the water pressure will increase due to gravity’s pull – there’s no relation with electricity, however.

To take the analogy further…

The pipe has resistance – a thin pipe has more resistance, so with the same pressure, water will flow less quickly, i.e. less current. This is the water equivalent of Ohm’s Law.

In this context, the opposite effect is more relevant: when the connecting pipe is infinitely thick, it will have no resistance, an infinite amount of water will flow, and there will be no way to build up pressure. In electrical terms: a big fat short across a voltage source leads to a huge current.

In the real world, there is no such thing as infinite thickness or amounts. Likewise, in electrical circuits there is always some resistance. In the case of batteries, it is called “internal resistance”, which is like a resistor inside the battery, acting as if it were in series with the circuit. Similarly, in a capacitor (which can also act as voltage source) this is called Equivalent Series Resistance (ESR).

A low resistance – regardless of whether it’s internal or an actual resistor – leads to large currents when the rest of the circuit is shorted out. Which is why shorting out a lead-acid battery, or a LiPo battery, or a large super-capacitor, is a very bad idea. Large currents can generate huge amounts of heat (think: welding equipment). Even at “only” a few volts.

Just like in the water analogy: if you want to avoid big water flows, and keep the pressure intact, then you have to avoid big pipes (and leaks, which are in essence unbounded pipes).

The same holds at much smaller scales as well. Efficient use of electricity, as we’d like it with ultra low-power wireless sensor nodes for example, means we need to control voltage levels very carefully – any difference in voltage levels will lead to current flowing.

[Back to article index]