Back to homeTechnology · Secondary Year 2 · Change subject
Start for free
Secondary 2 · Technology
Control and robotics · Robotics

Robots and Controller Boards

A robot vacuum doesn't really know where the living room couch is, but it acts as if it did. Every robot follows the same recipe: sense the world, decide what to do, and act on it. Let's open up that box.

The sense-decide-act chain

Side view of a wheeled robot: a distance sensor at the front detects an obstacle, the controller board inside processes the signal, and the rear wheel motor carries out the action. senses sensors decides controller board acts actuators
Practice★☆☆Not started
Explain in your own words the three things a robot does for it to be considered a robot: perceive its environment, process that information, and act upon the world.…

Explain in your own words the three things a robot does for it to be considered a robot: perceive its environment, process that information, and act upon the world. Apply this to a robot vacuum cleaner: what does it use to "sense" the room, what does it "decide", and what does it "do"?

Solve
Practice★☆☆Not started
The figure shows the operational chain of an obstacle-avoiding mobile robot, but the central link is covered. State which element of the robot is covered in the chain…

The figure shows the operational chain of an obstacle-avoiding mobile robot, but the central link is covered.

distance sensor ? wheel motors senses decides acts the robot

State which element of the robot is covered in the chain (its "brain") and explain the role of each of the three links: what data the sensor collects, what the covered element does with that data, and what command the motors receive when an obstacle is near.

Solve
Practice★☆☆Not started
Decide which of these devices are robots and which are not, justifying your answer using the sense-decide-act chain: (a) a robot vacuum cleaner, (b) a remote-controlled…

Decide which of these devices are robots and which are not, justifying your answer using the sense-decide-act chain: (a) a robot vacuum cleaner, (b) a remote-controlled car, (c) a traffic light that changes based solely on time, and (d) a drone that maintains its altitude autonomously. What is missing from those that are not robots?

Solve

Sensors: the robot's senses

With that number, the program can make decisions. For example: "if the distance is less than 15 cm, stop" or "if the distance is greater than 50 cm, move forward." Each rule compares a reading with a reference value.

Practice★☆☆Not started
Sensors are the "senses" of the robot. Match each sensor with what it perceives: (a) ultrasonic distance sensor, (b) light sensor, (c) touch sensor or push button, and…

Sensors are the "senses" of the robot. Match each sensor with what it perceives: (a) ultrasonic distance sensor, (b) light sensor, (c) touch sensor or push button, and (d) tilt sensor, with these situations: the robot detects that it has fallen on its side, notices that it has hit the wall, measures how far away the obstacle is, and distinguishes day from night.

Solve
Practice★★☆Not started
The ultrasonic sensor measures the distance to the nearest object: it emits a beep and measures how long it takes for the echo to return. Explain what data reaches the…

The ultrasonic sensor measures the distance to the nearest object: it emits a beep and measures how long it takes for the echo to return. Explain what data reaches the program (a number: the distance in centimeters) and write two decision rules using that data: one to stop the robot before colliding and another for it to move forward only if the hallway is clear.

Solve
Practice★★☆Not started
The line-following robot works in the classroom but fails in the hallway: the floor is different and there is more light. Explain why robots need to be tested and…

The line-following robot works in the classroom but fails in the hallway: the floor is different and there is more light. Explain why robots need to be tested and adjusted in the real location where they will work (sensors read different values depending on the surface and light) and what "calibrating" a sensor before testing means.

Solve

Actuators and the controller board

Block diagram showing sensors as input elements that send data to the controller board and actuators as output elements that receive its orders. sensor signal board order motor

micro:bit or Arduino. The micro:bit comes with lights, buttons, and built-in sensors, and is programmed with blocks without extra wires: it is ideal for getting started. Arduino is more open: it lets you build circuits with many components, but you have to connect them yourself. For a first obstacle-avoiding robot, either one works; choose the one you have on hand and justify why.

Practice★☆☆Not started
Actuators are the parts of the robot that act upon the world. Classify these elements as either a sensor or an actuator: motor, speaker, temperature sensor, LED lights,…

Actuators are the parts of the robot that act upon the world. Classify these elements as either a sensor or an actuator: motor, speaker, temperature sensor, LED lights, distance sensor, cell phone vibration motor, and camera. Explain the general difference between the two in one sentence.

Solve
Practice★☆☆Not started
The controller board (such as micro:bit or Arduino) is the brain of the robot. Explain in your own words what a controller board is: what three things we connect to it…

The controller board (such as micro:bit or Arduino) is the brain of the robot. Explain in your own words what a controller board is: what three things we connect to it (sensors, actuators, and the program we write) and why it is said to be programmable: who decides what the robot does, the board or the person who programs it?

Solve
Practice★☆☆Not started
A regular computer also has inputs and outputs (keyboard, screen), but it is not a robot. Explain the key difference: a robot acts physically upon the world (it moves,…

A regular computer also has inputs and outputs (keyboard, screen), but it is not a robot. Explain the key difference: a robot acts physically upon the world (it moves, grabs, triggers mechanisms), whereas a computer primarily works with information. Give two examples illustrating this difference.

Solve
Practice★★☆Not started
micro:bit and Arduino are the two most widely used school boards. Compare what you know or research about them: which one comes with built-in lights, buttons, and…

micro:bit and Arduino are the two most widely used school boards. Compare what you know or research about them: which one comes with built-in lights, buttons, and sensors ready to use without extra wiring, and which one is more open for building circuits with components. Choose one for your first obstacle-avoiding robot and justify your choice.

Solve
Practice★★☆Not started
Classify these robot components as inputs (they carry information to the board) or outputs (they receive commands from the board): start button, line sensor, wheel…

Classify these robot components as inputs (they carry information to the board) or outputs (they receive commands from the board): start button, line sensor, wheel motor, status LED light, buzzer, and collision sensor. Explain how this classification relates to the sense-decide-act chain.

Solve

Programming behavior: sequences, loops, and conditionals

In this course we describe programs with flowcharts or in words, not in code. The diamond is a question; the rectangle is an action.

Flowchart of an obstacle-avoiding robot: forever, ask whether the distance is less than a value; if yes, turn; if no, move forward. forever distance less than 15 cm? yes no turn move forward and ask again
Practice★☆☆Not started
We program the robot using blocks: a sequence is "move forward for 2 seconds, turn 90° right, move forward for 2 seconds". Describe the path the robot will draw on the…

We program the robot using blocks: a sequence is "move forward for 2 seconds, turn 90° right, move forward for 2 seconds". Describe the path the robot will draw on the floor when executing this sequence twice in a row, and explain the difference between a sequence and a loop in a movement program.

Solve
Practice★★☆Not started
The figure shows the flowchart of the program for an obstacle-avoiding robot, but the question inside the decision diamond is covered. Write the question that should go…

The figure shows the flowchart of the program for an obstacle-avoiding robot, but the question inside the decision diamond is covered.

start ? yes turn right no move forward

Write the question that should go inside the decision diamond for the robot to work (what the sensor measures and what value it is compared against) and explain the complete behavior of the robot using this flowchart: what it does when there is nothing ahead and what it does as soon as it detects an obstacle.

Solve
Practice★★☆Not started
The "wall-following" program repeats this logic forever: if the right sensor sees the wall far away, turn right; if it sees it close, turn left; otherwise, go straight…

The "wall-following" program repeats this logic forever: if the right sensor sees the wall far away, turn right; if it sees it close, turn left; otherwise, go straight ahead. Explain the role played by the "forever" loop and the conditionals, and describe the path the robot will follow alongside a wall with a bend.

Solve
Practice★★☆Not started
You want the robot to draw a square on the floor with a felt-tip pen. Write the program using a "repeat 4 times" loop: which two commands go inside the loop (move…

You want the robot to draw a square on the floor with a felt-tip pen. Write the program using a "repeat 4 times" loop: which two commands go inside the loop (move forward and turn) and by what angle it must turn each time. Explain what would change in the program to draw an equilateral triangle instead of a square.

Solve

Designing and diagnosing real robots

Priorities. When there are two sensors, the program must decide which one takes precedence if both warn at the same time. The safest goes first: if there is an edge (a cliff) and an obstacle at the same time, the edge is checked first, because falling damages the robot more than a bump. If you change the order of the questions, the robot may deal with the obstacle and move toward the edge.

Thresholds. A fan that turns on and off at the same value (for example 28 °C) would switch on and off many times in a row when the temperature fluctuates around that value. With two thresholds (turn on above 28 °C, turn off below 25 °C) it works steadily.

Practice★★☆Not started
Describe the complete sense-decide-act cycle of a robot vacuum cleaner during one minute of operation: which sensors it uses (distance, collision, stair drop-off), what…

Describe the complete sense-decide-act cycle of a robot vacuum cleaner during one minute of operation: which sensors it uses (distance, collision, stair drop-off), what decisions it makes based on that data (change direction, return to base if battery is low), and which actuators it operates in each case.

Solve
Practice★★★Not started
The figure shows, seen from above, a line-following robot with two independent driving wheels and two infrared sensors (a and b) that distinguish the dark line from the…

The figure shows, seen from above, a line-following robot with two independent driving wheels and two infrared sensors (a and b) that distinguish the dark line from the light floor.

the line a b moves like this

A class group has programmed the robot with this rule: "If sensor a (left) detects black, turn on the left motor at full power to correct the heading; if sensor b (right) detects black, turn on the right motor at full power". When testing it, the robot runs off the track to the right on the first left turn.

  1. Justify why the group's reasoning is flawed: which way does a differential-drive robot actually turn when you accelerate only the left wheel, and what should each motor do to turn left?

  2. Design the complete control table for the two motors (left motor and right motor: forward, stop, or reverse) for the 4 possible states of sensors a and b (white/white, black/white, white/black, black/black).

  3. Someone claims: "It is impossible for a robot to follow a line with only a single sensor". Prove that this statement is false by explaining what movement strategy a robot with a single infrared sensor would need to follow to stay on track.

Solve
Practice★★★Not started
Design the program for an automatic fan using a micro:bit: it must turn on the fan when the temperature exceeds $28\ \text{°C}$ and turn it off when it drops below…

Design the program for an automatic fan using a micro:bit: it must turn on the fan when the temperature exceeds $28\ \text{°C}$ and turn it off when it drops below $25\ \text{°C}$. Write the logic using loops and conditionals (in words, not code) and explain why two different thresholds are used instead of just one (what would happen if it turned on and off at the exact same value).

Solve
Practice★★★Not started
The obstacle-avoiding robot always crashes on its right side. Carry out a diagnosis like an engineer: list three possible causes ordered from most to least likely (a…

The obstacle-avoiding robot always crashes on its right side. Carry out a diagnosis like an engineer: list three possible causes ordered from most to least likely (a slower motor, a misaligned sensor, an error in the turning program) and describe the specific test you would perform to rule out each one without dismantling the robot.

Solve
Practice★★★Not started
A delivery company tests two quadcopters during a day with gusty winds of $35\ \text{km/h}$: Drone A (radio-controlled): an operator on the ground observes the flight…

A delivery company tests two quadcopters during a day with gusty winds of $35\ \text{km/h}$:

  • Drone A (radio-controlled): an operator on the ground observes the flight through binoculars and moves the transmitter sticks to compensate for deviations.

  • Drone B (autonomous): it has no remote control; its microcontroller reads an accelerometer, a gyroscope, a barometer, and a GPS receiver 100 times per second to control the four motors independently and hold a fixed position.

  • Predict what will happen to each drone when a sudden gust of wind pushes both $2\ \text{m}$ to the side: compare the reaction speed and precision of both systems, explaining the cause of the difference.

  • Identify the complete control chain in Drone B: which physical variables its sensors measure, what calculation or command the processor generates, and what the actuators do to correct the tilt.

  • Based on the concept of automatic closed-loop control versus a loop closed by a human operator (teleoperation), justify why Drone B is strictly a robot according to the technological definition and why it is a marketing error to call Drone A a "robot".

Solve
Practice★★★Not started
A mobile robot equipped with an ultrasonic sensor moves in a straight line toward a wall at a fixed speed of $40\ \text{cm/s}$. The sensor takes $0.05\ \text{s}$ to…

A mobile robot equipped with an ultrasonic sensor moves in a straight line toward a wall at a fixed speed of $40\ \text{cm/s}$. The sensor takes $0.05\ \text{s}$ to perform and process each measurement, and the motors need an additional $0.30\ \text{s}$ to brake and change the direction of rotation once the board issues the command.

  1. Calculate the distance the robot travels from the moment the sensor detects an obstacle until the robot comes to a complete stop.

  2. In the robot's program, the instruction has been set to: "if distance < $12\ \text{cm}$, then brake and turn". Predict using numerical data whether the robot will crash into the wall or manage to avoid it in time, and calculate the minimum safe distance threshold that should be configured.

  3. If the robot has two speed modes ($15\ \text{cm/s}$ and $60\ \text{cm/s}$), explain why a fixed distance threshold is inadequate and design a formula or logical rule so that the board automatically adjusts the braking distance based on the speed at which it travels.

Solve
Practice★★★Not started
A robot has two sensors at the same time: an obstacle sensor and a black line sensor on the floor (marking a toy drop-off). Design the program priorities: what command…

A robot has two sensors at the same time: an obstacle sensor and a black line sensor on the floor (marking a toy drop-off). Design the program priorities: what command it should issue if it detects both an obstacle and an edge at the same time, in what order the conditions are evaluated, and what happens if the order of questions is reversed. Justify your hierarchy with the safety of the robot in mind.

Solve
Practice★★★Not started
A design team creates a myoelectric robotic prosthesis for a person's hand. The prosthesis features a muscle impulse sensor on the forearm, a microcontroller,…

A design team creates a myoelectric robotic prosthesis for a person's hand. The prosthesis features a muscle impulse sensor on the forearm, a microcontroller, servomotors that move the fingers, and a pressure sensor on the tip of the index finger.

  1. Describe the complete functional chain of the system when the user tries to grasp an egg: indicate what signal the muscle sensor captures, what the board calculates, what the servomotors do, and what crucial information the pressure sensor returns to the board.

  2. Predict what would happen if the prosthesis operated in "open loop" (that is, without a pressure sensor on the fingers, relying solely on the force exerted by the user's forearm muscle).

  3. Imagine that the pressure sensor breaks due to an impact and becomes stuck, always sending a reading of "$0\ \text{N}$" (zero pressure). Analyze the risk this poses to both the object and the motors of the prosthesis, and design a safety measure (via software or with a complementary sensor) to prevent damage when this failure occurs.

Solve
Practice★★★Not started
"The robot decided to run over the plant pot": analyse this phrase commonly said at home and argue why it is misleading: who actually decided its behavior, where the…

"The robot decided to run over the plant pot": analyse this phrase commonly said at home and argue why it is misleading: who actually decided its behavior, where the limits of its sensors and program lay, and what responsibility we have when programming machines that act in the world. End with two rules that every home robot should follow.

Solve

Back to the beginning: the robot vacuum doesn't need a mental map or to "know" where the couch is: its sensors detect that a piece of furniture is nearby, the board processes the reading, and it orders the motors to change direction.

Summary

See all the exercises in this section