A little robot that sweeps crumbs off the table and stops itself right at the edge instead of driving off. This guide takes you from a pile of parts to a working robot, one step at a time.
Before you start
None of these are special. Everything here is probably already in the house.
Know your gear
Open the boxes and lay everything out before you build anything. Find each item below so you know what you are holding.
A tiny computer the size of a credit card cut in half. The 25 red squares are little lights called LEDs. The gold stripes at the bottom are how it plugs into other boards.
Its job: it is Dusty's brain. It reads the sensors, decides what to do, and tells the motors to go.
MICRO-USB TO PROGRAM · BUTTONS A AND B
A board with a slot the micro:bit slides into, a round hole for the battery plug, and two sockets for motors.
Its job: the middleman. The micro:bit is far too weak to run motors directly, so it whispers instructions to this board, and this board does the heavy lifting.
3 TO 11 VOLTS · DRIVES 2 MOTORS
A small silver can with a gold gearbox on the front and a flat metal shaft poking out. Two wires, one red and one black.
Its job: one drives the left wheel, one drives the right. Run them opposite directions and Dusty spins on the spot.
6 VOLTS · 3 MM D-SHAPED SHAFT
Black plastic wheels with a soft rubber tire. The hole in the middle is a circle with one flat side, shaped to match the motor shaft.
Its job: the wheel size decides how fast Dusty drives, and speed is the thing this whole experiment measures. Do not swap for bigger ones.
PRESS-FIT · NO GLUE NEEDED
A little plastic cage holding a metal ball, plus a bag of thin plastic washers called spacers.
Its job: the third foot at the back. Two wheels plus one ball is steady and turns cleanly. Four wheels would fight every turn.
USE EVERY SPACER IN THE BAG
Two tiny bumps on a small board. One shines invisible infrared light down, the other watches for it to bounce back.
Its job: the whole point of the robot. Light comes back means table. Nothing comes back means the table ended, stop now.
MOUNT EXACTLY 3 MM ABOVE THE TABLE
A small black block with a springy metal arm and a little wheel on the end. Push the arm and it clicks.
Its job: the backup. A stiff wire drags on the table holding the arm down. Table ends, the wire drops, the switch clicks, motors stop.
3 LEGS · USE C AND NO
A plain silver motor with two metal tabs. You attach your own brush to the shaft: cut-down paintbrush, toothbrush heads, or pipe cleaners.
Its job: flicks crumbs up and backward over a little lip into the tray, exactly the way a dustpan works.
ONE SPEED · ONE DIRECTION · OWN SWITCH
A black box that holds four AA batteries, with a little switch on the side and a wire ending in a plug.
Its job: powers everything. It is also the heaviest thing on Dusty, and that weight sits over the wheels where it helps them grip.
SWITCH OFF WHILE YOU BUILD
A laptop is a computer that can do millions of different things. A microcontroller is a computer that does one job forever, very reliably, using almost no electricity. There is one in your microwave, one in the car's key fob, and a few dozen in the car itself.
The micro:bit is a microcontroller you can reprogram. When you load code onto it, that code stays there. Unplug it, put in batteries a week later, and it starts running your program again immediately. It has no operating system to boot, so it is ready the instant power arrives.
Think of the micro:bit's pins as a person who can point but cannot lift. A pin can supply enough electricity to light a small LED, roughly 1/100th of what a motor wants. Wire a motor straight to it and you do not get a slow robot, you get a dead micro:bit.
The driver board contains a circuit called an H-bridge. It is four electronic switches arranged in a shape like the letter H, with the motor in the middle. Close two switches and electricity flows left to right and the motor spins forward. Close the other two and it flows right to left and the motor spins backward. The micro:bit just says which pair to close.
Weekend 1 · about 30 minutes
Everything bolts to this one piece of foam board. Cut it square and accurately now, or every single thing after this sits crooked.
TOP VIEW. THE FRONT EDGE IS WHERE THE SENSORS WILL GO.
You have a square of foam board with a centerline, two motor marks, one caster mark, and the word FRONT written on it.
Weekend 1 · about 45 minutes
Both motors have to point in exactly the same direction. If one is even slightly twisted, Dusty will curve instead of driving straight, and you will spend an hour blaming the code.
FRONT VIEW. IF ONE AXLE SITS HIGHER THAN THE OTHER, DUSTY LEANS AND STEERS ITSELF.
Inside the gold box on the motor is a stack of gears. The motor itself spins insanely fast, around 30,000 times a minute, with almost no strength. Useless for pushing a robot.
The gears trade that speed for strength. A 1:298 gear ratio means the motor spins 298 times for every 1 turn of the wheel. You lose 298 times the speed and gain roughly 298 times the pushing force. That trade is why a robot this small can shove a pile of cereal around.
Set it on the table and push gently. It rolls in a straight line, not a curve, and does not rock side to side.
Weekend 1 · about 20 minutes
This is where almost everyone gets it wrong, because the caster is shorter than the wheels unless you stack up the spacers it came with.
NOSE-DOWN BY A MILLIMETER IS GOOD. IT AIMS THE SENSORS AT THE TABLE.
Dusty sits on three points without rocking, and a gentle push sends it rolling straight and smooth.
Weekend 1 · about 30 minutes
Now the electronics go on. Keep the battery switch OFF for this entire step.
TOP VIEW. HEAVY THINGS GO OVER THE WHEELS, NOT OUT AT THE ENDS.
Flipping the switch lights up the micro:bit, and the robot still sits level with all the weight on board.
Weekend 1 · about 1 hour
First code of the project. The goal is small on purpose: forward, backward, and spin. No sensors yet.
LEFT MOTOR TO A, RIGHT MOTOR TO B. WRITE IT DOWN SOMEWHERE.
You cannot give a motor "a bit less electricity" easily. What the board does instead is switch the power fully on and fully off, hundreds of times every second. Leave it on 40% of the time and the motor behaves as if it is getting 40% of the power. This trick is called PWM, short for pulse width modulation.
It is exactly how a dimmer switch works, and how a phone screen changes brightness. The flicker is far too fast for eyes to catch.
40% is not random. It gives Dusty about 7 centimeters per second, slow enough to stop safely at an edge. Turning that number up is literally the experiment.
Pressed on the floor, Dusty drives forward in a straight line for two seconds and stops. That is Weekend 1 finished.
Weekend 2 · about 45 minutes
This little stick is the most important part of the whole robot. It carries the sensors out in front of the wheels, and that head start is the only reason Dusty can stop in time.
TWENTY MILLIMETERS AHEAD, THREE MILLIMETERS UP. MEASURE BOTH.
Light comes in lots of colors, and your eyes only pick up some of them. Just past red, there is more light your eyes simply cannot see. That is infrared.
TV remotes use it. So does the sensor that stops an automatic door closing on you. Dusty's sensor shines infrared straight down and measures how much bounces back, so it works in a dark room just as well as a bright one.
Here is the catch worth remembering: dark surfaces swallow infrared. A black placemat bounces almost nothing back, so Dusty thinks the table ended. That is not a bug in your robot, it is how light works, and Step 7 is where you deal with it.
Both sensors sit 3 mm above the table, 20 mm ahead of the wheels, and the boom does not wobble when you nudge it.
Weekend 2 · about 1.5 hours
The big one. By the end of this step Dusty stops itself at the edge of a real table, and you have the numbers written down to prove it.
Some questions have two answers: is the button pressed, yes or no. That is digital, and computers love it.
Other questions have a whole range of answers: how much light came back? That is analog. The micro:bit turns it into a number from 0 to 1023, where 0 is none at all and 1023 is loads.
Analog is better here than a simple yes/no, because you get to pick where the line falls. And picking that line on the actual table you are using, instead of guessing once and hoping, is what calibration means.
A white paper tablecloth might read 200. Dark wood might read 650. If you hard-coded "over 500 means cliff" then Dusty would refuse to move on the dark table, convinced it was already falling.
So instead, Dusty looks at whatever surface it is sitting on, right now, and decides for itself what "normal" looks like. Everything much brighter than normal is a cliff. Same code, any table. That one idea is worth explaining to a judge.
Twenty approaches out of twenty end with Dusty stopping and turning away, written down in the notebook. That is Weekend 2 finished.
Weekend 2 · about 30 minutes
A second way of noticing the edge that works on a completely different principle, so the two cannot fail for the same reason.
IT IS NOT LOOKING AT ANYTHING. IT IS TOUCHING. COLOR CANNOT FOOL IT.
The infrared sensor can be fooled by a black placemat. The whisker cannot, because it touches instead of looking. The whisker could be fooled by a placemat edge it slides over. The infrared would catch that instantly.
Engineers call this redundancy: two systems that fail for different reasons, so a problem that defeats one gets caught by the other. Planes have several of everything important for exactly this reason.
When a judge asks "what if the sensor is wrong?", this is the answer, and it is a really good one.
With the infrared sensors taped over, Dusty still stops at the edge using nothing but the whisker.
Weekend 3 · about 2 hours
Up to now you have built a robot that avoids falling. Now it earns its name.
THE BRUSH SPINS BACKWARD, NOT FORWARD. FORWARD THROWS CRUMBS OFF THE TABLE.
You can say a real number out loud: "Dusty picked up 3.8 grams out of 5." That is Weekend 3 finished.
Weekend 4 · the whole day
The robot is finished. This weekend turns it into a science project, and this is the part the display board is actually about.
SAME ROBOT, TWO DIFFERENT IDEAS. RACE THEM AND SEE WHICH WINS.
Your prediction was that somewhere past half speed, Dusty needs more room to stop than the 20 mm head start it has, and goes over the edge.
If that happens, you did not fail. You predicted a thing using arithmetic, then tested it, and the world agreed with you. That is the entire job of science, and it is much more interesting than a robot that just works.
The one number a judge will remember is the crossing point: the fastest speed where Dusty still stopped every single time. Put that number in big type on the board.
You have a filled-in data table and two charts drawn from your own numbers. That is Weekend 4, and the project is basically won.
When it misbehaves
Everything here has happened to somebody. Find the symptom, try the fix.
| What you see | Most likely cause | What to do |
|---|---|---|
| Nothing happens at all | Power | Switch on? Batteries the right way round? Plug pushed fully in? Try fresh batteries. |
| Drives in a curve | Motors not parallel | Sight down the front. If they look fine, one motor may be slower; trim its speed by a few percent in code. |
| One wheel goes backward | Wires swapped | Do not rewire. Make that motor's speed negative in the code. |
| Refuses to move at all, sensors lit | Dark surface | It thinks it is already at a cliff. Recalibrate on that table with button A. |
| Falls off despite the sensors | Too fast, or boom moved | Lower the speed. Re-measure the 3 mm gap and the 20 mm overhang. |
| Stops randomly in the middle | Loose wire or a crumb | Wiggle each wire with the power off. Wipe the sensor faces. |
| Brush spins, catches nothing | Height or direction | Bristles should just kiss the table. Check it flicks backward, not forward. |
| Gets slower as you test | Batteries draining | Normal. Use fresh batteries for every measured run so the experiment is fair. |
| micro:bit will not take the code | Cable | Many micro-USB cables are charge-only. Borrow one you know moves data. |
Words to know
Judges ask what words mean. Here they are in one place.