Electrons are obedient citizens of the universe. You can always count on them to obey Ohm’s Law.

Ohm’s Law relates the voltage (electrical pressure) to the current (electrical rate of flow) and the resistance (restriction of electrical flow) in an electrical circuit. Ohm’s law is usually stated as I = V/R (i.e., current equals voltage over resistance), but it is also useful to remember it as shown above (1V = 1A * 1Ω). The latter form states that 1 **volt** (the widely used unit of electrical voltage) equals 1 **ampere** (the widely used unit of electrical current) times 1 **ohm** (the widely used unit of electrical resistance, often depicted with the greek letter Ω). In this article we will use this formula to determine for the given voltage, “what is the current in amperes when X is the resistance in ohms?” or “what resistance in ohms is required to ensure a particular current in amperes?”

The other formula shown above enables calculation of the amount of power in a circuit (i.e., the amount of energy being transferred over time) in watts. It states that the amount of electrical pressure (in volts) times the amount of current flow (in amperes) gives the amount of power (in watts). One watt is also equivalent to 1 joule per second. This formula is useful in designing circuits to ensure that I am not exceeding 1/4 watt, since that is the rating for the inexpensive resisters I most often use.

Suppose you were designing a circuit like the one above, and you needed to ensure that the current flow through this circuit (in amperes) was no more than 20mA (i.e., 20 milliamperes, or 20 thousandths of an ampere). What resistance (in ohms) should you use in this case to ensure that current flow given that the circuit will be powered with 5V (5 volts)? Let’s do the math. Substituting the voltage and amperage values into Ohm’s Law we have:

5V = 0.020A * NΩ

Dividing both sides by 0.020A gives us:

5V / 0.020A = NΩ

Simplifying gives us:

250.0 = NΩ

So we need a 250Ω resistor here to keep the current flow to 20mA, as shown in the image below:

How much power is being consumed here? The second formula tells us that watts = volts * amps, so we have 5V * 0.020A = 0.1W. So typical 1/4 watt (i.e., 0.25W) rated resistors are more than able to handle this much power.

Suppose you are connecting a GPIO pin on a microcontroller with 5V logic, through a resistor to a transistor that you want to provide with between 9mA and 17mA. What range of values could this resistor have to keep the current through this circuit within the desired range?

Scroll down to see the answer…

.

.

.

.

.

.

.

.

.

.

.

.

.

First let’s use Ohm’s Law to find the maximum resistance (i.e., for the least current flow):

5V = 0.009A * NΩ

Dividing both sides by 0.009A gives us:

5V / 0.009A = NΩ

Simplifying gives us:

555.56 = NΩ

Now let’s use Ohm’s Law to find the minimum resistance (i.e., for the maximum current flow):

5V = 0.017A * NΩ

Dividing both sides by 0.017A gives us:

5V / 0.017A = NΩ

Simplifying gives us:

294.12 = NΩ

For this circuit, you will need to use a resistor rated between 294.12Ω and 555.56Ω. So rummage through your parts bin to find a value somewhere inside that range and preferably away from the ends of the range.