Let's Make Robots!

Simple Map robot



I have arduino duemilanove, ultrasonic sensor , geared motors with wheels. I wanted to make a room mapping/ navigating robot to go from one place to other.

 Even if it doesnt learn the environment in real time ,is allright. I just want it to store a simple map of square room and go from one square tile to the other.


Please guide me.




Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Bajdi thanks for the link

Kariloy... yep... you are right...I forgot to mention that, I have l293d drivers.. and yes I will boost my basic knowledge..  :)


will post picture after I finish my robot.

Deseo saber si hay alguien en esta pagina que sepa Español. Me cuesta mucho trabajo leer en Ingles. tengo varias preguntas y preferiria hacerlo en mi idioma. Por favor, agradeceria mucho que me lo hicieran saber. Gracias.

Another way to do it simple without mapping, is to use arrays that stores movements in time to have something like this:

assume that:

  • 1 is forward
  • 2 is backwards
  • 3 left
  • 4 right

now every time we do 1 meter, (encoders suggested are really suggested by me also) we know the direction we had.

So, when we find an obstacle we log in the array the direction change.

by appending to the map array, by going forward, than delay 1 second (assume it is 1 meter to do it simple), than found an obstacle

at right we turn left and we go another meter forward, the array will be something like:


It is not so useful for mapping itself, but can be used as a base for various "smart" navigation objectives.

I used this method to make the robot navigate 'till the next obstacle and then to remember where it was without going back to his error.

I have lost the HDD where i had backups, so i have this code no more, but is quite simple to do, just store data, to go back do it reversed ([2,4,2] in our array) and than look if it is already been done by searching in the last stored movements. I was storing only the last 12 movements divided in three arrays in temporal order, cause of low memory.

I hope this helps!

Seems like you're starting from near zero knowledge, am I right? First robot?

Regardless, you need to get some basics on electronics first, also programming if you don't know any yet.

1st-  Start simple: Build the obiquitous obstacle avoider which can be later upgraded.

-- If what stated above is your complete parts list, there is at least one big part missing: motor driver. This is needed to control the geared motors, which you can't just directly connect to the arduino.

--- you can either shell out some money and buy a motor shield that plugs into the arduino board, or just make one yourself. In the latter case electronics knowledge will be required.

As a side note, a micro servo where to mount the sonar module may be useful later for sweeping (sort of like a radar) and help with future mapping.

2nd- Once you get a basic obstacle avoider going you can start thinking about the mapping, and as Bajdi said wheel encoders will allow you to control/measure travelled distances. Also probably you'll be wanting some form of persistant stored of those maps. I myself never delved into mapping so I can only suggest you search ( e.g. google ) on the subject, I'm sure there will be plenty of examples to choose from.

There's lots of details I don't mention here, however the main points I want to get across are:

- Learn your basics (electronics, programming, etc).

(NOTE: This point is VERY useful for asking specific questions, because nothing upsets more a potential helper than a person that can't help him/her self. -- I've highlighted some keypoints where it might be useful for you to do some research.)

- Start small & incrementally advance your project as you build your own knowledge


The easiest way to do this is using encoders. I recently bought an encoder kit from http://rocketbrandstudios.com/ to try something similar. The following link contains a lot of information about mapping an area: http://www.societyofrobots.com/programming_wavefront.shtml

Here's my post on wavefront: http://letsmakerobots.com/node/35373.

It runs on an arduino, and maps using an IR sensor mounted on a servo (hence there's a bit of trig).

But you could cut it up and simplify it to your needs.

I've yet to complete a robot uding it, but it works on a bench top.

Goodluck with this ambitious project.

cool!! did you use sharp sensors?