Arduino | Maze Solving Robot (MicroMouse) \ Wall Following Robot
HTML-код
- Опубликовано: 1 янв 2018
- 6 Steps to build this Robot: www.instructables.com/id/Maze...
This Robot was Designed to solve a simple maze Using Arduino and wall following Algorithm.
Song: Warriyo - Mortals (feat. Laura Brehm) [NCS Release] Наука
Sir did you programmed it for this particular maze only or it will work with any other maze?
Yes .. its for wall following mazes like in this article here:
www.instructables.com/Maze-Solving-Robot-MicroMouse-Wall-Following-Robot/
You can change the code to make it follow a certain wall if you want. you can also find images of the mazes in the article.
Can you please explain, why you have used offset value for calculating errorP in PID(boolean left), but not in errorP in pid_strat() ?
The offset is for manipulating the error result with a fixed value .. was added initially to try adjust robots distance with the wall it follows .. since pid_start has no detected walls it doesn’t need it .. you can remove the offset by making its value 0 it the definition line .. in theory it won’t change any thing ..
Hi Isaac, I have question about your code. There is one thing I don't understand. " float errorI = (2.0 / 3.0) * errorI + errorP ; " what are 2.0 and 3.0 values? Btw this PID system is similar to PID library or it's different thing.
Hi, 2.0 and 3.0 values are just to make the total value less.
and I dunno what you mean by PID library ..
@@iZaaQ Oh ok, so i can use any other values or you calculates it somehow? I have on mean pid_v1.h but if i understand now you created your own system which you control trajectory and motor speed?
@@patrykilkow8112 you can use any other value. however you still have a constant that manipulates the final results which you can change too to find the perfect ratio for your situation.
and yes you can find everything in the same code under different functions.
sir can I know what is the length and width of the classic you used in the bot?
What do you mean by the classic ?
I did the project and one of the ultrasonic sensors is not measuring any distance(showing 0 on the serial monitor)...Any help on how to solve this issue??
Hi,
Check the connections carefully and make sure that the ultrasonic is not damaged or anything .. also if you changed the Pins connection make sure to change them in the code too ..
Hello Issac! I am looking forward to creating this robot and I am wondering if i can use a L293D motor driver instead of the L298N, with low rpm torque wheels, if I can , could you tell me what i should tweak? Thanks!
is that the driver shield? if so, i didn't use it before, i guess you'll use the libraries and try find out the connections so
1- the new connections
2- the code changes
the code should be similar since its the same idea. but you'll need to tweak the input/output pins.
Hope you have fun building it.
@@iZaaQ Thanks!
If the robot is right wall following do we have to make right wall follow =true in the setup part?
If so, What happens if we make first_turn =true in the setup part?
To make the robot always follow the right wall you have to only change these values as Follows:
first_turn = true ;
rightWallFollow = true ;
leftWallFollow = false ;
If you want the robot to follow the left wall make them as follows:
first_turn = true ;
rightWallFollow = false ;
leftWallFollow = true ;
this line
first_turn = true ;
makes the robot skip the scanning phase.
i have built as same as you correctly but my bot is not moving only , one more thing the driver is not providing the 5 v outout so can i connecet it to the arduino 5v pin , reply me ..
I did that and it worked
Hello! For powering up the arduino and the l298n can I use 2 3.7v accumulators ? And to connect a + and a - to the gnd and 12v of the l298n and to make a Dad wire and connect it in the round port of the arduino?
you can use less that 12v but its better to use 12v .. better you can use 2x 3.7v in series to get 7.4v.
for the connections please follow this article for all the details:
www.instructables.com/Maze-Solving-Robot-MicroMouse-Wall-Following-Robot/
Thanks a lot.
Ah and i uploaded the code and i get a error for NewPing library, i cannot install the library provided in the zip and i have tried all the versions of the library, still no luck@@iZaaQ
you'll need to put the library in the same folder as the code
@@iZaaQ aha
Hi AM, my name is Carlos, I am a primary education teacher, your project is excellent.
Two times I can use the gearmotors, and what difference does it make if the front sensor is not on the side of the idler wheel.
Thank you very much
from Mendoza Argentina
Thanks carlos .. the sensor will affect wall detection.. and will affect how soon the robot will turn .. you always can make an angle to make the sensor detect the turn earlier or later .. however that depends on your turning algorithm to make sure that it turns on the right timing ..
Thank you so much for this video! I have nearly completed my verson of the Stryker V1.0 following your instructable! I just wanted to take a minute to thank you for taking time to be so detailed and concise in your instruction. I've throughly enjoyed this project. I'm wanting to make my robot circle the perimeter of my basement. Do you think you could please do another instructable that would make this robot follow just the left OR right wall? Or maybe point me in the direction of how to change the code so that it will just follow one wall?
Thanks a lot for your kind words and support, To make the robot always follow the right wall, please change code to be like the following:
first_turn = true ;
rightWallFollow = true ;
leftWallFollow = false ;
If you want the robot to follow the left wall change them as follows:
first_turn = true ;
rightWallFollow = false ;
leftWallFollow = true ;
I hope this helped ..
if there is any further quires don't hesitate to contact me ..
Thanks again, your words were really amazing ..
@@iZaaQ Thank you SO much! I will be working on it again Wednesday... I can't wait to see how it turns out!
@@iZaaQ bhai I knw how the bot turns in right wall follow and left wall follow algorithms but how it works in Ur first turn algorithm
@@mohamedjamesha1289 it follows simple PID algorithm until it finds the first turn ..
@@iZaaQ wat is the rpm of the motor that u used bro
Why trigger pins and echo pins connected to analog
didn't have enough digital pins ..
Hello, great project for begginers. Could you give me a link to the motors that you have used in your project? If these are not available to buy, could you give me an example of cheap motors with encoders that i could use in this project?
Hello, Thanks a lot ..
Any 12 DC motor should do the trick .. I used a motor that look close to this one: www.robotshop.com/en/pololu-12vdc-500rpm-191-metal-gearmotor.html
you have to check the RPM and choose what you want as there are many gear ratios in the market ..
For the motor driver I used [L298N] .. The connections are shown in the article in details ..
Follow this link for the full detailed building steps: instructables.com/id/Maze-Solving-Robot-MicroMouse-Wall-Following-Robot/
How did you prepared a maze?
Any idea of the pinout for the motor? im using an l298n mini, but i dont see how to use without enable, cause i just send the analogwrite to the motors by pwm to the inputs, dont have to use a enable pin, could you help me please? thanks in advance
I used the same motor driver [L298N] .. The connections are shown in the article in details ..
Follow this link for the full detailed building steps: instructables.com/id/Maze-Solving-Robot-MicroMouse-Wall-Following-Robot/
Isaac Hossam EL-Din thanks, but mine is the mini version, i connected everything, but doesnt work as it should, if you can please, check the mini version, has some differences, thats the fail in my code i think, pwm isnt workin for me
For the [L298N] mini there is no [Enable A or Enable B] instead it uses a different way of speed control ..
you have 4 pins only for control and speed control
2 pins for Motor A:
En1: Low
En2: PWM Signal or High
OR
En1: PWM Signal or High
En2: Low
2 pins for Motor B:
En3: Low
En4: PWM Signal or High
OR
En3: PWM Signal or High
En4: Low
Check the [L298N] datasheet for more information ..
Isaac Hossam EL-Din thanks sir, i would try to figure out how to make it work with mini, or will try to get the big version, l293 has enable, so it should work too i think, thanks for your fine attentions sit
Most Welcomed :D
Hii, thank you to share such a great project .
I have problem that, my robot doesnot move (wheels)on ground. Off the ground its works and wheels works well. Any idea what could be problem? I use 14 AA battery just for motors and for arduino i use power bank.
I can not find problem. Any advice?
If you feel like it needs more torque (if wheels barely move off ground) then you may need to adjust the code first. if you're using my code please make sure to add more base speed as I used less power for my motors. Please re-check and let me know.
Can u do the same maze solver but not like wall, it's for track?
If you mean Line Tracking robots you'll need to change sensors, body and the code to do so ..
@@iZaaQ haan can u tell me the changes and send me the code.
If possible make a video on that.
@@vinayak6685 Thanks for your trust. Actually I don't have line tracking codes right now .. will update you once I have a good one ..
Can you explain the base speed, thanks btw
it's the forward speed .. if there is no base speed the robot won't move forward ..
you're welcomed dude ..
Assala mu alaikum brother
Bro in that code some of the lines are back slashed(//).... So what should we do... Whether upload as it is or want to remove that slashes of those lines before uploading????
w alykum assalam brother
you can upload it as it is .. no need to modify those lines ..
@@iZaaQ TQ bhai
@@iZaaQ bro what is the length and breadth (wheel to wheel) of the bot
@@mohamedjamesha1289 thanks to follow this link for those details: www.instructables.com/id/Maze-Solving-Robot-MicroMouse-Wall-Following-Robot/
Bro can I use this motor www.electronicscomp.com/300-rpm-centre-shaft-dc-geared-motor-india
What type of wires are you using?
Jumper Wire Dupont Cable Line 1P-1P Male to Male
@@iZaaQ Okay, thanks for your response 😇💥
@@iZaaQ Sir, what is that caster ball wheel used in front and where to buy it?
@@masterclasz1907 it's a Robot's Metal Caster Wheel, and I bought it from a local store.
you can find it online as well.
it's only to balance the robot and to not make turning complex.
@@iZaaQ Okay
Cost? Just for the raw materials of the robot, not any of the programming tools or anything.
it cost around 60~70 $
Thanks man appreciate it.
Most Welcomed
friend, do not use button to start?
it has a power button only ..
Follow this link for the full detailed building steps: instructables.com/id/Maze-Solving-Robot-MicroMouse-Wall-Following-Robot/
How do I upload the newping.h library to arduino? How do I download the library as a .ZIP?
add the library file in the same folder as the .ino file .. so the IDE can find it.
You can also find all if these in the github link that i added in the article.
Here it is:
github.com/isaac-hosam/Maze-Solving-Robot
In [ flaot error I = (2/3)*error I +error I +error P]...
You have never defined what are the values taken for error I.
What is the first error I value
assuming the normal conditions >> error I will be clear = 0 .. so initially will not add anything in the first result.. later it will accumulate over time taking into account the previous result .. and as it seems it was just defined in that line so no need to define it again somewhere else in the code ..
hi sir can u send me code to make maze solver bot
you can find all details in the article, follow this link: www.instructables.com/Maze-Solving-Robot-MicroMouse-Wall-Following-Robot/
Can u send me the code please??
Follow this link to know how I build the robot: instructables.com/id/Maze-Solving-Robot-MicroMouse-Wall-Following-Robot/
Follow this for the code: create.arduino.cc/editor/is7aq_shs/391be923-808e-4a73-8ab7-4caf2e01d11e/preview
Also This link contains the code file and all libraries used in coding: github.com/Is7aQ/Maze-Solving-Robot