Georg Simon Ohm wrote a rule to account for observations of voltage (volts), current (amps), and resistance (ohms). We typically see this rule, as voltage is equal to current times resistance:
volts = amps * ohms Voltage equals current times resistance.
A little algebra shows us that the equivalents are:
amps = volts/ohms Current equals voltage divided by resistance.
ohms = volts/amps Resistance equals voltage divided by current.
Now let's confuse things a little bit and use the standard (SI) symbols for this:
V = IR Voltage equals current times resistance
And the confusion is the 'I' is the symbol for amps. But this is what is used so let's just go with it.
I = V/R Current equals voltage divided by resistance.
R = V/I Resistance equals voltage divided by current.
With this law, if you know any two of the variables, you can solve for the third unknown variable. This comes in handy when for instance you want to specify the resistor for an LED. Let's say that you will be powering at 3.3V and the datasheet says the LED is most efficient when passing 15mA of current. You solve the resistance formula:
R = V/I
R = 3.3/.015
R = 220 ohm
And since 220 ohm is a standard resistor size we can easily get the exact resistor needed. In the Arduino Projects Kit we use 1k ohm resistors and have 5V power so the current can be found with:
I = V/R
I = 5/1000
I = 0.005 amps
And while 5 mA (0.005 amps) is under-powering the LED, it are plenty bright and since we may be using batteries, the lower current saves power and extends the battery life.
Figure 3: Electric current from battery through resistor and LED
We get electricity to do useful work by channeling it from devices that produce electric force (like generators and batteries) through devices that do electric work (like lights and motors) and back to the device that created the force. That last part is critical. Circuit is just a fancy way of saying ‘circle’: electricity must run around a circle to do useful work.
Figure 3 shows arrows marking the direction of conventional current from the higher voltage side of a 9-volt battery (the positive terminal) through a resistor and an LED back around to the lower voltage terminal of the battery.
You have probably seen really complex circuits on printed circuit board or as schematics, but no matter how complex it looks, it can be simplified to one part producing the force as a current, one part using that force to do work, and the circular electrical connection between them.
If we connect a copper wire between the + and – terminals of a battery, ‘short circuiting’ them, as shown in Figure 4, the current will rush through doing a lot of work making the wire heat up and quickly deplete the chemicals in the battery that are creating the electric potential difference in the first place. Don’t try this experiment because not only will it deplete your battery, many batteries will heat up and possibly even explode when treated this way.
Figure 4: Short circuit
If you are doing Arduino experiments plugged into the USB port of your computer you are using +5V supplied from the PC over the USB cable. If you short circuit the + to the -, and if you are lucky, the USB protection circuits on the PC will detect the current rush and shut down your USB connection before something blows up in your PC. And if you aren’t lucky? Well, say bye-bye to something expensive. The morale? Be careful not to short circuit anything expensive, flammable, or with tendencies to explode, that being most things that can be short-circuited – including you.
Voltage across resistance
Let’s build a circuit that let’s us play with Ohm’s Law. We put 8 of the 1k ohm resistors from the Arduino 101 Projects Kit on the breadboard so that they are each connected in series - this yields 8k ohm in 1k ohm increments. These are connect one end of that series to +5V and the other end to the GND as shown in Figures 5, 6, and 7 that show the current and the voltage drop across this circuit. This arrangement of resistors is called a voltage divider and allows us to access each cumulative resistance value from 0 to 1k, 2k,3k,4k,5k,6,7,and 8k ohm. [The illustrations also show the Arduino Analog Input pin 0 attached between the fifth and sixth resistors counting up from the +0V and we will look at that in a minute].
Figure 5: Resistor series current drawing
Figure 6: Resistor series voltage drawing
Figure 7: Resistor series schematic
Let’s play with Ohm’s Law for a moment. We know that we have 5 volts and a total of 8k ohm resistance in our circuit, so we can calculate the unknown variable, current (I):
I = V/R
I = 5/8000 = 0.000625 amps
0.000625 Amps is the same as 0.625 milliamps which we will usually show as 0.625mA. So we have 0.625mA current passing through each of the 8 resistors and since each resistor is 1k ohm and we can solve Ohm’s Law for the voltage across each resistor:
V = IR
V = 0.000625 * 1000 = 0.625 volts
So, theoretically, we should be able to measure the voltage between fifth and sixth resistor above 0V (as shown in Figure 6) and it should conform to Ohm’s Law where the total resistance of the 5 resistors is 5k &Omega:
V = IR
V = 0.000625 * 5000 = 3.125 volts
Theoretically? We will take a look at this law with some real-world measurements in the labs, but first let's take a look at an Arduino function we will find very useful in those labs.