Arduino Learning Studiorobotics pathway

R11-U3 · usually age 11 · Robot Explorers

Measure and Improve

Why does the rover lose the line?

Pilot unit plan · 5 sessions · not yet classroom-validated

Build: Calibrated line-following robot

The rover loses the line for reasons that can be measured: shiny or matt paper, light from a window, a sensor that reads differently, too much speed. Learners calibrate each sensor on two mats, log eight runs on a test path, make one change, log eight more, and compare the success rates before and after.

  • Sense
  • Test and debug

Who it is for

Age is a starting point, never a limit. A learner who can show what this unit starts from can begin here at any age.

How they learn
By arranging instruction cards or blocks, predicting what happens, and testing on a kit. Short sentences, with words and pictures together.
The adult's role
An adult oversees circuits, batteries and motors.
Session
60–75 minutes
Hardware
micro:bit with MakeCode, or a similar child-friendly board. Start in the board's own simulator. A micro:bit is 3.3 V: never connect a 5 V signal straight to it.

Starts from

Builds, and what it is the input for

In the studio today

No studio lab or activity for this unit yet.

Sessions

  1. Session 1 · 60 min

    Why does the rover lose the line?

    Causes and tests: a run fails for a reason. The light the sensor sees changes with the paper, the lighting and the sensor itself, and a fast rover has less time to correct. A trial log records every run the same way, so eight runs give a success rate: passes out of 8.

    The adult says first: “A lost line has a cause. Find it, test it, count it.”

    Learner card

    1. Write one cause per card.
    2. Guess how to test it.
    3. Eight runs make a rate.
    4. Passes out of 8.
    5. Draw your trial log.

    Key words (show each with a picture): cause · trial log · success rate

    Timing (10 of 60 min at the screen)

    1. 15 minAway from the screen: List the causes from R11-U2's runs; one card each, with a guess and a test.
    2. 10 minAway from the screen: Paper samples by the window and under the lamp: which reads highest?
    3. 10 minAt the screen: The simulator: a reading just above and just below the threshold.
    4. 10 minAway from the screen: Draw a trial log with its columns.
    5. 15 minAway from the screen: Fill in the table; say what a success rate is.

    In the studio

    No studio lab or activity.

    Outside the studio: MakeCode editor and its micro:bit simulator (makecode.microbit.org)

    Hands-on

    Nothing is powered: this session uses paper samples, the logs from R11-U2 and the simulator only. First, away from the screen, the group lists causes from their R11-U2 runs, and each pair writes one cause per card with a guess and a test for it. They hold white printer paper, glossy paper and grey card under a lamp and by a window, and guess which reads highest. Each pair draws a trial log with its columns. In MakeCode next, the learner opens their R11-U2 blocks. In the simulator, each sensor pin the blocks read shows a number from 0 to 1023 that starts at 0; drag the pin up for a bigger number. It is a stand-in you set: the simulator cannot see a mat or a line. The learner sets the left sensor's pin just above and then just below the threshold and says what the left wheel would do: a reading near the threshold can flip either way.

    Starting blocks: The learner's own blocks from R11-U2.

    Evidence to collect

    A prediction for each cause, the learner's own short test table (Cause | My guess | How to test) for four causes, and the learner's spoken explanation of why a run fails for a reason, and how eight runs make a success rate.

    Test table columns: Cause | My guess | How to test

    Predict
    For each cause, the learner guesses whether it makes the rover lose the line more often, and how to test it.
    Debug
    If two causes could explain the same failure, plan a test that changes only one of them.
    Reflect
    Why is one failed run not enough to know the cause?

    Works towards: Tuning

  2. Session 2 · 75 min

    Does each sensor read the same on every mat?

    Calibration on the real mats: each sensor is read over white and black on a strip of the training mat and a strip of a second mat (glossy paper), on the stand at the height written on the chassis. Reflectance varies with the paper and the light, and the three sensors may not agree. The threshold that works is the one with room to spare on both sides for every sensor, on the mat the rover will run on.

    The adult says first: “Measure each sensor on each mat. Then choose a threshold with room to spare.”

    Learner card

    1. Read white, then black.
    2. Do all three sensors agree?
    3. Try the second mat.
    4. Find the smallest gap.
    5. Leave room on both sides.

    Key words (show each with a picture): calibrate · gap · threshold

    Timing (10 of 75 min at the screen)

    1. 10 minAway from the screen: Guess: will the glossy mat read higher or lower than the training mat?
    2. 10 minAt the screen: The reading blocks in the simulator, then download.
    3. 30 minAway from the screen: Turns at the stand, one pair at a time (about 7 minutes each): three sensors over white and black, on both mats' strips.
    4. 10 minAway from the screen: The gap for each sensor; choose one threshold with room on both sides.
    5. 15 minAway from the screen: Fill in the table; explain the threshold you chose.

    In the studio

    No studio lab or activity.

    Outside the studio: MakeCode editor and its micro:bit simulator (makecode.microbit.org)

    Hands-on

    In the simulator first, the learner checks the R11-U2 reading blocks (P1 in “forever”, A for P0, B for P2); then the learner downloads them (the board switched off, the micro:bit out of the board, USB in; USB out once the light on the back stops flashing, the micro:bit back in). These blocks hold no motor block, so no wheel can turn. The adult measures the pack, and the learner writes its voltage at the top of the table. At each pair's turn, the stop drill; with the rover on its stand the adult switches on and checks the sign (a sensor number: the reading program). The rover stays on its stand, and the adult slides in a strip cut from the mat (its white paper and its black line) laid on a book under the sensors at the height written on the chassis, slid in from the front by the adult, then a strip of the second mat. The learner reads all three sensors over white and over black on each, guessing first: at the adult's word the learner presses A for the left sensor, and the adult presses B for the right. For each sensor and mat, the learner writes the gap between white and black under the table, and where a threshold would sit. Last, the learner chooses one threshold for the test path and says how much room it leaves for the sensor with the smallest gap.

    Starting blocks: The learner's own blocks from R11-U2 session 2 (the sensor numbers on “forever”, A and B; no motor block).

    Pins

    P0
    left line sensor
    P1
    middle line sensor
    P2
    right line sensor

    Evidence to collect

    A prediction for each reading, the learner's own short test table (Sensor and mat | My guess | White | Black) for three sensors on two mats, and the learner's spoken or written explanation of how the readings changed between mats and sensors, and why their threshold leaves room on both sides.

    Test table columns: Sensor and mat | My guess | White | Black

    Predict
    Before each reading, the learner guesses the number, and whether the second mat will read higher or lower.
    Debug
    If one sensor's white and black are close together, switch off and check its height above the mat and its wire, one at a time.
    Reflect
    Which sensor would lose the line first, and how do your numbers show it?

    ⚠ Adult checks before power-on: Nothing metal touches the micro:bit, its gold pins or the board, and nothing metal lies under it. Before the adult switches on: the micro:bit is firmly in the board, display facing the Link header, its own battery pack and USB unplugged; both switches were off while anything was plugged in or moved. The board's battery is the motor battery: it reaches the motors only through the holder's switch, the board's on/off switch (the power-off switch) and its Motor 1 and Motor 2 terminals. The power-off switch is the board's on/off switch: it cuts the battery to the board, the micro:bit and every motor and servo. Anyone may switch it off at any time; only the adult switches it on. The battery holder rides on the rover, tied down: only the adult opens it, fits cells or works its switch. Safe start: the motors never run just because the board was switched on. “on start” turns them off; only A starts them, after a 3-second wait, and B stops them: a B during the wait clears armed, which A checks after the wait, so the drive never starts. Lift first: the board is switched on only with the rover on its stand, wheels in the air, because a mistake in the blocks could start a wheel at once. On the stand, the board's switch faces the adult, who stands at it; learners stay outside a zone taped 30 cm round the stand. Buttons on a switched-on rover: a learner presses only A, only at the adult's word and only while every wheel is still, with one hand on the micro:bit, nowhere near a wheel, and is back outside the taped edge before the 3-second wait ends. B, the switch, and lifting, carrying or placing a switched-on rover are the adult's: on the floor only the adult presses B. Every program shows its own sign at start, and the adult checks it on the stand before the rover leaves it: the drive program (R11-U1) a Heart, the reading program a sensor number, the line program the No icon. A rover showing the wrong sign does not go on the floor. Fingers, hair, sleeves and cords stay away from the wheels while the board is on; long hair is tied back. The rover is lifted only by its chassis. Floor speed limit: the rover's speed numbers are never above 40 (of 100), a planning choice. Practise the stop before every switch-on: the adult is the stopper. On “Stop!”, the adult switches the board off (on the floor, lifting the rover by its chassis first); learners call “Stop!” from outside the taped zone and never reach for the rover. Rewire only when unpowered: the board and the holder are switched off before any wire, motor, servo or sensor is plugged in, moved or taken out. Never leave a lead loose while the board is on: switch off first; a lead taken out is capped and taped away from the board. The line sensor is a Kitronik Clippable Detector Board, rated 2 V to 5.5 V and powered only from the Link header's 3V pin, so its outputs come from 3.3 V; never from 5 V. Kitronik gives the detector's current as 54 mA at 3 V. At the header's 3.3 V it will draw a little more (about 60 mA if it rises in step with the voltage, an estimate), still under the header's 90 mA. The detector's leads, checked before every switch-on: its 3V lead goes to the Link header's 3V pin, never to a servo header's V pin. The board marks each servo header ‘GND V SIG’, and its V pin carries the battery's voltage (the datasheet: the servo outputs ‘Provide supply voltage to servos’), above the detector's 5.5 V and far above the micro:bit's 3.6 V. All five leads are tied down to the chassis and each one given a gentle tug. No music blocks in these units: MakeCode plays music through pin P0, where the left line sensor is. Before the first switch-on, the adult measures the pack with a multimeter at its leads (the board switched off) and writes the voltage at the top of the log: a weaker pack can slow the rover, so a change in the rate may come from the cells.

    Works towards: Tuning

  3. Session 3 · 75 min

    How often does our rover follow the test path now?

    The before: eight runs on the test path (the training mat with one tighter curve added), every run started the same way, with the current blocks: the threshold from session 2 and speed 30. A run passes when the rover follows the line from the start box to the end of the line without help, and the lost-line stop then stops it by itself. The success rate is passes out of 8, and each failure's place on the path is logged.

    The adult says first: “Eight runs, the same way each time. Then count the passes.”

    Learner card

    1. Start in the same place.
    2. Guess each run.
    3. Pass or fail? Write it.
    4. Where was it lost?
    5. Count the passes out of 8.

    Key words (show each with a picture): before · eight runs · rate

    Timing (10 of 75 min at the screen)

    1. 10 minAway from the screen: Mark the start box; agree the pass rule.
    2. 10 minAt the screen: The session 2 threshold in the blocks; download.
    3. 25 minAway from the screen: Turns, one pair at a time (about 11 minutes each, eight runs): guessed and logged; the other pair draws the path.
    4. 15 minAway from the screen: Count the passes; mark the failures on a drawing of the path.
    5. 15 minAway from the screen: Say what the rate shows, and what may have caused each failure.

    In the studio

    No studio lab or activity.

    Outside the studio: MakeCode editor and its micro:bit simulator (makecode.microbit.org)

    Hands-on

    First, away from the screen, the group marks the start box so every run starts in the same place and the same way, and agrees the pass rule. In the simulator next, the learner sets the session 2 threshold in the steering blocks; then the learner downloads them (the board switched off, the micro:bit out of the board, USB in; USB out once the light on the back stops flashing, the micro:bit back in). The adult measures the pack, and the learner writes its voltage at the top of the log. At each turn, the stop drill; with the rover on its stand the adult switches on and checks the sign (the No icon: the line program). The stand check: at the adult's word the learner presses A and steps back, and the adult slides the white end of the test card under the sensors; the No icon must come back about 2 seconds after the 3-second wait, or the rover stays on the stand and the adult switches off to check the middle sensor. With the program waiting for A, the adult carries the rover by its chassis from the stand to the start box and sets it down. Each pair's turn on the floor: eight runs. At the adult's word the learner presses A and steps back outside the tape; only the adult presses B. Before each, the learner guesses pass or fail; after each, the learner logs pass or fail and where it was lost. The cells and the mat stay the same for all eight runs; the pair waiting its turn draws the path. Last, the learner counts the passes and marks every failure on a drawing of the path.

    Starting blocks: The learner's own blocks from R11-U2, with the threshold chosen in session 2 and the speed at 30.

    Pins

    P0
    left line sensor
    P1
    middle line sensor
    P2
    right line sensor

    Evidence to collect

    A prediction for each run, the learner's own short test table (Run | My guess | Pass or fail | Where lost) for eight runs, and the learner's spoken explanation of the success rate and where on the path the failures happened.

    Test table columns: Run | My guess | Pass or fail | Where lost

    Predict
    Before each run, the learner says pass or fail; before the eight, the passes expected.
    Debug
    If failures cluster in one place, look at what is different there: the curve, the light, a crease in the paper.
    Reflect
    Why must every run start the same way before the numbers can be compared?

    ⚠ Adult checks before power-on: Nothing metal touches the micro:bit, its gold pins or the board, and nothing metal lies under it. Before the adult switches on: the micro:bit is firmly in the board, display facing the Link header, its own battery pack and USB unplugged; both switches were off while anything was plugged in or moved. The board's battery is the motor battery: it reaches the motors only through the holder's switch, the board's on/off switch (the power-off switch) and its Motor 1 and Motor 2 terminals. The power-off switch is the board's on/off switch: it cuts the battery to the board, the micro:bit and every motor and servo. Anyone may switch it off at any time; only the adult switches it on. The battery holder rides on the rover, tied down: only the adult opens it, fits cells or works its switch. Safe start: the motors never run just because the board was switched on. “on start” turns them off; only A starts them, after a 3-second wait, and B stops them: a B during the wait clears armed, which A checks after the wait, so the drive never starts. Lift first: the board is switched on only with the rover on its stand, wheels in the air, because a mistake in the blocks could start a wheel at once. On the stand, the board's switch faces the adult, who stands at it; learners stay outside a zone taped 30 cm round the stand. Buttons on a switched-on rover: a learner presses only A, only at the adult's word and only while every wheel is still, with one hand on the micro:bit, nowhere near a wheel, and is back outside the taped edge before the 3-second wait ends. B, the switch, and lifting, carrying or placing a switched-on rover are the adult's: on the floor only the adult presses B. Every program shows its own sign at start, and the adult checks it on the stand before the rover leaves it: the drive program (R11-U1) a Heart, the reading program a sensor number, the line program the No icon. A rover showing the wrong sign does not go on the floor. Fingers, hair, sleeves and cords stay away from the wheels while the board is on; long hair is tied back. The rover is lifted only by its chassis. Floor speed limit: the rover's speed numbers are never above 40 (of 100), a planning choice. Practise the stop before every switch-on: the adult is the stopper. On “Stop!”, the adult switches the board off (on the floor, lifting the rover by its chassis first); learners call “Stop!” from outside the taped zone and never reach for the rover. Rewire only when unpowered: the board and the holder are switched off before any wire, motor, servo or sensor is plugged in, moved or taken out. Never leave a lead loose while the board is on: switch off first; a lead taken out is capped and taped away from the board. The line sensor is a Kitronik Clippable Detector Board, rated 2 V to 5.5 V and powered only from the Link header's 3V pin, so its outputs come from 3.3 V; never from 5 V. Kitronik gives the detector's current as 54 mA at 3 V. At the header's 3.3 V it will draw a little more (about 60 mA if it rises in step with the voltage, an estimate), still under the header's 90 mA. The detector's leads, checked before every switch-on: its 3V lead goes to the Link header's 3V pin, never to a servo header's V pin. The board marks each servo header ‘GND V SIG’, and its V pin carries the battery's voltage (the datasheet: the servo outputs ‘Provide supply voltage to servos’), above the detector's 5.5 V and far above the micro:bit's 3.6 V. All five leads are tied down to the chassis and each one given a gentle tug. No music blocks in these units: MakeCode plays music through pin P0, where the left line sensor is. Before every floor turn, on the stand: A, then the white end of the test card under the sensors; the No icon must come back about 2 seconds after the 3-second wait. If it does not, the rover stays on the stand and the adult switches off to check the middle sensor and its wire. The lost-line stop: if the middle sensor sees no line for 20 passes of the loop in a row (each pass waits 100 ms, so about 2 seconds), the rover stops by itself. B stops the motors too. The run time-out: a second counter, passes, that A sets to 0 and every pass of the loop adds 1 to; at 300 passes (about 30 seconds, a little more in practice) the rover stops by itself wherever it is, even if a sensor has failed and reads dark all the time. 300 is a planning choice, sized to the plans' courses, where a good run at 30 takes under 20 seconds. Every course ends: the line stops at an end, with no loops, junctions or crossings, so a rover that keeps finding a line cannot circle for ever. The adult times a good run on each new course: if it takes 20 seconds or more, the course is made shorter. A switched-on rover that is not showing the No icon is live: it may be driving or about to drive. Hands off; the adult stays beside its switch. Stall or runaway: if a wheel is blocked, the rover pushes against anything, a motor hums without turning or the rover leaves the mat, call “Stop!” at once. Floor runs happen only in a cleared area with adults present: at least 1 m clear round the mat, learners outside its taped edge, one rover at a time per adult, who walks beside it. Before the first switch-on, the adult measures the pack with a multimeter at its leads (the board switched off) and writes the voltage at the top of the log: a weaker pack can slow the rover, so a change in the rate may come from the cells.

    Works towards: Tuning

  4. Session 4 · 75 min

    Does one change make it better?

    Tuning: change one thing, keep everything else the same, and run the same eight runs again. The change comes from the evidence: if the failures were on the tight curve, try a slower speed; if one sensor's gap was small, re-choose the threshold from session 2's readings. One change at a time, or the result cannot say which change helped.

    The adult says first: “Change one thing only. Then run the same eight runs again.”

    Learner card

    1. Choose one change.
    2. Guess the new rate.
    3. Keep everything else the same.
    4. Eight runs. Log each one.
    5. Count the passes again.

    Key words (show each with a picture): one change · tune · after

    Timing (10 of 75 min at the screen)

    1. 15 minAway from the screen: Read the before log; choose one change; guess the new rate.
    2. 10 minAt the screen: Make the one change; the simulator, then download.
    3. 25 minAway from the screen: Turns, one pair at a time (about 11 minutes each, eight runs): the same runs; the other pair plans the next test.
    4. 15 minAway from the screen: Count the passes; compare them with the before log.
    5. 10 minAway from the screen: Say why you chose that change.

    In the studio

    No studio lab or activity.

    Outside the studio: MakeCode editor and its micro:bit simulator (makecode.microbit.org)

    Hands-on

    First, away from the screen, the pair reads its before log and its calibration table and chooses one change, with a guess of the new success rate: the speed from 30 down to 25 (only if both wheels started at 20 or less in R11-U1), or a new threshold from session 2's readings. In the simulator next, the learner makes that one change and checks the blocks, then downloads them (the board switched off, the micro:bit out of the board, USB in; USB out once the light on the back stops flashing, the micro:bit back in). The adult measures the pack, and the learner writes its voltage at the top of the log. At each turn, the stop drill; with the rover on its stand the adult switches on and checks the sign (the No icon: the line program). The stand check: at the adult's word the learner presses A and steps back, and the adult slides the white end of the test card under the sensors; the No icon must come back about 2 seconds after the 3-second wait, or the rover stays on the stand and the adult switches off to check the middle sensor. With the program waiting for A, the adult carries the rover by its chassis from the stand to the start box and sets it down. Each pair's turn on the floor: the same eight runs as session 3, with the same start box, the same mat and the same cells. At the adult's word the learner presses A and steps back outside the tape; only the adult presses B. The learner logs each run in a new table with the same columns, then counts the passes.

    Starting blocks: The learner's session 3 blocks, with one change: a slower speed or a re-chosen threshold.

    Pins

    P0
    left line sensor
    P1
    middle line sensor
    P2
    right line sensor

    Evidence to collect

    A prediction of the new success rate and of each run, the learner's own short test table (Run | My guess | Pass or fail | Where lost) for eight runs after one change, and the learner's spoken or written explanation of the change they chose and why it came from the before log.

    Test table columns: Run | My guess | Pass or fail | Where lost

    Predict
    Before the eight runs, the learner guesses the new passes out of 8; before each run, pass or fail.
    Debug
    If the rate got worse, the change still taught you something: check that only one thing changed, then plan the next single change.
    Reflect
    How do you know it was your change, and not luck, that changed the rate?

    ⚠ Adult checks before power-on: Nothing metal touches the micro:bit, its gold pins or the board, and nothing metal lies under it. Before the adult switches on: the micro:bit is firmly in the board, display facing the Link header, its own battery pack and USB unplugged; both switches were off while anything was plugged in or moved. The board's battery is the motor battery: it reaches the motors only through the holder's switch, the board's on/off switch (the power-off switch) and its Motor 1 and Motor 2 terminals. The power-off switch is the board's on/off switch: it cuts the battery to the board, the micro:bit and every motor and servo. Anyone may switch it off at any time; only the adult switches it on. The battery holder rides on the rover, tied down: only the adult opens it, fits cells or works its switch. Safe start: the motors never run just because the board was switched on. “on start” turns them off; only A starts them, after a 3-second wait, and B stops them: a B during the wait clears armed, which A checks after the wait, so the drive never starts. Lift first: the board is switched on only with the rover on its stand, wheels in the air, because a mistake in the blocks could start a wheel at once. On the stand, the board's switch faces the adult, who stands at it; learners stay outside a zone taped 30 cm round the stand. Buttons on a switched-on rover: a learner presses only A, only at the adult's word and only while every wheel is still, with one hand on the micro:bit, nowhere near a wheel, and is back outside the taped edge before the 3-second wait ends. B, the switch, and lifting, carrying or placing a switched-on rover are the adult's: on the floor only the adult presses B. Every program shows its own sign at start, and the adult checks it on the stand before the rover leaves it: the drive program (R11-U1) a Heart, the reading program a sensor number, the line program the No icon. A rover showing the wrong sign does not go on the floor. Fingers, hair, sleeves and cords stay away from the wheels while the board is on; long hair is tied back. The rover is lifted only by its chassis. Floor speed limit: the rover's speed numbers are never above 40 (of 100), a planning choice. Practise the stop before every switch-on: the adult is the stopper. On “Stop!”, the adult switches the board off (on the floor, lifting the rover by its chassis first); learners call “Stop!” from outside the taped zone and never reach for the rover. Rewire only when unpowered: the board and the holder are switched off before any wire, motor, servo or sensor is plugged in, moved or taken out. Never leave a lead loose while the board is on: switch off first; a lead taken out is capped and taped away from the board. The line sensor is a Kitronik Clippable Detector Board, rated 2 V to 5.5 V and powered only from the Link header's 3V pin, so its outputs come from 3.3 V; never from 5 V. Kitronik gives the detector's current as 54 mA at 3 V. At the header's 3.3 V it will draw a little more (about 60 mA if it rises in step with the voltage, an estimate), still under the header's 90 mA. The detector's leads, checked before every switch-on: its 3V lead goes to the Link header's 3V pin, never to a servo header's V pin. The board marks each servo header ‘GND V SIG’, and its V pin carries the battery's voltage (the datasheet: the servo outputs ‘Provide supply voltage to servos’), above the detector's 5.5 V and far above the micro:bit's 3.6 V. All five leads are tied down to the chassis and each one given a gentle tug. No music blocks in these units: MakeCode plays music through pin P0, where the left line sensor is. Before every floor turn, on the stand: A, then the white end of the test card under the sensors; the No icon must come back about 2 seconds after the 3-second wait. If it does not, the rover stays on the stand and the adult switches off to check the middle sensor and its wire. The lost-line stop: if the middle sensor sees no line for 20 passes of the loop in a row (each pass waits 100 ms, so about 2 seconds), the rover stops by itself. B stops the motors too. The run time-out: a second counter, passes, that A sets to 0 and every pass of the loop adds 1 to; at 300 passes (about 30 seconds, a little more in practice) the rover stops by itself wherever it is, even if a sensor has failed and reads dark all the time. 300 is a planning choice, sized to the plans' courses, where a good run at 30 takes under 20 seconds. Every course ends: the line stops at an end, with no loops, junctions or crossings, so a rover that keeps finding a line cannot circle for ever. The adult times a good run on each new course: if it takes 20 seconds or more, the course is made shorter. A switched-on rover that is not showing the No icon is live: it may be driving or about to drive. Hands off; the adult stays beside its switch. Stall or runaway: if a wheel is blocked, the rover pushes against anything, a motor hums without turning or the rover leaves the mat, call “Stop!” at once. Floor runs happen only in a cleared area with adults present: at least 1 m clear round the mat, learners outside its taped edge, one rover at a time per adult, who walks beside it. Before the first switch-on, the adult measures the pack with a multimeter at its leads (the board switched off) and writes the voltage at the top of the log: a weaker pack can slow the rover, so a change in the rate may come from the cells.

    Works towards: Tuning

  5. Session 5 · 75 min

    Did our change make the rover better?

    The prototype, a calibrated line-following robot, judged by its numbers: the success rate before and after one change, side by side. Four more runs of each setting make the comparison fairer, but a gap of a few out of 12 may still be luck: the learner says how sure they are. The extra runs alternate, after, before, before, after, so a tiring pack affects both settings alike. The learner explains the change, the evidence for it and what to try next.

    The adult says first: “Before and after, side by side. Did your change help?”

    Learner card

    1. Write both rates.
    2. Guess: will it hold?
    3. After, before, before, after.
    4. Compare passes out of 12.
    5. How sure are you?

    Key words (show each with a picture): compare · before · after

    Timing (15 of 75 min at the screen)

    1. 10 minAway from the screen: Both logs side by side; both rates; will the difference hold?
    2. 5 minAt the screen: The after blocks: the simulator, then download.
    3. 10 minAway from the screen: First turns, one pair at a time (about 5 minutes each, two runs): the after blocks.
    4. 5 minAt the screen: The before blocks: the simulator, then download.
    5. 15 minAway from the screen: Second turns (about 7 minutes each, four runs): the before blocks.
    6. 5 minAt the screen: The after blocks again: the simulator, then download.
    7. 10 minAway from the screen: Third turns (about 5 minutes each, two runs): the after blocks.
    8. 15 minAway from the screen: Compare passes out of 12; explain which is better and how sure.

    In the studio

    No studio lab or activity.

    Outside the studio: MakeCode editor and its micro:bit simulator (makecode.microbit.org)

    Hands-on

    First, away from the screen, the learner puts the before and after logs side by side, writes both rates and guesses whether the difference will hold. In the simulator next, the learner checks the after blocks, then downloads them (the board switched off, the micro:bit out of the board, USB in; USB out once the light on the back stops flashing, the micro:bit back in). The adult measures the pack, and the learner writes its voltage at the top of the log. The extra runs alternate over three turns for each pair: after, before, before, after. At each turn, the stop drill; with the rover on its stand the adult switches on and checks the sign (the No icon: the line program). The stand check: at the adult's word the learner presses A and steps back, and the adult slides the white end of the test card under the sensors; the No icon must come back about 2 seconds after the 3-second wait, or the rover stays on the stand and the adult switches off to check the middle sensor. With the program waiting for A, the adult carries the rover by its chassis from the stand to the start box and sets it down. First turn: two runs with the after blocks. At the adult's word the learner presses A and steps back outside the tape; only the adult presses B. While the other pair runs, the learner downloads the before blocks the same way; second turn, from the stand check again: four runs with the before blocks. Then the after blocks again, downloaded the same way; third turn: two more runs with the after blocks. The learner adds the four extra runs of each setting to its rate (passes out of 12 for each setting). Last, the learner explains to the adult which setting is better and how sure they are.

    Starting blocks: The learner's own blocks from session 4 (after) and from session 3 (before).

    Pins

    P0
    left line sensor
    P1
    middle line sensor
    P2
    right line sensor

    Evidence to collect

    The unit's evidence: the learner compares success rates before and after a change: a prediction for each setting, the learner's own short test table (Setting | My guess | Passes of 12) for both settings, with the four extra runs, and the learner's spoken or written explanation of whether the change helped, how sure they are, and what they would change next.

    Test table columns: Setting | My guess | Passes of 12

    Predict
    Before the extra runs, the learner says whether the better setting will stay better, and why.
    Debug
    If the two settings swap places in the extra runs, the difference was small: say so, and plan a bigger test.
    Reflect
    How many runs would you want before you trust a change on a real rescue rover?

    ⚠ Adult checks before power-on: Nothing metal touches the micro:bit, its gold pins or the board, and nothing metal lies under it. Before the adult switches on: the micro:bit is firmly in the board, display facing the Link header, its own battery pack and USB unplugged; both switches were off while anything was plugged in or moved. The board's battery is the motor battery: it reaches the motors only through the holder's switch, the board's on/off switch (the power-off switch) and its Motor 1 and Motor 2 terminals. The power-off switch is the board's on/off switch: it cuts the battery to the board, the micro:bit and every motor and servo. Anyone may switch it off at any time; only the adult switches it on. The battery holder rides on the rover, tied down: only the adult opens it, fits cells or works its switch. Safe start: the motors never run just because the board was switched on. “on start” turns them off; only A starts them, after a 3-second wait, and B stops them: a B during the wait clears armed, which A checks after the wait, so the drive never starts. Lift first: the board is switched on only with the rover on its stand, wheels in the air, because a mistake in the blocks could start a wheel at once. On the stand, the board's switch faces the adult, who stands at it; learners stay outside a zone taped 30 cm round the stand. Buttons on a switched-on rover: a learner presses only A, only at the adult's word and only while every wheel is still, with one hand on the micro:bit, nowhere near a wheel, and is back outside the taped edge before the 3-second wait ends. B, the switch, and lifting, carrying or placing a switched-on rover are the adult's: on the floor only the adult presses B. Every program shows its own sign at start, and the adult checks it on the stand before the rover leaves it: the drive program (R11-U1) a Heart, the reading program a sensor number, the line program the No icon. A rover showing the wrong sign does not go on the floor. Fingers, hair, sleeves and cords stay away from the wheels while the board is on; long hair is tied back. The rover is lifted only by its chassis. Floor speed limit: the rover's speed numbers are never above 40 (of 100), a planning choice. Practise the stop before every switch-on: the adult is the stopper. On “Stop!”, the adult switches the board off (on the floor, lifting the rover by its chassis first); learners call “Stop!” from outside the taped zone and never reach for the rover. Rewire only when unpowered: the board and the holder are switched off before any wire, motor, servo or sensor is plugged in, moved or taken out. Never leave a lead loose while the board is on: switch off first; a lead taken out is capped and taped away from the board. The line sensor is a Kitronik Clippable Detector Board, rated 2 V to 5.5 V and powered only from the Link header's 3V pin, so its outputs come from 3.3 V; never from 5 V. Kitronik gives the detector's current as 54 mA at 3 V. At the header's 3.3 V it will draw a little more (about 60 mA if it rises in step with the voltage, an estimate), still under the header's 90 mA. The detector's leads, checked before every switch-on: its 3V lead goes to the Link header's 3V pin, never to a servo header's V pin. The board marks each servo header ‘GND V SIG’, and its V pin carries the battery's voltage (the datasheet: the servo outputs ‘Provide supply voltage to servos’), above the detector's 5.5 V and far above the micro:bit's 3.6 V. All five leads are tied down to the chassis and each one given a gentle tug. No music blocks in these units: MakeCode plays music through pin P0, where the left line sensor is. Before every floor turn, on the stand: A, then the white end of the test card under the sensors; the No icon must come back about 2 seconds after the 3-second wait. If it does not, the rover stays on the stand and the adult switches off to check the middle sensor and its wire. The lost-line stop: if the middle sensor sees no line for 20 passes of the loop in a row (each pass waits 100 ms, so about 2 seconds), the rover stops by itself. B stops the motors too. The run time-out: a second counter, passes, that A sets to 0 and every pass of the loop adds 1 to; at 300 passes (about 30 seconds, a little more in practice) the rover stops by itself wherever it is, even if a sensor has failed and reads dark all the time. 300 is a planning choice, sized to the plans' courses, where a good run at 30 takes under 20 seconds. Every course ends: the line stops at an end, with no loops, junctions or crossings, so a rover that keeps finding a line cannot circle for ever. The adult times a good run on each new course: if it takes 20 seconds or more, the course is made shorter. A switched-on rover that is not showing the No icon is live: it may be driving or about to drive. Hands off; the adult stays beside its switch. Stall or runaway: if a wheel is blocked, the rover pushes against anything, a motor hums without turning or the rover leaves the mat, call “Stop!” at once. Floor runs happen only in a cleared area with adults present: at least 1 m clear round the mat, learners outside its taped edge, one rover at a time per adult, who walks beside it. Before the first switch-on, the adult measures the pack with a multimeter at its leads (the board switched off) and writes the voltage at the top of the log: a weaker pack can slow the rover, so a change in the rate may come from the cells.

    Works towards: Tuning

Materials

  • Per pair: a BBC micro:bit and its USB cable (USB micro-B at the micro:bit end)
  • A computer with a web browser for MakeCode (makecode.microbit.org); no installs needed
  • Per pair: a Kitronik Compact All-In-One Robotics Board for BBC micro:bit (stock code 5693), its Link header fitted with a 2.54 mm pin header by the adult (soldering is adult-only)
  • Kept by the adult: 4 × AA alkaline cells (1.5 V each, 6 V nominal) in a holder with a screwed-shut cover and its own on/off switch, wired by the adult to the board's power terminal block; no rechargeable cells, Li-ion, LiPo, RC or coin-cell packs
  • Pencils and paper for the test tables
  • Per rover: two right-angle geared TT motors with yellow wheels (Kitronik stock code 25100), leads soldered on by the adult
  • Per rover: a flat chassis about 20 cm by 12 cm (stiff corrugated plastic or thick card), a smooth plastic ball caster with spacers to level the deck, cable ties, M3 nuts and bolts, and a stand (a box that holds the wheels in the air)
  • Per rover: a Kitronik Clippable Detector Board (stock code 5678), five wires each with a ring end for a pad bolt and a female jumper socket, M3 nuts, bolts and spacers for its stand-offs, and a ruler
  • The training mat from R11-U2, a second mat of glossy paper with the same black line, and the test path: the training mat with one tighter curve added
  • Paper samples (white printer paper, glossy paper, grey card), a strip cut from each mat, a book, masking tape, a stopwatch and the R11-U2 logs
  • For the adult: a multimeter, to measure the pack each powered session

⚠ Safety before any session

  • Batteries: only AA alkaline cells in the board's closed holder, and USB from a computer for downloads; no rechargeable cells, power banks, Li-ion, LiPo, RC packs or coin cells.
  • Cells: the adult fits four new alkaline cells of one type, the right way round, never mixes new and used cells, takes spent cells out and screws the cover shut.
  • The power-off switch is the board's on/off switch: it cuts the battery to the board, the micro:bit and every motor and servo. Anyone may switch it off at any time; only the adult switches it on.
  • The board's battery is the motor battery: it reaches the motors only through the holder's switch, the board's on/off switch (the power-off switch) and its Motor 1 and Motor 2 terminals.
  • A motor never runs from a micro:bit pin: it runs only from the board's motor terminals, powered by the board's battery.
  • Lift first: the board is switched on only with the rover on its stand, wheels in the air, because a mistake in the blocks could start a wheel at once.
  • Fingers, hair, sleeves and cords stay away from the wheels while the board is on; long hair is tied back. The rover is lifted only by its chassis.
  • Floor speed limit: the rover's speed numbers are never above 40 (of 100), a planning choice.
  • Floor runs happen only in a cleared area with adults present: at least 1 m clear round the mat, learners outside its taped edge, one rover at a time per adult, who walks beside it.
  • Stall or runaway: if a wheel is blocked, the rover pushes against anything, a motor hums without turning or the rover leaves the mat, call “Stop!” at once.
  • Rewire only when unpowered: the board and the holder are switched off before any wire, motor, servo or sensor is plugged in, moved or taken out.
  • Never leave a lead loose while the board is on: switch off first; a lead taken out is capped and taped away from the board.
  • The battery holder rides on the rover, tied down: only the adult opens it, fits cells or works its switch.
  • Learners press only A, at the adult's word, with every wheel still and one hand on the micro:bit only. B, the switch and moving a switched-on rover are the adult's.
  • Only the parts the plan names connect to the micro:bit, through the board's Link header. Never connect a 5 V signal or supply to a micro:bit's pins or battery socket: it runs at 3.6 V at most.
  • If the board, a motor, the holder or a wire gets warm: switch the board off, don't touch it, tell the adult.
  • The line sensor is a Kitronik Clippable Detector Board, rated 2 V to 5.5 V and powered only from the Link header's 3V pin, so its outputs come from 3.3 V; never from 5 V.
  • The detector's 3V lead goes only to the Link header's 3V pin, never a servo header's V pin (battery voltage); its five leads are tied down and tug-tested.
  • No music blocks in these units: MakeCode plays music through pin P0, where the left line sensor is.
  • The lost-line stop: if the middle sensor sees no line for 20 passes of the loop in a row (each pass waits 100 ms, so about 2 seconds), the rover stops by itself. B stops the motors too.
  • Every line run ends by itself: the lost-line stop after about 2 seconds without a line, and the run time-out after 300 passes (about 30 seconds), even if a sensor fails.
  • Every course ends: no loops, junctions or crossings, and a good run takes under 20 seconds.
  • A switched-on rover that is not showing the No icon is live: it may be driving or about to drive. Hands off; the adult stays beside its switch.

Notes for the adult

  • Read each step aloud first: your words come before the learner's card. The card uses short sentences; show each key word with a picture.
  • These plans assume one adult for up to four pairs. Learners plug the USB cable into their own computer, gripping the plug, while the adult watches; only the adult handles cells and battery packs. With more pairs, add an adult or bring fewer pairs to the real board at once.
  • Each session's timing keeps screen time to short bursts (15 minutes at most), with building, acting or testing away from the screen between them.
  • Before the first session on the real board, set up each computer and test a download: either pair each micro:bit once with WebUSB (then MakeCode's Download button sends the program straight to it), or download the .hex file and drag it onto the MICROBIT drive. The light on the back flashes while the program copies: unplug only after it stops.
  • To download, the board is switched off and the adult takes the micro:bit out of it (or the learner does, with the adult watching), holding it by its edges and pulling it straight out; the learner plugs in USB, downloads and unplugs USB once the light on the back stops flashing; the micro:bit goes back in the same way, straight and firmly, display facing the Link header, before the adult switches on. Every swap wears the edge connector a little: swap only to download or at a pair's turn, and never rock the micro:bit out.
  • Powered work rotates: one rover at a time per adult, each pair (or team) taking its turn while the others work away from the screen. Planning figures: a turn takes about 3 minutes to set up (the stand, the sign, the stop drill, the stand check) and about a minute a run, so each session's timing gives every turn its minutes.
  • The pack is 6 V nominal (4 × 1.5 V), at the edge of all three ranges: the bottom of Kitronik's recommended 6.0–10.8 V for the board, and the top of the TT motor's 3–6 V and the servo's 4.8–6 V. Expect it to vary: new cells can read above 1.5 V each with nothing running (Energizer's handbook works an example with an open circuit voltage of 1.6 V), and the pack sags under load, because each fresh cell has 150 to 300 milliohms of internal resistance (Energizer E91). Kitronik's board page lists under Requires a Power Supply that links to its 3 × AA holder; these plans use 4 × AA instead, because 3 × AA is 4.5 V nominal, below the board's recommended 6.0 V and the servo's 4.8 V.
  • Kitronik labels the board Age 11+ and tags it Designed for_Engineers. These plans are adult-led for that reason: the adult builds, wires, powers and switches every rig and keeps the battery holder; the learner changes numbers in blocks, presses the micro:bit's buttons when the adult says, and watches from outside the safe zone or the gate's path.
  • Before the first session, add the extensions on each computer: in MakeCode's Extensions, search for Kitronik and pick the Kitronik robotics Board; for the line sensor, search for Kitronik clip detector.
  • The MakeCode simulator prepares the work. Only the real board, seen working by the adult, counts as evidence: a simulator run is never physical success.
  • Learners already make their own test tables (R09-U3): give the columns, and the learner draws and fills in the table.
  • The studio's Arduino labs are written for ages 12 and up and are not used in this unit, not even its motor or steering labs: they wire a 5 V Uno, never a micro:bit.
  • Carried over from age 10: the same board, battery and power-off switch; the same motor blocks with a speed from 0 to 100; the power path from R10-U1 (battery, board, motor, back), now through two motor drivers; and the safe stop rule from R10-U3 (when unsure, the safe choice), now: stop when the line is lost. The servo socket stays empty at age 11.
  • Motor 1 drives the left wheel and Motor 2 the right; the left line sensor is on P0, the middle one on P1 and the right one on P2.
  • An engineering note, not a maker's quote: the board's driver chip keeps the last speeds it was sent. If the program halts (it crashes, or the micro:bit is pulled out), a wheel that was turning can keep turning; after a reset, “on start” turns the motors off only once the program runs again. Only the switch is sure to stop the motors.
  • If both wheels stall, the pack's voltage can sag far enough to reset the micro:bit. The safe start then keeps the motors off until A, so the rover sits still showing its sign: treat it as live and switch off.
  • Planning choices, not sourced figures: the speeds 30 and 25, the floor limit of 40 of 100, the 3000 ms drive limit, the 3-second wait after A, the lost-line stop's 20 passes of 100 ms, the run time-out of 300 passes, the detector's starting height of 10 mm, the 1 m clearance and the 30 cm zone.
  • Kitronik gives the detector's current as 54 mA at 3 V. At the header's 3.3 V it will draw a little more (about 60 mA if it rises in step with the voltage, an estimate), still under the header's 90 mA.
  • The detector hangs under the front on stand-offs (bolts with nuts and spacers) that set one height above the floor: start at about 10 mm (a planning choice: Kitronik gives no height), measured with a ruler and written on the chassis. Keep it fixed: every reading and threshold holds only at that height.
  • Which side P0 is on depends on how the detector is bolted on, so check it: with the line under the left sensor only, does P0 drop? If P2 drops instead, the adult switches off and swaps the P0 and P2 wires at the header.
  • If a sensor's white and black numbers overlap (its lowest white is not above its highest black), no threshold works: switch off and change one thing at a time, the detector's height on its stand-offs, the light on the mat (no sunlight or lamp on it) or the mat itself (matt white paper, a darker line), then read again.
  • A substitute line sensor must have, on its own datasheet: a supply rating that includes 3.3 V (as the Kitronik board's 2–5.5 V does), analogue outputs, and a total current under 90 mA at 3.3 V (the Link header's limit). The adult checks all three before buying.
  • A run passes when the rover follows the line from the start box to the end of the line without help, and the lost-line stop then stops it by itself.
  • Calibration is a need (R10-U2): the reference here is the mat itself, read over white and black, as the ruler was for the distance sensor.
  • Repeatable runs are a need (R10-U4): every run starts in the same box, on the same mat, with the same cells, so before and after can be compared. A failed run counts and is never rerun.
  • The speed change only goes down here (30 to 25), and only if 25 stays above the lowest speed that started both wheels in R11-U1: the floor limit of 40 stays.
  • The floor sessions (3 to 5) plan for two pairs per adult, because each pair runs eight times or more: with four pairs, add an adult or run the floor sessions twice.
  • Readiness decides, not age: a learner who already logs eight runs, makes one change from the evidence and compares the success rates can move on to R11-U4.

Planned studio features

Not built yet. The unit runs without them.

  • A line-following simulator in the studio with a mat whose shine and lighting can be changed, labelled as simulated inputs, so learners can rehearse a calibration.
  • Printable picture cards for each session's key words, and printable learner cards.
  • A printable trial log and a before-and-after comparison sheet.

Sources

The facts this plan relies on, in each source's own words.