← Circuits with the micro:bit

A complete loop

Current only flows around a complete loop: out of pin 0, through the resistor and the LED, and back to GND. Break the loop anywhere, or turn the LED round, and the current stops everywhere at once.

You switch pin 0 on, but the LED stays dark. The code is right. What else has to be true for current to flow?

In micro:bit Foundations the LEDs were already on the board. Now you wire your own: an LED (a light that lets current through one way), a resistor (it protects the LED; next lesson says how) and two wires to the micro:bit's pins. Pin 0 can be switched on (3.3 V) by code. GND is the micro:bit's ground, 0 V.

WidthMore contexts, same idea.
PredictRead the problem and decide what you think before you try anything. A wrong guess is fine: it shows you what to look for.

Unclip a wire

Pin 0 is on and the LED is lit. You unclip the wire from the LED to GND. The LED…

TryTry it on the board and compare the result with your prediction.

Try: break the loop

Was your prediction right?

Try it yourselfYour edits are saved in this browser.

Unclip the GND wire. What happens to the LED?

Use the board. This ticks when you get there.

Clip GND back on, then unclip the pin 0 wire instead.

Use the board. This ticks when you get there.

Clip both wires on, then switch pin 0 off.

Use the board. This ticks when you get there.

InvestigateWork out why it happens, one step at a time.

Worked example: follow the loop

Worked exampleBefore each step, say what you think comes next.
  1. pin 0 on: 3.3 V\text{pin 0 on: } 3.3\text{ V}Code switches pin 0 on. It is 3.3 V above GND.

Now apply it: where in the loop is the current smallest?

The loop is complete and pin 0 is on. Where is the current smallest?

Sam's LED never lights. Click the line where Sam's plan first goes wrong.

ModifyChange the problem on purpose and see what happens.

Vary: the LED the wrong way round

Try it yourselfYour edits are saved in this browser.

Turn the LED round, with both wires clipped and pin 0 on.

Use the board. This ticks when you get there.

Every wire is clipped and pin 0 is on, but the LED is dark. Which is the best first thing to check?

Modify TypicalChange the problem on purpose and see what happens.

Build it in Tinkercad

Your teacher will give you the class code. Long leg of the LED towards the resistor and pin 0.

PractiseA few on your own, to check you have it.

Loops

Which of these lights the LED?

A torch has a battery, a switch and a bulb. Turning the switch off…

MakeMake your own problem using what you have learned. Expect a few tries; that is normal.

Fix the circuit

Try it yourselfYour edits are saved in this browser.
Need a hint?

There are three faults. Check each part of the loop in turn.

Another hint

Is every wire clipped? Is the LED the right way round? Is the pin on?

Another hint

Clip GND, turn the LED round and switch pin 0 on.

This LED won't light. Find and fix every fault.

Use the board. This ticks when you get there.

For teachers

Students break and remake a loop of pin 0, a resistor, an LED and GND on a board, see that current stops everywhere when the loop breaks anywhere, find that an LED only works one way round, then build the same circuit in Tinkercad. About 40 minutes.

Open the teacher guide: answers, solutions, slides and a worksheet.

Students will be able to

Before class

Try the boards, and set up a Tinkercad class (Classes › New class; students join with the class code and a nickname, no email). Check Tinkercad loads on student devices.

Simplifications: the board's model is a 3.3 V pin, an LED that drops 2 V, and wires with no resistance. The resistor's job is the next lesson; here it is just part of the loop.

If you have kits, one LED, a 220 Ω resistor and two crocodile clips on a real micro:bit make the Try even better.

Running the lesson

  1. Predict: ask those who chose 'stays lit' to say where the current would go.
  2. Try: ask why unclipping the pin wire and unclipping GND have the same effect.
  3. Vary: the backwards LED is the slip students will make in Tinkercad. Point at the long leg.
  4. Make: ask students to list the faults in the order they checked them.

The hard part (on purpose)

Students picture the pin pushing power out like a tap. Keep asking 'where does the current go back in?'

When students get stuck

Stretch and support

Stretch: Add a second LED and resistor on pin 1. Is that one loop or two? What happens to the first LED if the second's GND wire comes off?

Support: Give a printed loop to trace with a finger: pin 0, resistor, LED, GND, back to the micro:bit.

Where it leads

Next: Why the resistor (how much current, and what limits it).

Code links: micro:bit Foundations (pins and digital write); Engineering › Power and motors (why a pin can't run a motor).

Sources

What each step is for

Now you can
Next lesson2. Why the resistorWith no resistor, far too much current flows and the LED is damaged. A resistor limits the current: current = voltage ÷ resistance (Ohm's law). Bigger resistor, less current. In a single loop it works on either side of the LED.