All paths

Build a robot vacuum

Bumpers and cliff sensors, wheel encoders and a map, random bounce against spiral against rows, a five-layer behavior ladder, and a battery that sends it home to its dock.

Arduino Uno R3Free7 lessons6 h4 chapters2,173 XPRobotics · Advanced+250 XP

0 of 7 done

What you will build

3 projects, built step by step

7 lessons in 4 chapters, about 6 hours on a simulated Arduino Uno R3. Free, in your browser, every step checked by the simulator.

Chapter 1 project

Cliff sensors

A TCRT5000 looking at the floor: infrared light that comes back means floor, none means a stair. Find the edge, see the cliff beat a bump, and meet the black rug every robot vacuum fears.

Open it in the simulator
Chapter 2 project

Coverage patterns

Three ways to clean the same room and a map that scores them: random bounce, a widening spiral, and rows back and forth (boustrophedon). Measure how much each covers, and tighten the rows.

Open it in the simulator
Chapter 3 project

Battery and docking

Read the pack through a voltage divider, decide when to head home, and drive back to the dock by dead reckoning. Then raise the threshold and see why real docks use an infrared beacon for the last bit.

Open it in the simulator
The map

Chapter by chapter

Each lesson opens when the one before it is done, and each chapter ends in a project.

Chapter 1

Sensing the world

Two bumpers and a cliff sensor, and the layers that decide which one wins.

  1. Open250 XP

    Bump sensors

    The gallery’s robot vacuum: two lever microswitches on the front corners. Hit a wall on each side, watch it back up and turn away from the hit, and see why the turn is random.

    0 of 5 steps

  2. ProjectLocked424 XP

    Cliff sensors

    A TCRT5000 looking at the floor: infrared light that comes back means floor, none means a stair. Find the edge, see the cliff beat a bump, and meet the black rug every robot vacuum fears.

    0 of 4 steps

4 questions, graded as you go.
Chapter 2

Covering a room

Encoders and dead reckoning, then three coverage patterns scored on a map.

  1. Locked250 XP

    Where am I? Encoders

    The vacuum grown up: wheel encoders, dead reckoning and a map of a room in 10 cm squares. Drive a meter, count the edges, turn on the spot, and calibrate the wheel size.

    0 of 5 steps

  2. ProjectLocked424 XP

    Coverage patterns

    Three ways to clean the same room and a map that scores them: random bounce, a widening spiral, and rows back and forth (boustrophedon). Measure how much each covers, and tighten the rows.

    0 of 4 steps

5 questions, graded as you go.
Chapter 3

Behaviors and power

A five-layer behavior ladder, a battery read through a divider, and the trip home to the dock.

  1. Locked212 XP

    The behavior ladder

    Five layers, the higher always winning: cliff, bumper, obstacle, battery, clean. Trigger each one while it cleans, and prove a cliff beats a bump.

    0 of 4 steps

  2. ProjectLocked424 XP

    Battery and docking

    Read the pack through a voltage divider, decide when to head home, and drive back to the dock by dead reckoning. Then raise the threshold and see why real docks use an infrared beacon for the last bit.

    0 of 4 steps

4 questions, graded as you go.
Chapter 4

Project

Clean a whole room, survive the furniture and dock.

  1. Locked189 XP

    Project: clean a room

    Put it all together: clean the whole room in rows, with the ladder watching, deal with a chair leg and a stair on the way, then drive home and dock.

    0 of 4 steps

3 questions, graded as you go.
Syllabus

Every lesson in the course

All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.

Chapter 1

Sensing the world

  1. Bump sensorsThe gallery’s robot vacuum: two lever microswitches on the front corners. Hit a wall on each side, watch it back up and turn away from the hit, and see why the turn is random.
  2. Cliff sensorsA TCRT5000 looking at the floor: infrared light that comes back means floor, none means a stair. Find the edge, see the cliff beat a bump, and meet the black rug every robot vacuum fears.
Chapter 2

Covering a room

  1. Where am I? EncodersThe vacuum grown up: wheel encoders, dead reckoning and a map of a room in 10 cm squares. Drive a meter, count the edges, turn on the spot, and calibrate the wheel size.
  2. Coverage patternsThree ways to clean the same room and a map that scores them: random bounce, a widening spiral, and rows back and forth (boustrophedon). Measure how much each covers, and tighten the rows.
Chapter 3

Behaviors and power

  1. The behavior ladderFive layers, the higher always winning: cliff, bumper, obstacle, battery, clean. Trigger each one while it cleans, and prove a cliff beats a bump.
  2. Battery and dockingRead the pack through a voltage divider, decide when to head home, and drive back to the dock by dead reckoning. Then raise the threshold and see why real docks use an infrared beacon for the last bit.
Chapter 4

Project

  1. Project: clean a roomPut it all together: clean the whole room in rows, with the ladder watching, deal with a chair leg and a stair on the way, then drive home and dock.
Keep going

The next course on your track

Build a robot vacuum is part of the maker track, a ladder of courses from zero to expert.

Next course

Build a smartwatch

Build a watch you could wear: a round display, an analog face in fixed-point trig, real time, steps, days of battery and a menu.

Open the next course
Track

Maker track

Follow the starter kit you already own, then build a claw machine, a balance bot, a handheld console or an LED cube, each a short course checked by the simulator.

See every course on the track
Kits

Build it on your bench too

Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.

Have a kit already?

Find your kit

Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.

See every kit
Questions

About Build a robot vacuum

Is Build a robot vacuum free?

Yes. All 7 lessons of Build a robot vacuum are free and run in your browser, with nothing to install and no parts to buy before you start.

Do I need a real Arduino Uno R3?

No. Every lesson runs on a simulated Arduino Uno R3 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.

How long does Build a robot vacuum take?

About 6 hours: 7 lessons in 4 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.

What will I build?

Each chapter ends in a project that puts it together: Cliff sensors, Coverage patterns and Battery and docking.

Where do I start?

With "Bump sensors", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.