Introduction: Maze Solver With Arduino and ArduMoto(Micromouse) V:1.2

This ''Instructables'' aims to help any maker, enthusiast to make their own maze solver (Micromouse). The existence of Micromouse's has dated back to the 1950's and competitions are being held ever since. Although these competitions may require good equipment, but in mainly, it is a race of algorithms. There are many algorithms on this issue and there is always for improvement. Step by step, will try to cover anything that there is to be about Micromouses. From materials to designs and to coding we will try to give many options and ideas that could help me.

PS: We are not claiming that our robot is the best and the fastest out there, this ''Instructables''aims to be educational and for the purpose of fun! Hope you like our tutorial and feel free to contact us about anything you want to share or ask, actually we encourage you to share what you have done! So please send us if you have tried to build your own :)

EDIT: After trying to prepare for some local competitions, I've noticed some flaws of my own designs and basic misconceptions. In this (V1.1) edit, "I would like to shine light upon these bugs."

EDITS OF V1.1 ARE ON:

  • Materials & Tools

EDITS OF V1.2:

Upon more research and testing, we decided that changing your motors from DC Motors to Stepper Motors would be more precise, despite of sacrificing from speed and time. I will post a material list after we completely finish our robot! -Mert

Step 1: About Us!

(Left: Kerem Guventurk, Right: Mert Karakas)

My friend and I, Kerem Guventurk and Mert Karakas (respectively), our two high school seniors, in 2016, in Hisar Schools, Istanbul, Turkey. We are both makers, coders... what ever you would want to call it: we just love learning new things and working together :)


I cannot emphasize on this more than ever: This ''Instructables''or any information about ourselves, our projects and out computer science team is only to help you and everyone else. We are not here to promote ourselves and If you feel that our postings promote ourselves, please tell us and we will consider it very seriously and will change it!

Step 2: Materials & Tools

Materials

  • 1 Arduino UNO
  • 1 ArduMoto Arduino Motor Shied (Try to buy it pre-soldered - or not, it is more fun to solder it but can be difficult for some)
  • 3 HC-SR04 Ultrasonic Sensors
  • A Li-Po Battery*
  • A bunch of jumper wires (Male-Male, Female-Male, Female-Female [probably not needed])
  • A small piece of plain Perfboard (DOT PCB) or A Breadboard**
  • Paper Tape (For convenience sake)
  • Headers (optional)
  • Heat-shrink tubes (optional)
  • 1 680μF Capacitor (not necessary)
  • 1 470μF Capacitor (not necessary)

Motor options: There are a lot of options but I would like to suggest two, since I only have these two options in my arsenal: DC Motor with encoders (Built in or external), DC Motors and a gyroscope, or both!

Tools

  • 3D Printer****
  • Sawing paper*****
  • Dremel
  • Soldering Iron
  • A computer

*You can use a 7.4 volts, 450 mAh battery or a 11.1 volts, 1500 mAh battery. We suggest you to use a 7.4 volts and 450 mAh because it is sufficient and can be cheaper.

**You can use a breadboard but it will cover more space than a perfboard, plus you will get to solder more! Soldering = More fun!

***We have experience in both versions, 2 and 4 motors, but we will show you how to build one with 2 motors. If you choose to use 4, we can still assist you with it.

****Yes, 3D Printers are not accessible for everyone, which is totally normal. We used it to print out our chassis but there are a lot of other ways to make your own! For suggestions;

  • Wood: Be careful of which wood you choose, heating problems and its durability.
  • Steel: Steel is a really good choice but shaping steel or finding a machine that would cut it can be difficult. Maybe more difficult than finding a 3D printer... (Depending on your location) Also steel and cutting it can be expensive as well!
  • Plexiglass: Personally, I wouldn't suggest this... But it is an option. It is cheap, somewhat durable.
  • There s always things that we might not know... Tell us what did use use :)

*****Might not be necessary, we used it to correct our chassis design flaws.

Step 3: Getting to Know Your Boards and Using Them!

We will be using an Arduino UNO and an ArduMoto shield for the Arduino. Basically, we are using a microcontroller (Arduino) and an ad-on (ArduMoto) for it to have an easier access to our motors. We will have a more-detailed section about how do they work together in the "Code" section but here are some links that you can benefit from:

Of course to use these boards you need the Arduino SDK(1st link) and the ArduMoto* library(2nd link)

For this step, you will need to solder your Arduino and ArduMoto, if the are unsoldered. After that keep your soldering iron hot because you will have to solder 2 capacitors into the board then solder them to the designated pins in the photo. Then interlock the boards. This way we are connecting the pins of the boards physically and ready to connect out exterior parts.

*If you dont know how to import libraries into your Arduino: https://www.arduino.cc/en/Guide/Libraries

**Make sure you read it good and how could you configure the qtr sensors on the encoder. It states that you can simply configure them using a micro-controller, which I found difficult to.

Step 4: Understanding the Pins of Your Ultrasonic Sensor

There are 4 pins soldered into the HS-SR04 sensor:

  • Vcc: 5V.
  • Trig (Trigger Pulse Input): Source of our ultrasonic signal.
  • Echo (Echo Pulse Output): Receiver of out ultrasonic signal.
  • GND: Ground.

More detail can be found here.

We are going to use our sensors to measure the distance between our robot and the walls of the maze. So a simple way to this is with 3 sensors*. Because we have 3 sensors: we need a common Vcc, a common GND and 6 unique pins for 3 Echo, 3 Trig pins. To create common grounds, you can use a breadboard or a perfboard. The fourth picture is an example of common Vcc's and GND's. Just solder all of the Vcc's, + an extra one for the Arduino, together and do the same for the GND's. Then choose 6 pins to connect your Echo, Trig pins. For convenience sake, we suggest to label all 6 pins and your common Vcc and GND with their names and sensor directions because it will be much easier when you are coding.

*This is not the only way: We have seen people do it with 6 sensors or with infrared distance sensors. You may use more or less sensors or different types as well.

Step 5: Plugging Our Motors!

Get your wires out, preferably red and black, and solder your wires*. Our goal is to connect the ArduMoto with our motors. As you can see, there is 2 sections:

  • A section with 2 inputs (+, -)
  • A section with 4 inputs {(A: 1, 2), (B: 3, 4)

Your battery's high voltage must connected to the (+) pin of the first section and the battery's ground must be connected to the (-) pin of the ArduMoto. As you can see in the second photo, we soldered headers to the ends of the wires (the side that will be connected to our board) and covered it with heat-shrink tubes for durability. It is not necessary but optimal. Then connect them as followed:

  • Left motor's (+, -) : (A: 2, 1)
  • Right motor's (+, -) : (B: 3, 4)
  • Battery's (+, -) : (+, -)

*We suggest you to solder a black wire and a red wire to indicate the voltage potentials of your motors. The motors are uni-signed, which means that it doesn't matter which wire goes where.

Note: If you're going to use the Pololu Wheel Encoders, you'll just have to place the DC Motors in the housing of the encoders and screw them in.

Step 6: Building Your "Mouse"!

Grab your silicone gun and start gluing! If you designed a magnificent chassis, then you might not need to silicone :)

This steps is self-explanatory, just design your own mouse. Our advices are:

  • Use cable ties to have a clean environment.
  • Use paper tape to label wire names just in case, if you would have to change something.
  • Make sure your sensors are parallel. to the ground.

Step 7: Code and Algorithms

We don't want this "Instructables" to be too long. So if you want to learn more about algorithms on this topic, you can visit our web page: HisarCS where your can find our article on this topic.

This is our Github where you can access for the code.

Currently, where working on implementing the Pololu Wheel Encoders into our project and make it move consistently. There are a lot of sources on this issue. We will try to complete it quickly as possible and upload our work on Github and here.

Step 8: In Conclusion

We always encourage to ask your questions and contacts us with your great accomplishments :)

And always try to help others with what you learn because it is more and fun and valuable at the end :)

Contact info:

  • Mert Karakas
    • mail: mert.karakas@ggl.hisarschool.k12.tr
    • skype: mert.karakas5
    • I respond to Instructables messages
Full Spectrum Laser Contest 2016

Participated in the
Full Spectrum Laser Contest 2016