Exercises: Robots and controller boards
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"?
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.
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.
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.
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, mobile phone vibration motor, and camera. Explain the general difference between the two in one sentence.
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?
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?
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.
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.
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.
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 behaviour 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.
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.
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 centimetres) 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.
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.
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.
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.
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.
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.
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.
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.
-
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?
-
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).
-
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.
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).
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.
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".
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.
-
Calculate the distance the robot travels from the moment the sensor detects an obstacle until the robot comes to a complete stop.
-
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.
-
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.
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.
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.
-
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.
-
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).
-
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.
"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 behaviour, 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 behaviour, 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.
Topic challenge. Design the virtual prototype of a climate control robot to optimize the thermal comfort of your home using a microcontroller board. 1. Real data…
Topic challenge. Design the virtual prototype of a climate control robot to optimize the thermal comfort of your home using a microcontroller board.
-
Real data collection: Check the official AEMET website for the maximum temperatures recorded in your municipality over the last $3$ days and calculate their arithmetic mean (for example, $26,4$ ºC). This value will be the activation threshold.
-
Design and simulation: In the free MakeCode simulator for micro:bit (or Tinkercad), plan the architecture of the robot by identifying its three essential parts: microcontroller board, sensor (internal thermometer), and actuator (servomotor simulating the opening of a vent or a warning on the LED matrix).
-
Programming: Program the control algorithm using blocks. It must continuously read the temperature and, if it exceeds the calculated threshold, activate the actuator; otherwise, it will remain idle.
-
Final report: Prepare a short report (maximum $1$ page in LibreOffice Writer) that includes the AEMET data, the justification of the chosen components, and a screenshot of the code running in the simulator.
Assessment criteria:
-
Rigorous collection of real data from AEMET and correct calculation of the thermal threshold.
-
Accurate and justified identification of the robot's microcontroller board, sensors, and actuators.
-
Functional and error-free algorithm in the simulator according to the given conditions.
-
Technical quality, clarity, and organization in the writing of the final report.