1

Crumbs and the robot that came first

Robot vacuums clean floors. Nobody built one for the table.

Ants and cockroaches find food by scouting. When one scout finds crumbs, it leaves a scent trail so the rest of the colony can follow. That is why the first step against bugs is always the same: clean up right after eating.

Most people brush crumbs off the table with a hand. The crumbs land on the floor. The mess did not leave the house, it just moved somewhere harder to reach. Dusty catches crumbs in a tray you dump in the trash.

The first Roomba robot vacuum went on sale in September 2002 for about $199. Before it was called Roomba, the team called it DustPuppy. It had three separate systems just to keep it from falling down stairs, because falling is the biggest danger for any driving robot.

Invention: A new thing, or a new way of doing something, that solves a problem.
Autonomous: It decides for itself. No remote control, no driver.
Try it
After dinner, count how many crumbs are left on the table. Then brush them off with your hand and count how many ended up on the floor.
Did you know?
Before it was the Roomba, the robot vacuum was called DustPuppy. Dusty is in good company.
2

The brain: micro:bit and code

A microcontroller is a tiny computer that does one job forever.

A laptop can do millions of different things. A microcontroller does one job, very reliably, using almost no electricity. There is one in a microwave, one in a car key, and dozens in the car itself.

The micro:bit is a microcontroller you can reprogram. Its 25 red LEDs can scroll sensor numbers, so you can read them at the table with no laptop. Button A runs random bounce and button B runs Spot Clean. When you load code, it stays. Switch Dusty on a week later and the program starts right away.

Code is a list of steps the computer follows exactly, in order. Dusty’s code uses three big ideas. A loop repeats steps forever. An if checks something and decides what to do. A variable is a box that remembers a number, like the threshold.

on button A pressed
read the table, set threshold
forever
if a sensor reads above threshold
stop both motors
back up, spin a random amount
else
both motors forward at 40
Microcontroller: A small computer that runs one program forever.
Loop: Steps that repeat.
If / then: A decision: if this is true, then do that.
Variable: A named box that holds a number.
Try it
Ask Claude for a MakeCode program that shows a heart when you press button A. Paste it into makecode.microbit.org, flip to Blocks, and find the if/then. Then flash it and check it works.
Did you know?
The micro:bit is about 4 cm by 5 cm, smaller than a credit card.
3

Motors and the H-bridge

The micro:bit can point, but it cannot lift. The motor board does the lifting.

A micro:bit pin gives about enough electricity to light a small LED, roughly 1/100th of what a motor wants. Wire a motor straight to it and you get a broken micro:bit, not a slow robot.

The moto:bit board has a circuit called an H-bridge: four electronic switches in the shape of the letter H, with the motor in the middle. Close one pair and the motor spins forward. Close the other pair and it spins backward. The micro:bit only says which pair.

To run a motor at 40%, the board flicks the power fully on and off hundreds of times a second, on 40% of the time. The motor acts like it gets 40% of the power. This is called PWM. At 40%, Dusty drives about 7 centimeters per second.

Power on (bright) and off (dark), one short slice of time
25%
40%
75%

The real board does this hundreds of times every second.

H-bridge: Four switches that let a motor spin either direction.
PWM: Pulse width modulation. Flicking power on and off very fast to run a motor slower.
Try it
Load the motor test at 40, then at 80. Time how long Dusty takes to cross a ruler at each speed.
Did you know?
A dimmer switch for room lights uses the same on-off trick as PWM.
4

Wheels, steering and three feet

Dusty steers with no steering wheel. It just runs its two wheels differently.

Both wheels forward at the same speed: straight. One faster than the other: a curve. One forward and one backward: a spin in place. This is called differential drive.

Each N20 motor has a gearbox with a 298:1 ratio. The motor spins 298 times for one turn of the wheel. The gears trade speed for strength, so a tiny motor can push the whole robot.

Dusty stands on two wheels and one ball caster. Three points always sit flat, even on a bumpy table. Four wheels would rock whenever the table was not perfectly flat.

Differential drive: Steering by running two wheels at different speeds.
Caster: A ball or wheel that rolls in any direction to hold up one end.
Try it
Set the left motor to 40 and the right to 20. Which way does Dusty curve? Now swap them.
Did you know?
Camera tripods have three legs for the same reason Dusty has three feet.
5

Seeing the edge with infrared

Shine light down, measure the bounce. No bounce means no table.

Each cliff sensor has two tiny bumps. One is an infrared LED that shines invisible light straight down. The other measures how much light comes back.

On the table, the light bounces straight back up. Past the edge, it shines into empty air and almost nothing comes back. That sudden drop is how Dusty knows the table ended.

The sensor works best about 3 mm above the table and gets unreliable past 6 mm. Two US pennies stacked up are almost exactly 3 mm, so they set the height. The sensors sit 62 mm in front of the wheels, which gives Dusty a head start to stop.

How much infrared light bounces back
White or light surface60 to 80%
Black surface10 to 20%
Past the table edgealmost none

A black placemat is much closer to a cliff than white paper is.

Infrared: Light just past red that eyes cannot see. TV remotes use it.
Reflectance sensor: An emitter and a detector together. It shines light and measures the bounce.
Try it
Point a TV remote at a phone camera and press a button. The camera can see the infrared flashes your eyes cannot.
Did you know?
Dark surfaces fool real Roombas too. Some refuse to drive onto black rugs because they think the rug is a cliff.
6

Numbers, thresholds and calibration

Dusty measures the table it is sitting on, then decides for itself what a cliff looks like.

A button is digital: pressed or not, yes or no. The sensor is analog: it has a whole range of answers. The micro:bit turns it into a number from 0 to 1023. For Dusty’s sensors, a low number means lots of light came back, and a high number means almost none did.

A threshold is the line between table and cliff. On white paper the table might read 200 and the edge 900. Dark wood might read 650 on the table. A fixed line at 500 would make Dusty think the dark table was already a cliff.

So Dusty calibrates. Press A while it sits still, and it reads the table and sets the threshold 200 above that. Same code, any table.

tablecliffthreshold 400table 200edge 90001023threshold = table + 200
Analog: A measurement with a whole range of answers, not just yes or no.
Threshold: The cutoff number. Above it means cliff, below it means table.
Calibration: Measuring the surface at startup so the threshold fits that table.
Try it
Scroll the sensor number on the LEDs. Write down the reading on white paper, on wood, on a black placemat, and held over the edge.
Did you know?
Scientists calibrate scales, thermometers, and telescopes before they trust a measurement.
7

Redundancy: the whisker

Two sensors that fail for different reasons.

The whisker is a small switch with a springy arm and a little wheel. The wheel rolls on the table and holds the arm pushed in. When the table ends, the arm drops, the switch clicks, and the motors stop.

Infrared can be fooled by a black placemat. The whisker cannot, because it touches instead of looking. Having two different systems do the same job, so one can catch what the other misses, is called redundancy.

The test: cover both infrared sensors with tape. If Dusty still stops at the edge, the whisker works on its own.

Redundancy: Two systems that fail for different reasons, so one catches what the other misses.
Switch: A part that opens or closes a circuit.
Try it
When a judge asks "what if the sensor is wrong?", practice answering with the word redundancy.
Did you know?
Airplanes have two or three of almost every important system for the same reason.
8

Gears: trading speed for strength

The brush gears make the roller 5.4 times slower and about 5.4 times stronger.

When two gears touch, their teeth pass one for one. The motor gear has 12 teeth and the big gear has 36, so the motor goes around 3 times for one turn of the big gear.

A small 10-tooth gear is stuck to the big gear. It drives the 18-tooth roller gear, which slows things down again by 18 ÷ 10 = 1.8. The two slow-downs multiply: 3 × 1.8 = 5.4.

The 130 motor spins about 8,000 to 10,000 times a minute. Divided by 5.4, the roller turns about 1,500 to 1,800 times a minute, with enough turning strength to push through a pile of cereal.

12361018motorroller36 ÷ 12 = 318 ÷ 10 = 1.8
3 × 1.8 = 5.4 times slower, about 5.4 times stronger
Gear ratio: How many turns in for one turn out. The brush gears are 5.4 to 1.
Torque: Turning strength.
Gearing down: Using gears to trade speed for strength.
Try it
Put a marker dot on the motor gear and the roller gear. Turn the roller once by hand and count the motor gear turns. You should get about five and a half.
Did you know?
A bicycle does the same thing. The low gear makes hills easier by trading speed for strength.
9

Power: volts and the power bank

A power bank holds a steady 5 volts until it is empty.

Volts are like the push behind electricity. Four AA batteries start near 6 volts and fade as they run down, so Dusty would get slower all day. Speed is what the experiment measures, so a steady 5 volts keeps the test fair.

Battery size is measured in milliamp hours (mAh). The bank holds 5,200 mAh and Dusty uses about 450 milliamps. 5,200 ÷ 450 is about 11 hours, but the bank loses some energy changing its voltage, so plan on 6 to 7 hours.

The power bank is a lithium battery. Never crush, pierce or drop it. If it gets hot, swells or smells, a grown-up takes it out.

Volt: A unit for how hard electricity is pushed.
Milliamp hour: How much charge a battery holds.
Circuit: A complete loop that electricity flows around.
Try it
Charge the bank and watch the four blue lights. Each light is about a quarter full.
Did you know?
AA batteries lasted Dusty only about 90 minutes. That is why the power bank change (MOC-001) happened.
10

3D printing and PLA

A 3D printer builds a part like a stack of very thin pancakes.

PLA is a plastic made from plants, usually corn or sugarcane. The printer pushes a thread of it into a nozzle at about 220°C, where it melts like hot glue, and draws one layer 0.2 mm thick. Then it draws the next layer on top.

The base plate is 28 mm tall. 28 ÷ 0.2 = 140 layers. All 19 printed pieces use about 101 grams of PLA.

The screw holes print a little smaller than the M2 screws, 1.8 mm instead of 2 mm. The screw cuts its own thread as it turns. The small print in Batch 1 checks that holes come out the right size before the long print.

PLA: A plastic made from plants. The printer melts it and builds parts in layers.
Layer: One thin slice of a 3D print, 0.2 mm on Dusty.
Pilot hole: A hole a bit smaller than the screw, so the screw cuts its own thread.
Fit check: Testing the part everything else depends on before making the rest.
Try it
The deck post is 35 mm tall. How many 0.2 mm layers is that? (Answer: 175.)
Did you know?
PLA goes soft at about 60°C. A car in the Houston sun gets hotter than that inside, so Dusty never stays in the car.
11

Stopping distance

The faster you go, the more room you need to stop.

Nothing stops instantly. A robot keeps rolling while its code notices the edge and while the motors slow down. A faster robot covers more ground in that time and has more motion to get rid of.

Dusty’s sensors are 62 mm ahead of its wheels. That head start is the room it has to stop. The prediction: at slow speed it needs about 8 mm, and at full speed about 38 mm, so it should never fall.

The experiment tests four speeds (25, 50, 75 and 100), 20 runs each, measuring how far the sensor goes past the edge and counting falls. If the numbers climb toward 62, the chart can predict the speed where Dusty would finally fall.

Millimeters to stop
Slow (prediction)8 mm
Full speed (prediction)38 mm
Head start it has62 mm

If a bar ever reaches the pink one, Dusty falls.

Stopping distance: How far something travels after it starts to stop.
Prediction: Your best guess before you test, and why. Also called a hypothesis.
Try it
Roll a toy car down a ramp from low and from high. Mark where it stops each time. Which one needs more room?
Did you know?
Cars that brake by themselves use the same idea: see the problem early enough to stop in time.
12

Search patterns: bounce or rows

Simple random driving works. Rows work better on a small spill.

The first Roomba had no map. It drove straight, turned a random amount at an obstacle, and drove again. Bounce around long enough and you cover the whole room. It sold about a million a year. That is Dusty’s button A.

Spot Clean on button B sweeps a 1 foot square in rows, like mowing a lawn. The brush is 52 mm wide and the rows are 40 mm apart, so each row overlaps the last by 12 mm and no stripe is missed. 305 mm ÷ 40 mm is about 8 rows.

The spill race: 5 grams of cereal in a taped square, Spot Clean against random bounce for the same time, then weigh what each caught.

start1 ft square, 8 rows
Algorithm: A step-by-step plan for solving a problem.
Overlap: The part covered twice, so nothing gets missed.
Try it
Draw a square on paper and cover it with a pencil in rows. Then cover another one by scribbling in random directions. Which looks cleaner?
Did you know?
An expensive robot vacuum from 2002 mapped the room with sound, like a bat, and cost about seven times more than the Roomba.
13

Running a fair test

Change one thing, measure what happens, and keep everything else the same.

In the speed test, the thing you change is motor speed. The things you measure are stopping distance in millimeters and falls out of 20. Everything else stays the same: the table, the charged power bank, the 3 mm sensor height, and the running start.

To find an average, add up the runs and divide by how many there are. Then make a chart with speed along the bottom and stopping distance up the side.

Saying "Dusty cleans pretty well" is an opinion. Saying "Dusty picked up 3.8 grams out of 5, which is 76 percent" is a measurement. Science runs on measurements.

Example: grams picked up out of 5, three tries
3.6
4.0
3.8
3.6 + 4.0 + 3.8 = 11.4, and 11.4 ÷ 3 = 3.8 g
3.8 ÷ 5 = 0.76, so Dusty caught 76%
Variable you change: What you change on purpose (motor speed, or the search pattern).
Variable you measure: What you count (millimeters to stop, falls, grams picked up).
Controlled variables: Everything you keep the same (table, power bank, sensor height, light).
Try it
Write your prediction before any runs: "I think doubling the speed will make the stopping distance (more than / less than / exactly) double because..."
Did you know?
Every run counts, even the bad ones. Only redo a run if something broke, and write down what happened.
14

How engineers invent

Ask, imagine, plan, create, test, improve. Then do it again.

Dusty has used every step: asking how to keep crumbs off the table, imagining a list of cleaning robots, planning the design, and now building it.

Once a design is locked, changes go through a change order. It says what changes, why, what else it touches, and who said yes. Dusty has had two so far: the USB-C power bank (MOC-001) and Spot Clean on button B (MOC-002).

Testing always finds problems. That is good. Keep notes and photos of what went wrong and how it got fixed. Judges love that.

Prototype: The first one you build to find out what is wrong with the idea.
Requirement: Something the invention must do, with a number and a reason.
Change order: A written record of a change to a locked design, and why.
Try it
Write down why you picked the table robot over the other cleaning robot ideas. That goes in the packet and on the board.
Did you know?
The first design is almost never the final one. Dusty started as foam board and became a 3D printed robot.

All the words

Use these in the packet, on the board, and when the judges ask questions.

AlgorithmA step-by-step plan for solving a problem.
AnalogA measurement with a whole range of answers, not just yes or no.
AutonomousIt decides for itself. No remote control, no driver.
CalibrationMeasuring the surface at startup so the threshold fits that table.
CasterA ball or wheel that rolls in any direction to hold up one end.
Change orderA written record of a change to a locked design, and why.
CircuitA complete loop that electricity flows around.
Controlled variablesEverything you keep the same (table, power bank, sensor height, light).
Differential driveSteering by running two wheels at different speeds.
Fit checkTesting the part everything else depends on before making the rest.
Gear ratioHow many turns in for one turn out. The brush gears are 5.4 to 1.
Gearing downUsing gears to trade speed for strength.
H-bridgeFour switches that let a motor spin either direction.
If / thenA decision: if this is true, then do that.
InfraredLight just past red that eyes cannot see. TV remotes use it.
InventionA new thing, or a new way of doing something, that solves a problem.
LayerOne thin slice of a 3D print, 0.2 mm on Dusty.
LoopSteps that repeat.
MicrocontrollerA small computer that runs one program forever.
Milliamp hourHow much charge a battery holds.
OverlapThe part covered twice, so nothing gets missed.
Pilot holeA hole a bit smaller than the screw, so the screw cuts its own thread.
PLAA plastic made from plants. The printer melts it and builds parts in layers.
PredictionYour best guess before you test, and why. Also called a hypothesis.
PrototypeThe first one you build to find out what is wrong with the idea.
PWMPulse width modulation. Flicking power on and off very fast to run a motor slower.
RedundancyTwo systems that fail for different reasons, so one catches what the other misses.
Reflectance sensorAn emitter and a detector together. It shines light and measures the bounce.
RequirementSomething the invention must do, with a number and a reason.
Stopping distanceHow far something travels after it starts to stop.
SwitchA part that opens or closes a circuit.
ThresholdThe cutoff number. Above it means cliff, below it means table.
TorqueTurning strength.
VariableA named box that holds a number.
Variable you changeWhat you change on purpose (motor speed, or the search pattern).
Variable you measureWhat you count (millimeters to stop, falls, grams picked up).
VoltA unit for how hard electricity is pushed.