First attempt at floodfill based Micromouse (Arduino nano) (Link to code in Description)

Поділитися
Вставка
  • Опубліковано 3 лис 2024

КОМЕНТАРІ • 56

  • @111.ashwin
    @111.ashwin Рік тому +4

    Superb work!

  • @01aragog78
    @01aragog78 9 місяців тому +1

    love your work 👍👍

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

    Amazing

  • @Aniruddha_r
    @Aniruddha_r 2 місяці тому +1

    @pranjalagrawalrobotics Hi Pranjal, You have done amazing work, But I have few question. can you please let us know which IR sensors you have used. also you used sensor value with array of 7 elements, reason for selecting 7. is any specific logic/reason?
    Morver in you code you used "sensor_on_pin" and its connected to pin no. 17, which sensors is this exactly. you connected a one diagonal left sensor to pin no. 4 and on same pin you connected one of the motor pin. Is this by mistake in code, or what is reason behind this dual pin usage?
    Your help will be appreciated..

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

    Genial!!!!!!!!!

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

    Very nice

  • @MohitSharma-ci9kd
    @MohitSharma-ci9kd 3 місяці тому +1

    Hello brother can you please provide the circuit diagram, because there are some doubts in circuit.

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

    Hlo pranjal can you pls explain what is sensor on point in your code

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

    bạn có thể ra video hướng dẫn làm được không

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

    what is the main ino file need to upload , and what is the motor you used can you tell the model (encoder) , thank you great work brother

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

    Amazing work! Is it possible to get the schematic diagram?

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

    Nice work. I saw your code and could see that you are adjusting the bot alignment with left and right ir sensors only with a threshold and not any pid . Any specific reason for this?

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

      The bot does use PID for wall following (pid is used on both the ir sensor reading and the encoder reading)
      Threshold is only used for detecting walls after the bot has reached the centre of a block and wants to scan its surrounding walls.

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

      @@pranjalagrawalrobotics in your code i could see that you are calculating error based on encoder count difference and computing the pid value from that. And then computing wall error as difference between left and right ir sensors. Wall error +/- pid error+/- constant speed is the final output. Wall error is not from pid , it's computed directly. I was curious to know why no pid for ir sensor and only for encoder count

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

      @@suricool99 just checked, and yeah, you’re right, I misremembered.
      Basically, what happened was that we started working on the bot around a week before the competition. In fact, we were still working on it on the day of the competition. We simply ran out of time and weren’t able to tune the PID for the sensors and so we computed it directly.

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

      @@pranjalagrawalrobotics we are also in a similar situation. We have got the constant speed part and wall follower part to work independently. We are stuck at a place where we are struggling to combine both speed/position based control along with wall follower pid control . Do you have any suggestions? How can we do this. ?

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

      @@suricool99 I can’t be sure, since I never got around to implementing pid for the ir sensors and combining it with the encoders, but maybe you could try computing the pid value from the ir sensors and encoders independently and then combine them in a ratio you tune.
      Like, instead of directly adding/subtracting either the encoder pid value or the ir sensor pid value, you could compute smth like (0.7*ir_pid + 0.3*encoder_pid) and add/subtract that from the speed.
      I would assume that giving a higher weightage to ir sensors would work slightly better since they can actually sense and avoid the walls whereas if you start off slightly off angle, the encoders would be fighting to drive you closer to the walls.

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

    A question, did you design the PCB board you used for the project yourself? And if so, could you provide it to me?

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

    do you use compass ?? like mpu6050 ?

  • @charlysoledad3180
    @charlysoledad3180 11 місяців тому +1

    its necessary use 5 IR sensors, or can i use 4 or less?

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

      I think atleast 3 are needed. One for each of the side walls and one for sesing the front wall. Wall following will be pretty tough though woth so few sensors. With 4, you could place two directly perpendicular to the side walls and two slightly angled. Although, this setup may have difficulty identifying the front wall in time. 5 really is convenient.

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

    proporcionas el código pero no el diagrama, como podría servir sin eso

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

    Do you use a distance sensor or an obstacle avoidance sensor?

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

    How did you make the maze? I want to try making the maze at home to test a micromouse

  • @0xatul
    @0xatul Рік тому +3

    Hey great work!
    I know little about micromouse's but that's pretty amazing to watch.
    Few questions, why did the mouse stop once it reached the centre and why did you had to restart from the beginning at 0:52 ? Is is how the flood fill algorithm works?

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

      The bot stopped at the centre because I have set it as the target. I haven’t programmed the bot to return to the start point so it stopped once it reached the target.
      The bot constantly updates its map of the maze as it explores. Hence, each subsequent run is better than the previous until the maze is completely mapped out. Hence, I restart it from the start point so that it can explore more and find better oaths (as it did!)
      You can learn more about floodfill and other maze solving algorithms here - www.123seminarsonly.com/Seminar-Reports/038/59360985-Maze-Solving-Algorithms.pdf, marsuniversity.github.io/ece387/FloodFill.pdf

    • @0xatul
      @0xatul Рік тому

      @@pranjalagrawalrobotics that's helps thanks

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

    how did u can simulator in mms

    • @pranjalagrawalrobotics
      @pranjalagrawalrobotics  11 місяців тому +2

      I used this simulator - github.com/mackorone/mms
      They have provided code to connect the simulator to an arduino. In the arduino code, you can simply make calls to the provided simulator API instead of the motor driver and similarly make calls to the API instead of reading data from the sensors,

    • @m4s0314
      @m4s0314 11 місяців тому +1

      @@pranjalagrawalrobotics can i have your eg code in mms , thanks for replied

    • @komilelmurodov3401
      @komilelmurodov3401 11 місяців тому +1

      Code

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

      @@m4s0314 drive.google.com/drive/folders/1xG0jK4TJxe-gcxNtGWqhTgi0iRqMKp3k?usp=share_link
      The code modified to work with the simulator is older though

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

      @@komilelmurodov3401 drive.google.com/drive/folders/1xG0jK4TJxe-gcxNtGWqhTgi0iRqMKp3k?usp=share_link

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

    What component do i need?

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

    How did you set the goal (how does bot know the goal position in the maze)?

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

      In coding he just follows the right wall

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

      @@cowboygamer6980 I know it's wall follow algorithm, but I want to know how does it determine the goal position?

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

      @@cowboygamer6980nah, this uses the floodfill algorithm, not the wall following algorithm. That’s why it takes two completely different paths in the two runs.

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

      @@rexcode9366it knows it’s starting position and that the goal is as the centre. It doesn’t know the wall layout.

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

      @@pranjalagrawalrobotics yeah, I saw your GitHub repo. Can you make a tutorial on it, explaing in detail

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

    which motor you using ? in your github code the file .h meaning for ?

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

      I am using 600 rpm micro metal gear motors.
      .h files are called header files

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

      @@pranjalagrawalrobotics thanks

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

      are you using encoder motor ?

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

      @@kinhkong69z62 Yes

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

      can you please provide the link to buy this motor, also what batteries are you using
      @@pranjalagrawalrobotics​

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

    so its arduino nano , can it work on arduino uno or how do i change it to work on arduino uno

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

      The code should work as is, though you should check how much ram the uno has. If it is less than the nano then you may have to modify the code a bit.

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

      @@pranjalagrawalrobotics and how to make it learn the make and fix the finish point to find the smallest path

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

      @@pranjalagrawalrobotics hey bro i checked your coed and tried to verify it but its showing an error that the encoder is missing. how do i solve it.

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

    Code plzz

  • @williamjesusblinkedec1720
    @williamjesusblinkedec1720 12 днів тому

    Saludos si me puedes ayudar 😊