Introduction: Simple Object Avoidance W/ Arduino
To start I would like to say that this has been my very first project using the Arduino platform, and therefore, my wiring, code, and other items can be heavily improved upon. Other than that, this project was a great starting point for me, and I hope others can learn something from this project. The whole goal for this project was simply to make a robot that could navigate autonomously, simply by avoiding objects in its environment.
Note: As of July 5th, 2011 this instructable will be available for voting in the MIcrocontroller contest here.
Step 1: Chassis/Hardware
The chassis I used for this project was a recycled Acroname PPRK which I had found in a pile of junk. The condition was not mint when I got my hands on it, with the servo controller missing I decided I would revive the project with an arduino.
The PPRK came with the following parts:
3 Sharp IR-proximity sensors (I used 2)
3 MPI MX-400 Servo Motors (I used 2)
3 omni directional wheels (I used 2)
1 Metal and plastic frame to mount everything
Other hardware I used:
DFRobot Prototyping shield
1 small solder-less breadboard w/ adhesive
1 red LED (for verification of sensor functionality)
1 Multicolored LED (for decoration)
Step 2: Code/Wiring
The code in the .pde file can also help with the wiring of the project, just by looking at what device is attached to each pin of your arduino, trust me, it makes it easier on both of us.
The way the code works is very simple in theory. To start, the robot continually drives in a straight line until two of the following happen, either one, the left proximity sensor senses an object closer than the set value, or two, the right sensor senses an object closer than the set value. depending on which sensor is triggered, the arduino will decide whether the robot will turn to the left or to the right. This whole process continues over again and again.
Probably the most challenging part of the project was controlling the servo motors since there is not much documentation on the internet, so the method i used was either spitting a value of 0 or 180 to change the direction the servo motor was turning.
There is also code included for a random color changing LED that I was experimenting with, you can easily disregard it if you wish.
Step 3: Finished Product
My Conclusion: The Arduino is a very powerful tool that can be used for many applications, in fact, right now the arduino used in this project is being used in another. I can't wait to continue building my skills with this handy micro-controller.