Arduino Ladder · Bozoma Innovation Hub

Band 1  ·  Signal Tower

Bench  Ohm's law, and checking this course

One line of arithmetic that turns four of this course's warnings from rules you believe into results you can check.

Time
70 min
You need
A pen. Then your breadboard, 1 LED, 4 jumper wires, and resistors of 220Ω, 330Ω, 1kΩ and 10kΩ for the table. (The 100Ω row is worked on paper only, and the lesson says why.)
At once
Everybody at once
Before this
Do bench-multimeter first, or at least know the three voltages across your own light.

Sketches for this project

Every file opens with a plain-English header saying what it does and how to wire it, hole by hole.

Why

Every warning in this course is a sum you have not been shown

Count how many times this course hands you a number and asks you to trust it. Some of these you have met already. The rest are waiting for you.

  • Use a 220 ohm resistor. (Band 1, already)
  • An Arduino pin can give about twenty thousandths of an amp before it is damaged. (Band 1, already)
  • That module's resistor is 100 ohms, which is over the line. (Band 1's traffic module)
  • An RGB module's three resistors may be different values from each other, on purpose. (Band 2)
  • Use 220 on the transistor's base, not 1k, or the switch never fully closes. (Band 6)

Every one of those is true, and not one of them is anything you can check. That leaves you believing this course rather than reading it, which is a weak position to learn from and an easy one to get out of.

This lesson is one line of arithmetic. With it, every one of those sentences stops being a rule and becomes a result, and you can work out the next one yourself when nobody has written it down for you. Come back to this page when you reach Band 2 and Band 6, because the numbers on those pages are worked out here.

There is no wiring in this part and no sketch. Get a pen.

Think first

Back to the rope

15 min

In Band 1 you made a loop of rope and pulled it round, and three things were happening at once. Band 1's glossary gave you their names and then the course got on with building things. Here is what they actually mean.

In the ropeIts nameMeasured inWhat it really is
How hard you pullVoltagevolts, VThe push. Always a difference between two places, never a thing one place has on its own.
How fast the rope movesCurrentamps, AThe flow. The same everywhere round one loop, which you saw: squeeze anywhere and the marker slows everywhere at once.
How tightly a hand gripsResistanceohms, ΩThe narrowness. How hard it is for the flow to get through that part.

You already know from the rope how they affect each other. Pull harder and it moves faster. Squeeze tighter and it moves slower. That is the whole of it, and this is that sentence written down:

Volts = amps × ohms

V = I × R

I is the letter for current, for historical reasons nobody needs. Rearranged the two ways you will actually use:

I = V ÷ R     and     R = V ÷ I

The first one is the one you will use ninety per cent of the time, because it answers the question that matters: how much is going to flow through this, and is that too much?

The unit trap that catches everybody onceAmps are big. Everything in this course is thousandths of an amp, written mA and said “milliamps”. 20 mA is 0.02 A. If you put 20 into the sum where it wants 0.02, your answer comes out a thousand times wrong and looks reasonable. Divide by a thousand going in, multiply by a thousand coming out, or work in volts and ohms and remember the answer arrives in amps.
Look closer

Your own light, on paper

25 min

Take the three voltages you wrote down in the multimeter lesson. If you have not done that one, the numbers are about 5, about 3 and about 2.

The step everybody misses

You might expect to put 5 volts and 220 ohms into the sum. Do not. The 5 volts is not across the resistor. It is across the resistor and the LED together, and they are sharing it.

An LED is a strange component: it takes a fixed bite out of the voltage and hands the rest on. A red one takes about two volts and it takes that whether the current is large or small. So:

5 V total − 2 V for the LED = 3 V left for the resistor

That 3 is the number the sum wants, because the sum is about the resistor.

Now do it:

I = V ÷ R
I = 3 ÷ 220
I = 0.0136 amps
I = 13.6 thousandths of an amp

Compare that with what your meter saidSomewhere around 13 or 14. You just predicted a measurement. Not read it off a page, not been told it: worked it out from two numbers and a rearranged sum, and the world agreed with you.
If your numbers are a little apartThey should be. Your resistor is not exactly 220, you rounded the LED to exactly 2 volts, and the board's 5V is probably 4.9. Three small honest gaps. Being within one milliamp is a good agreement, and knowing why the last decimal disagrees is worth more than making it agree.
Change it

Now check the course

30 min

This is the part that pays for the lesson. Same sum, four of this course's warnings, and now you can see for yourself whether each one is true. Two of them belong to bands you have not reached yet, and that is fine: do the arithmetic now and you will recognise the number when the page hands it to you.

1. The module resistor we told you to worry about

Band 1's traffic light module page says that if the tiny resistors on the back read 101, that is 100 ohms and it is over the line. Check it.

3 ÷ 100 = 0.030 A = 30 mA   against a pin rated for 20

You should seeThat the page was right, and that you did not need the page. Half as much resistance lets through twice as much current, every time.

2. The transistor base in Band 6

The fan page insists on 220 ohms rather than 1k, and says 1k gives “about four” milliamps. A transistor's base takes about 0.7 V and hands on the rest, the same way an LED does.

5 − 0.7 = 4.3 V across the resistor

with 220Ω:   4.3 ÷ 220  = 0.0195 A = 19.5 mA   just inside the limit
with 1k:      4.3 ÷ 1000 = 0.0043 A = 4.3 mA   a fifth of that

You should seeBoth numbers in the page falling straight out of the sum. Nothing there was a matter of opinion.

3. Fill this in yourself

A red LED, 5 volts, and each resistor in turn. Work out the current, predict the brightness in words before you build anything, then build three of the five rows and see.

ResistorVolts across itCurrent, mAYour predictionWhat you saw
100 Ω3
220 Ω3
330 Ω3
1 kΩ3
10 kΩ3
Build these from the 5V pin, not a digital pinMove the wire out of the Arduino pin and into 5V, as you did for the multimeter lesson. Then no sketch is running and nothing can confuse the result.

Check the other end of the loop too. The light's return leg goes to the − rail along the top edge, nearest row j, the same pair the multimeter lesson used and the one Band 1 uses, and one wire runs from that rail to a GND pin. Moving the far end to 5V does nothing if that return wire came off the board between lessons, and a dark LED will look like a wrong calculation when it is a missing wire.

Do not build the 100 ohm row at all, from a pin or from 5V. Thirty milliamps is over the pin's twenty and it is also over the LED's own twenty: an ordinary 5 mm LED is a 20 mA part, so that row would damage the light as well as the pin. Work it out on paper and build three of the other four. Noticing that a number breaks two limits rather than one is the skill this table is really teaching.
You should seeSomething that surprises most people. Between 220 and 1k the current drops to a fifth, and the light looks perhaps half as bright. Your eye is nothing like a straight line, which is why Band 2's fade needs so many steps at the dim end and why a photograph of two LEDs never shows what you saw.

4. The one that explains something we never explained

Band 2's RGB module page tells you the three resistors on the board may be different values from each other, and calls it a deliberate design decision. Here is the reason, and it is this lesson.

ColourTakes aboutLeaves for a 220ΩSo the current is
Red2.0 V3.0 V13.6 mA
Green2.2 V, and varies a lot by make2.8 V12.7 mA
Blue or white3.0 V2.0 V9.1 mA
You should seeBlue getting a third less current than red through the same resistor. Give all three the same 220 and the blue is the weakest of the three, so your white comes out warm and yellowish rather than white. Different resistors are how the designer evens them up, and now you know what to look for on the back of any module you meet.
Done

What this changes

From here on, a resistor value is a decision you can make rather than a number you copy. When a page tells you to use 220 you can work out what happens if you use 470, and decide.

Keep in your build log:

  • Your predicted current for your own light, next to what the meter said
  • The completed five-row table, predictions included, especially the ones you got wrong
  • One sentence: what would happen to your light if the resistor were half the value, and why
The question to carry into the next lesson

Everything here has been one loop, one component at a time. But the tower you built in Band 1 has three lights on it, and Band 5's game has four.

Are those three lights sharing the current, or does each get its own? Does adding the third light dim the other two? Write down what you think before you turn the page. Most people guess wrong, and the guess is the useful part.

Ship it

This one is a measurement, so post the measurement. A photograph of your meter showing what your 220 ohm resistor actually reads, or your table with the predictions you got wrong still visible, is a better post than a finished build. Almost nobody publishes the part where they checked.

The five lines still work. What you measured, what you expected, the gap between them, the number itself, and what you will do differently now you know.

Show your work has the template. Tag it #BozomaBuilds.