An introduction or light refresher on voltage dividers and the maths that goes with them.
At DIYODE, we recognise that many makers arrive from different backgrounds to the traditional pathways into electronics. This means someone who can code up amazing projects because they’re already familiar with software or are good at learning languages, may never have picked up an electronic component.
Conversely, we have many readers who are quite young, some in primary school. Many mathematical concepts that are easy for adults are not so for kids. Quite often, something like the relationship between multiplication and division as being the reverse of one another is harder for many students to grasp, even when they can perform both functions well separately. This means that talking about things like voltage being divided evenly across two resistors might require an explanation or refresher of the maths involved.
Because of the varying levels of existing knowledge we expect from those reading these articles, we’ll do our best to break the information into blocks with their own headings. This way, if you already understand, say, fractions, you can skip ahead to how they relate to voltage dividers. However, because many people find fractions a complex topic and many of our younger readers haven’t finished learning about them yet, we have spent quite a lot of the article on them.
It is perfectly ok to need to plug gaps or brush up. In fact, we recently responded to a reader email regarding the answer to an equation in an article. They could not get the answer we did. On investigation, it turns out they had forgotten to apply order of operations. This was a competent person in a job that would have involved reasonable maths, just not indices and order of operations. So when something doesn’t work for you or you cannot remember the basics, don’t hesitate to revisit things even if you think you should know them. Maybe it was something you never ‘got’ well in school despite ‘getting’ apparently more complex things, or maybe you just use it so rarely, you forget! Both points are very familiar to some DIYODE staff!
REQUIRED UNDERSTANDING FOR VOLTAGE DIVIDERS
To follow along with this explanation, you’ll need to understand basic electrical properties. In light of what we highlighted above, it seems prudent to very briefly recap voltage, current, resistance, and Ohm’s Law. Because electricity is the movement of electrons along a chain of atoms, there must be some force involved to move them. The flow of electrons is ‘current’, and the force that moves them results in ‘voltage’. More correctly, there is a ‘potential difference’ between where the electrons are coming from and going to. We measure the potential difference with the unit ‘Volts’, hence ‘voltage’. It’s not technically correct, but it’s easier than saying ‘potential difference’ and it’s commonplace.
Current is measured in ‘amperes’, usually written and pronounced as ‘amps’, and is the amount of electrons flowing past a certain point. Electricity can be thought of as water flowing through a pipe. Current would be the flow in litres per minute, and voltage would be the equivalent of the pressure in the pipe. You can move more water through a pipe of a given size by increasing the pressure behind it, or you can keep the pressure the same and increase the size of the pipe. Electricity works the same way, to a degree.
No material on Earth carries current perfectly. Even superconductors are not perfect, they’re just closer than anything else. Just like water in a pipe experiences friction on the material of the pipe, electrons experience some resistance when moving through a conductor. This either reduces the voltage, or the current. The amount of voltage lost is called ‘voltage drop’. There are some materials that have more resistance than others. Those which conduct no or almost no electrons are insulators. Those which conduct under some conditions and not others are semiconductors, and some materials just have a high resistance to current at all times. These are the basis for electronic components called ‘Resistors’.
There is a relationship called ‘Ohm’s Law’, named after the scientist who identified and quantified it, that describes the relationship between voltage, current, and resistance. The resistance of a material in Ohms (Ω) is the voltage divided by the current. You can also write it as voltage is equal to the current multiplied by the resistance; or that current is the voltage divided by the resistance. All calculations are in base units, not multipliers. In other words, Ohms, and not kilohms; amps and not milliamps. We’ll write a Fundamentals on decimal multipliers in electronics another time.
There is a handy way of remembering this relationship, and it involves drawing a pyramid. When arranged as shown, you can remember it by the phrase ‘Voltage at the Very top, Resistance on the Right’. The order of the bottom two doesn’t matter, but consistency is always helpful. Using this diagram, you can find one unknown quantity by whichever two you do have. Remove the unknown from the diagram, and you will be left with your calculation. Note that the horizontal line under V is a standard division line, while the vertical line between I and R is there for clarity. If I and R are next to each other in your equation, standard maths rules apply: Multiply them.
DC CURRENT THROUGH A RESISTOR
Direct Current (DC) is an electrical current that moves in one direction. That’s what the majority of maker projects use. Alternating Current (AC) changes direction in a regular cycle, and will cross zero volts when it changes. That means not all waves are AC! We’ll stick to DC explanations at this point.
Resistors as components come in different ‘values’ of resistance that can be chosen for a task. The resistance is constant (besides a minor effect of temperature but outside extreme situations, this can be ignored), so according to Ohm’s Law, either current or voltage must change. If you have a 5V power supply rail, and you connect a 1000Ω (1kΩ)resistor between it and ground, current will flow to ground.
Ground is always at 0V, so all of the voltage ‘drops’ across the resistor. It actually becomes heat, but that’s another story for another time. According to Ohm’s law, we know the resistance, and we know the voltage that will drop across the resistor (Hint: It’s the supply voltage!), so we can calculate how much current flows through the resistor.
Now, if you use a 10kΩ (10 000 Ω) resistor, the voltage drop is still the same. It’s the current that changes. Remember this, it’s important later on.
REFRESHING ON FRACTIONS
You might be new to fractions or just a bit rusty, but before covering voltage dividers further, we need to cover the maths that they are based on. That means Fractions. Be warned, this is a compressed version. Normally, I would teach the following in a primary classroom in a series of forty-five to sixty minute lessons with explanation, instruction, whole-class, group, and individual activities to help, and spread over several years. That’s not possible in a magazine article!
We’re probably not pitching to many readers who are learning fractions here for the first time, but maybe some, and other people just struggle with them. If this is you, we have some ways to work with fractions before just using numbers on paper. For most readers, we expect you are just looking for a reminder if it’s all a bit rusty.
Fractions are always a whole thing divided or cut up into equal parts. The key here is ‘equal’. The thing can be a whole object cut up, like a cake, pizza, chocolate bar, or so on. Or, it can be a whole group. A packet of M&M’s, for example, has many little chocolates inside it, but you still have a whole packet. Until someone else realises you have M&M’s, then you don’t have a whole packet.
In any simple fraction written mathematically, there are two numbers. One on top of the dividing line, called the ‘numerator’, and one under it, called the ‘denominator’. The denominator is the number of total equal parts the whole has been divided into. The numerator on top is how many of those parts you actually have or are dealing with.
Let’s start with the most common fraction we hear: Half. A half is written as 1/2, which means one equal part out of the two equal parts the whole was divided into. It does not just mean one of two bits, which is how we tend to use it in society. Ever heard someone complain about having the ‘smaller half’? There is no such thing. In school maths, we so often use circles to show this and other fractions, but it also is true for any other shape. If you have a packet of M&M’s, and you open it and split the chocolates into two piles the same size, you have two halves. If you keep one and give the other pile to someone else, you now have one equal part out of the two that made up the whole. You have 1/2 of the M&M’s. In the photo, there is a whole packet together on the left, and a whole packet divided into halves on the right.
The denominator can be any number. In other words, you can divide a whole into any number that you want. Some are easier than others. For example, if I had ten M&M’s in a fun-sized packet, I could not easily divide the group into twelve, without cutting up the chocolates. I would have to cut them all up, too, because the parts have to be equal sized. On top of that, the numerator can be any number up to a whole, as well. So, if I had my ten M&M’s divided into five equal parts of two M&M’s each, I could have,1/5,2/5,3/5,4/5, or 5/5. That last one is the same as a whole. The picture here shows ten M&M’s. On the left is a whole, but shown as 5/5. On the right is 3/5 with 2/5 a bit further apart. Notice that there is more than one M&M in the equal groups, but all equal groups have the same number of M&M’s.
A BIT OF HELP
If that seems a bit hard to make sense of, there are ways to help get your head around it. Using things and moving them always helps, as does drawing. For these examples, we want to find two thirds (2/3) of 6. The six things are a whole because they are a group. To work with thirds (1/3), we need to first divide or cut that group up into three equal parts.
Find a bunch of items the same size. Of course, you probably don’t have those little wooden MAB blocks lying around at home like you do in school maths class, but LEGO blocks, marbles, squares of paper, anything will do. Count out six of them and put them in a line touching each other. To divide them into three equal parts, drag the first one aside to start a pile. Drag the next one to start another pile, and the next on to start the third pile. Now, drag whatever is left, one at a time, to each pile one after another, until you have none left. You now have three groups, and there are two squares of paper in each one. Each square of paper represents one of the six we had at the start. So, one third (1/3) of 6 equals 2, because there are two bits of paper in each. Now, you can count your parts of the whole much more easily. Move two groups together, to make two thirds (2/3), or two equal parts out of three, and count how many units you have in there. You should have four squares of paper, showing 4. Two thirds (2/3) of 6 is 4.
Alternatively, you can draw. Graph paper works the best for this. Count out your whole first, and draw a box around the whole. We used six squares of the graph because we have a whole divided into six parts. This method is harder if you aren’t already able to do a bit of division maths. It’s really a visual way of keeping track of things, rather than a way of actually doing the maths like dragging things around in the physical example. Again, memorising times tables helps a lot here. If you can do the division of six divided by three equals two, you can draw a line after the first two boxes, and another after the next two. Now, you can visually see the fraction. If you know you want to find out what two thirds (2/3) of 6 is, you just count how many single grid squares there are altogether in two of the three equal sized groups. The answer is 4.
DOING THINGS WITH FRACTIONS
So, that’s all ok if all you want to do is figure out how much of something you have. We will do exactly that in some cases with voltage dividers later. However, often we need to do mathematical things with fractions. You can add them together, subtract them from each other, multiply them together, and divide them by each other. Multiplying and dividing fractions is one of the more challenging things to teach in Primary school, and luckily, we don’t need to know that to learn about voltage dividers. We do, however, need to know how to add and subtract them.
Adding fractions is fairly easy. Because the denominator on the bottom is only telling us how many parts there are in total, we can ignore it in many cases and just add the numerators. Try it with the M&M’s. Ten M&M’s divided into five groups of two means that each is (1/5) two M&M’s. So, (1/5 + 2/5 = 3/5) because we are only adding the numerators. Look at in picture form:
What happens if you try to add 4/5 + 2/5 = 6/5. You have more parts than the whole now, because 4 + 2 = 6. You end up with something called an improper fraction if you leave it as which is still useful in some maths, not thankfully you won’t come across this if you’re playing with voltage dividers very often. This topic is a whole set of maths lessons again, but the nutshell version is that you must take away the denominator (the number of parts the whole was divided into) from the bigger numerator. That leaves you with a mixed fraction, which is how many wholes, with the fraction next to it for how many parts are left over that do not make a whole. In our case we have 6/5 - 5/5 = 1/5. However many times you take the denominator away is how many wholes you have. This goes to the left of the fraction. In our case, we took one whole away, so we have 1 1/5.
Subtracting fractions works the same way. You can have 3/5 - 2/5 = ?. Just treat it like normal subtraction and take 2 away from 3, leaving you with 1 on the top as the numerator. So, 3/5 - 2/5 = 1/5. It is possible to have a fraction where the number you are subtracting is bigger than what you are subtracting it from, like 2/5 - 4/5 = ?. Thankfully, that won’t happen when you’re working with voltage dividers, so we’ll leave it for now.
FRACTIONS WITH DIFFERENT DENOMINATORS
What happens if the denominators are different? This happens a lot, and can still sometimes get in your way when working with voltage dividers. The answer is simple: You have to make the denominators the same. That means finding a number that is a multiple of both denominators. In other words, a number that can be made by multiplying one denominator by a number, then the other denominator by a different number, to give the same result.
Take, for example, 1/4 + 1/5. How could these be added? We need a number that both 4 and 5 go into. This is where some memorized, rote-learned maths is really helpful because there is no shortcut. You can either guess and check, or remember some common maths facts. Knowing your times tables helps, because you might remember that both 4 and 5 go into 20. In fact, that’s the smallest number they both go evenly into. So, you have to do some multiplication.
Whatever you do to the bottom of a fraction, you do to the top. Let’s start with . We need to make the denominator 20. 4 goes into 20 five times, so if we multiply 4 x 5 to get 20 on the bottom as the denominator, we must also multiply the numerator by 5 as well. 1 x 5 = 5. This is because we’re multiplying the whole fraction to make it bigger, not just part of it.
Now, we need to do the same to 1/5. 5 goes into 20 four times, so we multiply 5 x 4 to get 20. That’s just the same numbers in a different order this time, but it won’t always be. Now, you must also multiply the numerator by 4, because we’re multiplying the whole fraction. 1 x 4 = 4.
Now that we have two fractions with the same denominator, we can add them 5/20 + 4/20 = 9/20.
Fractions are the fundamental way that voltage dividers work. However, while you need to know how they work, they are not the way we often express or calculate voltage dividers. Often, you’ll use decimals and percentages. These are based on fractions and are a different way of expressing a whole divided into parts, but we’ll explain them after we tackle voltage dividers themselves, so that you can learn or refresh decimals and percentages in context.
VOLTAGE DIVIDERS
Earlier, we showed that a resistor connected between a voltage and ground will drop the full voltage across it. What if you connect several resistors in series (one after another)? The voltage will drop across the whole string of resistors. You have created a voltage divider.
A voltage divider does just what its name suggests: It divides the voltage supplied to the ends of a string of resistors that make it up. In any voltage divider, the amount of voltage dropped across each resistor is proportional to the value of the resistor as a fraction of the total. This is why we spent so much time explaining the maths earlier. To explain, we’ll use a supply voltage of 6V because the maths will be neat.
The total voltage dropped in each set of resistors is still the supply voltage. However, the voltage measured at the test points (TP) will be different. This is where the fraction maths comes in, and why we spent so much time explaining it in case you needed that. In the case of the two 1000Ω resistors, we know from memory that a whole divided into two equal parts results in halves. Half the voltage drops across the first one, and half across the second. That means that the voltage measured at TP1 will be half the supply voltage, because that’s what’s left after half drops across the first resistor. In the case of our 6V supply, that’s 3V.
In the case of the three 1000Ω resistors, one third of the voltage is dropped across the first resistor, one third across the second, and one third across the last one. Now you can see the effect of the fraction relationship. At TP2, one third of the voltage has dropped across the first resistor, leaving us with two thirds, or 4V. The voltage is what is left, not what has dropped. At TP3, two thirds have dropped, leaving us with one third, or 2V.
FRACTIONS, RATIOS, PROPORTIONALITY
What if the resistors are not equal? The proportional rule above means that the amount of voltage dropped across each resistor is related to its fraction of the total resistance.
We know that the voltage drop across the resistors altogether will be the supply voltage. We’re making the supply voltage in this example 8V, to make the maths easy. We also chose resistor values to make the fraction maths easy. In the previous examples, we dealt with easy fractions that were obvious. This time, however, the first step is to add up all the resistors to find a total. 500Ω + 1000Ω + 500Ω = 2000Ω.
Then, we can work out what fraction of the total each resistor is. For the first resistor, we take 2000 and divide it by 500. Of course, the answer is 4. There are four equal groups of 500 in 2000, so one of those equal groups is one out of four, written as 1/4. Even our youngest readers should recognise that as a quarter. Because there is another 500Ω resistor further down, we also know that one is 1/4 of the total, too.
Now, there is one 1000Ω resistor left. 1000 goes into 2000 twice, so 1000 is one group of two, or 1/2. Many readers who already know or are comfortable with fractions have already done this and what’s next in their heads, but it won’t always be this simple. We now have 1/4, 1/2, and 1/4 of 2000. Now, we have to convert the fractions so the denominators are the same. In this case, it’s quite easy, because two of the denominators are 4, and the other one, 2, goes into 4. It goes in twice, and whatever you do to the bottom, you do to the top. So, to convert 1/2, multiply the denominator (2) by 2 to get 4, and multiply the numerator (1) by 2 to get 2. Now, you have 2/4, and you can calculate the voltage drop.
If we have 8V divided into four equal parts, we divide 8 by 4, leaving 2V per equal part. To find out how much voltage is dropped across each resistor, we just do some addition. The first resistor drops 1/4, or one part of four. That’s 2V. The second drops 2/4, or two parts of four. That’s 2 x 2V, or 4V. The third resistor drops 1/4, or one part of four, so it’s 2V again. That’s the drop across each resistor. The voltage between TP1 and ground can be found by subtracting the amount dropped across the first resistor (2V) from the 8V supply, OR, by adding up what’s left below it, to get 6V. The same applies to get 2V at TP2. You can subtract what has already dropped from the total 8V, or you can add up what is left between TP2 and ground, which is 2V.
Interestingly, you can measure the voltage drop across each resistor as well, but we’ll cover this later.
WORKING IN DECIMAL
So far, we’ve tried hard to explain the maths involved, rather than just show ‘how to do it’. Understanding how a mathematical operation works and why allows you to build on your knowledge more easily, and also makes it much easier to transfer the knowledge to other situations and add new information. However, we have to leave that behind now, to an extent, for practical reasons.
It is often easier to work in decimals when dealing with voltage dividers, especially because the numbers will rarely be neat fractions. Decimals and fractions are closely related. Again, a recap of the maths for those who haven’t done this in a while or were never comfortable with it.
Decimals are another way of dividing a whole, and they rely on an understanding of place value. On the left of the decimal point, you can see the traditional place values where zero to nine units can fit in the units column before creating one ‘ten’, and so on. On the right, however, the same applies but they are not whole numbers. The first column is tenths, a whole divided into ten equal parts. The second column to the right is hundredths, or a whole divided into one hundred equal parts.
Thousandths is next. Happily, the place value rules still apply: There are ten ‘one thousandths’ in a ‘hundredth’, and ten ‘hundredths’ in a ‘tenth’. Note that we say that there are ten because there can be nine parts (represented by the dots), and adding one more spills into the next column. In other words, if there are ten ‘hundredths’, there is actually one ‘tenth’ and that’s how we record it. Every time you fill nine dots, the column is full. If you add another, the ten cannot stay in that column. They add 1 to the column to the left, and then they clear, ready to count again.
The decimals that we are interested in are always less than 1, so they will always start with a ‘0.’ The place value chart goes into infinity on both sides of the decimal point. Take the number ‘0.308’ as an example. There is a ‘0’ to the left of the decimal point, so there are no wholes. Then we have three tenths, zero hundredths, and eight thousandths. This is really important. If there are any zeros in between numbers that we want, they are still included because they tell us there is nothing in those columns. If you just write ‘0.38’, you actually have three tenths and eight hundredths, a completely different number. This is obvious to many adults, but I have seen primary students, some teens, and even adults who aren’t confident with maths, struggle with it.
The other aspect to note is that of ‘significant figures’. This means the numbers we are interested in. For example, we might have the decimal 0.307519735 However, as the ‘5’ is in the ‘ten thousandths’ column, the ‘1’ in the ‘hundred thousandths’ column, and so on, it may not be necessary to calculate this far. We need to choose a level of accuracy, and for most cases with voltage dividers, two or three significant figures is ok. This means looking at the digit to the right of the last one we are interested in.
We chose three significant figures before, so looking at 0.307519735, we move three places to the right of the decimal point, to find ‘7’. This is our last significant figure. We then look at the right of that, and decide if ‘7’ stays the same or rounds up. If the number to the right of our last significant figure is 1, 2, 3, or 4, then it rounds down to ‘0’, and our last significant figure stays the same. However, if it is 5, 6, 7, 8, or 9, then it rounds up to ‘10’, which we know from out place value rules that we can’t have. The ‘0’ stays where it is, and the ‘1’ is added to the next column, which changes our last significant figure ‘7’, to ‘8’.
Now that everyone has had a chance to brush up on decimals, let’s relate them to voltage dividers. Unfortunately, this is where we leave the deep explanation behind. We can’t fit in a full explanation, so we’ll just cover how to actually do the operations. We will do it in the context of an example depicted in the diagram, a voltage divider formed by a 2kΩ (2000Ω) resistor and an 18kΩ (18 000Ω) resistor.
First, add the resistors together, giving 20 000Ω. Then divide the value of each resistor by the total, to give the decimal that represents each resistor’s share of the total. Notice that the equation is written two ways. The dividend (the number to be divided) is presented on top of the line, with the divisor (the number to be divided by) on the bottom. That is mathematically preferred, but having a number sentence with the ÷ sign is more familiar to many people, and is how you will enter it on a calculator.
The answers tell us that the 2kΩ resistor accounts for 0.1 of the total, while the 18kΩ resistor makes up 0.9 of the total. This, you may have spotted, is the same as one tenth (1/10) and nine tenths (9/10), because the first decimal place value is tenths. Decimals are a really good way of avoiding the situation with fractions where you have different denominators.
Now that we have the decimal amounts of the total, we can find the voltages. Because the voltage divider is connected across 5V, we need to multiply that by the decimals. Remember, the decimals with ‘0’ before the decimal point are all less than 1, and multiplying anything by less than 1 has the effect of dividing it, even though the operation is multiplication. We need to multiply 5V by 0.1 to find the voltage dropped across the 2kΩ resistor, and then multiply 5V by 0.9 to find the drop across the 18kΩ resistor. In this case, 0.5V is dropped across the first resistor, and 4.5V across the second.
There are a variety of other ways to deal with decimals, and some are faster. Many can be done in the head for simple numbers like those above. However, they all require a familiarity with decimal maths, and there is no point trying to describe any if this is new or rusty for you. If you are ready for them, chances are you already know them!There are faster ways to do this calculation, too, with several steps in one equation, but the same comments apply.
A MORE COMPLEX EXAMPLE
This example shows the real value of working with decimals rather than fractions. This voltage divider is connected across 12V, and consists of a 3.9kΩ resistor, a 15kΩ resistor, and a 560Ω resistor. You can read the equations with the explanations above to follow along. We have chosen to stop at four significant figures where relevant. First, add the resistors up to give a total of 19 460Ω.
The 3.9kΩ resistor drops 2.4048V across it, the 15kΩ resistor drops 9.2496V, while the 560Ω resistor drops 0.3456V.
BASIC VOLTAGE DIVIDERS
Finally, that’s most of the maths explanation out of the way. If you’ve been reading the previous information, you will have seen some examples of basic voltage dividers. These are any situation where several resistors are connected in series for the purpose of giving different voltages. In some situations, you may connect resistors in series to give a specific value, but in that case, you don’t actually use them as a voltage divider, so we won’t count it.
In basic voltage divider situations, two more resistors are connected in series for a given task. Often, this is to set a reference voltage. This is where being able to calculate with decimals helps. Generally, the target reference voltage is known, and you can calculate the decimal ratio of this as an amount of the total supply voltage. Then, the same ratio of resistors can be chosen.
Take, as an example, a basic comparator circuit. This has two equal resistors from a 5V supply. Because the resistors are equal, the supply voltage will be dropped equally across both and the voltage at their junction will be half the supply voltage. This makes a handy digital switch, but you could easily make the values different to change the behaviour.
There can be more than two resistors in a voltage divider. Many electronic keyboard or organ circuits for kids feature a simple Voltage Controlled Oscillator (VCO) with an eight- or ten-part voltage divider. The stylus used to ‘play’ the instrument contacts different points along the divider, giving different voltages to the oscillator and hence changing the sound.
Another use of voltage dividers is as a level converter. In the case of microcontrollers, it is not uncommon to have a 5V sensor that you wish to use with 3.3V rated inputs. This means that you want a voltage divider that drops 1.7V across the first resistor, and 3.3V across the second. That’s 1.7 ÷ 5 to give 0.34 for the first resistor, and 3.3 ÷ 5 to give 0.66 for the second. The fun part, of course, is choosing values. There is such a thing as a 330Ω, 3.3kΩ, or 33kΩ resistor, but in commonly available series, there is no 170Ω, 1.7kΩ, or 17kΩ. In this case, it is more likely that you will have to choose a higher value for the first resistor, and have a slightly lower voltage which still should work with a 3.3V system.
If you chose 2kΩ and 3.3kΩ resistors, you would end up with 1.89V dropped across the first, and 3.11V across the second, rounded to two decimal places in each case. That would still be perfectly adequate.
POTENTIOMETERS
Potentiometers in their true sense are variable voltage dividers. The component itself is often called a ‘variable resistor’, but it is not. It can be wired as one, however. The left-hand diagram is a variable resistor. Because we don’t like having loose ends in electronics, the unused end of the resistor is wired to the ‘wiper’, the moving part. This has the effect of shorting out the section of the resistor between the unused end, and the wiper. The other end is connected to the current to be reduced, and the wiper changes the amount of resistance that is in play as it moves up and down the resistor.
A potentiometer is the same physical device, but with all three terminals used. The ends are connected to the supply, or between ground and any other voltage to be divided. You can use this setup to divide a less-than-supply voltage generated elsewhere in a circuit.
The wiper is the output from the voltage divider, and moving it changes the ratio of resistor above and below the wiper. That’s the same as changing the size of the two resistors in a basic voltage divider, except that whatever is taken away from one is instantly added to the other. The voltage at the wiper will vary accordingly.
VOLTAGE DIVIDERS IN PRACTICE
There are a variety of situations we have covered already which use voltage dividers. One thing we have not discussed is how to choose resistor values. In the example of the 3.3V level converter above, we pointed out that values of 200Ω/330Ω, 2kΩ/3.3kΩ, 20kΩ/33kΩ and 200kΩ/330kΩ all have the same relationship and will divide the voltage the same way. So which one?
The question in many cases comes down to current. A current path between supply voltage and ground will consume power. Even when power consumption is not an issue, heat generation is. On a 5V supply, a pair of resistors of 2Ω and 3.3Ω would give the ratio we want. However, plugging them into ohm’s law tells us that the current through them will be 0.94 amps! That’s quite a lot for what are probably, for most makers, going to be ¼ Watt resistors. For the 2Ω resistor, and remembering that power dissipation in a resistor equals the current through it multiplied by the voltage drop, that’s 1.78 Watts!
The answer is to choose higher values of resistors, with the same relationship, to reduce the current. How much so depends on your input circuit. For example, a comparator has an input impedance so high that for practical purposes, it can be considered infinite (it isn’t, but in real terms for this case, it may as well be). Impedance, if you are wondering, is the ability to resist the flow of current, but it’s made up of more than DC resistance, which is why we use a different term. The short version is, a high-impedance input takes a tiny current to activate it, so the resistor values can be large.
However, this may not always be the case. Other circuits may have inputs that take more current to drive. Such an example might be the base of a transistor. In this case, you have to choose values which allow enough current to flow through the resistors.
CURRENT PATHS
Not only does current flow of the circuit inputs have to be factored in, but so do current paths. In the examples to this point, the voltages have been sent to high-impedance inputs, like the comparator. However, if the circuit using the voltage divider presents a current path of reasonable size, this has to be factored in.
If some of the current is flowing through the circuit, that amount is not flowing through the second (or whichever) resistor. According to Ohm’s Law, this changes the voltage drop across that resistor, because not all of the current from the first resistor is flowing through it. This must be factored in if this happens, as would be the case if driving a current sink like the base of a transistor.
Thankfully, there are few situations that result in this behaviour. Besides driving a transistor from a voltage too high for its base to handle, there are few situations most makers will encounter that present the challenge. In most cases, voltage dividers are used to drive high-impedance inputs like microcontrollers, comparators, op-amps, and so on.
FINE TUNING
There are situations where you may wish to have a resistor value that is not in the standard values range. There are also times when you might find that all the response you need from a potentiometer happens in a very small part of its travel. The answer in both cases is to ‘pad out’ a potentiometer with fixed resistors.
In the first example, we have a fictional situation that requires a very precise voltage. It’s the 5V out, 3.3V in situation from earlier, but we’re pretending it has to be precise. The answer here is to use a potentiometer in between two fixed resistors.
Here, we know we need 3.3V at the output of the divider, which equates to 0.66 of the total 5V supply. There is no ‘magic bullet’ way to select resistor values. Recognising that 0.66 is almost exactly two thirds helps, but guess-and-check will help the less mathematically confident. To guess and check, add up the values of the chosen resistors. In this case, we end up with 5200Ω.
Multiply that by 0.66, to give the value of resistance needed at the output of the divider. 5200Ω x 0.66 = 3432Ω. A 1kΩ potentiometer on top of a 2.7kΩ fixed resistor, giving 3.7kΩ of the total, means the desired point is within the range of the potentiometer. Just turn it until a multimeter set to resistance reads 3432Ω between the output and ground, or better still, power it and turn until the multimeter set to voltage reads 3.3V.
On this last point, using a measured voltage output is the preferred method to fine-tune a voltage divider, because tolerance means the resistors are rarely their exact stated value. If you used resistance in the example above and turned the potentiometer until you saw 3432Ω, the first resistor, not being measured, may not be exactly 1.5kΩ, so the voltage out will still not be exactly 3.3Ω. However, it will be close if using 1% resistors.
The second example is a situation where all of the desired effect of a potentiometer happens in a small amount of travel. In this fictional example, the temperature setting for a thermostat based on a comparator originally had a 10kΩ potentiometer as the reference voltage input.
However, all of the desired temperatures seemed to fall within a third of the travel of the potentiometer, roughly centred on the middle. It is tempting to just add a 10kΩ resistor above and below the potentiometer, but this risks leaving some temperatures unattainable.
We noted that it was centred roughly on the middle, and we couldn’t be precise. Accordingly, two 8.2kΩ resistors are chosen, so as to leave the potentiometer as a greater part of the divider than if all three resistors were equal, and thus avoid a situation where it hits the end of its travel before a certain temperature can be set.
WHAT DOES IT ALL MEAN?
For some readers, that was a lot of information at once. For others, you knew nearly all of it. That’s the nature of modern Making. Despite all the time and space we dedicated to the maths for the reasons explained, it’s still a poor way to conduct a maths lesson.
However, hopefully someone got a new understanding of voltage dividers, what they are, and how they can be used. There are many ways to do the same thing, so there is material we haven’t covered here. In particular, many people will have other ways of doing the maths involved. There are also variations on the voltage divider that we didn’t cover, like inductive and capacitive voltage dividers. Those are for another time.
Having said that, we still have a hands-on exploration for those who want to, using some resistors and a multimeter.
Hands on:
MEASURING VOLTAGES
Tools & Materials (SEE TEXT FOR DETAILS) |
---|
Tools and Materials: |
Multimeter |
Power Supply capable of 5V and 12V |
Parts Required: | Jaycar | Altronics | Pakronics |
---|---|---|---|
1 x Solderless Breadboard | PB8820 | P1002 | DF-FIT0096 |
2 x 470Ω Resistors* | RR0564 | R7550 | SS110990043 |
4 x 1kΩ Resistors* | RR0572 | R7558 | SS110990043 |
Optional Parts Required: | Jaycar | Altronics | Pakronics |
---|---|---|---|
1 x Packet of Wire Links* | PB8850 | P1014A | SS110990044 |
2 x 10kΩ Resistors* | RR0596 | R7582 | SS110990043 |
1 x 10kΩ 16mm Linear Potentiometer | RP7510 | R2243 | - |
* Quantity shown, may be sold in packs.
Earlier, we mentioned that you can measure the voltage drop across different parts of a voltage divider. It would have got in the way if we explained it at the time, and it makes for a simple experiment anyway, if you’re approaching voltage dividers for the first time.
Many people think of voltage as something that is measured between a point, and ground. Indeed, several of the examples worked that way. However, you can also measure within a voltage divider. Voltage is just potential difference, meaning more electrical force at one point than another. What some people don’t realise is that this is all that is ever measured: Ground is just 0V, but you can move that reference point.
To illustrate, we’re going to build a circuit with two voltage dividers in it. They are examples from earlier, but modified slightly for available values. One has three 1kΩ resistors, while the other has a 470Ω, a 1kΩ, and another 470Ω.
Assemble the resistors as shown, then connect 5V to the supply rails. Make sure your multimeter is set to measure DC voltage, and place the probes across the supply rails. If all is well, you should read 5V or close to it.
Now, keep the black (COM, GND, or -) probe on the ground (-) rail, and move the red probe to the junction of the first and second resistors. You should read around two thirds of the supply voltage, around 3.33V. Now, move the red probe to the junction of the second and third resistors. The voltage should now read around 1.66V or so.
However, if you move the probes so that the black probe is on the junction between the first and second resistor, and the red probe is on the supply side of the first resistor, you should also read 1.66V or so, a third of the supply voltage. You are measuring the difference in potential between the current coming into the resistor and the current leaving it, after the voltage drop across the resistor.
Now, move both probes so that the red one is on the junction of the first and second resistor, and the black one is on the junction between the second and third. You are now measuring the voltage drop across that resistor, instead of the voltage between there and ground as we are more familiar with. It again should be around 1.66V. The numbers will differ slightly because of resistor tolerance and power supply differences.
Now, try the same experiment with the second divider, the 470Ω/1kΩ/470Ω one. What are the differences? Now, try it with 12V instead of 5V for the supply. While you have the set-up built, why not try some of the other dividers covered, like measuring the voltage at the wiper of a potentiometer as it rotates, then seeing the effect when you pad it out with resistors?
As Albert Einstein said; “Play is the highest form of research”.