Robotics is an approach that provides students an opportunity
to learn about various concepts and domains by integrating
subjects like physics, mathematics and computer programming
into learning.
Benefits of opting Robotics
• experimental and innovative creations.
• critical thinking and innovation.
• fills the gap between the theoretical learning and the real-
world application.
• promotes teamwork and collaboration.
• aware of industry trends and many more.
Before we discuss on Robotics.
We should understand, how we come up to robotics or robot?
Answer: As humans are always interested to manage the
human efforts by employing machines over the task.
In the same series to utilise the machines with full potential ,it
requires sensing the task to accomplish, robots comes into
picture with the sensing and other functionalities extending
machines to next level.
So, first question arises, what is Machine?
A machine is a device that utilizes power to apply forces and
control movement, ultimately performing an action.
Machines are designed to make work easier by changing the
magnitude or direction of force, often acting as force
multipliers.
But to make the machine more intelligent, we need to give
them decision and sensing ability.
A robot is a machine specially one programmable by a
computer capable of carrying out a complex series of actions
automatically.
A robot can be guided by an external control device, or
they may be embedded within.
Some of applications of robots are:
• Industrial – the main use of robots for many years
• Entertainment – increasingly more and more toys
• Military – such as UAV’s (Unmanned Aerial Vehicle),
UGV’s (Unmanned Ground Vehicle), triage and
surveillance.
• Service, including dispensing food and cleaning
• Exploration, including in space
• Hazardous environments – sending robots to work where
it is best for humans to stay away
• Cleaning, etc
• Laboratory specimens
• Surgery, rehabilitation, physiotherapy
Components of Robot
A basic robot for students typically includes a controller (the
"brain"), mechanical parts for movement, and sensors to
interact with the environment. These components allow the
robot to receive commands, move, and gather information
about its surroundings.
Controller:
This is the "brain" of the robot, often a microcontroller or
microprocessor. It runs the software that controls the robot's
actions and receives input from sensors.
Mechanical Parts:
These are the physical components that enable movement,
such as motors, gears, wheels, and actuators (devices that
convert energy into motion, like servos).
Sensors:
These allow the robot to perceive its environment. Examples
include:
• Proximity sensors: Detect objects nearby.
• Light sensors: Detect light levels.
• Ultrasonic sensors: Measure distance to objects using
sound waves.
• Cameras: Provide visual input.
Power Supply:
Robots need a power source, usually batteries, to
operate.
Chassis/Frame:
The physical structure that holds all the components
together and provides support.
Communication Modules:
(Optional) Allow the robot to communicate with other
devices or systems, using technologies like Bluetooth or
Wi-Fi.
Isaac Asimov's Three Laws of Robotics
(Set of rules designed to govern the behaviour of robots)
First Law: A robot may not injure a human being or, through
inaction, allow a human being to come to harm.
Second Law: A robot must obey the orders given it by human
beings except where such orders would conflict with the First
Law.
Third Law: A robot must protect its own existence as long as
such protection does not conflict with the First or Second Laws.
Arduino UNO
As a Student of Robotics, we refer Arduino UNO as as
Processor(microcontroller) & Board and prototype platform to
understand and implement Robots.
Arduino UNO
Arduino is a prototype platform (open-source) based on an
easy-to-use hardware and software. It consists of a circuit
board, which can be programmed (referred to as a
microcontroller) and a ready-made software called Arduino IDE
(Integrated Development Environment), which is used to write
and upload the computer code to the physical board.
Prerequisites:
Programming language: C & C++
Basic Electronics
Arduino Board Description
1: Power USB
2: Power Jack
3: Voltage Regulator
4: Crystal Oscillator
5Arduino Reset Pin
6,7,8,9 Pins (3.3 V,5V, GND, Vin
10 Analog Pins (A0 to A5)
11: Main Microcontroller
12: ICSP Pin
13: Power LED Indicator
14: TX & RX LEDs
15: Digital I/O Pins
16: AREF
17 Reset Button
Arduino program called sketch.
Arduino programs can be divided in three main
parts: Structure, Values (variables and constants),
and Functions.
Software structure consist of two main functions –
1. Setup () function
2. Loop () function
Purpose of Void setup () function called when a sketch
(program) starts
Use it to initialize the variables, pin modes, start using libraries,
etc. The setup function will only run once, after each power up
or reset of the Arduino board.
Purpose of Void Loop () function After creating a setup ()
function, which initializes and sets the initial values, the loop ()
function does precisely what its name suggests, and loops
consecutively, allowing your program to change and respond.
The first Electric circuit & Program
// the setup function runs once when you press reset or power
the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pin Mode(3, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(3,HIGH);// turn the LED on (HIGH is the voltage
level)
delay(1000); // wait for a second
digitalWrite(3,LOW); // turn the LED off by making the
voltage LOW
delay(1000); // wait for a second
}
First Sensor: ULTRASONIC SENSOR
Ultrasonic sensors are used to measure distance and
detect objects by emitting high-frequency sound waves
and measuring the time it takes for the reflected waves
(echo) to return.
They are commonly used in various applications like
object detection, distance measurement.
The speed of sound in air is approximately 343 meters
per second (m/s) at 20°C
Sound waves are longitudinal waves. This means that
the particles of the medium through which the sound
wave travels (like air, water, or solids) vibrate in the
same direction as the wave is traveling.
Working of Ultrasonic sensor
Pin Labels of Ultrasonic sensor
Circuit Diagram to test Ultrasonic Sensor
Program to test Ultrasonic Sensor
const int trigPin = 9;
const int echoPin = 10;
long duration;
int distance;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600);
}
void loop ()
{
// Clear the trigPin by setting it LOW for 2micro seconds
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 microseconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in
microseconds
duration = pulseIn(echoPin, HIGH);
// Calculate the distance (in cm)
distance = duration * 0.034 / 2;
// Prints the distance on the Serial Monitor
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
delay (500);
}