How to code your Line follower robot with PID control and working code!
Вставка
- Опубліковано 1 жов 2024
- Detailed video showing how you can code the Robojunkies LF-2 Line Follower Kit. This kit is based on the Arduino Nano and is intended to be a modular, easy to assemble line follower kit. The kit comes with sample code for you to easily test the robot yourself.
Buy the LF-2 kit here-
www.robojunkie...
Motor Test Code-
create.arduino...
Sensor Test Code-
create.arduino...
Full Line follower Code-
create.arduino...
Check out the assembly guide for the robot here- • How to make a fast lin...
Sparkfun website link- learn.sparkfun...
Follow our Instagram page- @robojunkies for more videos, projects and products. DM us on instagram in case youre keen on buying this kit.
Please check out our website- www.robojunkies.com for more products.
Aimoni Robotics is now Robojunkies! Sorry for the long break since the last video. We have come back stronger with more products and videos. Thank you for your support!
Music used- freesound.org/...
Find the latest code here-
www.robojunkies.com/pages/resources
I notice that there is a Serial.begin(9600); is that for Bluetooth connection?
@@frostking7829 it's for serial monitor display
Can you please guide me that how to make it more faster without running out please reply under 2 days
Please check out our website for the latest code under the resources tab
Great job Robojunkies team . This video series of LF2 bot is very detailed. Thanks a lot for your hardwork.
Thank you Surjit!
Can you deliver to Pakistan??
Hi did u find any alternative for tge carrier board?
please stop using music. The voice is not clear enough
Thanks for your feedback
Your teaching method is very nice.
Thank you very much!
Nice work! Do you have similar code in spike prime programming? Thanks!
We haven't worked with spike yet
One unfortunate thing I see about our Indian videos is the poor quality of communication.
It becomes very uncomfortale saying that since many initiatives shown by these service providers/companies is reasonably commendable.... and comments like mine could sound de-motivating ... but in reality its quite the opposite.
❤ thank you.
bro it is not mworking bro
Try another motor driver
Awesome, nice ❤ 😉👍 👏👏👏 subscribed and like 578 @arduinomaquinas thanks you !
Nice
Hello i am not able to order your kit from Nepal. So can you send me circuit diagram and components name of carrier board OR else any other alternative with carrier board
Did you find any alternative? Pls reply
Brother, please give me the lf-2 carrier board circuit diagram
Please provide a circuit diagram
as usualy my one didnt work . can you send me a link about how to make a real life robot pls
Can I use 8 sensor array instead of 5?
Yes you can use 8 sensor also, however code will change accordingly.
Sir can you please provide code for 8 ir sensor array
Hi,
Can you give the motors specs. ?
Thanks.
Motors are n20- 6V 600 rpm
I made my own IR sensor instead of buying the module. Mine has 4 sensor with 3 cm distance between them.
Total length of my sensor is ~14cm
Does you code with on my sensor?
You will have to change the code for a different sensor.
Can you provide us the circuit diagram of carrier board please....
Nice work! Do you have similar code in EV3-g programming? Thanks!
Can you please drop a mail on our email id- robojunkiesindia(at)gmail(dot)com
What's the Rpm for the dc motor
Does it always need to calibrate first before starting? Can it calibrate the line at first switching on, and use that calibration for the next switch on/off?
In that case you will have to modify code to save the calibration values in eeprom.
yup after the first calibration you can make the arduino print these values record them and just hardcode them into the code
but it's better to leave a few seconds for the calibration anyway, if you switch environment lighting conditions etc... could result in these sensors having different calibration values
hello robojunkies, do u guys have a code for 8 sensors? im planning to buy the kit and upgrade the sensors, thankyou!
Hi, we do have code for 8 sensors, and will soon launch the sensor on our website along with accompanying code.
What kind of method is this for finding Kp? Can you explain?
hey bro do u happen to know if i can use 1000rpm n20 geared motors for my racing bot using only ir sensors? struggling to pick between 300rpm 6V or 1000rpm 6V to avoid wasting money. not sure if using 1000rpm will put my robot out of track. i ma using l298N motor driver
1000 rpm is pretty good in terms of speed.
For n20 motors beyond this you will find that it's torque is poor.
For faster motors, you may have to try out other kind of motors
Will the old code still work
Yes old code will also work. Just need the library with the old code.
help it doesnt go forward
can you provide the model solidworks file please
Hello, can you do this with motor running backward? Thank you, i hope you can explain me how to do
I've tried this, however the robot quickly loses the line.
This is due to the position of the sensor.
The sensor needs to be located in the direction of motion.
If the sensor is on the opposite side of motion, the robot isn't able to fully follow the line. Because you are trying the predict the line rather than follow the line.
Or at least I haven't worked out how to work it well.
For small corrections it may work but not reliably
hey great video i would really appreciate it if you can share with us the specifications of material you used and also the code you used on arduino nano, thank you
are there programs like this that i can use if I use digital light sensors? please reply in 2~3 days because this is for a competition thanks
Mera bot 10m/s ki speed se chalta hai
What we have to do if we have to run the robo on white line on black surface?
Hey can u segggest some line following sensors as on ur site, they are out of stock.
Bro why did not you use digital array
You can use analog or digital, however the code will change accordingly.
I find that students find it easier to use analog sensors especially when using without any libraries.
Can you tell me if it is possible to make the PID control with Digital IR sensors instead of Analog ones???
Can you provide the code, the previous link isn't working
Can you check again. The link works on my end
Do you ship worldwide? In romania
don't do this
? Didn't get you
Pin 11 and 12,
are these push button with 10k resistor connected but 5v and groud along with 11 and 12?
We haven't used a pull up/ down resistor since we have configured the buttons as input pullup
My motors are not running, it just making sound, if i change 100 to 180 then it rotates
I'll need more info about what hardware you are using to understand better
I guess that, if we want to use this on a 3cm line we will need to change the Kp, Ki, and Kd values.
did you find an answer please?
Code works with a 3cm line. Check out our latest code on our website under the resources page.
I am wanna to buy these products of pid line follower where I can get product link
Please contact our instagram page- @robojunkies to buy the kit
Can you please provide circuit diagram
What to change in code for 3cm wide line
Keep it up
Thank you!
Do you have a video tutorial about the car on the left at minute 0:25 ? pls
Hi, it was a Lego based line follower, pretty old video so don't have much with me now.
Will try to find the code on my computer
What the line width ? 2cm?
what board is used sir? the green one
It's the lf2 carrier board- www.robojunkies.com/products/dual-motor-control-carrier-board
Which motor is used?
how to make it work for 3cm lines?
Try out the new code listed on our website. Will work with 3cm lines ( white and black)
Just specify the relevant line details at the start of the code
How fast is it going, mean any stats.
Will do a speed test and post soon.
Earlier tests showed an avg speed of around 1m/s
hello, where did you get the pcb?
Its a product we sell on our store- www.robojunkies.com
I am using l298 motor driver so what will be the changes in the code?
You will have to change the motor control functions. In the current program, it uses the tb66 library. Instead you will have to setup the wiring and functions as per the l298 motor driver
@@robojunkies ahh that seems like hard work😣
👏👏👏 good job 👏👏👏
Thanks Avinash!
At kp = 0.020
Ki = 0.001
Kd = 0.010
My robot works well with speed 40.But I am clueless after many tries how to make it tune for speed 140.Please help me sir
circuit diagram you have
@@HarshithDevadiga-pr2zc hey bro do u happen to know if i can use 1000rpm n20 geared motors for my racing bot using only ir sensors? struggling to pick between 300rpm 6V or 1000rpm 6V to avoid wasting money. not sure if using 1000rpm will put my robot out of track
@@LawerenceiRidgwayv 1000rpm will be very high bro. sensor and controller should br good enough to handle the response
Y not use 2 li ion cells with 1000rpm motor
18650 Li ion cells tend to get a bit heavy, so robot may tend to become sluggish.
1000 rpm is a great option. Sourcing it becomes challenging at times hence we provide 600 rpm in our kit.
You can check out our website for more details www.robojunkies.com
How can the robot use the proportional term in PID controller when it doesn't know how far away from the desired path is the robot? You can't calculate distance just based on two sensor that are detecting Light vs Dark Path
It's actually not calculating distance from the centre of the line.
The sensor array has 5 total sensors out of which two sensors are on either side of the line (equidistant), and assumes that the centre of the line is where both sensors see the same value (since they are analog out)
Error= left- right sensor value
This isn't exactly the centre always but for practical purposes it works very well as you can see int the video.
how to change code for 8 sensors?
Please refer to our website for code with 8 channel sensors
Is it also available on Raspberry Pi?
This is only for Arduino nano as of now
Bro can you make a full video on how to make this robo
Hi, Please check the earlier video about the building guide on our channel
@@robojunkies bro can you make video about how to set pid value
yes i want fastest line follower form your side
You can contact us on Instagram for sale inquiries
i can not see full code ..help me please
create.arduino.cc/editor/robojunkies/8f43a49f-aab5-494d-8dcf-c9f00e55a3c1/preview
What it the cost of this . I want it to buy 🙃
Please contact us on instagram- @robojunkies to buy this kit
It is available for purchase
Hi, it's available for purchase on our website- www.robojunkies.com
@@robojunkies it is urgent for me
hey i need ur help
What help do you need?
Yes the code isn't working
Hi, try out the new code listend on our website
It’s very informative ❤️😍
Thanks Jithosh!
Price
Please contact our instagram page- @robojunkies to buy the kit
Is it possible to use l293d instead of this TB motor drive.... Any difference
In terms of the hardware compatibility, you can use an l293d instead, although its max output is slightly lower and is in general lower performance for this application.
In terms of code, you will have to modify the code to work for the other motor driver and make associated functions for robot movement.
In short, the code won't work directly, but will work with appropriate modifications
the code dose not work
Latest code available here- www.robojunkies.com/pages/resources
Can you send me schematic or pcb file for sensor sir
IIT Techfest generally happens in december every year.
Carrier board full na enna bro@robojunkies
Hi Ranjith! Carrier Board now available on our store- www.robojunkies.com