Robot Design and Operation: Expanded Modules
Prof. Hany Elnashar
handbook
Module 1: Introduction to Robotics
1.1 What is a Robot?
A robot is a programmable machine capable of performing tasks autonomously or
semi-autonomously. It combines mechanical components, control systems,
sensors, actuators, and software to interact with and manipulate the physical world.
Robots vary widely in complexity and from simple automated arms to sophisticated
humanoid machines. Robots are often used to perform tasks that are dangerous,
repetitive, or require high precision, helping improve safety, efficiency, and
productivity across industries.
1.2 History and Evolution of Robotics
The idea of mechanical being’s dates back to ancient civilizations, such as Hero of
Alexandria's automata. The modern term "robot" comes from Karel Čapek's 1920 play
R.U.R. Key developments include the first industrial robots in the 1950s, the
introduction of AI and computer control in the 1980s and 1990s, and the emergence
of consumer and autonomous robots in the 21st century. Robotics has evolved from
mechanical curiosities to highly intelligent and autonomous systems with real-world
applications.
1.3 Types of Robots
Robots can be classified based on their structure and application.
1. Based on Mobility
- Stationary Robots – Fixed in one place (e.g., industrial robotic arms).
- Mobile Robots – Can move using wheels, legs, or other mechanisms (e.g., drones, self-driving cars).
- Walking (Legged) Robots – Use legs for movement (e.g., Boston Dynamics' Atlas).
- Swimming Robots – Designed for underwater tasks (e.g., robotic fish).
- Flying Robots – Drones and UAVs (Unmanned Aerial Vehicles).
2. Based on Functionality
- Industrial Robots – Used in manufacturing (e.g., assembly line robots).
- Service Robots – Assist humans (e.g., cleaning robots like Roomba, medical robots like Da Vinci Surgical System).
- Military & Security Robots – Bomb disposal, surveillance drones (e.g., PackBot).
- Agricultural Robots – Used in farming (e.g., autonomous harvesters).
- Exploration Robots – Space rovers (e.g., NASA's Perseverance), deep-sea robots.
- Entertainment Robots – Toy robots, animatronics (e.g., Sony’s Aibo).
- Social Robots – Interact with humans (e.g., SoftBank’s Pepper).
3. Based on Autonomy
- Pre-Programmed Robots – Follow fixed instructions (e.g., factory robots).
- Autonomous Robots – Make decisions using AI (e.g., self-driving cars).
- Teleoperated Robots – Controlled remotely by humans (e.g., surgical robots).
- Semi-Autonomous Robots – Combine human control with AI (e.g., some drones).
4. Based on Design & Structure
- Articulated Robots – Arm-like with rotary joints (common in industries).
- SCARA Robots – Fast, precise horizontal movements (used in assembly).
- Delta Robots – Spider-like, high-speed pick-and-place tasks.
- Cartesian Robots – Move in straight lines (3D printers, CNC machines).
- Soft Robots – Made of flexible materials (used in delicate tasks).
1.4 Applications in Modern Industries
Robots are widely used in modern industries to automate repetitive tasks, enhance
safety, and improve efficiency. In manufacturing, they handle complex assembly
lines. In healthcare, robots assist surgeons and patients. Agricultural robots
automate tasks like seeding and harvesting. Robots in logistics sort and transport
goods, while in construction, they perform precision tasks like bricklaying. Their
adaptability enables them to fit into diverse environments.
1.5 Ethical and Social Implications
As robots become more integrated into society, ethical concerns arise regarding job
displacement, privacy, bias, and autonomy. Automation could affect employment,
requiring policy and workforce adaptation. AI-based decisions can reflect societal
biases. Data collection by autonomous systems raises privacy concerns.
Determining liability for autonomous robot actions is a legal challenge. Responsible
design and regulation are essential for ethical robotics development.
Module 2: Core Robot Components
2.1 Mechanical Structure
2.1.1 Materiatypesls for Frames
The frame forms the robot’s structural skeleton, determining strength, weight, and
durability. Common materials include aluminum for its balance of strength and
weight, steel for heavy-duty applications, plastic for lightweight and cost-sensitive
designs, and carbon fiber for high-performance robots. Material choice affects
mobility, payload capacity, and thermal resistance.
2.1.2 Joint Mechanisms
Joints enable a robot’s limbs to move. Revolute joints allow rotation (like elbows),
prismatic joints allow sliding motion (like telescopic arms), and spherical joints allow
multi-axis rotation (like a human shoulder). Choosing the right joint type is essential
for achieving desired motion paths.
2.1.3 Degrees of Freedom (DOF)
Degrees of Freedom represent the number of independent movements a robot can
perform. A robotic arm with six DOF can replicate most human arm motions. Higher
DOF allows more flexibility but requires complex control algorithms and increases
design complexity.
2.1.4 End Effectors
End effectors are the tools attached to the end of robotic arms. They include grippers,
suction cups, welding torches, or customized tools depending on the application.
The design and control of end effectors directly impact task precision and
effectiveness.
2.2 Actuation Systems
2.2.1 Types of Motors
Motors convert electrical energy into mechanical motion. DC motors are simple and
fast, servo motors offer precise position control, stepper motors move in discrete
steps for accuracy, and brushless motors provide high efficiency and durability. The
motor type depends on required torque, speed, and control precision.
2.2.2 Hydraulic and Pneumatic Actuators
Hydraulic actuators use pressurized liquid for high-power applications, while
pneumatic actuators use compressed air for lighter loads. These are often used
where electric actuators are inadequate. They provide robust motion but require
careful pressure control and maintenance.
2.2.3 Gear Systems
Gear systems adjust speed and torque between motors and moving parts. Common
types include spur gears for simple transmission, planetary gears for compact high-
torque applications, and bevel gears for angled motion transfer. Gear ratios help fine-
tune motion dynamics.
2.2.4 Mobility Mechanisms
Mobility defines how a robot moves. Wheeled designs offer speed and simplicity,
tracked systems provide better traction on rough terrain, and legged robots mimic
biological movement to navigate complex environments. The choice affects speed,
maneuverability, and terrain handling.
2.3 Power Systems
2.3.1 Battery Technologies
Batteries supply electrical power to mobile robots. LiPo batteries are lightweight and
powerful but require careful handling. Li-ion batteries are safer and long-lasting.
NiMH batteries are less dense but more environmentally friendly. Battery choice
impacts on the runtime and load capacity.
2.3.2 Power Management
Efficient power management ensures consistent voltage and current delivery to all
components. It includes circuit protection, energy distribution, and heat dissipation
strategies. Proper management prevents power failures and extends battery life.
2.3.3 Voltage Control
Voltage regulators and converters maintain stable power levels to sensitive
electronics. They ensure that motors, sensors, and controllers receive appropriate
voltages to operate safely and efficiently. Linear and switching regulators are
commonly used.
2.3.4 Efficiency and Runtime
To extend operational time, robots need energy-efficient components, sleep modes,
and optimized movement algorithms. Lightweight design, efficient motors, and
intelligent power usage contribute to longer battery life and better performance.
2.4 Control Systems
2.4.1 Microcontrollers vs. SBCs
Microcontrollers (e.g., Arduino) are ideal for real-time, low-level control tasks, while
Single Board Computers (e.g., Raspberry Pi) handle complex processing, such as
image recognition or web communication. Many robots use both for layered control.
2.4.2 Motor Drivers
Motor drivers like H-bridges and PWM circuits control motor direction and speed.
They act as intermediaries between the control board and motors, handling power
demands and feedback for smooth operation.
2.4.3 RTOS
Real-Time Operating Systems manage task scheduling and execution in time-critical
applications. They enable deterministic responses, multitasking, and priority
handling in robotics systems, ensuring reliable performance.
2.4.4 Safety Systems
Safety mechanisms prevent damage and accidents. These include emergency stop
buttons, overload protection, fault detection, and thermal sensors. They are critical
for robots operating around humans.
2.5 Sensors and Perception
2.5.1 Proximity Sensors
These sensors detect objects and measure distance. Ultrasonic sensors use sound
waves, infrared sensors detect heat or reflection, and LiDAR uses laser light for high-
precision mapping. They are essential for navigation and obstacle avoidance.
2.5.2 IMUs
Inertial Measurement Units combine accelerometers and gyroscopes to monitor
orientation, acceleration, and rotation. They help stabilize movement and support
autonomous navigation.
2.5.3 Vision Systems
Robotic vision uses cameras, depth sensors, and software (e.g., OpenCV) to interpret
images. It enables object detection, facial recognition, and path planning. Stereo
vision systems add depth perception.
2.5.4 Tactile Feedback
Tactile sensors measure force, pressure, and contact. They allow robots to grip
delicate items, respond to touch, and adapt to varying conditions in manipulation
tasks.
2.6 Software Architecture
2.6.1 Open vs. Closed-Loop
Closed-loop systems use feedback to adjust performance in real time. Open-loop
systems execute commands without feedback, suitable for predictable tasks.
Closed loop offers higher precision.
2.6.2 PID Control
PID controllers adjust robot motion using Proportional, Integral, and Derivative terms.
They maintain stability and reduce error by correcting deviations from the desired
path or position.
PID stands for Proportional–Integral–Derivative, a control algorithm used in robotics to maintain accurate
positioning, speed, or orientation. It minimizes the error between the desired setpoint and the actual system
output.
PID Formula:
Output = (Kp × Error) + (Ki × Integral of Error) + (Kd × Derivative of Error)
• Kp (Proportional gain): Reacts to the current error.
• Ki (Integral gain): Reacts to the accumulation of past errors.
• Kd (Derivative gain): Reacts to the rate of error change.
PID Control Pseudocode:
Initialize:
Kp, Ki, Kd = tuning constants
previousError = 0
integral = 0
Function computePID(setpoint, actualValue):
error = setpoint - actualValue
integral += error
derivative = error - previousError
output = (Kp * error) + (Ki * integral) + (Kd * derivative)
previousError = error
return output
PID Models:
Type Description Application Example
P-only Fast but can overshoot. Basic motor speed control.
PI Removes steady-state error. Temperature control systems.
PD Fast correction and prediction. Drone flight correction.
PID Balanced, precise, and adaptive. Line-following, arm control.
2.6.3 Robot Operating System (ROS)
ROS is a modular, open-source middleware for robot software development. It
supports communication between sensors, actuators, and control systems,
simplifying complex integration.
ROS is a middleware framework that allows robotic components—like sensors, actuators, and control
algorithms—to communicate effectively. It simplifies complex robot software development by providing
reusable tools, libraries, and message-passing systems.
Common Versions of ROS:
Type Description Example Use
The original version. Widely supported, large
ROS 1 Used in education and research robots like TurtleBot.
ecosystem.
Improved version with better real-time support, Used in industrial AMRs (Autonomous Mobile
ROS 2
security, and industrial focus. Robots).
micro- Deployed in low-power embedded systems (e.g.,
Lightweight version designed for microcontrollers.
ROS robotic grippers or sensors).
ROS Core Components:
• Nodes: Independent processes (e.g., camera node, motor control node).
• Topics: Channels for publishing/subscribing data (e.g., velocity commands).
• Services: Request-response actions (e.g., request a path plan).
• Messages: Data formats (e.g., sensor readings, motor speeds).
• TF (Transform Library): Tracks spatial relationships between components.
Example:
A delivery robot may use:
• ROS 2 for high-level planning.
• Nodes for GPS, obstacle detection, and motor control.
• Topics for sharing path updates and real-time velocity.
2.6.4 Behavior-Based Robotics
Behavioral robotics uses Finite State Machines and behavior trees to simulate
decision-making. Robots can switch tasks based on environment and conditions,
enabling adaptive, autonomous behavior.
Module 3: Building Your First Robot
3.1 Design Phase
3.1.1 Requirements
Defining robot requirements involves understanding the tasks, environment, and
performance goals. Consider size, weight, cost, and operational constraints to
ensure a feasible design.
3.1.2 CAD Modeling
Computer-Aided Design tools allow virtual construction and simulation of robot
parts. CAD models help detect design flaws, optimize layout, and streamline
assembly planning.
3.1.3 Component Selection
Select components like motors, controllers, and sensors based on functionality,
compatibility, and budget. Reliable sourcing from trusted vendors ensures
performance and safety.
For Choosing the right components is critical for building a functional and efficient robot. The selection depends on
application, environment, cost, and required performance.
Frame Material Selection:
Application Recommended Material Reason
Lightweight drone Aluminum Strong and light
Heavy-lift arm Steel Durable and rigid
Classroom demo bot Plastic Low cost and safe
Racing robot Carbon Fiber High strength-to-weight
Motor and Actuator Selection:
Task Motor Type Reason
Positioning arm Servo Motor Precise angle control
Line-following bot DC Motor Simple and fast
3D Printer Axis Stepper Motor Accurate stepwise motion
Excavation robot Hydraulic Actuator High force output
Gear Type Selection:
Movement Need Gear Type Use Case
Simple rotation Spur Gear Toy robots
High torque in compact space Planetary Gear Robotic arms
Directional change Bevel Gear Wheel turning system
Battery Type Selection:
Environment Battery Type Note
Outdoor drone LiPo Lightweight, powerful
Service robot Li-ion Reliable and safe
Educational robot NiMH Affordable and non-toxic
Control Board Choice:
Use Case Board Type Example
Sensor & motor control Microcontroller Arduino Uno
AI, vision, or mapping SBC Raspberry Pi 4
Embedded sensor tasks microcontroller (low-power) ESP32, STM32
3.2 Assembly
3.2.1 Mechanical Construction
Use structural fasteners, adhesives, and custom mounts to assemble the chassis
and mechanisms. Precision in mechanical construction ensures alignment,
durability, and ease of maintenance.
3.2.2 Circuit Design
Proper circuit design involves organizing connections, avoiding shorts, and managing
current paths. Soldering, breadboarding, or PCB design tools can be used depending
on the project scale.
3.2.3 Sensor Integration
Sensors must be correctly mounted, calibrated, and connected. Interfacing them
with the controller allows accurate environmental sensing and feedback for control
loops.
3.3 Programming
3.3.1 Basic Movement
Programming movement includes driving motors for forward, reverse, and turns.
Code libraries abstract hardware control to simplify software development.
Now this is pseudo code for movements
Function stopMotors(): Right Motor: STOP
Turn OFF all motor pins
Function moveForward(): Function spinLeft():
stopMotors() stopMotors()
Left Motor: FORWARD Left Motor: REVERSE
Right Motor: FORWARD Right Motor: FORWARD
Function moveBackward(): Function spinRight():
stopMotors() stopMotors()
Left Motor: REVERSE Left Motor: FORWARD
Right Motor: REVERSE Right Motor: REVERSE
Function turnLeft(): Main Loop:
stopMotors() If forward command:
Left Motor: STOP
Right Motor: FORWARD moveForwar
d()
Function turnRight(): Else if backward
stopMotors() command:
Left Motor: FORWARD
moveBackw spinLeft()
ard() Else if spin right:
Else if left command:
spinRight()
turnLeft() Else:
Else if right command:
stopMotors(
turnRight() )
Else if spin left:
3.3.2 Obstacle Avoidance
Obstacle avoidance algorithms use sensor input to detect and navigate around
objects. Conditional logic or mapping strategies improve responsiveness and safety.
pseudo code for Obstacle Avoidance:
Function readSensors():
frontDistance = readUltrasonicSensor(FRONT)
leftDistance = readUltrasonicSensor(LEFT)
rightDistance = readUltrasonicSensor(RIGHT)
return frontDistance, leftDistance, rightDistance
Function avoidObstacle():
front, left, right = readSensors()
If front < safeThreshold:
stopMotors()
If left > right:
turnLeft()
Else:
turnRight()
Else:
moveForward()
Main Loop:
While robot is ON:
avoidObstacle()
wait(100 milliseconds)
3.3.3 Wireless Control
Wireless communication using Bluetooth, WiFi, or RF modules allows remote
control. This adds flexibility for testing, remote operation, and telemetry.
• Bluetooth (e.g., HC-05): Short-range, easy setup with phones or tablets.
• Wi-Fi (e.g., ESP8266, ESP32): Medium to long-range control via web
interfaces.
• RF Modules (e.g., nRF24L01): Low-latency control, used in RC-style systems
Example (Pseudocode):
3.3.4 Autonomous Navigation
Autonomous robots use sensors and AI to navigate without human input. Algorithms
like A*, wall-following, or SLAM enable independent movement through dynamic
environments.
3.4 Testing and Debugging
3.4.1 Functional Testing
Systematically verify each subsystem—motors, sensors, communication—to ensure
the robot performs as expected. Use test cases to check various scenarios.
3.4.2 Troubleshooting
Diagnose issues using logs, multimeters, or debug messages. Common problems
include bad connections, faulty components, or code logic errors.
3.4.3 Optimization
Tune parameters, optimize code, and reduce weight or power usage to enhance
performance. Efficient robots run longer and perform better under constraints.
Module 4: Advanced Topics in Robotics
4.1 SLAM
Simultaneous Localization and Mapping enables robots to build a map of an
unknown environment while tracking their own location. This is key for autonomous
navigation and used in robotics vacuum cleaners, drones, and self-driving cars.
4.2 Machine Learning
Machine learning allows robots to learn from experience. Supervised learning uses
labeled data to train models, while reinforcement learning teaches robots through
rewards and penalties. These techniques enable object recognition, motion
planning, and decision-making.
4.3 Human-Robot Interaction
HRI focuses on making robots usable and understandable to humans. Voice
interfaces use speech recognition; gesture recognition allows control via body
movement; and tactile interfaces provide intuitive control through touch, increasing
accessibility and usability.
4.4 Swarm Robotics
Swarm robotics involves many simple robots working cooperatively. Inspired by
insects, these systems are scalable, fault-tolerant, and capable of complex group
behavior like mapping, search and rescue, or collective transport.
Module 5: Operational Considerations
5.1 Safety Standards
Adhering to safety standards such as ISO 10218 or ANSI/RIA ensures that robots
operate safely around humans. Standards define safe design, emergency protocols,
and acceptable risk levels.
5.2 Maintenance
Routine maintenance includes inspecting hardware, cleaning sensors, updating
firmware, and replacing worn parts. Scheduled maintenance extends robot lifespan
and prevents downtime.
5.3 Troubleshooting
Effective troubleshooting combines systematic testing, sensor data analysis, and
inspection. Tools like oscilloscopes and diagnostic software help identify issues in
sensors, motors, and software.
5.4 Performance Metrics
Metrics like cycle time, energy efficiency, accuracy, and uptime quantify robot
performance. Benchmarking against these metrics allows continuous improvement
and system evaluation.
Case Study: Autonomous Delivery Robot for Urban Environments
Scenario Overview
This case study presents the development of an autonomous ground-based delivery
robot designed to operate in busy urban environments. The robot is intended to
transport small packages from distribution centers to homes or businesses within a
5-kilometer radius. It must safely navigate sidewalks, avoid pedestrians and
obstacles, handle curb transitions, and reach destinations using GPS coordinates
and visual landmarks.
Design Objectives
• Navigate crowded urban sidewalks with obstacle avoidance
• Carry up to 10 kg of packages securely
• Operate for at least 4 hours on battery power
• Integrate with a mobile app for status tracking and delivery confirmation
Component Selection and Justification
• Mechanical Structure: Lightweight aluminum chassis with a plastic shell for
impact resistance; four-wheel configuration for stability and smooth urban
terrain handling.
• Actuators: Brushless DC motors paired with planetary gear systems to provide
efficient, quiet operation and sufficient torque.
• Power System: Lithium-ion battery pack with onboard power management
and real-time voltage monitoring.
• Control System: Raspberry Pi 4 SBC for navigation and communication tasks,
coupled with an Arduino Mega for real-time motor and sensor control.
• Sensors:
o LiDAR for mapping and obstacle detection
o Ultrasonic sensors for curb and step detection
o IMU for orientation and tilt correction
o Cameras for lane-following and object recognition using OpenCV
Software Architecture
• ROS (Robot Operating System) is used to manage sensor data, localization,
and navigation.
• Navigation stack includes SLAM for map generation and path planning
algorithms.
• PID controllers ensure smooth acceleration, braking, and turn control.
• The robot communicates via 4G and Wi-Fi to sync with cloud services and user
mobile apps.
Testing and Validation
• Initial tests conducted in simulated environments using Gazebo.
• Field tests performed on local sidewalks with varying pedestrian traffic and
lighting.
• Performance metrics tracked: route completion time, obstacle detection
success, curb handling accuracy, and battery consumption.
Ethical and Operational Considerations
• Safety features include LED indicators, emergency stop, and automatic
shutdown on collision.
• Privacy policies are in place to anonymize data collected by cameras and
sensors.
• Fail-safe protocols ensure the robot halts safely in case of GPS loss or power
failure.
Results and Future Improvements
• Prototype achieved 90% delivery success in test environments.
• Plans include improved AI for dynamic obstacle prediction, solar charging
panels, and multilingual voice announcements for pedestrians.
This case study illustrates the integration of multiple robotics disciplines—
mechanical design, control theory, software architecture, AI, and ethics—into a
coherent real-world application.
Appendices
• A. Tools: List of recommended tools including soldering irons, multimeters,
oscilloscopes, and mechanical toolkits.
• B. Open-Source Platforms: Overview of Arduino, Raspberry Pi, ROS, and
other community-supported platforms.
• C. Reading: Suggested textbooks, papers, and journals on robotics.
• D. Glossary: Definitions of technical terms used throughout the textbook.