Line Follower Robot using Arduino UNO, IR sensor and L298 motor driver
HTML-код
- Опубликовано: 4 окт 2024
- Line Follower Robot using Arduino UNO, IR sensor and L298 motor driver
Hi viewers !
I have made an black Line Follower Robot using Arduino UNO, IR Sensor, L298 motor driver..
Code and Schematics:- projectiot123....
Components Details () {
Arduino UNO,
ROBOT 3 WHEELS VEHICLE CHASSIS,
IR Sensor x 3,
male to female jumper wires,
female DC pin,
4007 Diode,
1k resistor ,
LED,
L298 Motor Driver,
Switch On/Off,
Battery 8.2v
}
Muhammad Ansar
03378655465
Website - bit.ly/2zrVHpW
RUclips - bit.ly/2r8xhx1
Facebook - bit.ly/2P6ZQVd
Twitter - bit.ly/2DOobNm - Наука
Sir you teach well but I request you also speak while you are working. Tell the names of parts you are using and also tell their function and why you are using that particular part. It will help to those who are new to this field. It is very difficult to learn just by watching. So also explain during manufacturing process.
Thanks.
Ok I try
Sir I made one. But my sensors work opposite. It runs in black and stop in white. How I solve this problem?
Bro very easy Change the code Where the sensors are getting Zero Red There is one to do
the most likely thing is that it is simple but easy to the new comers :)
excuse me, I am using tcrt5000 for line following robot and there are two output as d0 and a0. Which one should I use? Digital or analog?
analog
the project was explained very well and thanks for explanation...
Welcome
Bro nice project..
Of we want to pull 40-50kg load...
Like this ..what. volt motor to be used..
And motor driver..
sir, I love your videos about Arduino Projects.
Sir, I made a line follower using two motors (200 rpm) but both are rotating at different speed. So the bot is not even following straight line correctly. Can you please tell me why this is happening & what to do?
Change the duty cycle Slow motor
analogWrite(S_A, 150); // for 1 motor
0 to 255
analogWrite(S_B, 150); // for 2 motor
0 to 255
Thanks a lot bro..
It beacame very useful to me for connections and idea about code.
Nice video.
Welcome
sir i made it using your video..but the ir sensors are not working..and motor is not rotating..pls help
How many volt use the battery
i used 3 nos. of 3.7V 2000mAH Li Ion battery
Jacob Thomas check out this one
ruclips.net/video/KPQ4tf-1QwI/видео.html
I do have problem with motor driver , when i am setting up speed for both motor like for example 100 then both motors are working on different speed why??? Can you explain me
@Cool Stuff i have changed motors and also changed motor driver l298n 3 times then also both motors are not working on same speed , due to this my robot keeps on rotating on its own axis , i really want to found solution to this problem somebody can help me please???
@Cool Stuff use battery of 12 v of around 10ah capacity then tell me you got it correct or not because i have got my self correct anyhow by this way do reply me!!
@@jaykadu8745 same problem here bro
@@sakibisrak4094 we have to use dc motor with encoder as a solution to our problem, i have done it and i got successfull
Same problem
Do I need a 36v battery to make the wheels work? .. I already try 18v but still not working ?
not use the 12v to over battery
use the 7v to 12v battery
Sir I am from Bangladesh. Where i can find those infrared sensor? Can u give me some details ?
Is there no online store for electronics
I accually made a line follower but from technical problems it did not work but then only i saw i did not connect ir sensor😂😬
Bro my motor driver is not working. Can u please tell me where is the problem.
Sir, I used two 9v batteries but they are not even lasting for 20 minutes.What battery should I use? Please specify the type and volt.
Which is better, geared or normal dc motor
Use the 9 volt rechargeable battery
@@MuhammadAnsar ok
Areey bhai mast video hai apke vedio ke bajese mai robotex me jeeta
Bro u deserve more appreciation. Best of luck to you
thank you
Sir, I have an interest in robotics. Sir, can you tell me how you become an electronics engineer, tell me how you get into robotics, I want to become an electronics engineer like you, what courses do you get to become an electronics engineer?
Study hard and get into IIT and get engineering in electronics, then learn mechatronics it's combination of electronics and mechanical engineering.
Software is also a very big part of robotics so if u want to code for robots then u have to go into software engineering.
Sir, I love the project. Sir, can I add black visual theme to the Arduino IDE software? Sir, can this black visual theme work in Arduino IDE software in my laptop core i 7 window 10?
Why is the positive terminal of motor i.e A1 and B2 always low????
Best line follower ki video hai
thank you
Sir I have connected total 8 no of it sensor. The output terminal I have shorted and connected to single input terminal. But without sensing sensor, the output terminal goes high. Why...
Go to the code and lower the number
Bro I have a problem the line following robot is responding to every object instead of black only i tried to change the potentiometer reading by rotating the cube but nothing happens
plzz broo help mee
I think the sensor needs calibrating or choose a sensor that comes with lights(just put those lights nearby a sensor), but with the "adjustable" module may be good. following this video.
ruclips.net/video/F1-pWC4HmHg/видео.html
Please make a video on sensor following robot means If i have any band and in that band a sensor
then our robot should follow us
and always should some distance between robot and human means sensor
please sir
ok bro
in my robot,when led is off,motor is moving .but when led is on motor is not moving what can i do now?
Change the code input read 0/1
nice work
do you have any project ideas for final year engineering students.
Nice project Bro, Thank you.
Glad you like it
Nice project, appreciate your work!
thank you
I just listed: SG Line Following Robot ||science project||, for ₹1,499.00 via @amazon www.amazon.in/gp/product/B082WM78RV/ref=cx_skuctr_share?smid=A30BENWXZLHSML
Can I use l293d motor shield in stead of l293n?
Sir, iam confused with the infrared sensor in google it is used for obstacle detection used?
No. For obstacles detection there is a sensor called obstacle sensor. But IR sensors are different. They detect only the reflected light.
Im stuck where the IR sensor is not able to differentiate between the white and black color. The values provided by the sensor is always in the same range or same when in black and white paths. How can i differentiate between them? And i am using the same ir sensor as yours
Bro my infrared sensor is not working
very good... but if you were taking English. i would understand you . please talk english language or make subtitle at least
ok
Aslam u alikum sir great work and thanks for your video that i have made my first robotic car ......I have just a one problem in this method when the sensor begins to move or right it moves so fast that my robotic car goes out of the line and un control able .....just this problem makes my project incomplete.....plzzz help me i will be very greatfull.
😑😑🤐🙄🙄🙄
wa alaikum assalam
decrease this value for the speed slow
analogWrite(S_A, 150);
analogWrite(S_B, 150);
Hi Muhammad Ansar , Nice video but i have one question as you have reading the IR sensor value on analog pin i.e A0,A1,A2 but you reading its value from digitalRead line no 31,33,34 .. it is used to read digital value but your sensor is analog it should be analogRead instead of that ?
MashALLAH , Love to see your work sirr,
thank you
*If the track is laid under sunlight then will it work properly or not??*
no
Hi bro. I do not have a battery 8.2 v. If you change the battery what changes in the code
changing battery up to 6 volts 9 volts will not make any changes to the code
@@MuhammadAnsar thanks
@@boutebinahichem8885 welcome
when output is high then the motors are not working but when output is low then it works.... please help asap
when i lift the robot in the air and led on the sensor is off then motors rotate but when keep the robot on th e line and both led are on then it does not work
please tell what should i do?
Can i change the 8.2 battery for 7.4v
yes
I got a question about the connection which one is vcc and vs? Is that 5v and 12v and also where is ground from the l298 n connected to?
Sir if the problem statement is such that when the bot approaches three black in 3 sensor then a LED or a Buzzer will be on then how to code it sir ?!
Sir we can use 2 ir sensor to start and stop a bot right ( one ir sensor at front will detect the end and the other at the back of bot which will detect the starting point ) ??
sir i made line following robot but problem in sensor
,please help me some direction
yes bro
Interesting work sir, but what if obstacle arises through the line? please reply.
Simple Line Follower Robot and Line Follower And Obstacle Avoiding Robot link ruclips.net/video/djwPGcN7CBw/видео.html&lc=z23esfmbnymmzzucuacdp43bz3gnxohbc4bp3kxhujlw03c010c
How much distance you kept between IR sensors??
1inch
Hi muhammad. did you explain to me why you add a resistor and LED and diode to chage battery? Thanks.
It is used for charging Indication
Ah i see. thanks a lot.
I'm from morocco i'm a teacher. I will make a robot like your's with my students... 🌷
@@boumlim Welcome
Which software you have used to upload the program in the Arduino
Arduino IDE
Bro i am done same to same but my LFR don't follow the line what is my mistake
How many vote battery you are using
@@MuhammadAnsar as same as you use 4.1 v 2A.but can't find my mistake.help me
@@MuhammadAnsar the day after tommorow my project show day help me to do it better
Sir, can I use 1 sensor for the project? We've got the car as a project for university and they provide us only one sensor. Thank you in advance
bro 1 sensor based Line Follower Robot is not Possible
but 2 sensor based is Possible video link ruclips.net/video/djwPGcN7CBw/видео.html
@@MuhammadAnsar I don't know. They give us XD-01 TCRT5000 model, is it the same?
The thing is, I'm from Russia xD We may have different line sensors depending on contries.
@@bambi4199 u require minimum two, for right turn and left respectively
sir i have two sensor what should change in the code??? im in hurry please respond quickly
thanks........
Watch this video on my channel Line Follower And Obstacle Avoiding Robot using Arduino, IR Sensor and Ultrasonic Sensor
Sir .... im the same guy.... can i change the arduino nano to arduino uno? What the code will be?
Please respond quickly.... thanks...
@@ianisaac5915 same code apply arduino uno and arduino nano
@@ianisaac5915 welcome
Can I get the code 4 for sensor and with dificult track Please
Good day sir!. Are you using PWM to control the motors speed? Coz the robot has a perfect turn for traveling the line curvature.
If i want to use 4 sensors what should i do, can i get the code?
Vvv Thanks Extremely Logic👌👌👌
welcome
sir im having a problem im doing this proiect. my sensor doesnt read the line it reads the floor 3 sensor been green light when i put the my follower robot on floor what should i do
There are two codes sir as i visit the link of your codes and schematic. What should i upload the first code or the second code?
Thank you sir
create.arduino.cc/projecthub/embeddedlab786/line-follower-robot-d22d06?ref=user&ref_id=598105&offset=5
Check this link and download the code
Welcome
sorry, I'm seriously interested in your project. I've already done the hardward part. For the software part, I'd like to use your program. Unfortunately I can't "retrieve" it from your link. Could you send it to me or put it in the description?
yes bro send email
Muhammad Ansar bergo30175@gmail.com
sir i have completed the model but the tyres are not moving can yu plzz tell why. Also i have cross checked the connections.
Calibrate the IR sensor Through variable resistance
Hello Sir?? Iam hoping you will notice this sir. If ever 4 wheel car with obstacle and line following can you help me please??
send email
@@MuhammadAnsar jolz11dahan@gmail.com
@@MuhammadAnsar
can you please send that to me too. Thank you.
quanghuybmth@gmail.com
Sir, the wheels are not moving. What should I do?
Sir, can I use two ir sensors instead of using three ir sensors to the line follower robot? Can the line follower robot work if I connect two ir sensors to the line follower robot?
yes bro u can use 2 ,one for rigth side and one for left side ,
how about with 4 ir Sir, can i get the code?
please.
What charging circuit you used to charge the battries?
9Volt 2Ampere
Can i use 7.4 volt 2200 mah lipo battery??
yes bro
is that a acrylic sheet used for line following
Can we control it by using Android
yes
hello I can also use the TCRT5000 Reflective Optical Sensor Module
yes
it is necessary that you have to change something in the programming or the charge to the Arduino so to use it with the module mentioning
السلام عليكم
I have created a track-tracking robot for this video, and I have added other sensors to it, but if the sensor in the middle senses the wheels stop and not move, the sensor on the right works with the right wheel and the sensor on the left works with the left wheel.
I did not know the problem
Please help me
Change the sensor pin A0, A1, A2
A2, A1, A0
@@MuhammadAnsar
Yes, I did it before, but the problem remains with the sensor in the middle. If the track senses, the two wheels do not spin and both stop.
@@MuhammadAnsar
Please help me
You can make this project without using MCU, does anyone know that?
yes bro chack this link ruclips.net/video/rmh2AVF8vCs/видео.html
i have the same sensors , but they don't return 0 or 1 , they return big values like 500 , 400
just use input digital mode
@@MuhammadAnsar now it works thank you so much
@@oukzizyasmine5800 welcome
Why my robot is moving in circular motion?
Thanks you brother forever ❤❤
Always welcome
Did you directly connected the Battery to the Arduino board?
yes bro
battery Arduino
+ = Vin
- = Gnd
@@MuhammadAnsar yes it's weird
Sir I am trying to make line follower and obstacle avoiding robot like you have made but I not getting the all material same
Robocup?
me to but in myu case i had the same so the prob is i suck at making arduino programs
How do you measure the distance between wheels and the IR sensors
3 cm
Not between the sensor and the floor . I ment between the back of the robot and the sensors
does this work using pid
may kya battery badle direct current plug use kar saktahu??
Thank you Sir for this video. It helped me a lot in making the project. But I would like to bring out a mistak that you had done in your video.
That is, in circuit diagram EnableA is connected with 11 and EnableB is connected with 10 while in the code EnableA is connected with 10 and EnableB is connected with 9.
So please make it correct otherwise it may create problem for others.
Once again thanx a lot......
ok bro
Is correction ke baad right aur left turn ho rha hai but forward nahi chal raha
all are wrong. you confused the viewers. you used analog pins for the sensors. then you initialized it using digital codes as seen on your VOID LOOP.
Analog port can be digital read
plz im trying to make a line follower with PID coorctor and dinamixels AX 8 dynamixel but it's a rusbbery projet
Sir, I have done as ur schemetic but my left sude motor works but right side dont.... any sollution for this.. thank u
welcome
adjust the right side sensor to the variable resistor
I am don't using diode in battery charging and infrared sensor attached to the arduino UNO, is there any problem
no problem
@@MuhammadAnsar need code and ckt for 3 ir sensors with ultrasonic sensor
sir please please all equpment list with specification. please sir 6 day leter my project submission.
Hello,why you did'nt made center sonser longer as the others
what?
Where do you learn how to code with a specific sensor?
read the sensor datasheet
Me abhi diploma in 5th sem me hun aap plz batlaiye konsa project sahi rehega finel sem ke liye I am also in electronics branch
Where you have used the diode
yes 4007 diode
@@MuhammadAnsarbut where
@@sanjaymourya2728 use for the battery Charger
@@MuhammadAnsar have used it for the vin, gnd, gnd and 5v in Arduino UNO
Please suggest coding for 2senser 4motor line follower
Check this video:- ruclips.net/video/ItvJbyYNP8s/видео.html
Can we use non rechargeable batteries ...if yes...which would be best(volatge and current rating)...also pls send the 2 ir sensor circuit and code...thank you
yes 7v to 9v battery use kr skty hy
@@MuhammadAnsar also sir...we have used 150rpm motors and tried to give almost 9v of supply...we are not getting more speed...what to do...any changes in the program or more powerful batteries required
@@rakeshshridhar_ battery 12v pwm full kr dy 255
@@rakeshshridhar_ Change the pwm
analogWrite(S_A, 255);
analogWrite(S_B, 255);
@@MuhammadAnsar thank you sir... it worked...also.... it is taking little time to move after the switch is on...should o decrease the delay time so that the bot moves immediately after the switch is on
Can I use 9V Battery ?
yes
Mene 9v battery use kare but motor nahi chal rahi aur jab computer se connect kiya to chalne laga is liye kal mai 4v ke battery lene jaunga
bahot badhiya bhai... keep posting :D
thank you
In Shaa Allah zaror
Where is the VCC in motor driver
sir an i use 300 rpm 12 v motor in same coding
I am big fan
Bhi ma bhe app ke trha exaparemant krta
. 03421335013 . ya mara nmbar hay bhe jan
. moja halp chaeya
thank u
ok
Facing this while uploading (Sketch uses 1582 bytes (4%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes).
kindly suggest.
This is not a problem. This message comes everytime you upload the code.
Sir, how to contact you? I need to do project same as you but need to add ultrasonic sensor to stop the robot
Bhai ye jo ap na battery lagai ha ye dusri wali battery sa change ho sakti ha ? Circuit ma kia changes ae ge?
haaan g bro use kr skty hy likn battery ktny voltage ki hy
@@MuhammadAnsar Bhai us ma 6 AA k cells hain
@@Hamzakhan1o haaan g use kr skty hy
please anybody tell me , what rpm speed motor & ir sensor model can use? please sir please . its very emergency for me
ROBOT 3 WHEELS VEHICLE CHASSIS
motor 500 rpm 9v