Robot vacuums are among the few robots many pupils have seen at work, which makes them a perfect case study. The interesting part is not the suction but the design problem: how does a machine clean a room it cannot properly see, without missing patches or falling down the stairs? For the technical background, our explainer on how robot vacuums find their way around compares the navigation methods in detail. Here we focus on what pupils can do with it.
Age range: KS3 (ages 11 to 14). The paper robot activity also works with upper KS2. Time: two lessons, or one long session.
Curriculum links (National Curriculum in England):
- KS3 Computing:
understand several key algorithms that reflect computational thinking [for example, ones for sorting and searching]; use logical reasoning to compare the utility of alternative algorithms for the same problem
- KS3 Design and technology:
identify and solve their own design problems and understand how to reformulate problems given to them
- KS3 Design and technology:
develop specifications to inform the design of innovative, functional, appealing products that respond to needs in a variety of situations
- KS3 Design and technology:
test, evaluate and refine their ideas and products against a specification, taking into account the views of intended users and other interested groups
Suggested route: case study (15 minutes), paper robot activity (20 minutes), design brief (one lesson), discussion questions as a plenary.
Quoted from the current programmes of study for computing and design and technology (2013). A revised curriculum is due to be taught from September 2028.
1. The design problem
Ask pupils to design a machine that cleans a floor by itself. They usually start with the vacuum. Push them towards the harder questions:
- How does it know where it has already cleaned?
- How does it avoid falling down the stairs?
- What should it do when it bumps into a chair leg or a cable?
- How does it get back to its charger before the battery runs out?
In D&T these are design requirements; in Computing, each needs an algorithm.
2. Case study: the first Roomba
iRobot launched the first Roomba in the US in September 2002, priced at $199.95. Its approach is simple enough for pupils to act out. According to iRobot's launch announcement, it travelled in a spiral until its bumper touched an object or wall, then followed the wall with a wall-following sensor before starting a new spiral or some straight runs. Cliff avoidance sensors detected stairs and steered it away. It built no map; over time it covered each part of the room two to five times.
Is cleaning the same patch five times a design flaw, or a sensible trade-off for an affordable machine with simple sensors?
Later robots added ways to keep track of where they are. iRobot says its budget Roomba Essentials models use gyroscopes and an optical caster wheel to clean in neat rows, while its LiDAR models use a laser sensor to map the home and, if the battery runs low, recharge and then resume cleaning where they left off. Our navigation explainer covers these methods and SLAM in more depth.
3. Inputs, processing and outputs
Every behaviour breaks down into an input, a decision and an output, linking neatly to sensors and actuators in D&T.
| Input (sensor) | What it tells the robot | Example decision | Output (actuator) |
|---|---|---|---|
| Bump sensor in the bumper | It has touched something | Back off and turn to a new angle | Wheel motors |
| Cliff sensors underneath | The floor has dropped away, for example at the top of the stairs | Stop and turn away | Wheel motors |
| Gyroscope and wheel sensors | Which way it is facing and how far it has travelled | Keep the next row straight | Wheel motors |
| LiDAR or camera | Where walls, furniture and landmarks are | Choose the next area to clean | Wheel motors, brushes and suction |
| Infrared signal from the dock (some models) | Which direction the charger is in | Head home to recharge | Wheel motors |
4. Activity: the paper robot (unplugged, 20 minutes)
Pupils compare two algorithms for the same problem, as the KS3 Computing programme of study describes.
- In pairs, draw a 6 by 6 grid: the room. Shade two or three squares as furniture and put a counter, the robot, in one corner.
- Algorithm A, random bounce: move forward one square at a time. When blocked, roll a dice (1–2 turn left, 3–4 turn right, 5–6 turn around). Dot every square visited.
- After 40 moves, count squares never cleaned and squares cleaned more than once.
- Algorithm B, rows: start again and work up and down in rows, like mowing a lawn, going around the furniture. Count the moves until every square is clean.
- Compare: which used fewer moves? Which needed more information about the room? Which copes better if someone moves a chair?
Teacher tip: rows only work if the robot knows where it is, which is why systematic cleaning needed gyroscopes, cameras or LiDAR. Stronger groups can write either algorithm as a flowchart or pseudocode using selection and repetition, or program it on a classroom robot from our coding robots guide.
5. Design brief
Design a floor-cleaning robot for a primary school classroom. It must clean under the tables after the children have gone home, avoid the step down into the corridor and return to its charger by itself.
Pupils write a specification before sketching, under headings such as:
- Users: cleaners, teachers, pupils and the site manager.
- Sensors: which inputs does it need, and why?
- Safety: what happens if a child picks it up, or it reaches the step?
- Privacy: does it need a camera at all in a room used by children?
Then they produce annotated sketches and a flowchart for one behaviour, such as finding the charger, and test the design against the specification by asking a teacher or cleaner what they would change.
6. Discussion questions
- The 2002 Roomba covered parts of a room two to five times. When is a "good enough" solution better than a perfect one?
- A camera helps a robot spot socks and cables, but it also takes pictures inside people's homes. How should designers balance usefulness and privacy?
- If a robot vacuum falls down the stairs, whose fault is it: the designer's, the owner's or nobody's?
- How could a robot vacuum help an older or disabled person live more independently?
Key words
- Algorithm: a step-by-step set of rules for solving a problem.
- Specification: a list of what a product must do.
- Gyroscope: a sensor that measures turning, so the robot knows which way it is facing.
- LiDAR: short for light detection and ranging; a laser sensor that measures distances to build a map.
- SLAM: simultaneous localisation and mapping, where a robot builds a map and works out its position on it at the same time.
- Trade-off: giving up some of one thing to gain another.
