๐ฑ ๐ค โโโโโฑ โ
๐ What you need
- the shared phone with a free browser robot simulator or block-and-Python robot environment
- your control loop diagram from module 1
- paper for logging results
โ Do this
- Set up a line-following task. Before writing anything, name your sensor, your decision and your action out loud.
- Write the crudest possible controller: if the sensor sees dark, turn one way; otherwise turn the other. Run it.
- Watch it wobble violently down the line. That wobble is the signature of on-off control โ point at it, it is important.
- Log the time to complete the course. Then double the turn amount and log again. Then halve it. Three numbers, one table.
- Add a straight-ahead zone: only turn if the sensor is strongly one way. The wobble should shrink. Log the time again.
- Now break it on purpose: add a sharp corner it cannot handle, and write down exactly why it fails.
๐ก Why it works
On-off control, also called bang-bang control, is the simplest thing that works and it is genuinely used where the wobble does not matter โ a fridge thermostat, for instance. But on a moving robot it wastes energy and overshoots constantly. Feeling that limitation yourself is what makes the next module land.
๐ฅ Challenge
Beat your best lap time by changing only ONE number per run, logging every attempt. Bring your table to module 6 โ you will need it.
๐ New words
bang-bang controla controller with only full-on and full-off outputs
overshootgoing past the target before correcting back
simulationa model of the real system you can test against safely
๐น๏ธ
Sim Runner
Tap when you have finished this module.