How to code your Line follower robot with PID control and working code!

Поділитися
Вставка
  • Опубліковано 15 січ 2025

КОМЕНТАРІ • 145

  • @robojunkies
    @robojunkies  Рік тому +5

    Find the latest code here-
    www.robojunkies.com/pages/resources

    • @frostking7829
      @frostking7829 Рік тому

      I notice that there is a Serial.begin(9600); is that for Bluetooth connection?

    • @moncefamor8613
      @moncefamor8613 9 місяців тому

      @@frostking7829 it's for serial monitor display

    • @SujeethMm
      @SujeethMm 2 місяці тому

      ​@@frostking7829 sensor reading in serial monitor

  • @surjitsinghdeo6533
    @surjitsinghdeo6533 2 роки тому +10

    Great job Robojunkies team . This video series of LF2 bot is very detailed. Thanks a lot for your hardwork.

  • @pokpikchan
    @pokpikchan 2 роки тому +6

    Your teaching method is very nice.

  • @kaushikyadav-h8e
    @kaushikyadav-h8e 3 місяці тому

    good explanation, you should also explain how to get the position of the line, how to calibrate sensors and how motor functions work.

  • @asma-tp6vs
    @asma-tp6vs 9 годин тому

    how to add an led indicating end of track

  • @AaradhyMine
    @AaradhyMine Рік тому +2

    Can you please guide me that how to make it more faster without running out please reply under 2 days

    • @robojunkies
      @robojunkies  Рік тому +1

      Please check out our website for the latest code under the resources tab

    • @20maksudursium00
      @20maksudursium00 3 місяці тому

      @@robojunkies can you give the link?

  • @jhakeyvancudal3467
    @jhakeyvancudal3467 25 днів тому

    Can i change the motor to make it run faster? and does it work when there are intersections in the track?

  • @Gamer-iy4ti
    @Gamer-iy4ti 2 дні тому

    The product is sold out,now how we bye it?

  • @shaykherenalsayad2541
    @shaykherenalsayad2541 11 місяців тому

    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

  • @krupo900
    @krupo900 5 місяців тому +1

    Nice work! Do you have similar code in spike prime programming? Thanks!

    • @111.ashwin
      @111.ashwin 4 місяці тому

      We haven't worked with spike yet

  • @THEbonny95
    @THEbonny95 Рік тому

    What kind of method is this for finding Kp? Can you explain?

  • @rock1223
    @rock1223 2 роки тому +1

    👏👏👏 good job 👏👏👏

  • @aceofspades7499
    @aceofspades7499 2 місяці тому

    How many volts of batteries???

  • @nhatpham5797
    @nhatpham5797 10 місяців тому

    Hello, can you do this with motor running backward? Thank you, i hope you can explain me how to do

    • @robojunkies
      @robojunkies  10 місяців тому +1

      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

  • @chabibanii
    @chabibanii Рік тому +1

    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?

    • @robojunkies
      @robojunkies  Рік тому

      In that case you will have to modify code to save the calibration values in eeprom.

    • @mahmoudsalah7628
      @mahmoudsalah7628 Рік тому

      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

  • @vikasjha2029
    @vikasjha2029 Рік тому

    What we have to do if we have to run the robo on white line on black surface?

  • @ReTr0MaKeR
    @ReTr0MaKeR 2 роки тому +2

    Can I use 8 sensor array instead of 5?

    • @robojunkies
      @robojunkies  Рік тому

      Yes you can use 8 sensor also, however code will change accordingly.

  • @kundanprasad2221
    @kundanprasad2221 11 місяців тому

    Can you provide us the circuit diagram of carrier board please....

  • @elijahresaba7662
    @elijahresaba7662 11 місяців тому

    hello robojunkies, do u guys have a code for 8 sensors? im planning to buy the kit and upgrade the sensors, thankyou!

    • @robojunkies
      @robojunkies  10 місяців тому

      Hi, we do have code for 8 sensors, and will soon launch the sensor on our website along with accompanying code.

  • @Stable_Robotics
    @Stable_Robotics 8 місяців тому

    Nice work! Do you have similar code in EV3-g programming? Thanks!

    • @robojunkies
      @robojunkies  8 місяців тому

      Can you please drop a mail on our email id- robojunkiesindia(at)gmail(dot)com

  • @curlyhole8861
    @curlyhole8861 Рік тому

    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

  • @advitkathuria7006
    @advitkathuria7006 Рік тому

    Hey can u segggest some line following sensors as on ur site, they are out of stock.

  • @3grhappy
    @3grhappy 10 місяців тому

    what board is used sir? the green one

    • @robojunkies
      @robojunkies  10 місяців тому

      It's the lf2 carrier board- www.robojunkies.com/products/dual-motor-control-carrier-board

  • @jithoshbabu3985
    @jithoshbabu3985 2 роки тому +2

    It’s very informative ❤️😍

  • @jumbo999614
    @jumbo999614 5 місяців тому

    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?

    • @111.ashwin
      @111.ashwin 4 місяці тому

      You will have to change the code for a different sensor.

  • @AIstream171
    @AIstream171 7 місяців тому +1

    Can you deliver to Pakistan??

    • @Stitchds
      @Stitchds 6 місяців тому

      Hi did u find any alternative for tge carrier board?

  • @RAJANYASARKAR-fy2sh
    @RAJANYASARKAR-fy2sh Рік тому

    Which motor is used?

  • @amanshah2640
    @amanshah2640 Рік тому +1

    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

    • @Stitchds
      @Stitchds 6 місяців тому

      Did you find any alternative? Pls reply

  • @SaveenAnanda
    @SaveenAnanda 7 місяців тому

    as usualy my one didnt work . can you send me a link about how to make a real life robot pls

  • @dakshwadekar
    @dakshwadekar 10 місяців тому

    How fast is it going, mean any stats.

    • @robojunkies
      @robojunkies  10 місяців тому

      Will do a speed test and post soon.
      Earlier tests showed an avg speed of around 1m/s

  • @gojosatoru7836
    @gojosatoru7836 7 місяців тому

    What's the Rpm for the dc motor

  • @catalin_2746
    @catalin_2746 Рік тому

    Do you ship worldwide? In romania

  • @nextsodanextsoda6010
    @nextsodanextsoda6010 5 місяців тому

    Will the old code still work

    • @111.ashwin
      @111.ashwin 4 місяці тому

      Yes old code will also work. Just need the library with the old code.

  • @_aman_raj_005
    @_aman_raj_005 9 місяців тому

    Sir can you please provide code for 8 ir sensor array

  • @chamudithaedirisingha237
    @chamudithaedirisingha237 5 місяців тому

    Brother, please give me the lf-2 carrier board circuit diagram

  • @waqasch5955
    @waqasch5955 2 роки тому +1

    Hi,
    Can you give the motors specs. ?
    Thanks.

  • @bookofrichest7817
    @bookofrichest7817 Рік тому +1

    Please provide a circuit diagram

  • @Francesco105590
    @Francesco105590 2 роки тому

    hello, where did you get the pcb?

    • @robojunkies
      @robojunkies  Рік тому

      Its a product we sell on our store- www.robojunkies.com

  • @ichikaorimuza9240
    @ichikaorimuza9240 Рік тому

    Do you have a video tutorial about the car on the left at minute 0:25 ? pls

    • @robojunkies
      @robojunkies  10 місяців тому

      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

  • @KillChor1.
    @KillChor1. Рік тому

    I am using l298 motor driver so what will be the changes in the code?

    • @robojunkies
      @robojunkies  Рік тому

      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

    • @KillChor1.
      @KillChor1. Рік тому

      @@robojunkies ahh that seems like hard work😣

  • @Natureunfiltered5011
    @Natureunfiltered5011 Рік тому

    Pin 11 and 12,
    are these push button with 10k resistor connected but 5v and groud along with 11 and 12?

    • @robojunkies
      @robojunkies  10 місяців тому

      We haven't used a pull up/ down resistor since we have configured the buttons as input pullup

  • @shankargouda2534
    @shankargouda2534 Рік тому

    It is available for purchase

    • @robojunkies
      @robojunkies  Рік тому

      Hi, it's available for purchase on our website- www.robojunkies.com

    • @shankargouda2534
      @shankargouda2534 Рік тому

      @@robojunkies it is urgent for me

  • @user-sk1pn1wk8i
    @user-sk1pn1wk8i Рік тому

    Is it also available on Raspberry Pi?

    • @robojunkies
      @robojunkies  Рік тому

      This is only for Arduino nano as of now

  • @sailesh8950
    @sailesh8950 Рік тому

    What to change in code for 3cm wide line

  • @sikandaramir9615
    @sikandaramir9615 2 роки тому

    Bro can you make a full video on how to make this robo

    • @robojunkies
      @robojunkies  Рік тому

      Hi, Please check the earlier video about the building guide on our channel

    • @sikandaramir9615
      @sikandaramir9615 Рік тому

      @@robojunkies bro can you make video about how to set pid value

  • @nnnbbb1400
    @nnnbbb1400 Рік тому

    What the line width ? 2cm?

  • @Intelli_Sphere
    @Intelli_Sphere 11 місяців тому

    how to make it work for 3cm lines?

    • @robojunkies
      @robojunkies  10 місяців тому

      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

  • @nextsodanextsoda6010
    @nextsodanextsoda6010 5 місяців тому

    I guess that, if we want to use this on a 3cm line we will need to change the Kp, Ki, and Kd values.

    • @ItsRomanomar
      @ItsRomanomar 5 місяців тому

      did you find an answer please?

    • @111.ashwin
      @111.ashwin 4 місяці тому

      Code works with a 3cm line. Check out our latest code on our website under the resources page.

  • @smailmansouri1347
    @smailmansouri1347 Рік тому

    can you provide the model solidworks file please

  • @A.hemanthmayur
    @A.hemanthmayur 2 місяці тому

    Bro I need that it should move fast pls help me bro in 2 day

  • @godgajet6763
    @godgajet6763 9 місяців тому

    help it doesnt go forward

  • @vishalp6263
    @vishalp6263 2 роки тому +1

    Can you please provide circuit diagram

  • @sailendraku.biswal3841
    @sailendraku.biswal3841 Рік тому +2

    What it the cost of this . I want it to buy 🙃

    • @robojunkies
      @robojunkies  Рік тому

      Please contact us on instagram- @robojunkies to buy this kit

  • @JNECPavanK
    @JNECPavanK 2 роки тому

    I am wanna to buy these products of pid line follower where I can get product link

    • @robojunkies
      @robojunkies  Рік тому

      Please contact our instagram page- @robojunkies to buy the kit

  • @LawerenceiRidgwayv
    @LawerenceiRidgwayv Рік тому

    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

    • @robojunkies
      @robojunkies  10 місяців тому

      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

  • @sikandaramir9615
    @sikandaramir9615 2 роки тому +1

    Bro why did not you use digital array

    • @robojunkies
      @robojunkies  Рік тому +2

      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.

    • @JoaoPedro-eo7tx
      @JoaoPedro-eo7tx Рік тому +1

      Can you tell me if it is possible to make the PID control with Digital IR sensors instead of Analog ones???

  • @unknownxyz7885
    @unknownxyz7885 Рік тому +2

    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

    • @robojunkies
      @robojunkies  Рік тому +1

      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.

  • @godgajet6763
    @godgajet6763 9 місяців тому

    how to change code for 8 sensors?

    • @111.ashwin
      @111.ashwin 4 місяці тому

      Please refer to our website for code with 8 channel sensors

  • @honestreiewer2041
    @honestreiewer2041 Рік тому

    Can you provide the code, the previous link isn't working

    • @robojunkies
      @robojunkies  Рік тому

      Can you check again. The link works on my end

  • @nagendraprasadg8638
    @nagendraprasadg8638 Рік тому

    My motors are not running, it just making sound, if i change 100 to 180 then it rotates

    • @robojunkies
      @robojunkies  Рік тому

      I'll need more info about what hardware you are using to understand better

  • @manishashuklapandey4270
    @manishashuklapandey4270 4 місяці тому

    Nice

  • @punyapinwiset9062
    @punyapinwiset9062 2 роки тому

    i can not see full code ..help me please

    • @robojunkies
      @robojunkies  2 роки тому

      create.arduino.cc/editor/robojunkies/8f43a49f-aab5-494d-8dcf-c9f00e55a3c1/preview

  • @antosatle-logger3217
    @antosatle-logger3217 Рік тому

    Is it possible to use l293d instead of this TB motor drive.... Any difference

    • @robojunkies
      @robojunkies  Рік тому

      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

  • @_AbhishekGarg
    @_AbhishekGarg Рік тому

    hey i need ur help

  • @azverndias913
    @azverndias913 2 роки тому +1

    Keep it up

  • @AnandBhatB
    @AnandBhatB Рік тому

    Y not use 2 li ion cells with 1000rpm motor

    • @robojunkies
      @robojunkies  Рік тому

      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

  • @shettyadithcreations1799
    @shettyadithcreations1799 Рік тому

    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

    • @HarshithDevadiga-pr2zc
      @HarshithDevadiga-pr2zc Рік тому

      circuit diagram you have

    • @LawerenceiRidgwayv
      @LawerenceiRidgwayv Рік тому

      ​@@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

    • @HarshithDevadiga-pr2zc
      @HarshithDevadiga-pr2zc Рік тому

      @@LawerenceiRidgwayv 1000rpm will be very high bro. sensor and controller should br good enough to handle the response

  • @Alone_Yashu-8055
    @Alone_Yashu-8055 2 місяці тому

    Bro is other way apart from 11 and 12 button

  • @craftkids6795
    @craftkids6795 Рік тому +2

    bro it is not mworking bro

  • @biswajitdhal2469
    @biswajitdhal2469 2 роки тому +1

    Price

    • @robojunkies
      @robojunkies  Рік тому

      Please contact our instagram page- @robojunkies to buy the kit

  • @muhammadammar387
    @muhammadammar387 2 роки тому

    yes i want fastest line follower form your side

    • @robojunkies
      @robojunkies  2 роки тому

      You can contact us on Instagram for sale inquiries

  • @desispiderman2546
    @desispiderman2546 Рік тому

    Mera bot 10m/s ki speed se chalta hai

  • @sarabasheer-jc7ws
    @sarabasheer-jc7ws Рік тому +2

    please stop using music. The voice is not clear enough

  • @kanishkayadav1561
    @kanishkayadav1561 Рік тому +1

    Yes the code isn't working

    • @robojunkies
      @robojunkies  10 місяців тому

      Hi, try out the new code listend on our website

  • @animearistocrat
    @animearistocrat Рік тому

    the code dose not work

    • @robojunkies
      @robojunkies  Рік тому

      Latest code available here- www.robojunkies.com/pages/resources

  • @aqiladhiasyarafans6854
    @aqiladhiasyarafans6854 2 роки тому

    Can you send me schematic or pcb file for sensor sir

    • @robojunkies
      @robojunkies  Рік тому

      IIT Techfest generally happens in december every year.

  • @nevillecreativitymentor
    @nevillecreativitymentor 8 місяців тому

    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.

  • @ashwanthshorts322
    @ashwanthshorts322 Рік тому

    don't do this

  • @RanjithKumar-kd9hn
    @RanjithKumar-kd9hn Рік тому

    Carrier board full na enna bro@robojunkies

    • @robojunkies
      @robojunkies  Рік тому

      Hi Ranjith! Carrier Board now available on our store- www.robojunkies.com

  • @arduinomaquinas
    @arduinomaquinas Рік тому +1

    Awesome, nice ❤ 😉👍 👏👏👏 subscribed and like 578 @arduinomaquinas thanks you !