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/...

КОМЕНТАРІ • 136

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

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

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

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

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

      @@frostking7829 it's for serial monitor display

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

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

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

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

    Can you deliver to Pakistan??

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

      Hi did u find any alternative for tge carrier board?

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

    please stop using music. The voice is not clear enough

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

    Your teaching method is very nice.

  • @krupo900
    @krupo900 Місяць тому +1

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

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

      We haven't worked with spike yet

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

    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.

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

    bro it is not mworking bro

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

      Try another motor driver

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

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

  • @manishashuklapandey4270
    @manishashuklapandey4270 29 днів тому

    Nice

  • @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 2 місяці тому

      Did you find any alternative? Pls reply

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

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

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

    Please provide a circuit diagram

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

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

  • @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.

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

    Sir can you please provide code for 8 ir sensor array

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

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

  • @jumbo999614
    @jumbo999614 Місяць тому

    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 Місяць тому

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

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

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

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

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

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

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

  • @gojosatoru7836
    @gojosatoru7836 3 місяці тому

    What's the Rpm for the dc motor

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

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

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

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

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

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

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

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

    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  6 місяців тому

      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

  • @nextsodanextsoda6010
    @nextsodanextsoda6010 Місяць тому

    Will the old code still work

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

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

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

    help it doesnt go forward

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

    can you provide the model solidworks file please

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

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

    • @robojunkies
      @robojunkies  6 місяців тому +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

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

    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

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

    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

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

    Mera bot 10m/s ki speed se chalta hai

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

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

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

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

  • @sikandaramir9615
    @sikandaramir9615 Рік тому +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???

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

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

    Do you ship worldwide? In romania

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

    don't do this

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

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

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

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

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

  • @nextsodanextsoda6010
    @nextsodanextsoda6010 Місяць тому

    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 Місяць тому

      did you find an answer please?

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

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

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

    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

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

    Can you please provide circuit diagram

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

    What to change in code for 3cm wide line

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

    Keep it up

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

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

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

      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

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

    What the line width ? 2cm?

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

    what board is used sir? the green one

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

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

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

    Which motor is used?

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

    how to make it work for 3cm lines?

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

      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

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

    How fast is it going, mean any stats.

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

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

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

    hello, where did you get the pcb?

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

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

  • @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😣

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

    👏👏👏 good job 👏👏👏

  • @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 9 місяців тому

      circuit diagram you have

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

      ​@@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 8 місяців тому

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

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

  • @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 5 місяців тому

    how to change code for 8 sensors?

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

      Please refer to our website for code with 8 channel sensors

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

    Is it also available on Raspberry Pi?

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

      This is only for Arduino nano as of now

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

    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

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

    yes i want fastest line follower form your side

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

      You can contact us on Instagram for sale inquiries

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

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

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

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

    hey i need ur help

  • @kanishkayadav1561
    @kanishkayadav1561 8 місяців тому +1

    Yes the code isn't working

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

      Hi, try out the new code listend on our website

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

    It’s very informative ❤️😍

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

    Price

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

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

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

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

    the code dose not work

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

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

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

    Can you send me schematic or pcb file for sensor sir

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

      IIT Techfest generally happens in december every year.

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