Working on a Maze Solving mBot - The Maze


#21

Minor update: Makeblock now offers a line follower array for maze solving and other line following fun.


#22

really great job! well done! i ve recently bought mbot for my school and if you could tell me, how is it possible to stop at the intersection and check for the left or right path? How do you ensure this since there is a sensor in front that checks distance and the one on the bottom for the black line. If i had 3 sensors (straight, left and right) it would be simple enough. thank you in advance, good luck on your e book!


#23

Hi @ngeo23,

I knew the distance between the room centers and just had the mBot stop at those intervals. Since the motors are not equipped with encoders, I did several runs to get the time required to cover the distance at the selected speed. If you want the array that you are thinking of, Makeblock has one (link) for ~$14 USD.

I published the first volume of the book last May (link) and I’m working on the second volume which deals with the mBot and Arduino environments. Coaching a robotics team sort of killed the back half of 2016 for me, so I’m hoping to get the second volume out sometime towards the end of the year.


#24

i though of that but i also though it would take several trials!!! you have very much patience! i thought if i could adjust the sensor looking always on the right or left and in combination with the black line to turn
 thanks for the links!


#25

It didn’t really take that much patience. I did a few timed runs and measured the distance for each, averaged them, and then did a final calculation to get “really close” (followed by a little minor tweaking). The issue with the line following sensor that comes with the mBot is that it is really only geared towards line following, not intersection detection so I had to think out of the box to get a solution that didn’t required extra parts. :slight_smile:


#26

Hi, did you already finish the project with the trémaux algorithm? And is there a description of maze solving and mapping written in your E-book?


#27

I’m still working on the second book that will feature TrĂ©maux’s Algorithm for a maze solver. I am planning on a brief discussion of maze solving and mapping that will have a list of resources for anyone who wants to dive more deeply into the subject.


#28

Dear Sir, I am new to mbot maze solving, are you using the original line follower sensor in the youtube mbot? How can you detect the intersection by using the original one?


#29

Hi @Jess,

Yes, the line follower in the YouTube video is the one that comes with the mBot. I wrote an eBook (link) that covers programming the mBot in mBlock and has several programs that demonstrate using most of the devices on the mBot (didn’t do the IR Receiver/Transmitter device. Will cover in the book I’m working on now that does native mBot coding in Arduino). The short answer to your question is that the program uses the line follower to follow the black lines on the floor of the maze and then periodically executes a turn to see if there is a black line at a right angle. The program then uses the ultrasonic sensor to detect whether or not there is an opening. The goal was to limit the program to just using the stock mBot with no additional components. Look through the forums here and you’ll see that several other folks have taken different approaches to maze solving. :slight_smile:


#30

Dear Chuck, thx for you reply, and your reply really helps me. I can do the line following program well but not with the intersection, and now I know how to do it, many thanks.

BTW, can you share the actual distance of each of the black line? I would like to build a maze that is similar to yours.

Cheers,
Jess


#31

I have it set up with the intersections being on 11 in (27.94cm) centers. You can build the maze of just about any size (so long as the mBot can turn without hitting the walls. In the code I set the distance at 27.94cm so that the mBot stops every 27.94cm of forward movement to check for intersections.


#32

thank you so much


#33