Arduino 4 Wheeler Line Follower Robot DIY Kit

2,550.00৳ 

8 People watching this product now!
  • Pick up from the RadioGear Store

Schedule Pick up from store

Free

  • Inside Dhaka Metro

Inside Dhaka Metro city

24 Hours

60tk

  • Outside Dhaka metro

Outside Dhaka Metro

24 Hours

100tk

  • Outside Dhaka

All Bangladesh 

1-2 Days

130tk

  • Terms And Conditions
  • Return Policy

Payment Methods:

How to Order Online

Description

HOW LINE FOLLOWER ROBOT WORKS?

The concept of the line follower robot is related to the transmitting and receiving of light. The white colour reflects all the light that falls on it whereas the black colour absorbs all the light.

In this line follower robot, we have used IR transmitters and receivers ( also known as photodiodes). When IR light falls on a white surface, it gets reflected back towards the IR receiver, generating some voltage changes that are analyzed by the Arduino.

When IR light falls on a black surface, it gets absorbed by the black surface, and no rays are reflected back thus, the IR receiver doesn’t receive any rays.

In this project, when the IR sensor senses a white surface, an Arduino gets HIGH as input, and when it senses a black line, an Arduino gets LOW as input. Based on these inputs, an Arduino Uno provides the proper output to control the line follower. 

Component List:

1x Arduino Board (UNO)
1x –A to micro-USB cable
1x 4wheel Car chassis
1x L298 motor driver module
2x IR sensor module
2x 18650 battery

1x 2s holder

1x battery charger

1xOn-Off- Switch
Connecting wire
jumper cables

Arduino 4 Wheeler Line Follower Robot DIY Kit

Code:

#define MOTOR_SPEED 60

int mot1=9;

int mot2=6;

int mot3=5;

int mot4=3;

int left=13;

int right=12;

int Left=0;

int Right=0;

void LEFT (void);

void RIGHT (void);

void STOP (void);

void setup() {

pinMode(mot1,OUTPUT);

pinMode(mot2,OUTPUT);

pinMode(mot3,OUTPUT);

pinMode(mot4,OUTPUT);

pinMode(left,INPUT);

pinMode(right,INPUT);

digitalWrite(left,HIGH);

digitalWrite(right,HIGH);

}

void loop() {

analogWrite(mot1,MOTOR_SPEED);

analogWrite(mot2,0);

analogWrite(mot3,MOTOR_SPEED);

analogWrite(mot4,0);

while(1) {

Left=digitalRead(left);

Right=digitalRead(right);

if((Left==0 && Right==1)==1)

LEFT();

else if((Right==0 && Left==1)==1)

RIGHT();

}

}

void LEFT (void) {

analogWrite(mot3,0);

analogWrite(mot4,30);

while(Left==0) {

Left=digitalRead(left);

Right=digitalRead(right);

if(Right==0) {

int lprev=Left;

int rprev=Right;

STOP();

while(((lprev==Left)&&(rprev==Right))==1) {

Left=digitalRead(left);

Right=digitalRead(right);

}

}

analogWrite(mot1,MOTOR_SPEED);

analogWrite(mot2,0);

}

analogWrite(mot3,MOTOR_SPEED);

analogWrite(mot4,0);

}

void RIGHT (void) {

analogWrite(mot1,0);

analogWrite(mot2,30);

while(Right==0) {

Left=digitalRead(left);

Right=digitalRead(right);

if(Left==0) {

int lprev=Left;

int rprev=Right;

STOP();

while(((lprev==Left)&&(rprev==Right))==1) {

Left=digitalRead(left);

Right=digitalRead(right);

}

}

analogWrite(mot3,MOTOR_SPEED);

analogWrite(mot4,0);

}

analogWrite(mot1,MOTOR_SPEED);

analogWrite(mot2,0);

}

void STOP (void) {

analogWrite(mot1,0);

analogWrite(mot2,0);

analogWrite(mot3,0);

analogWrite(mot4,0);

} 

TROUBLESHOOTING

Robot is moving too fast?

For this change value of motor speed in the code. Note that 1 is the minimum value and 255 is the maximum speed.

No power supply?

Try changing your batteries. Ensure that you must supply  12v to the L298 Motor Driver module. A Voltage rating less than this will not work.

Project not working?

Ensure that the circuit you have made is according to the circuit diagram. Check for loose connections. Cross-check for motor connections.

Motors are rotating in opposite direction?

For this, reverse the terminals of the motor connecting the Motor driver module.

IR sensitivity issue?

There is a potentiomenter on the IR sensor module. Adjust with the help of screwdriver as per your requirement.

Customer Reviews

0 reviews
0
0
0
0
0

There are no reviews yet.

Be the first to review “Arduino 4 Wheeler Line Follower Robot DIY Kit”

Your email address will not be published. Required fields are marked *

1 2 3 4 5
1 2 3 4 5
1 2 3 4 5