Line Robot Manual
Line Robot Manual
MANUAL
MAKERLAB ELECTRONICS
2024
Makerlab Electronics
Table of
CONTENTS
01 Introduction
What is electronics
05 Chapter 1
What is an Arduino Uno Board?
Parts of Arduino Uno Board
08 Chapter 2
What is Arduino IDE
How to Download Arduino IDE?
14 Chapter 3
What is Ultrasonic Sensor?
What is HC-SR04
How does it work?
Pinouts, Wiring and Coding
18 Chapter 4
What is Servo Motor?
Different Types of Servo Motors
How does it work?
Pinouts, Wiring and Coding
23 Chapter 5
What is L298N?
How does it work?
Pinouts, Wiring and Coding
27 Chapter 6
What is Line Sensor?
How does it work?
Pinouts, Wiring and Coding
Makerlab Electronics
Table of
CONTENTS
31 Chapter 7
What is Sensor Shield V5
Pinouts
33 Chapter 8
What is 2WD Smart Robot Car Chassis Kit?
Manual Assembling
36 Chapter 9
Avoidance Robot
Let's Try Building Avoidance Robot!
42 Chapter 10
Line Follower
Let's Try Building Line Follower Robot!
48 Chapter 11
Line Follower with Obstacle
Avoidance Robot
Let's Try Building Line Follower
with Obstacle Avoidance Robot
In this manual, you will learn some basics in
electronics while building a cool smart car robot for
object detection or obstacle tracking.
What is Electronics?
Imagine you have a tiny, smart brain that you can tell
what to do by writing simple instructions. That’s what
an Arduino is! It’s a small electronic board that can
read information (like light, temperature, or button
presses) and control things (like lights, motors, or
speakers) based on those instructions. You can
connect it to lots of different sensors and gadgets,
and program it using a computer to create all sorts
of cool projects, like a robot, a weather station, or
even a video game controller!
PARTS OF ARDUINO
2 3
1 7
4
5
6
1. USB Connector - Connects to your computer for programming the
board.
3. Digital Pins - Used for digital input and output, like turning LEDs on and
off.
6. Analog Pins - Used for analog input, like reading a sensor value.
A B C
GIVES POWER SOURCE TO ARDUINO BOARD
A B C
USED FOR DIGITAL OUTPUT AND INPUT LIKE LED
A B C
USED TO RESTART PROGRAM IN ARDUINO
A B C
What is Arduino IDE?
6.1.
How To download Arduino IDE
6.2.
6.3.
How To download Arduino IDE
6.2.
6.3.
How To download Arduino IDE
6.4.
6.5.
What is Ultrasonic Sensor?
PINOUTS
CODING:
long duration;
int distance; Defines Variables
void setup()
{
pinMode(trigPin, OUTPUT); Sets the trigPin as an Output
pinMode(echoPin, INPUT); Sets the echoPin as an Input
Serial.begin(9600); Starts the serial communication
}
void loop() {
digitalWrite(trigPin,LOW);
delayMicroseconds(2);
digitalWrite(trigPin,HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
Serial.print("Distance:");
Serial.println(distance);
}
PINOUTS
CODING:
#include <Servo.h> Include the Servo library
int servoPin = 3;
Declare the Servo pin
Servo1.write(0);
delay(1000); Make servo go to 0 degrees
Servo1.write(90);
delay(1000); Make servo go to 90 degrees
Servo1.write(180);
Make servo go to 180 degrees
delay(1000);
}
What is L298N?
PINOUTS
PINOUTS
OUT1/OUT2 - DC Motor A connection
OUT3/OUT4 - DC Motor B connection
+12V - Power supply (5V-12V recommended)
GND - Ground pin
+5V - Power supply for logic circuit (input or output)
ENA - Spinning speed for motor A (PWM)
IN1/IN2 - Spinning direction for motor A
IN3/IN4 - Spinning direction for motor B
ENB - Spinning speed for motor B (PWM)
EXAMPLE WIRING
CODING:
digitalWrite(in1,HIGH);
digitalWrite(in2,LOW);
digitalWrite(in3,HIGH);
digitalWrite(in4,LOW);
}
void loop() {
}
What is Line Sensor?
A line sensor is a type of sensor that helps robots "see" and follow
lines on the ground. Imagine you’re playing a game where you have
to walk along a path marked with a line on the floor. You keep your
eyes on the line to make sure you stay on it, right? A line sensor
does something similar for a robot.
PINOUTS
PINOUTS
5v - Connects to the 5V of Arduino
L- Connects to pin 4
C- Connects to pin 3
R - Connects to pin 2
GND - Connects to the GND of Arduino
EXAMPLE WIRING
CODING:
'const' means that these
// Sensor pinsconst
values won't change during
int sensor1Pin = 2; // Sensor 1 connected to digital pin
the program execution
2const int sensor2Pin = 3; // Sensor 2 connected to digital
pin 3const int sensor3Pin = 4; // Sensor 3 connected to
digital pin 4
A 2WD Smart Robot Chassis Kit is a basic building set for creating a
small, two-wheeled robot. It usually includes a sturdy base
(chassis), two motors with wheels, and sometimes additional parts
like caster wheels or mounts for sensors. This kit is designed to be
used with an Arduino or another microcontroller, allowing you to
create a robot that can move around, avoid obstacles, or follow a
line. It’s a great starting point for high school students to learn
about robotics, coding, and electronics by assembling and
programming their own robot.
Imagine you have a little car toy kit that you can build
yourself, but instead of just rolling around, you can
program it to move on its own. That’s what the 2WD
Smart Robot Chassis Kit is! It’s like a build-your-own
robot car with two wheels that you control by giving
it instructions through a computer. You can make it
go forward, turn, or even avoid bumping into things.
It’s like having a robot buddy you build and program
all by yourself!
Manual for Assembling
1.
Manual for Assembling
2.
Obstacle Avoidance Robot
An obstacle avoidance robot is a type of robot designed to
automatically detect and navigate around obstacles in its path. It
typically uses sensors, like ultrasonic or infrared sensors, to "see"
objects in front of it. When the robot senses something blocking its
way, it can change direction or stop to avoid a collision. High school
students often build these robots as a project to learn about
sensors, coding, and robotics, as it combines both mechanical
design and programming to create a robot that can move around
on its own without bumping into things.
2. Attach the Ultrasonic Sensor, SG90 and Bracket to 2wd Chassis Kit
Lets Make Obstacle
Avoidance Robot!
3. Put Double sided Foam Tape in the back of the arduino uno and
attach in 2Wd Chassis Kit
6. Put Double sided Foam Tape in the back of the battery holder then place
to bottom of 2WD Chassis Kit
Lets Make Obstacle
Avoidance Robot!
7. Get Jumperwires and connect all the Components
8. Please click the link below to access the code. Copy it and upload
it to your Arduino Uno.
CAREFUL!
Be sure to carefully
check the placement of
the 18650 battery,
ensuring that the
positive and negative
terminals are correctly
aligned before inserting
it.
Line Follower Robot
1. Put Double sided Foam Tape in the back of the arduino uno and
attach in 2Wd Chassis Kit
4. Put Double sided Foam Tape in the back of the battery holder then place
to bottom of 2WD Chassis Kit
Lets Make Line Follower Robot!
5. Screw the 3D Printed Bracket to 2wd Chassis Kit
8. Please click the link below to access the code. Copy it and upload
it to your Arduino Uno.
CAREFUL!
Be sure to carefully
check the placement of
the 18650 battery,
ensuring that the
positive and negative
terminals are correctly
aligned before inserting
it.
Line Follower with Obstacle Avoidance
Robot
A Line Follower with Obstacle Avoidance Robot is an advanced
type of robot that combines two functions: following a line and
avoiding obstacles. It uses sensors to detect a line on the ground
and follows it, just like a regular line follower robot. However, it also
has additional sensors, like ultrasonic sensors, to detect obstacles
in its path. When the robot encounters an obstacle while following
the line, it temporarily leaves the line, navigates around the
obstacle, and then returns to the line to continue following it. This
type of robot is a great project for high school students to learn
about combining multiple functions in robotics, including sensor
integration, programming, and decision-making processes.
2. Attach the Ultrasonic Sensor, SG90 and Bracket to 2wd Chassis Kit
Line Follower with Obstacle
Avoidance Robot
3. Put Double sided Foam Tape in the back of the arduino uno and
attach in 2Wd Chassis Kit
6. Put Double sided Foam Tape in the back of the battery holder then place
to bottom of 2WD Chassis Kit
Line Follower with Obstacle
Avoidance Robot
7. Screw the 3D Printed Bracket to 2wd Chassis Kit
10. Please click the link below to access the code. Copy it and
upload it to your Arduino Uno.
CAREFUL!
Be sure to carefully
check the placement of
the 18650 battery,
ensuring that the
positive and negative
terminals are correctly
aligned before inserting
it.