O LEVEL PHYSICS
CHAPTER 6: ROBOTICS
Comprehensive Notes
Covering all syllabus objectives for Section 6.0
Syllabus Coverage
6.1 Principles of Robotic Systems — Sensors and Actuators
6.2 Robot Design Methodologies
• Identify and apply tools and applications for robot design
• Use CAD tools, simulation software, micro-controllers
• Write structured programs to control robots
How to Use These Notes
Read each section carefully before attempting past paper questions.
Key terms are highlighted — learn their definitions precisely.
Exam tips flag common mistakes and high-frequency exam questions.
All syllabus objectives are addressed in the order they appear.
6.0 ROBOTICS
6.1 Principles of Robotic Systems — Sensors and Actuators
6.1.1 What is a Robot?
A robot is a machine that is capable of carrying out a complex series of actions automatically,
especially one programmable by a computer. Robots are used to perform tasks that may be
dangerous, repetitive, or require great precision.
Robot (definition):
A programmable machine that can sense its environment (using sensors), process information
(using a controller/microprocessor), and respond by performing physical actions (using actuators).
The basic structure of a robotic system can be summarised as:
The Input-Process-Output Model of a Robot
INPUT (Sensors) --> PROCESS (Microcontroller / CPU) --> OUTPUT (Actuators)
Sensors collect data from the environment and convert it into electrical signals.
The microcontroller processes the signals and runs a control program.
Actuators receive output signals and produce physical movement or action.
6.1.2 Sensors
A sensor is a device that detects a physical quantity (such as temperature, light, sound, or distance)
and converts it into an electrical signal that can be read by a microcontroller or computer.
Sensor (definition):
A transducer that converts a physical or environmental signal into an electrical signal for
processing by a control system.
Types of Sensors Used in Robotics
You need to be able to identify sensors and explain their functions. The key sensors are:
Sensor Type What it Detects How it Works / Application in Robots
Temperature Sensor Temperature (heat) Resistance changes with temperature. Used in
(e.g. thermistor, robots that handle hot materials or monitor
thermocouple) environment temperature.
Light Sensor (LDR Light intensity Resistance decreases as light increases. Used for
— Light Dependent line-following robots, object detection, and day/night
Resistor) switching.
Ultrasonic Sensor Distance / proximity Emits ultrasonic pulses and measures time for echo
to return. Used for obstacle avoidance and
navigation.
Pressure Sensor Force / pressure Converts mechanical force into electrical signal.
applied Used in robotic gripper hands to control gripping
force.
Proximity Sensor Presence of an object Detects objects without physical contact using
nearby infrared, magnetic, or capacitive fields. Used in
automated production lines.
Infrared (IR) Sensor Infrared radiation / Detects IR light reflected from surfaces. Used in
heat / distance line-following, TV remotes, burglar alarms.
Sound Sensor Sound waves Converts sound pressure waves into voltage. Used
(Microphone) in voice-controlled robots.
Gyroscope / Orientation / tilt / Measures angular velocity or linear acceleration.
Accelerometer acceleration Used to keep robots balanced (e.g. drones,
humanoid robots).
How Sensors Work — Key Concepts
• Most sensors are transducers: they convert one form of energy into another (usually into
electrical energy).
• The electrical output (voltage or resistance change) is fed into the microcontroller's
analogue-to-digital converter (ADC) which converts it to a digital value the program can use.
• A thermistor is a resistor whose resistance changes significantly with temperature. NTC
(Negative Temperature Coefficient) thermistors decrease in resistance as temperature rises.
• An LDR has high resistance in darkness and low resistance in bright light. It is used in a
potential divider circuit to give a voltage that varies with light level.
Worked Example — Potential Divider with LDR
A robot uses an LDR in a potential divider with a fixed 10 kOhm resistor connected to a 5 V supply.
In bright light: LDR resistance = 500 Ohm
Voltage across LDR = 5 x (500 / (500 + 10000)) = 0.24 V --> robot stops motor
In darkness: LDR resistance = 100 kOhm
Voltage across LDR = 5 x (100000 / (100000 + 10000)) = 4.55 V --> robot activates light
The microcontroller reads this voltage and executes the appropriate action.
■ Exam tip: Examiners frequently ask you to: (1) name a sensor for a given situation, (2) explain
how the sensor works, (3) describe what happens to the output signal as the measured quantity
changes.
6.1.3 Actuators
An actuator is a device that converts an electrical signal from the controller into a physical action or
movement. Actuators are the 'muscles' of a robot — they make things move, turn, push, pull, or grip.
Actuator (definition):
A component of a machine that is responsible for moving or controlling a mechanism or system,
powered by an electrical, hydraulic, or pneumatic source.
Types of Actuators
The three main categories of actuators are electric, hydraulic, and pneumatic:
Actuator Type Power Source / Principle Advantages & Applications
Electric Actuators Electrical energy converted to Precise, easy to control, quiet, clean.
(DC motor, stepper rotational or linear motion via Used in arm joints, wheels, conveyor
motor, servo motor) electromagnetism. systems.
Hydraulic Actuators Pressurised liquid (usually oil) Very high force output. Used in
(hydraulic cylinder, transmits force. Pascal's law — heavy industrial robots, construction
hydraulic motor) pressure applied to a fluid is machinery, car crushers.
transmitted equally in all directions.
Pneumatic Actuators Compressed air pressure drives Fast, lightweight, clean (no oil), safe
(pneumatic cylinder, pistons or vanes. in flammable environments. Used in
air motor) pick-and-place robots, food industry
robots.
Electric Actuators in Detail
Electric actuators are the most common in school-level robotics. You need to know the differences
between types of motors:
Motor Type Description and Use in Robots
DC Motor Rotates continuously when current flows. Speed controlled by varying
voltage. Direction reversed by reversing current polarity. Simple and cheap.
Used for wheels and fans.
Stepper Motor Rotates in precise small steps (e.g. 1.8 degrees per step). Controlled by
digital pulses. Excellent positional accuracy without feedback. Used in 3D
printers, CNC machines, robot arms.
Servo Motor DC motor with built-in feedback system (encoder). Gives precise control of
angle and position. Controlled by PWM (Pulse Width Modulation) signal.
Used in robotic joints and RC vehicles.
Comparing Hydraulic and Pneumatic Actuators
Feature Hydraulic vs Pneumatic
Working fluid Hydraulic: oil / liquid | Pneumatic: compressed air
Force output Hydraulic: very high (lifting cars, presses) | Pneumatic: moderate
Speed Hydraulic: slower | Pneumatic: faster
Cleanliness Hydraulic: oil leaks possible | Pneumatic: clean (air)
Compressibility Hydraulic: incompressible fluid — good precision | Pneumatic: air compresses
— less precise
Typical use Hydraulic: heavy machinery, robot welding arms | Pneumatic: light assembly,
food packaging robots
■ Exam tip: Know the differences between hydraulic and pneumatic actuators. A common exam
question asks: 'Suggest one reason why a pneumatic actuator is preferred over a hydraulic
actuator in a food packaging robot.' Answer: Pneumatic uses air — no risk of oil contaminating
food.
■ Note: Pascal's Law (for hydraulic systems): Pressure = Force / Area. A small force applied to a small
area can produce a large force at a large area, which is why hydraulic systems can lift very heavy loads.
6.1.4 Summary: Sensors vs Actuators
Sensors vs Actuators
Function Sensor: INPUT — detects and measures | Actuator: OUTPUT — moves and acts
Converts Sensor: physical quantity --> electrical signal | Actuator: electrical signal -->
physical action
Examples Sensor: LDR, thermistor, ultrasonic, IR | Actuator: DC motor, servo, hydraulic ram,
pneumatic cylinder
Analogy Sensor = sense organs (eyes, ears, skin) | Actuator = muscles
6.1.5 Feedback and Control Systems
A key concept in robotics is feedback. Most robots use a closed-loop control system where the
output is measured and compared with the desired value, and any error is automatically corrected.
Open-loop vs Closed-loop Control
OPEN-LOOP: No feedback. The controller sends a signal and does not check whether the desired
output was achieved. Simple but inaccurate.
Example: A simple timer-controlled robot that moves forward for 3 seconds regardless of what is in its
path.
CLOSED-LOOP: Uses feedback. Sensors measure the actual output and send data back to the
controller, which adjusts the actuators to correct any error.
Example: A robot arm that uses encoders to check its exact angle and adjusts the motor if it has not
reached the target position.
The Feedback Loop
• The setpoint is the desired value (e.g. target temperature = 25 degrees C).
• The sensor measures the actual value (e.g. current temperature = 22 degrees C).
• The error = setpoint - actual value = 25 - 22 = 3 degrees C.
• The controller responds to the error by increasing heater output until the error = 0.
■ Exam tip: Be able to explain why a closed-loop system is more accurate than an open-loop
system. Use the terms: sensor, feedback, error, controller, actuator.
6.2 Robot Design Methodologies
6.2.1 Overview of Robot Design
Robot design is the process of planning, creating, and testing a robotic system. It involves selecting
the right hardware (sensors, actuators, structure), writing control software, and testing the robot
against the design brief.
The design methodology is the systematic approach used to develop a robot. It typically follows
these stages:
The Robot Design Cycle
1. IDENTIFY THE PROBLEM — Define clearly what the robot must do.
2. RESEARCH — Study existing solutions; identify suitable sensors and actuators.
3. DESIGN — Use CAD tools to plan the physical structure and circuit layout.
4. SIMULATE — Use simulation software to test the design virtually before building.
5. BUILD (PROTOTYPE) — Assemble the robot using selected components and microcontroller.
6. PROGRAM — Write structured code to control the robot's behaviour.
7. TEST AND EVALUATE — Test against the design brief; measure performance.
8. IMPROVE — Modify design based on test results and repeat.
6.2.2 CAD Tools for Robot Design
CAD (Computer-Aided Design) tools are software applications used to create detailed 2D and 3D
models of robot structures, circuits, and components before physically building them.
Why Use CAD in Robot Design?
• Allows designers to visualise the robot in 3D before any parts are made.
• Identifies design faults (e.g. parts that clash or don't fit) early — saving time and money.
• Generates precise dimensions for manufacturing (e.g. cutting, 3D printing).
• Models can be shared digitally with other team members.
• Changes are easy to make without wasting physical materials.
Examples of CAD Tools Used in Robotics
CAD Tool Description and Use
Tinkercad Free, browser-based 3D CAD tool. Good for beginners. Can design robot
chassis and parts for 3D printing. Also includes basic circuit simulation.
Fusion 360 Professional 3D CAD and simulation software. Used for mechanical design of
complex robot structures, stress analysis, and motion simulation.
Fritzing Circuit design tool for prototyping with Arduino and Raspberry Pi. Draw circuits
on a breadboard view, then export PCB layouts.
AutoCAD Industry-standard 2D and 3D design software. Used for precise mechanical
drawings of robot frames and components.
SolidWorks Advanced 3D CAD tool used professionally to design robot arms and
enclosures. Includes simulation and finite element analysis.
■ Exam tip: You may be asked to: 'State one advantage of using CAD software when designing a
robot.' Good answers: can test the design virtually before building / easy to modify / reduces cost
of errors.
6.2.3 Simulation Software
Simulation software allows designers to test how a robot will behave in a virtual environment
without building a physical prototype. The software models the physics of movement, sensor
readings, and actuator responses.
Benefits of Simulation
• Test dangerous scenarios (e.g. robot navigating fire) without risk.
• Identify programming errors before uploading code to the real hardware.
• Faster and cheaper iteration — change and re-test instantly.
• Model different environments (factory floor, outdoors terrain) easily.
Examples of Simulation Software / Environments
Software Purpose
Webots Free open-source robot simulation. Simulates sensors, motors, and
environments. Supports C, Python, Java programming.
V-REP / CoppeliaSim Professional robot simulator. Used to simulate industrial arms, mobile
robots, and drone behaviour.
Gazebo Widely used in research robotics. Integrates with ROS (Robot Operating
System) for complex multi-robot simulations.
Scratch (Simulators) Block-based simulation for beginners. Visual programming with on-screen
robot movement.
Tinkercad Circuits Simulates Arduino circuits and code in the browser. Students can test
code without physical hardware.
6.2.4 Microcontrollers — ESP32, ESP8266, and Arduino
A microcontroller is a small integrated circuit (IC) that contains a processor, memory, and
input/output peripherals on a single chip. It is the 'brain' of a robot — it reads sensor data, runs the
control program, and sends commands to actuators.
Microcontroller (definition):
A compact integrated circuit designed to govern a specific operation in an embedded system. It
includes a processor core, program memory (Flash), data memory (RAM), and programmable I/O
peripherals.
Key Microcontrollers
Microcontroller Key Features and Use in Robotics
Arduino (e.g. Arduino Most popular beginner microcontroller. Uses ATmega328P chip. 14 digital
Uno) I/O pins, 6 analogue inputs, USB programming. Programmed in C/C++ using
the Arduino IDE. Used to control motors, read sensors, drive servos.
ESP8266 Low-cost microcontroller with built-in Wi-Fi. Based on Xtensa LX106 core.
Ideal for IoT (Internet of Things) robots that need wireless connectivity. Can
be programmed with Arduino IDE or MicroPython. Used for Wi-Fi-controlled
robots and smart home devices.
ESP32 More powerful successor to ESP8266. Dual-core processor, built-in Wi-Fi
AND Bluetooth. More I/O pins (38 GPIO), DAC outputs, touch sensors, and
more RAM. Supports Arduino, MicroPython, and ESP-IDF programming.
Used for advanced robots requiring wireless control, audio, or camera
features.
Raspberry Pi (for Single-board computer (not just a microcontroller). Runs a full Linux OS.
reference) Used when more computing power is needed (image processing, AI robots).
Comparing ESP32, ESP8266, and Arduino Uno
Feature Arduino Uno ESP8266 ESP32
Processor ATmega328P (8-bit) Xtensa LX106 (32-bit) Xtensa LX6 dual-core
(32-bit)
Clock speed 16 MHz 80 / 160 MHz 240 MHz
Wi-Fi No Yes (2.4 GHz) Yes (2.4 GHz)
Bluetooth No No Yes (BT + BLE)
RAM 2 KB 80 KB 520 KB
Flash memory 32 KB 4 MB (typical) 4 MB (typical)
Analogue inputs 6 (10-bit ADC) 1 (10-bit ADC) 18 (12-bit ADC)
GPIO pins 14 digital, 6 analog 11 usable GPIO 38 GPIO
Cost ~$4-$10 ~$1-$3 ~$3-$8
Best for Simple robots, IoT, Wi-Fi projects Advanced robots,
beginners wireless control
■ Note: For your exam, know that ESP32 is more powerful than ESP8266 (dual-core, has Bluetooth), and
that Arduino is best for beginners due to its simplicity. All three can be programmed using the Arduino IDE.
How a Microcontroller Controls a Robot
• Sensors connect to the microcontroller's input pins (digital or analogue).
• The microcontroller's program (stored in Flash memory) reads sensor values continuously in a
loop.
• Based on the sensor values, the program decides which actuators to activate and sends signals
through output pins.
• Motor drivers (e.g. L298N H-bridge) are often needed between the microcontroller and motors
because motors require more current than a GPIO pin can provide.
• The microcontroller can communicate with other devices via UART, I2C, SPI, Wi-Fi, or
Bluetooth.
6.2.5 Writing Structured Programs to Control Robots
Robot control programs must be structured, reliable, and efficient. Structured programming uses
clear, logical code with defined functions, loops, and conditionals to control robot behaviour.
Key Programming Concepts
Concept Explanation with Robotic Example
Variables Store sensor readings or motor speeds. E.g. 'int distance = [Link]();'
If / else statements Make decisions based on sensor input. E.g. 'if (distance < 20) { stop(); } else {
(selection) moveForward(); }'
Loops (while / for) Repeat actions. The main robot loop runs continuously: 'while(true){
readSensors(); decideAction(); runActuators(); }'
Functions / Group reusable code. E.g. 'void turnLeft() { leftMotor(0); rightMotor(255);
Procedures delay(500); }'
PWM (Pulse Width Controls motor speed by varying the duty cycle of a digital signal. E.g.
Modulation) analogWrite(motorPin, 128) gives 50% speed.
Serial Sends debug data to a computer screen. Useful for checking sensor readings
Communication during testing.
Example: Arduino Code Structure for a Simple Obstacle-Avoiding Robot
Sample Pseudocode / Arduino Structure
// Setup runs once at the start
void setup() {
pinMode(trigPin, OUTPUT); // ultrasonic trigger
pinMode(echoPin, INPUT); // ultrasonic echo
pinMode(motorLeft, OUTPUT);
pinMode(motorRight, OUTPUT);
}
// Loop runs continuously
void loop() {
int distance = measureDistance(); // read ultrasonic sensor
if (distance < 20) { // if obstacle within 20 cm
stopMotors();
turnRight(); // avoid obstacle
} else {
moveForward(); // no obstacle -- keep going
}
}
Structured Programming Principles
• Sequence: Instructions execute one after another in order.
• Selection: IF/ELSE statements choose different paths based on conditions.
• Iteration: Loops repeat sections of code (FOR, WHILE, DO-WHILE).
• Modularity: Breaking the program into functions makes it easier to test and debug each part
separately.
• Comments: Explaining what each section does makes the code readable and maintainable.
Scratch and Block-Based Programming
For beginners, Scratch (and similar tools like MakeCode for micro:bit) use visual blocks that
represent programming commands. This helps learners understand sequence, selection, and
iteration without needing to type code syntax.
• Scratch blocks connect like puzzle pieces — no syntax errors are possible.
• Can be used to simulate robot behaviour on screen.
• Translates directly to the concepts used in text-based languages like Python and C++.
6.2.6 ICT Tools, Robotic Kits, and Resources
Students learning robotics use a variety of tools and physical kits:
Resource / Tool Description
ICT Tools Used to write, compile, and upload programs to microcontrollers. Also used
(computers, tablets) for CAD design, simulation, and research.
Robotic Kits (e.g. Pre-built mechanical and electronic components that snap together. Allow
LEGO Mindstorms, students to build and program robots quickly without advanced engineering
VEX, Makeblock) skills.
Arduino IDE Free software used to write and upload Arduino programs. Includes a serial
monitor for debugging.
Braille Displays / ICT tools can be adapted for visually impaired learners using Braille output
Accessibility devices and screen readers.
Resource Persons Guest speakers and industry experts who demonstrate real-world robotics
(experts, engineers) applications in the classroom or workshop.
6.2.7 Applications of Robotic Systems
Understanding where robots are used helps contextualise your knowledge of sensors, actuators, and
design. Robots are used across many industries:
Industry Robot Application Sensors / Actuators Used
Manufacturing Welding, painting, assembling cars on Vision cameras, proximity sensors,
production lines servo and hydraulic actuators
Medicine / Da Vinci surgical robot assists surgeons Force sensors, cameras, electric
Surgery with minimally invasive procedures servo actuators
Agriculture Autonomous tractors, fruit-picking GPS, soil moisture sensors, electric
robots and pneumatic actuators
Exploration Mars rovers (Curiosity, Perseverance) Cameras, spectrometers, temperature
exploring planetary surfaces sensors, electric motors
Warehousing Amazon Kiva robots move shelves in QR code scanners, ultrasonic
fulfilment centres sensors, electric DC motors
Bomb Disposal Remote-controlled robots defuse Cameras, manipulator arms, electric
improvised explosive devices and pneumatic actuators
Education LEGO Mindstorms, Arduino robots Light, touch, ultrasonic sensors, DC
teach programming and engineering and servo motors
6.3 Key Terms and Definitions Summary
Key Term Definition
Robot A programmable machine that senses its environment, processes
information, and responds with physical actions.
Sensor A transducer that converts a physical quantity into an electrical signal for a
control system.
Actuator A device that converts an electrical signal into physical movement or action.
Transducer A device that converts one form of energy to another.
Microcontroller A single-chip computer containing processor, memory, and I/O used to
control a robot.
CAD Computer-Aided Design — software used to create 2D and 3D models of
robot structures.
Simulation Using software to model and test a robot's behaviour virtually before physical
construction.
Feedback Information about the robot's actual output that is sent back to the controller
to correct errors.
Closed-loop A control system that uses feedback from sensors to adjust actuator outputs
automatically.
Open-loop A control system with no feedback — output is not monitored or corrected.
PWM Pulse Width Modulation — a method of controlling power to actuators (e.g.
motor speed) by varying the duty cycle of a digital signal.
Hydraulic Powered by pressurised liquid — provides very high force output.
Pneumatic Powered by compressed air — fast, clean, lightweight.
GPIO General Purpose Input/Output — programmable pins on a microcontroller
used to connect sensors and actuators.
ESP32 / ESP8266 Wi-Fi (and Bluetooth for ESP32) enabled microcontrollers used in IoT and
wireless robots.
6.4 Exam-Style Practice Questions
Practice Questions — Try these before looking at the answers
Q1. State the difference between a sensor and an actuator in a robotic system. [2]
Q2. A warehouse robot uses an ultrasonic sensor for navigation. Explain how this sensor works and
what it detects. [3]
Q3. State one advantage of using a pneumatic actuator rather than a hydraulic actuator in a food
packaging robot. [1]
Q4. A robot arm uses a closed-loop control system. Explain, using the terms sensor, feedback, error,
and actuator, how the arm reaches its correct position. [4]
Q5. Compare the ESP32 and Arduino Uno microcontrollers. State two ways in which the ESP32 is
more capable. [2]
Q6. Describe two advantages of using simulation software when designing a robot. [2]
Q7. A line-following robot uses an LDR in a potential divider circuit. Explain how the LDR output
voltage changes when the robot moves from a white surface to a black surface. [3]
Q8. Write pseudocode for a robot that: moves forward until it detects an object within 15 cm, then
stops, turns left, and continues forward. [4]
Suggested Answers
A1. A sensor converts a physical quantity (e.g. light, temperature) into an electrical signal (input to
system). An actuator converts an electrical signal into physical movement or action (output from
system).
A2. The ultrasonic sensor emits a high-frequency sound pulse. The pulse travels outward and reflects
off obstacles. The sensor measures the time taken for the echo to return. Distance = (speed of sound
x time) / 2. It detects distance to objects.
A3. Pneumatic actuators use compressed air, not oil, so there is no risk of oil contaminating food
products.
A4. The sensor continuously measures the actual arm position and sends this feedback to the
controller. The controller compares the actual position to the target (setpoint) and calculates the error.
It then signals the actuator (motor) to adjust until the error is zero.
A5. Any two of: ESP32 has dual-core processor (faster) / built-in Bluetooth / more GPIO pins / higher
clock speed / more RAM / 12-bit ADC.
A6. Any two of: Test the robot virtually before building, saving cost / identify programming errors early
/ test in dangerous scenarios safely / faster to modify.
A7. On a white surface: light is reflected strongly, so LDR resistance is low. Voltage across LDR is
low. On a black surface: light is absorbed, LDR resistance increases, voltage across LDR increases.
The microcontroller detects this change.
A8. loop: read distance sensor; if distance < 15: stop motors; turn left for 0.5s; move forward; else:
move forward; end loop.
End of Chapter 6 — Robotics | O Level Physics Notes