When most people look at a schematic drawing, all they see is a sea of interconnected components with no rhyme or reason combining them. However, most circuits are actually a collection of circuit patterns. A circuit pattern is a common way of arranging components to accomplish an electronic task. Experienced circuit designers can look at a circuit and see the patterns that are being used. Instead of a mass of unrelated components, a circuit designer will look at a schematic and perceive a few basic patterns being implemented in a coherent way.
In this chapter, we are going to learn three basic resistor patterns and learn to work with switches as well.
9.1 Switches and Buttons
Switches and buttons are very simple devices, but nonetheless we probably need to take a moment to explain them. A switch works by connecting or disconnecting a circuit. A switch in the “off” position basically disconnects the wires so that the circuit can’t complete. A switch in the “on” position connects the wires.
There are different types of switches depending on their operation. The ones we are concerned with are called “single pole single throw” (SPST) switches, which means that they control only one circuit (single pole) and the only thing they do is turn it on or off (single throw).
To analyze a circuit with switches, you need to analyze the way the circuit behaves with each configuration of switches. In this case, obviously when S1 is open, no current at all flows. However, this circuit will use different amounts of current when S2 is closed, S3 is closed, and both S2 and S3 are both closed. Therefore, to truly know the behavior of the circuit, you need to calculate the current usage in each of these situations.
9.2 Current-Limiting Resistor Pattern
The first resistor pattern we are going to learn is one that we already know—the current-limiting resistor pattern. The idea behind this pattern is that a resistor is added to limit the amount of current that can flow through a device. The size of the resistor needed depends on the size of the voltage source, the action of the device itself, and the maximum amount of current to allow. Then, the resistor size needed can be calculated using Ohm’s law.
Many resistors are added to circuits to limit current flow. At the beginning, we used resistors to make sure we didn’t destroy our LEDs. In Chapter 8, we used a resistor to limit the amount of current flowing through our voltage regulation circuit.
In many different circuits, we will need resistors to limit current for two different reasons—to avoid breaking equipment and to save battery life. Oftentimes, we are actually choosing resistor values to accomplish both of these tasks.
If an LED breaks with 20 mA, then we need a resistor big enough to keep the current that low. However, if the LED light is sufficiently visible with 1 mA, then, to save battery life, we might want a bigger resistor. Battery capacity is often measured in milliamp-hours (mAh), with a typical 9 V battery holding 400 mAh. So, with such a battery, an LED circuit at 10 mA will drain the battery in 40 hours (400 mAh/10 mA = 40 h), but the same LED circuit with a bigger resistor, limiting the current to 1 mA, will take a full 400 hours (400 mAh/1 mA = 400 h) to drain the same battery! That will save you a lot of money in the long run.
9.3 Voltage Divider Pattern
9.3.1 Calculating the Voltages
So the voltage drop across the first resistor is 3 V. That means that, since the battery started at 9 V, at the end of the resistor the voltage compared to ground is 6 V. We can calculate the voltage drop across the second resistor either by Ohm’s law again or just by noting the fact that since the other end of the resistor is connected to ground, the voltage must go from 6 V to 0 V.
9.3.2 Finding Resistor Ratios
But how do we choose the values of the resistors?
One thing to note is that the second resistor consumed exactly twice as much voltage as the first resistor. Additionally, the second resistor was exactly twice as large as the first resistor. Thus, as a general principle, the relative sizes of the resistors will determine the relative amounts of voltage they eat up. So, if we needed a 4.5 V output—that is half of our input voltage—we would need both resistors to be the same.
Note that the specific resistance values don’t matter yet—it is the ratio we are concerned about so far. To get 4.5 V, we can use two 1 kΩ resistors, two 200 Ω resistors, or two 100 kΩ resistors. As long as the values are the same, we will divide the voltage in half.
If we wanted an 8 V output, we would do a similar calculation. Since we start at 9 V, we need to use up of the voltage in the first resistor, and of the voltage in the second resistor. Therefore, our resistors need to be in similar ratio. We could use a 100 Ω resistor for the first resistor and an 800 Ω resistor for the second resistor. Alternatively, we could use a 10 Ω resistor for the first resistor and an 80 Ω resistor for the second resistor. It is the ratio that matters most.
9.3.3 Finding Resistor Values
So how do you determine exactly what value to use? Here is where we start thinking about the load again. While we have been treating the voltage divider as a series circuit, in truth we have one resistor in series and then a parallel circuit with the other voltage divider resistor in parallel with the load. Our simplified model (where we ignore the parallel resistance) will work, as long as the load resistance does not impact the total parallel resistance by a significant amount. Therefore, let’s look at how the load resistance affects the parallel resistance.
This is significantly different from our simplified model which ignored the load resistance, which gave 2,000 Ω. That means that our simplified model won’t work with this value.
This is very close to the resistance of R2 by itself. So what we can say is that our voltage divider circuit can ignore the resistance of the load if the resistance of the load is significantly more than the resistance of the voltage divider resistor. A way of writing this down is that RL » R2. What “significantly” means depends on how sensitive your circuit is to voltage changes, but, generally (and for the purposes of the exercises), I will say that “significantly more” should mean at least ten times as much.
9.3.4 General Considerations
So, for low-resistance loads, a voltage divider does not work well, because it puts too little resistance between the voltage source and ground. However, in Chapter 11, we will see that many circuits have loads of approximately infinite resistance, so voltage dividers work really well in those cases.
In general terms, a voltage divider with smaller resistors is “stiffer” because it varies less in response to variations in a load, but it also eats up more current. A voltage divider with larger resistors doesn’t work with low-resistance loads, but it also uses up much less current.
9.4 The Pull-Up Resistor
The pull-up resistor is a strange circuit, but we will find very good applications for it once we start dealing with ICs in Chapter 11. It is probably easiest to describe by simply showing you a circuit and then describing how it works.
If you look at the path from where the circuit branches, when the button is not pressed, the current can only go one way—through the LED. However, when the button is pressed, the electricity has two options—either through the LED or directly to ground through the button. The electricity would always rather go directly to ground rather than through an intermediary, so all of the current goes through the closed button, and none of it goes through the LED.
Since the branch point is directly connected to ground when the button is pushed, that means that the voltage at the branch point is also zero. Kirchhoff’s voltage law says that no matter what path is taken, the voltage drop will always be the same. However, an LED induces a voltage drop, but the voltages on both sides of the LED are zero. Therefore, electricity cannot flow through the LED.
So what is the function of the resistor? The resistor connects the switch and the LED to the positive voltage source and provides a limitation on the current that runs through it. The resistor must be before the branch point for it to work.
The resistor is called a pull-up resistor because it is connected to the positive voltage source and is used to “pull up” the voltage on the circuit to a positive value when the switch is open while still providing safety (by limiting the current) when the switch is closed.
In short, a pull-up resistor is usually used to supply positive voltage to a circuit which might be turned off by redirecting the voltage to ground. The resistor provides both the electrical connection to the positive source and a limit to the amount of current that will flow if the current flow is then routed to ground (usually through some kind of switching mechanism).
9.5 Pull-Down Resistors
One more basic resistor circuit that is often used is the pull-down resistor. While the pull-up resistor is connected to the positive power rail, the pull-down resistor is instead connected to ground. So, in a pull-up resistor, if part of the circuit is disconnected, the voltage goes high. In a pull-down resistor, if part of the circuit is disconnected, the voltage goes low. However, we don’t yet have enough background really to understand how they are used here. They are covered more fully in Chapter 12. They are merely mentioned here because they are one of the basic resistor circuit patterns that are seen throughout electronics.
9.6 Review
- 1.
Buttons and switches allow circuits to be altered while they are running by connecting circuits (allowing pathways for electric current) and disconnecting circuits (blocking pathways for electric current).
- 2.
Most circuits are a combination of common, well-understood circuit patterns.
- 3.
The more experienced you are with the basic circuit patterns, the easier it is to see these circuit patterns when you look at a schematic drawing.
- 4.
A current-limiting resistor is a resistor that is used to limit the maximum current flow within a circuit, either to protect other components or to limit overall current usage.
- 5.
A voltage divider is a pair of two resistors connected in series with one another (usually connected to a positive voltage on one side and the ground on the other), but with another wire coming out in between them to provide voltage to another circuit (called the load ).
- 6.
In a voltage divider, it is assumed that the resistance of the load is significantly more than (i.e., greater than ten times) the resistance of the second half of the voltage divider because then the load can be basically ignored for calculating voltage drops.
- 7.
For a voltage divider, the ratio of the voltages consumed by each resistor is the same as the ratio of their resistances. The output voltage coming out of the first resistor is the level of the voltage that will be supplied to the load.
- 8.
Another way of stating the output voltage is , where R1 is the resistor connected to the positive voltage and R2 is the resistor connected to ground.
- 9.
Voltage dividers with smaller resistances are “stiffer”—they are impacted less by the resistance of the load. Voltage dividers with larger resistances are not as stiff but waste much less current.
- 10.
A pull-up resistor circuit is a circuit in which a positive voltage which may be switched to ground at some point is provided through a resistor.
- 11.
The pull-up resistor both (a) connects the circuit to the positive voltage to supply a positive current when the circuit is not switched to ground and (b) limits the current going to ground (i.e., prevents a short circuit) when the output is switched to ground.
- 12.
It is called a pull-up resistor because it pulls the voltage up when the circuit is not switched to ground.
9.7 Apply What You Have Learned
- 1.
In Figure 9-3, calculate the amount of current used by the whole circuit for each configuration of the switches S2 and S3 when S1 is closed. You can assume that the LEDs are red LEDs.
- 2.
Build the circuit given in Figure 9-3 (you may swap out resistors with different but similar values—anything from 300 Ω to about 5 kΩ should work).
- 3.
Given a 15 V voltage supply, what size of a resistor would be needed to make sure that a circuit never went over 18 mA?
- 4.
Given a 9 V battery source, design a voltage divider that will output 7 V to a load that has a resistance of 10 kΩ.
- 5.
Given a 3 V battery source, design a voltage divider that will output 1.5 V to a load that has a resistance of 1 kΩ.
- 6.
In Figure 9-6, how much current is going through the circuit when the switch is open? How much when it is closed? You can assume that the LED is a red LED.
- 7.
How would you modify the circuit in Figure 9-6 to keep the maximum current in the circuit under 2 mA? Draw the full circuit out yourself.
- 8.
Build the circuit you designed in the previous question. If you do not have the right resistor values, use the closest ones you have.