Teacher pack: Sensors and Microcontrollers
Print this page for a paper copy.
GENERATED from the course content. Do not hand-edit — regenerate with:
WRITE_TEACHER_PACKS=1 pnpm -C apps/learn vitest run lib/seed/__tests__/teacher-pack.test.tsTurn light, heat and distance into voltages a microcontroller can read — LDR and thermistor dividers, a potentiometer, a micro:bit reading a button and driving an LED, a Pico ADC, ultrasonic ranging, and a two-sensor alarm capstone.
- Lessons: 8
- Total lesson time: 124 minutes (about 2 h 4 min)
- Level: intermediate
- Objectives to mark: 26
- Access: every lesson needs Pro or a school licence
Lesson sequence
| # | Lesson | Minutes | Checks | Parts |
|---|---|---|---|---|
| 1 | A Night Light that Senses Darkness | 15 | 4 | breadboard, bench supply, resistor, LDR, LED, NPN transistor |
| 2 | Read a Temperature with the Meter | 12 | 3 | breadboard, bench supply, resistor, NTC thermistor |
| 3 | The Potentiometer is Just a Divider You Can Turn | 10 | 3 | breadboard, bench supply, potentiometer, resistor |
| 4 | A micro:bit Reads a Button | 15 | 3 | breadboard, micro:bit, push button, resistor |
| 5 | A micro:bit Drives an LED | 12 | 3 | breadboard, micro:bit, resistor, LED |
| 6 | A Pico Measures Light with its ADC | 15 | 3 | breadboard, Raspberry Pi Pico, resistor, LDR |
| 7 | Measure Distance with Ultrasound | 20 | 3 | breadboard, bench supply, Raspberry Pi Pico, HC-SR04 ultrasonic module, resistor |
| 8 | Capstone: a Two-Sensor Alarm | 25 | 4 | breadboard, Raspberry Pi Pico, resistor, LDR, NTC thermistor, LED, buzzer |
| Total | 124 | 26 |
Allow 124 minutes (about 2 h 4 min) of build time across 8 lessons. The estimates assume a learner working alone at the board; a class discussion, a demonstration and a pack-away typically add a third on top.
Curriculum mapping
The last two columns are deliberately blank. Fill in your own syllabus codes and the outcome each lesson evidences, then keep this page with your scheme of work.
| # | Lesson | Focus | Your code | Your outcome |
|---|---|---|---|---|
| 1 | A Night Light that Senses Darkness | Turn a light-dependent resistor into a voltage with a divider, then use that voltage to switch an LED on through a transistor when the room goes dark. | ||
| 2 | Read a Temperature with the Meter | Build a thermistor divider and learn to drive the multimeter properly: node voltages to ground, voltages across a part, and what each one tells you. | ||
| 3 | The Potentiometer is Just a Divider You Can Turn | See a potentiometer for what it is: a voltage divider with a movable midpoint, ready to feed an analog input. | ||
| 4 | A micro:bit Reads a Button | Wire a push button into micro:bit pin P0 with a pull-down resistor, and learn why a floating input is not the same as a LOW one. | ||
| 5 | A micro:bit Drives an LED | Drive an external LED from micro:bit pin P1 through a series resistor, and size that resistor from the pin’s own current limit. | ||
| 6 | A Pico Measures Light with its ADC | Feed an LDR divider into GP26 (ADC0) on a Raspberry Pi Pico and convert a 16-bit reading back into volts and into light level. | ||
| 7 | Measure Distance with Ultrasound | Wire an HC-SR04 ultrasonic module to a Pico, drop its 5 V ECHO signal to 3.3 V with a divider, and turn a pulse width into centimetres. | ||
| 8 | Capstone: a Two-Sensor Alarm | Combine a light divider and a temperature divider on two ADC channels, then raise an alarm only when both conditions agree. |
Objective checklist
One line per automatically-marked objective, in the order a learner meets them. Learners tick their own as they pass; a teacher can use the same list to mark a paper submission or to spot the lesson a class is stuck on.
1. A Night Light that Senses Darkness
- Place an LDR, an NPN transistor and an LED on the board.
- Wire the divider so that in the dark the LDR’s top leg (A) sits above 2 V.
- Feed the midpoint through a 10 kΩ resistor into the base so Vbe reaches about 0.7 V.
- The LED must light in the dark, drawing at least 5 mA.
2. Read a Temperature with the Meter
- Place the NTC thermistor and a 10 kΩ fixed resistor on the board.
- Wire the divider so the midpoint reads about half the supply (2.2 V to 2.8 V) at room temperature.
- Confirm with the meter that the thermistor drops the other half of the supply.
3. The Potentiometer is Just a Divider You Can Turn
- Place a 10 kΩ potentiometer on the board.
- Wire the CW end of the track to the red rail and the CCW end to the blue rail.
- With the knob at the halfway position, the wiper must read about half the supply (2.2 V to 2.8 V).
4. A micro:bit Reads a Button
- Wire the micro:bit’s 3V and GND pads to the rails, then add a push button and a 10 kΩ resistor.
- While the button is held down, P0 must sit at a solid HIGH (2.8 V or more).
- Releasing the button must pull P0 back to 0 V — that is the pull-down resistor’s whole job.
5. A micro:bit Drives an LED
- Place a 220 Ω resistor and an LED, with the micro:bit wired to the rails.
- Put the resistor in series with the LED — one lead each in the same column, and nothing else on that node.
- Return the LED cathode to the blue GND rail so P1 has somewhere to push current to.
6. A Pico Measures Light with its ADC
- With the Pico on the board, add an LDR and a 10 kΩ resistor.
- Feed the top of the divider from the Pico’s 3V3 pin, not from 5 V.
- Wire the midpoint to GP26 (ADC0). In the dark it must sit between 1.6 V and 3.0 V.
7. Measure Distance with Ultrasound
- Power the rails from the bench supply and add the HC-SR04 plus two divider resistors.
- Give the sensor its 5 V supply: VCC on the red rail.
- Tie the sensor’s GND and the Pico’s GND to the same blue rail.
8. Capstone: a Two-Sensor Alarm
- Build both sensor dividers and an indicator LED around the Pico.
- The light divider on ADC0 must read between 1.6 V and 3.0 V in the dark.
- The temperature divider on ADC1 must read about half of 3.3 V (1.4 V to 1.9 V) at room temperature.
- Put the indicator LED in series with its own resistor on GP15.