Making a simple Arduino Line Follower Robot
ฝัง
- เผยแพร่เมื่อ 24 ก.ค. 2024
- 🤖 This video showcases a complete tutorial on making a basic Arduino Line Follower robot. This design is based on a PID control system connected to 8 IR sensors. I hope you like it and I will be glad to try to answer any questions you have.
🌐 Link to my Hackster page (where you can find the codes, schematics and others): www.hackster.io/anova9347/lin...
🌐 In the near future, I will try to update the codes (+ more explanations) and the Android app, so stay tuned!
🎬 Video details:
00:00 Intro
01:56 CAD Model
04:23 Hardware
05:33 PCB Design
06:27 Functionality
08:45 PID control
13:12 PID gains & tunning
17:45 Improvements
🎖️ I now have a Patreon page! If you want to show your support, feel free to drop by: www.patreon.com/user?u=52260334 - วิทยาศาสตร์และเทคโนโลยี
Very bice video!! It helped me a lot!
i also thought it was very bice
@@adda7959 😂
Good job. Thanks for sharing!
well explained thank you
Very informative 👏
Hi guys, quick update: as I got summer break, I will pause my current project (check out my dev video about making a robotic vacuum cleaner if you haven't: th-cam.com/video/vU85X9C_cHI/w-d-xo.html).
That means I will start reworking the codes of the line follower, including adding more comments and descriptions. I will also include new codes with new features (for example automatic calibration). So stay tuned!!!! 😀
where you go?
Thank you for such information..
Thanks for sharing.
A BIG THANKS
Hello nice video and well explained 👍 thanks for the code in thé description
Thank you! In my projects, I often change my codes, so instead of explaining them, I offer in the description of this video a link to a written tutorial that contains the latest version of the code (with some explaining as well).
Oh yes i didnt see it my bad thank you for your answer 😉
than dude ı will use this information
hi, can i change hc-05 to hc-06 (4 pins) and have the same code? also can i still use the app for my hc-06 module? thank you
Nice
hi can i use other brand 8 channel ir sensor?
Hc 05 blutooth module used for what ?
hello,
can you share the sketchfab 3d model it is not opening since it shows like this
You can’t access this page because this Sketchfab 3D model has been deleted.
thank you
ı wont to ask
if ı make it even shorter is it be good or bad
after while about 30s in the app when i want to change the constants it show me this message :h-05 bluetooth error 516 unable to write broken pipe can u help how to fix it
Does it follow white line also
Bro, DRV8833 2 channel dc motor driver is used in this follower, due to cheapest
How do you pair the ble module with the phone? Every time I try to pair, it says pairing rejected. Any ideas?
In my case, to get the Bluetooth module working, I first paired the phone with the module from the Bluetooth panel in Settings. It usually requires a pairing key ('0000' or '1234' should work). When the pairing is done, you can select the module device directly from the Android application for the control of the line follower. Otherwise, make sure the module is connected properly to the microcontroller and the code is correctly uploaded.
First of all thanks for the video. Do you have by any change Matlab / Simulink models ?
Unfortunately, no. However, I try to share every resource I have used in the link in the description on my Hackster page.
DRV8835 Dual Motor Driver Carrier and 5V Step-Up/Step-Down Voltage Regulator S7V7F5 is not available in my country. What can i use then? For example can i use DRV8825 Stepper Motor Driver Module or l298 hbridge dual moto driver and for the voltage regulator can use any other buckboost converter?
You can use any other motor driver and voltage regulator as long as they are compatible. You need to make sure that the battery's voltage is between the input interval of the voltage regulator (and of course the output is 5V).
The same goes for the motor driver - the voltage input and output are compatible (also, you should take into account the current's output - if it is sufficient for the motors - the DRV8835 has an output of 1.2 A). Depending on what you alter, the wiring and the code will change too.
But yeah, the L298n motor driver can be used as a replacement. From what I've heard and tested, it has some voltage loss at the output.
im trying to use L298N Motor Driver, but what's "mode" from DRV8835 Dual Motor Driver Carrier
If you would take a look on the driver schematic (www.pololu.com/product/2135), the MODE pin determines the control interface.
You can connect mode pin in 8th pin of Arduino,in front i use DRV8833, eep pin is connected to that 8th pin,as your description code is suitable for that pcb board
so , we can use 8833 too??
Do we have to change the codes for DRV8833??
So can replace DRV8835 to DVR8833 the entire code is working fine?
where is the app download link
What is eep and ult pins in DRV8833 driver, explain its function
I suggest you take a look at its documentation because it is not a component used in this project, and neither are the EEP and ULT pins.
Of course, any other replacement of the hardware used in this project might not be compatible with the codes and PCB, so you will have to improvise and adapt them to your needs.
In these the digital I/O is use or Analog i/o ??
Both.
Would it be possible to use a drv8833, or any other motor driver, in place of the drv8835? Also does the code work only for the Arduino pro, or it could work for other arduinos too(the nano or the uno for example)?
It is possible to use any other hardware existing, as long as you have the same outcome. In the case of the motor drivers, you will need to keep track of the supply voltage, wiring, code to control the motors etc.
But strictly regarding this project, the PCB used doesn't support any modifications in hardware, so you will need to either use a breadboard or customise your PCB.
As for the code, it should work on all Arduino boards. But keep in mind that you have enough PWM, I/O and analogue pins required by the other components.
@@botreboot6352 Thanks.
Bro you can make line follower
One last question, which code is uploaded in Arduino pro mini QTR-8RC or pid control,are both
Android app I got is different it doesn't have motor speed a and motor speedb
Please can you tell me which code is use only for fastest line following as you put in your description like PID example, QTR-8Rc or advance pid+ Bluetooth from these which code is best for only line following fast
And
8833 DRV can be use instead of 8835 but In 8833 DRV eep and ULT pin is there where it connected please reply
"PID control example" is the sample example of the raw implementation of the PID control system.
"QTR-8RC Example" is the sample example of how the sensor array can be set up and used in the Arduino IDE.
The "Advanced PID control + Bluetooth communication" is the PID control system with some modifications for better control at taking curves. In addition, it offers Bluetooth support to easily tune the robot. Therefore, there is no code that makes the robot "faster". If you want the robot to go faster, increase the variables of the maximum speed and/or base speed.
If you would take a look on www.pololu.com/product/2130, you can see how each pin can be wired. And more precisely than that, eep and ult pins, which probably are the "nSLEEP" and "nFAULT" pins, can be left out, as they are not required for the minimal functionality of the motor driver.
@@botreboot6352 thank you for reply !!!
one more Question is that then we use DRV 8833 instead of 8835 without making changes in code of yours because in 8833 no mode pin is there
Please reply
In code kp ki KD value is changed in your code or keep constant in it
chill bro he will answer
The PID control system is based on finding the perfect values for the control terms / constants. By trial and error, you can find those values. I recommend researching more on the internet about the PID control system so you understand how it works. I also provide a brief explanation in the tutorial in the description of the video.
@@botreboot6352 thank you bro for helping 😊
Bro, why are use Arduino pro mini? In front i use Arduino nano its works or not
There is not much of a difference between these two Arduino boards. I went with the Arduino Pro Mini because of the smaller size. As I've stated in these comments, there is an infinite range of other hardware components that can be used instead.
Hey man please help, the app in the link is different, it dosent have base speed option
The version with the control of the speeds was never pushed to the resources because it was usually breaking the whole application if you would send a lot of data to the Arduino. However, you can manually set in the code your desired min, base max speeds.
Right now, I am working on a new interface and application for the line follower robot, so stay tuned because it will be released soon! :)
@@botreboot6352 thankyou
proteus design ?
What is the dimensions of PCB and dimensions of the lf robot
You can find the files of the PCB and STL objects in the link in the description (on my Hackster account). Moreover, there is a picture of the robot there, which contains all the dimensions of the components.
In advance pid Bluetooth code the KP Ki KD value are auto generated while calibrating?????
The calibration is for the sensors of the QTR-8RC. It has nothing to do with the PID control terms.
Can you share your value of kp ki KD u use in these
@@sanketmendke9793 please look up in the link in the description (of the written documentation). You will find there the specified values I have used, plus more information that would answer most of your questions.
@@botreboot6352 thank you very much 😊
Plase, why did you use those four resistors?
You can find the circuit schematic in the link in the description. Each button requires a pull-down resistor, and the Bluetooth HC-05 module requires 2 resistors (which make a voltage divider in order not to burn the module).
@@botreboot6352 nice! Thanks for answering, pretty cool car!
Which rpm gear motor is used
10:1 Micro Metal Gearmotor HPCB 6V from Pololu (www.pololu.com/product/3061), which has an no-load performance of 3300 RPM.
can you please tell the andoird ap name ?? or the link to it ... it will help me alot in my future projects
You can find the whole software, including the Android app in the link in the description. There you can download on your phone the .apk file.
@@botreboot6352 found it.. Thank you soooo... I will also post my codes and reserch to help and guide people... Once again thank you 🎊🎉
In advance pid Bluetooth code you not declared the button which is for calibration And start to run so it will drop out the button connection 🙄
Instead of using qtrtype rc can we use Analog it is beneficial to us
Will this work with black surface and white line
Yes, the library used here also has support for the white line black base configuration. However, the code needs to be changed, more exactly from "qtr.readLineBlack(sensorValues)" to "qtr.readLineWhite(sensorValues)".
@@botreboot6352 thank you so much sir
What app did u use for CAD model ?
I've used Fusion 360 from Autodesk.
Thanksss!🐱@@botreboot6352
I have made this, is there any way to make it take acute angles?
That's a really good question. I never got the chance to test it. However, I am remaking the line follower robot, both the design and the software, so when I test it, I will make sure to also include that.
@@botreboot6352 will you upload the video after its done, if yes then when will it would be?
Yes, of course I will upload the video. If everything goes smooth and without any bugs and issues, one month would be a realistic estimate.
@@botreboot6352 thanks bro, I was working on this I have an idea to make it take an acute angles, I'm a mechanical engg student so don't know much about programing, if you share your e mail then I will share my idea
My email is on my about page of my youtube page. If you cannot find it, then here you go: anova9347@gmail.com
Is this robot can solve a line following maze? If not, how can we make this?
From what I've heard, it really depends on the type of maze you are talking about. It can be with or without line, and in the contrary case, you have walls. If you only have lines and no walls, it is possible to work, but you need an algorithm to solve that maze optimally. There is already the movement of the car implemented. Now, the next step is to actually give it a brain.
In these robot you use DRv 8835 in that Mode pin is connected to 8 but I am using 8833 there is no mode in that so what I do or no need to connect mode in 8833? please reply
If you look at the motor drivers' documentation (letmegooglethat.com/?q=drv8835+pololu), you would observe that the mode pin aims to switch between two modes of operation of the motor driver. The DRV8833 doesn't have the mode functionality, so of course, you don't need to "connect mode".
Please but the vedio about code and uploading code
Less than 500 subscribers channel taught me that no one did
Why code shows error 😭 though I downloaded all libraries
Can you tell me which of the codes throws errors and what it says?
@@botreboot6352 thank you for reply and your help. I can fix the error.
Bro what is the password of the zip files please reply me
Hi.. the project is good. Can you show how to to do automatic calibration?
Also incase of end of line can we make it turn around?
Hi! Yes! I plan releasing soon a video where I redesign the whole app to control and tune the line follower robot. This will also include automatic calibration.
@@botreboot6352 I'm waitinggg !!!