August 21, 2015

899 words 5 mins read

Electricity as a shower (Understanding Volts and Amps)

shower
Normally electricity and water don’t mix, however today we’re just talking analogies. When working with electronics, it’s very common to see questions along the lines of “My project requires X volts, is it okay to use Y power source” or “My Raspberry Pi requires 1 amp, will a 2 amp power supply burn it out?". If you don’t know electricity, this makes perfect sense to ask. Rather than answer specific questions, how about an analogy?

Pretend for a moment that you’re taking a shower. You have your shower pressure (how fast it’s coming out of the shower head) which is voltage. Like any shower, there is a perfect water pressure, the shower comes out just so and makes for a wonderfully cleansing experience. Now, sometimes the water pressure varies a little bit and it’s not a big deal. However, at a certain point if the pressure gets to low, its just a trickle of water out of the faucet — no good. Or maybe it gets too high and the jets of water sting you (if you’ve got a traditional shower, not one of those fancy “rain” showers) or water starts to go everywhere.

power supply
It is the same thing for voltage. If you take a look at the specs sheet for an ATmega328P (the chip in the Arduino Uno) you’ll see that it’s rated for 1.8 — 5.5 volts, which is a decent range. If you provide it a nice 3.6 volts, right in the middle, it’ll be happy as a clam and have space for the voltage to go lower or higher on either side. If you take a look at most power supplies around your house, you’ll see something like 100-240v; it’s a big range but they’re designed to work properly for both 110v AC outlets (like in the USA) and 220v AC outlets (like they have in the UK). Remember though, electronics can’t “get out of the shower” in our analogy, so if you apply too much voltage to them — you’ll probably fry the gear. So keep your voltages in the specified range.

ely water tower
What about Amperage? That’s like the amount of water you have for your shower. Normally your house has a supply in gallons per minute, lets say 10 gallons/per minute. Your shower, we’ll say, uses 5 gallons per minute. So you’re set, perfect shower. What if you retrofit your bathroom to have showers on both sides, each using 5 gallons a minute. 2 * 5 gal = 10 gallons — you’re perfect! Ah, but now you use your double shower AND flush the toilet, suddenly things don’t work so well. Your toilet needed water too and you used more than the 10 gallons per minute your house can support. Maybe a shower stopped for a second, maybe the water went cold, maybe it just sputtered. Either way when you’re done playing in the shower and turn it off, the water is still there available to use, no harm.

IMG_0226
Back to electronics — you may have a power supply that provides 5 volts and 2 amps. If your Raspberry Pi only requires 1 amp, you’re perfect. You even have 1 amp left over that you could direct to something else like LEDs. As long as the total “draw” of all the items doesn’t go over the 2 amps that your power supply provides, you’re golden. Keep in mind that most devices have a “peak current” measured in amps. A Raspberry Pi may normally only require 500mA (500 milliamps, or half an amp), but could spike up to 1.5 amps if taxed hard. Often times you can google this information, if it’s not already listed in the spec sheet. The safest thing is to spec your power requirements for ALL your devices’ peak current usage.

Screen Shot 2015-08-21 at 4.48.29 PM
So what about being on batteries? Same concept, just you need to do the math for your storage tank. Now you’re taking a shower in an RV, and it has a 100 gallon tank. You’re 5 gallon a minute shower will be supported for 20 minutes, before you run out of water. If you turn off the shower after 2 minutes, you’ll still have 90 gallons left in the tank. Batteries also have a maximum rate at which you can siphon off power and this is the one place where the shower metaphor breaks down. Take the newest generation of Eneloop AA rechargeable batteries, the spec sheet for these BK-3MCC indicates that you can draw up to 6000mA. The real catch, if you look at the charts, is that the more amperage you pull, the less efficient the battery gets (and therefore the less power you get out of it). This is true for all batteries, so if the exact length of battery life is critical, check the spec sheets before you buy.

So there you go. It’s not a perfect analogy but if you understand the basics of how a shower works, you should now understand the basics of powering your electronics. If you’re the “tl;dr” type, here’s the short version: Voltage must be correct (or very close), Amperage you can safely have more.

Update: John, the editor, let me know that he recently read “The Manga Guide to Electricity". He noted that the book used a nearly identical analogy to what I used here, so the manga maybe of interest to those readers whom are more graphically oriented.