← Teacher guides

Teacher guide: Circuits with the micro:bit

Wire parts to a micro:bit's pins: a complete loop, a resistor to protect an LED, a button as an input, and a sensor that gives a number. Each idea is tried on a board first, then built for real in Tinkercad Circuits. Builds on micro:bit Foundations.

Open the student course

Each lesson works two ways. Students can work through the online tutorial at their own pace (it checks their answers and saves their progress in their browser), or you can teach it to the whole class from the slides, then send students into the tutorial for the Modify and Make steps.

Every lesson guide has plain-language notes, the answers to every check, a solution for every task, and slides and a worksheet for Waypoints Prepare. These guide pages are not linked from student pages, but they are not secret either: keep printed Teacher editions for answers you do not want students to find.

Whole-course cheat sheet: Open to print (every command, grouped by unit: a handout for the final challenge)

Lighting an LED

A complete loop, and a resistor to keep the current safe.

Lighting an LED in 5 minutes (read before teaching this unit)

The idea in plain words

Electric current only flows around a complete loop: out of a pin, through the parts, and back to GND (ground, 0 V). Break the loop anywhere (an unclipped wire, a part the wrong way round) and the current stops everywhere in it at once. A pin is not a tap that pushes power one way.

An LED lets current through one way only (the long leg towards the pin), and uses about 2 V. A micro:bit pin gives 3.3 V, so 1.3 V is left over. With nothing else in the loop, that would push far more current than the LED can take (about 20 mA). A resistor limits it. Ohm's law: current = voltage ÷ resistance, so 1.3 V ÷ 220 Ω ≈ 0.006 A = 6 mA. In a single loop the current is the same everywhere, so the resistor works before or after the LED.

What students get wrong

  • One wire is enough. The current needs a way back to GND.
  • The resistor must go first. Same loop, same current, either side.
  • An LED works either way round. It is a one-way valve.

The words

current (mA), voltage (V), resistance (Ω), complete loop (circuit), GND, LED, resistor, Ohm's law.

In Tinkercad

Tinkercad Circuits has a micro:bit, LEDs and resistors; MakeCode blocks run it. Hovering over an LED with too much current shows a warning. Set up a class with a class code so students need no email.

Cheat sheet: Open to print (A4, with board pictures) · Markdown

Reading inputs

A button as an input, and a sensor that gives a number.

Reading inputs in 5 minutes (read before teaching this unit)

The idea in plain words

A pin set as an input reads the voltage on it. Digital read gives 1 when the pin is joined to 3.3 V and 0 when it is joined to GND. A button joins the pin to 3.3 V only while it is held, so when it is up something else has to hold the pin at 0: a pull-down resistor to GND. Without it the pin is joined to nothing (floating), picks up electrical noise, and reads 0 or 1 at random.

Analog read gives a number from 0 to 1023 for 0 to 3.3 V. A knob (potentiometer) or a light sensor in a voltage divider changes the voltage on the pin, so the number changes. The number is not volts: 1023 means 3.3 V, and 512 about half that. A program compares the number with a threshold to decide, as a night light does.

What students get wrong

  • An unconnected pin reads 0. It floats.
  • The number is the volts. It is a scale from 0 to 1023.
  • Brighter always means a bigger number. It depends which way round the divider is wired.

The words

input, digital read, pull-down, floating, analog read, potentiometer, voltage divider, threshold.

Cheat sheet: Open to print (A4, with board pictures) · Markdown