0% found this document useful (0 votes)
20 views54 pages

Line Robot Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views54 pages

Line Robot Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

2WD ROBOT KIT

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?

Electronics is the study and use of small devices called


electronic components that control electricity to do
different things. These components, like batteries,
wires, and microchips, are used in devices such as
smartphones, computers, and TVs. They help us make
machines work, communicate, and even play games.
Think of electronics as the magic behind all your
favorite gadgets!
What is Arduino?

An Arduino is a small, programmable circuit board that you can use


to create electronic projects. It’s like a tiny computer that you can
control using a special language called C++. You can connect it to
sensors (which collect information like light or temperature) and
actuators (which do things like turn on lights or move motors). With
Arduino, you can make robots, weather stations, interactive games,
and much more. It’s designed to be easy to use, making it great for
beginners and hobbyists who want to learn about electronics and
programming.

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.

2. Reset Button - Restarts the program on the board.

3. Digital Pins - Used for digital input and output, like turning LEDs on and
off.

4. Microcontroller - The brain of the Arduino, it runs your programs.

5. Power Supply - Connects to a power source to power the board.

6. Analog Pins - Used for analog input, like reading a sensor value.

7. RX TX LED Indicator - a visual indication of serial data transmission,


helping users diagnose and understand communication activities between
the Arduino and other devices.
What did you learn?
THE BRAIN OF ARDUINO

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?

The Arduino IDE is a user-friendly software that allows you to write


and upload code to an Arduino board, which is a small,
programmable device used for electronics projects. It uses a
simplified programming language based on C/C++ and provides a
platform for you to easily create and test your projects, like
controlling lights, motors, and sensors. With built-in examples and a
straightforward interface, the Arduino IDE is perfect for beginners,
including high school students, to start learning programming and
electronics.

Imagine you have a special notebook where you


write down all the instructions for your tiny smart
brain (the Arduino) to follow. This notebook is called
the Arduino IDE! It's like a command center on your
computer where you type out simple directions for
the Arduino to understand. Once you're done
writing, you can send these instructions to the
Arduino, which then follows them exactly, making
your projects come to life. Whether you want to
make lights blink, motors spin, or sensors react, the
Arduino IDE is where you plan it all out!
How To download Arduino IDE
1. Click The link below

Official Website of Arduino for Arduino IDE

2. Click the "Win 10 and newer, 64 bits"

3. Click the "Just Download"


How To download Arduino IDE
4. Wait the download

5. Open the file

6. Follow These Steps

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?

An ultrasonic sensor is a device that uses sound waves to measure


distance. It emits high-frequency sound waves (ultrasound) and
measures the time it takes for the echo to return after bouncing
off an object. This time difference is then used to calculate the
distance to the object. Ultrasonic sensors are commonly used in
applications like distance measurement, object detection, and level
sensing in various fields such as robotics, automotive, and industrial
automation. They are known for their accuracy and reliability in
different environments.

what about HC-SR04?


The HC-SR04 is an ultrasonic
sensor used to measure distance.
It sends out a sound wave and
measures the time it takes for the
echo to return after hitting an
object. It can detect distances
from 2 cm to 400 cm accurately.
This sensor is commonly used in
robotics and obstacle detection
systems.
HOW DOES IT WORK?

PINOUTS

VCC - Connects to the power


supply (5v)
TRiG / TRIGGER - The trigger pin,
you send a signal here to start the
measurement.
ECHO - The echo pin, it outputs
the signal received back after
bouncing off an object.
GND - Connects to the ground of
the power supply.
EXAMPLE WIRING:

CODING:

const int trigPin = 9; Defines pins numbers


const int echoPin = 10;

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);

duration = pulseIn(echoPin, HIGH);


distance = duration * 0.034 / 2;

Serial.print("Distance:");
Serial.println(distance);
}

Clears the trigPin

Sets the trigPin on HIGH state for 10


micro seconds

Reads the echoPin, returns the


sound wave travel time in
microseconds

Calculating the distance

Prints the distance on the Serial


Monitor
What is Servo Motor?

A servo motor is a small, precise motor used for controlling the


position of objects. It consists of a motor, a control circuit, and a
position-sensing device. Servo motors receive a control signal that
represents a desired output position, which they maintain using a
feedback system. They are commonly used in applications
requiring precise control of angular or linear position, speed, and
torque, such as in robotics, RC vehicles, and automation systems.

Types of Servo Motor


Standard Hobby Servos
A standard hobby servo motor
typically has a movement range of 90
to 180 degrees. It provides feedback
to the controller to monitor its
position, allowing precise movement
with the correct pulse length from the
controller. Always check the motor's
specifications before using it in your
project to ensure it meets your needs.
Continuous Rotation
Continuous rotation servos, or "open-
loop" servos, differ from standard
servos as they control direction and
speed rather than position. The control
signal determines how fast and in
which direction the drive shaft moves,
but there is no feedback for precise
position control. Therefore, they are
not suitable for applications that
require moving between specific
points on the rotation arc.

HOW DOES IT WORK?


DIFFERENT SERVO MOTORS

PINOUTS

GND (Ground) - Connects to the


ground of the power supply.
5v - Connects to the 5V power
supply to power the motor.
Control - Receives the control
signals (usually pulse-width
modulation, or PWM) to dictate the
motor's position, speed, or
direction.
EXAMPLE WIRING:

CODING:
#include <Servo.h> Include the Servo library

int servoPin = 3;
Declare the Servo pin

Servo Servo1; Create a servo object

void setup() { We need to attach the servo


Servo1.attach(servoPin); } to the used pin number
void loop(){

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?

is a dual H-bridge motor driver integrated circuit (IC). It allows you


to control the speed and direction of two DC motors or control one
stepper motor.

Here are the key features:


Dual H-Bridge: Controls two motors
independently.
High Voltage and Current: Can
handle motor supply voltage up to 46V
and peak current up to 2A per bridge.
Control Pins: Includes enable and
input pins to control motor operations.
HOW DOES IT WORK?

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:

1) High operating voltage, which can be


{ up to 40 volts;
2) Large output current, the
int in1 = 5; instantaneous peak current can be up to
3A;
int in2 = 4; 3) With 25W rated power;
int in3 = 3; 4) Two built in H-bridge, high voltage,
int in4 = 2; large current, full bridge driver, which can
be used to drive DC motors, stepper
motors, relay coils and other inductive
void setup() { loads.
5) Using standard logic level signal to
pinMode (in1,OUTPUT); control.
6) Able to drive a two-phase stepper
pinMode (in2,OUTPUT); motor or four-phase stepper motor, and
pinMode (in3,OUTPUT); two-phase DC motors.
pinMode (in4,OUTPUT);

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.

How Sensors Work?

Sensing the Line:


The sensor uses light to detect the line. It shines a
light (usually infrared) onto the ground and
measures the light that bounces back.
If the light hits a dark line (like black tape on a
white floor), less light bounces back.
If the light hits a lighter surface, more light
bounces back.

Telling the Robot What to Do:


The sensor sends this information to the
robot's brain (a microcontroller or
computer).
The robot can be programmed to move
left, right, or straight based on where it
senses the line. This helps the robot stay
on track and follow the path.
HOW DOES IT WORK?

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

void setup() { 'INPUT' means that the pin is


// Initialize the sensor pins as input used to receive data from an
pinMode(sensor1Pin, INPUT); external device
pinMode(sensor2Pin, INPUT);
pinMode(sensor3Pin, INPUT);

This allows data to be sent


// Initialize Serial Monitor
between the Arduino and your
Serial.begin(9600);}
computer (Serial Monitor)
void loop() {

// Read the sensor values


int sensor1Value = digitalRead(sensor1Pin); Read the current state of the
int sensor2Value = digitalRead(sensor2Pin); sensors (HIGH or LOW) using
int sensor3Value = digitalRead(sensor3Pin); digitalRead()

// Print the sensor values to the Serial Monitor


Serial.print("Sensor 1: ");
Serial.print(sensor1Value);
Display the value of all the
Serial.print("\tSensor 2: ");
sensor using serial monitor
Serial.print(sensor2Value);
Serial.print("\tSensor 3: ");
Serial.println(sensor3Value);

// Add a small delay to make the output more readable


Delay of 200 milliseconds to
delay(200); make the output easier to
} read
What is Sensor Shield V5?

The Sensor Shield V5 is like an adapter that makes it super easy to


connect multiple sensors and gadgets to your Arduino. It plugs
right on top of your Arduino board, giving you labeled slots where
you can quickly and safely connect things like motors, lights, and
sensors without worrying about complicated wiring. This shield
helps you build projects faster and with fewer mistakes, making it
perfect for creating cool inventions like robots or weather stations
in a high school setting.

Think of the Sensor Shield V5 like a LEGO baseplate


for your Arduino projects. Just like you snap LEGO
pieces onto the baseplate to build something cool,
the Sensor Shield lets you easily snap in sensors and
gadgets onto your Arduino. It gives you clear spots
to plug everything in, so you don’t have to worry
about getting the wires all mixed up. It’s like having a
super simple building base that helps you create
awesome projects without the hassle!
SENSOR SHIELD PIN OUTPUT
What is 2WD Smart Robot Car Chassis Kit?

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.

When the robot detects an obstacle using the


ultrasonic sensor, the Arduino processes this
information and sends commands to the L298N
motor driver to steer the robot away from the
obstacle, ensuring it doesn’t crash. The servo motor
allows the ultrasonic sensor to scan different angles,
giving the robot a better understanding of its
surroundings.
Lets Make Obstacle
Avoidance Robot!
1. Assemble the Ultrasonic Sensor and SG90 to Bracket

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

4. Attach the Sensor Shield V5 to Arduino Uno


Lets Make Obstacle
Avoidance Robot!
5. Screw the L298N to 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.

Obstacle Avoidance Robot


Lets Make Obstacle
Avoidance Robot!

9. Insert the 18650 Battery to the Battery Holder

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

A line follower robot is an autonomous robot that is designed to


follow a specific path, usually a line drawn on the ground, which is
typically black on a white surface or vice versa. It uses sensors,
often infrared (IR) sensors, to detect the line by sensing the
contrast between the line and the surface. The robot's
microcontroller, such as an Arduino, processes the sensor data and
controls the motors to keep the robot on track by adjusting its
direction as it moves. High school students often build line follower
robots to learn about sensors, programming, and basic robotics, as
it’s a hands-on way to explore how robots can navigate and
interact with their environment.

Imagine a robot that’s like a train, but instead of


following tracks, it follows a line drawn on the floor.
That’s what a line follower robot does! It has special
sensors that act like eyes, allowing it to see the line.
As the robot moves, it constantly checks the line and
adjusts its direction to stay on track, just like how you
might follow a path in a maze. It’s a simple but smart
robot that knows how to stay on course all by itself!
Lets Make Line Follower Robot!

1. Put Double sided Foam Tape in the back of the arduino uno and
attach in 2Wd Chassis Kit

2. Attach the Sensor Shield V5 to Arduino Uno


Lets Make Line Follower Robot!

3. Screw the L298N to 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

6. Screw the 3 Channel Line Sensor to the 3D Printed Bracket


Lets Make Line Follower
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.

Line Follower Robot


Lets Make Obstacle
Avoidance Robot!

9. Insert the 18650 Battery to the Battery Holder

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.

Imagine a robot that's like a car driving on the road,


carefully staying in its lane. But this car is extra smart
—it can also detect obstacles like other cars or
roadblocks. If something is in its way, it doesn’t just
stop; it smoothly steers around the obstacle and
then returns to its lane, continuing its journey. That’s
what a Line Follower with Obstacle Avoidance Robot
does! It follows a line like a car follows its lane, but it
also knows how to avoid anything that might block its
path, just like a cautious driver on the road.
Line Follower with Obstacle
Avoidance Robot
1. Assemble the Ultrasonic Sensor and SG90 to Bracket

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

4. Attach the Sensor Shield V5 to Arduino Uno


Line Follower with Obstacle
Avoidance Robot
5. Screw the L298N to 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

8. Screw the 3 Channel Line Sensor to the 3D Printed Bracket


Line Follower with Obstacle
Avoidance Robot
9. Get Jumperwires and connect all the Components

10. Please click the link below to access the code. Copy it and
upload it to your Arduino Uno.

Line Follower With Obstacle


Avoidance Robot
Line Follower with Obstacle
Avoidance Robot

11. Insert the 18650 Battery to the Battery Holder

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.

You might also like