This is the first in a series of articles that will introduce absolute beginners of all ages to electronics and microcontrollers using the Arduino. In this column, we say hello to voltage, current, and resistance.
Over the years, I’ve introduced several people to microcontroller units (MCUs) and electronics using the Arduino Uno as a simple development platform. In the case of younger folks, they typically want to see things happening as soon as possible. By comparison, older students also tend to be interested in learning the underlying fundamentals.
I have tremendous respect for the various starter kits and beginner’s books that are available for the Arduino, like the ELEGOO UNO Project Super Starter Kit with Tutorial, for example, which — at the time of this writing — is available for only around $40 from Amazon Prime. These materials certainly get folks up and running quickly, and it doesn’t take long before people are pressing pushbuttons and flashing light-emitting diodes (LEDs) with gusto and abandon. However, I fear that oftentimes the result is to learn how to make things happen without actually knowing what is going on “under the hood,” as it were.
Another great thing about the aforementioned kits is that beginners can hit the ground running without requiring any tools, but this also limits their possibilities for future development. And one more downside to existing kit approaches is that the users don’t really know what to do if things don’t work as planned, which is most of the time in my experience, but maybe that’s just me.
As an aside, when I was a young lad of around 14 years old, I really wanted to understand electronics and build cool and cunning things, but this was long before the internet and I found almost everything I read on this subject to be horrendously confusing. One of the problems was that many of the authors assumed preexisting knowledge on the reader’s part. They seemingly had no clue as to how little I knew. If there had been such a thing as a “pit of misconception,” then it would have been a safe bet that I’d have hurled myself into it.
So, if you already know this stuff, and if you think some of my analogies and explanations are over-simplistic, please bear in mind that I’m not writing it for you – I’m writing it for me when I was just starting out on my quest to be an electronics engineer. And if I ever get my time machine working again (you simply can’t find the parts in the city where I hang my hat), I’m going to give 14-year-old me a really big surprise.
I’ve been thinking about this for quite some time and I have a cunning plan — “A plan so cunning we could pin a tail on it and call it a weasel,” as Blackadder would say. As a starting point, I’m going to write a series of Cool Beans Blogs to introduce fundamental electrical, electronic, and microcontroller concepts and principles in a fun and interesting way.
You may not be too surprised to discover that I’m going to come at this from a somewhat different direction to the usual suspects. My plan is to introduce concepts at a high level of abstraction while still conveying an understanding of the nitty-gritty details as to how things work. This will be a balancing act indeed, which explains why I just dispatched the butler to fetch my favorite pair of balancing trousers.
Furthermore, in addition to some nitty-gritty hands-on tasks, I’m also planning on creating associated videos providing tips and tricks and showing the experiments we discuss actually working in the real world.
It’s important to note that none of this is intended to replace existing books and starter kits — but rather to augment them. Having said this, if you are an absolute abecedarian, which — in this context — we will take to be synonymous with tenderfoot, novice, learner, neophyte, fledgling, amateur, or dabbler, then you may opt to start with my columns and use them as a springboard, following up with the other materials at a later date.
Introducing Voltage, Current, and Resistance
There are three fundamental concepts that we run into all the time in electrical and electronic engineering: voltage, current, and resistance. We also talk about “electricity,” but we’ll explain what we mean by this, and by the difference between “electrical” and “electronic,” shortly.
Purely for the sake of providing us with something to talk about, let’s visualize these little scamps as Cool Beans wearing T-shirts (stranger things have happened).
You’ll have to excuse resistance, who appears to have had a little too much coffee this morning. Unfortunately, it can be tricky to wrap your brain around these little rascals when you are initially exposed to them. What we need is some way to envision the relationship between them.
Let’s start with an analogy based on a 2-liter plastic fizzy drink bottle (you can replicate this experiment at home, if you wish). We commence by emptying the original contents of the bottle down the sink (you wouldn’t want to drink them, for goodness sake) and removing any external paper labels. Next, we use a permanent marker to draw a series of horizontal lines up the side. Annotate some of these marks with numbers starting with 0 a little way above the bottom and adding a ‘V’ character at the end. I used 18 graduations in my diagram because that’s what I felt like doing — you can use as many as you want.
In this example, we are using the height of the water in the bottle to represent voltage in an electrical system. The ‘V’ is the symbol we use for “volt,” which is the derived SI unit of electrical potential (we don’t need to worry what “electrical potential” means at the moment). The term volt itself is named after the Italian physicist Count Alessandro Giuseppe Antonio Anastastio Volta (1745–1827), who invented the electric battery in 1800, and who would have found it difficult to squeeze his name onto a credit card or a driving license (so it’s lucky for him that these weren’t around at that time).
As with all SI units whose names are derived from the proper name of a person, the first letter of its symbol is uppercase (e.g., ‘V’). However, when an SI unit is spelled out, it should always be written in lowercase (e.g., “volt”), unless it begins a sentence.
When we write things down, we might say “5 V” or “5 volts,” always with a space between the number and the qualifier. In both cases, we’d say “five volts” in conversation. We should probably make mention that it’s not uncommon to see 5V without a space, but this usage is frowned upon by those who don the undergarments of authority and stride the corridors of power.
Now, fill your bottle up to the halfway mark (the 9 V mark on my diagram), stand the bottle on something like an upturned saucepan next to your kitchen sink, and put a small measuring cup in the sink (a small transparent plastic cup with a mark on the side will do fine). Punch a small hole (say 2 mm diameter) into the bottle at the 0 V mark and record how long it takes to fill the measuring cup to some predefined mark you’ve selected (say 1/4 or 1/3 full). If you don’t have access to a timer, just counting “one Mississippi, two Mississippi, three Mississippi…” will be close enough.
The hole resists the flow of the water. In this case, we might say that, “the resistance is a function of the reciprocal of the cross-sectional area of the hole.” This is a complicated “engineer-speak” way of saying that when the hole gets bigger, the resistance it offers gets smaller, and vice versa, of course.
In our analogy, we’re using the hole to represent the resistance in an electrical system. In the same way that the hole resists or limits the amount of water that can pass through the hole, so does resistance in an electrical circuit resist or limit the flow of electricity.
We use the uppercase Greek letter Omega ‘Ω’ as the symbol of resistance, which is measured in units of ohms. When we say “ohm,” it sounds like “Oh” and “mmm” crunched together, which explains why we use ‘Ω’ as the symbol (sound them out: “ohm” and “Omega”). The term ohm is named after the German physicist Georg Simon Ohm (1789–1854), who defined the relationship between voltage, current, and resistance in 1827 (we now call this relationship Ohm’s law).
Last but not least, we turn our attention to current. In an electrical circuit, we might think of current as being the amount or quantity of electricity flowing through the circuit. In our water analogy, this is the amount of water flowing through the hole at any particular point in time.
In an electrical circuit, we measure current in units of amps, where the term amp is named after the French mathematician and physicist André-Marie Ampère (1775–1836), who formulated one of the basic laws of electromagnetism in 1820. Somewhat confusingly, the SI symbol we use for current is the letter ‘I’, which originates from the French phrase intensité du courant, meaning “current intensity.”
The Relationship Between Voltage, Current, and Resistance
Let’s look at our water bottle example above and see if we can work out the relationship between voltage, current, and resistance. What do you think will happen if we repeat our experiment starting with the bottle filled to the topmost mark (the 18V mark on my diagram), for example?
Let’s try this and see. Remembering that all analogies are suspect, and this analogy doubly so, we should reach the mark in our measuring cup in about half the time it took last time (it would be closer to exactly half the time if we could magically maintain the water level in the bottle at the 18 V mark in this test, and at the 9 V mark in the previous test). On this basis, we might say that doubling the height of the water (the voltage) doubles the amount of water flowing through the hole (the current). One way to think about this is that the greater the depth of water inside the bottle above the hole, the greater the pressure of the water inside the bottle on the other side of the hole. So, we can think of the depth of the water (voltage) as equivalent to the “pressure” that forces the water (current) through the hole (resistance).
Now let’s increase the size of the hole. It used to be 2 mm in diameter, which means its radius was 1 mm. Remembering that the area of a circle is given by the formula A = πr2, this means that the cross-sectional area of our original hole is 3.14 mm2. Let’s increase our hole to have a diameter of about 3 mm, which means the cross-sectional area of our new hole will be 7.07 mm2. Just for giggles and grins, rounding furiously, waving our arms in the air, and hoping no one looks too closely at our math, let’s say that our new hole is twice the area of the original hole.
Remember that when the hole gets bigger, the resistance it offers gets smaller, so what do you think will happen if we repeat our previous experiment with our larger hole starting with the water at the 18 V mark?
Once again, let’s try this and see. Nothing we are doing here even pretends to be precise, of course, but if our new hole really is twice the area of the original, then it should take only half the time to fill our measuring cup to its halfway mark.
Let’s return to our trusty Cool Beans (if you can’t trust a Cool Bean, who can you trust?). In the case of our water example, and as illustrated in Figure 3, we might think of our voltage (V) bean as trying to push our current (I) bean through the hole, while our resistance (R) bean does its best to impede things.
Electricity, Electronics, Conductors, and Insulators
Everything in the universe is made from collections of tiny particles called atoms. In turn, atoms are formed from even smaller (sub-atomic) particles called protons, neutrons, and electrons. Each proton carries a single positive (+ve) charge; each electron carries a single negative (-ve) charge; and the neutrons are neutral (we can think of the neutrons as the “glue” that holds everything together).
The number of protons determines the type of the atom. For example, hydrogen has one proton, helium has two, lithium has three, and so forth. By default, however many protons an atom contains, it also has the same number of electrons to balance things out, thereby leaving it in an electrically neutral state. If we try hard enough, however, we can pull electrons off atoms, leaving positive ions. We can also force electrons onto atoms, resulting in negative ions.
Positive ions don’t enjoy being positive ions – they really want to recoup their missing electrons and return to their electrically neutral state. Similarly, negative ions would be more than happy to rid themselves of any surplus electrons and return to their electrically neutral state.
We can envisage a simple battery as being formed from two containers – one filled with positive ions and the other filled with negative ions – with an insulating layer between (Figure 4a).
At this point, it’s important to note that, relatively speaking, the protons and neutrons are pretty much fixed where they are. We can think of these as being cantankerous and ponderous old men who see no good reason why they should get out of their comfy chairs and go anywhere, thank you very much! By comparison, electrons are teeny-tiny and extremely mobile. We can think of these little scamps as enthusiastic kids with boundless energy.
What the electrons want is some way to get from the side of the battery containing the negative ions to the side containing the positive ions. Some materials, like rubber, are referred to as insulators because they resist the flow of electricity and don’t allow electrons to pass through them (an ideal insulator would have infinite resistance). Other materials, like copper, are referred to as conductors because they allow electrons to pass through them with little resistance (an ideal conductor would have zero resistance).
An electrical or electronic circuit is composed of individual electronic components – such as resistors, capacitors, inductors, diodes, and transistors – connected by conductive wires or traces through which electric current can flow (we will introduce all of these components in the fullness of time).
A useful analogy here is to think of the network of copper pipes carrying water around a house. This is analogous to copper wires in an electrical or electronic circuit conveying electricity around the circuit.
The term “passive” is used to refer to a component (e.g., a resistor, capacitor, or inductor) that simply reacts to whatever is going on around it. The term “active” is used to refer to a component (e.g. a transistor or a vacuum tube) that can control what goes on around it. If a circuit comprises only passive components, it’s said to be an “electrical” circuit. By comparison, if – in addition to any passive components – a circuit contains at least one active component, it’s said to be an “electronic” circuit.
Most of the time, especially when we are talking about wires, we want to keep the resistance values in a circuit as small as possible. Sometimes, however, we wish to add an element of resistance, in which case we use a special component called a resistor. Some example resistors are shown in Figure 5 (we’ll discuss what the colored bands mean in a future column).
Let’s assume that we have a circuit formed from a 5 V battery, a resistor, and two pieces of copper wire as illustrated in Figure 4b. As soon as the final connection is made, electrons will start to race through the copper wires and the resistor, commencing their journey at the side of the battery containing the negative ions, and terminating it at the side of the battery containing the positive ions. Eventually, all of the electrons will be back where they belong, and the battery will stop working, at which time we would say that the battery has been “drained.”
All of this leads us to definitions of electricity and electronics that we can wrap our brains around. We can think of electricity as being humongous numbers of electrons racing from one place to another through a circuit, while electronics is the art of telling these electrons which way to go and what to do while they are on their journey.
Surprisingly, there’s a lot of hidden complexity in Figure 4b, not least the fact that we’ve shown one end of our 5 V battery as being +5 V and the other end as being 0 V. Happily, we’re going to ignore most of this complexity and pretend it doesn’t exist. There is, however, a fly in the soup or an elephant in the room (I never metaphor I didn’t like). Earlier, we said that the electrons travel from the negative side of the battery to the positive side, but the current arrow in our diagram appears to indicate that current flows from the positive side of the battery to the negative side.
This is a conundrum indeed. How can this be? Well, the thing is that when people discovered electricity deep in the mists of time, they didn’t really know what it was, and they certainly didn’t know anything about atoms and protons and electrons. For a variety of reasons, some theological, they thought that electricity flowed from positive to negative, so that’s the way they drew the arrows in their circuit diagrams. By the time we learned the ghastly truth, it was too late to change all the textbooks (seriously). As a result, although we now know that electricity flows from negative to positive, we all pretend it flows from positive to negative (it truly is a funny old world).
Ohm’s Law and Ohm’s Triangle
Earlier, we noted that it was the German physicist Georg Simon Ohm (1789–1854) who defined the relationship between voltage, current, and resistance, and that we now call this relationship Ohm’s law. The most commonly referenced form of the equation for Ohm’s law is as follows:
V = IR
We might also write this as V = I*R or V = I × R, where V is measures in volts, I is measured in amps, and R is measured in ohms.
The thing is that if we know any two of these values, we can work out the third. For example, if we know the current and the resistance in a circuit, we can calculate the voltage that’s driving it. Alternatively, if we know the voltage driving a circuit and the resistance in the circuit, we can calculate the current flowing through the circuit.
A very common situation is that we know the voltage driving the circuit and we know the maximum amount of current we want to flow through the circuit. Knowing these two values, we can calculate the value of the resistor we need to add to the circuit. Thus, we now have three flavors of our equation to play with:
V = IR (used to calculate voltage if we know current and resistance)
I = V/R (used to calculate current if we know voltage and resistance)
R = V/I (used to calculate resistance if we know voltage and current)
A graphical representation of this is known as Ohm’s triangle as illustrated in Figure 6. So, based on what we’ve learned thus far, how about we try some simple example questions as shown below?
Take a look at the circuits in Figure 7 and see if you can calculate the missing values without looking at the discussions below. When you are ready, compare your results with mine.
In the case of Figure 7a, we are solving for current, so we are going to use the equation I = V/R. Since V = 5 volts (or 5 V) and R = 1,000 ohms (or 1,000 Ω), this means I = 5/1000 = 0.005 amps (or 0.005 A).
Now, 0.005 A is five thousandths of an amp. In electronics, we often have to work with large and small values, but we dislike having to write lots of 0s. In the case of our resistor, for example, rather than write 1,000 Ω, we would typically use 1 kΩ, where ‘k’ stands for “thousand.” Similarly, in the case of the current value we just calculated, rather that write 0.005 A, we would typically use 5 mA (milliamps), where ‘m’ stands for “milli” or “thousandth.”
Now let’s turn our attention to Figure 7b. In this case, we are solving for resistance, so we are going to use the equation R = V/I. Now, the desired current is shown as being 20 mA, but Ohm’s law requires that we work in units of volts, amps, and ohms. This means we must think of the current as 0.02 A. Since our voltage is 5 V and our desired current is 0.02 A, this means R = 5/0.02 = 250 Ω.
Phew! I know that the above is a lot to wrap our heads around, but it really is worth taking the time to get a feel for what voltage, current, and resistance are and how they play together, because this is going to make it so much easier to understand the things that are to come.
In Part 2 we will consider some useful tools that will help us to build electronic circuits. Later, in Part 3, we will start to play with some simple circuits, including ones involving light-emitting diodes (LEDs). Until then, as always, I welcome your comments, questions, and suggestions.