🔍🔩 Parts bench
19 lessons

Sense, Think, Act: What Makes a Robot

A drill is a machine; a thermostat is almost a robot. The difference is a loop that reads the world before pushing on it — and how often that loop runs decides everything.

lesson 1 of 2 in this unit

One loop, three verbs

Strip any robot to its skeleton — a vacuum, a rover, a factory arm — and the same three-step loop is running underneath:

  • Sense — read something about the world: a distance, an angle, a brightness.
  • Think — compare the reading to what you want and decide what to do about the difference.
  • Act — push on the world with a motor, then go straight back to step one.

That last clause is the whole trick. A machine acts; a robot acts, checks what happened, and corrects. The loop is called feedback, and Unit 3 is devoted to doing it well — but every lesson between here and there is really about feeding this loop better senses and stronger muscles.

The loop has a heartbeat

How often the loop runs is its loop rate, and it is a spec, not a detail. A thermostat deciding every few seconds is fine — rooms drift slowly. A two-wheeled robot balancing on the spot must sense and correct hundreds of times per second, because it starts falling between the corrections:

react late → correct harder → overshoot → oscillatethe universal failure of a slow loop — you will meet it again, tunable, in Unit 3

This is why robots keep a small, single-minded computer close to the motors. It does nothing clever — it just never, ever misses a beat.

Where the loop lives

In a real robot the loop is split across parts you will meet all course: sensors feed a microcontroller (the metronome that never misses a millisecond), which drives motors through power electronics; bigger thoughts — maps, plans, vision — live upstairs in a larger computer that talks to the metronome. The split matters: thinking may hesitate, but the loop may not.

Is a washing machine a robot?

It senses (water level), decides (program step), acts (spin). Most engineers still say no — its loop never looks at the result of its actions and corrects. It follows a recipe. The line is fuzzy, and the useful question is never “is it a robot?” but “where is its feedback loop, and how fast?”

⚗️ Lab — The Bump Bot

A one-sensor robot in a corridor: it drives until its rangefinder says stop. You set the speed and the stop distance — and how often the loop runs.

  • With a fast loop, it parks neatly at any speed. Now slow the loop down and watch the same settings smack the wall.
  • Find the highest speed each loop rate can survive. That number is why balance robots run at hundreds of hertz.
  • Set the stop distance to zero: sense–think–act becomes think-too-late.
0.8 m/s
10 Hz
60 cm
Stop margin
41 cm
Worst-case overshoot
19 cm
Rule
a slow loop drives blind between samples

Check your understanding

1. What distinguishes a robot's loop from a machine following a recipe?

2. A self-balancing robot needs its loop to run hundreds of times a second because…

3. Why do robots keep a small dedicated microcontroller next to the motors even when they carry a big computer?

4. In the sense–think–act loop, 'think' means…