I recently started going back to projects I did a few years ago. The obstacle avoiding robot was my very first Arduino project, but looking at it on the shelf in my robot workshop, I felt that it had to be more pleasing to the eye. It really was a mess of wires, so I decided to fix it. The photo below shows the original model.
I used the original platform, but having learned from experience that it drives better when the jockey wheel is at the back, I decided to switch the orientation. I also got rid of the heavy lead acid battery and replaced it with a more efficient pair of Lithium cells. In stead of the big breadboard for the motor controller, I used an Adafruit motor shield, to make things more compact. Here is the result:
I had to use the Arduino’s analog pins as digital pins, because the Adafruit shield uses most of the digital pins. It is a neat trick I learned, If you call A0 = 14, A1 = 15, A2 = 16 and so on, you can use them as normal digital pins. At first I tried to make the robot work with only the ultrasonic sensor, but the results were mediocre. I therefore added 3 infrared sensor modules and rewrote the algorithm to use them as well. The result was much more professional.
Here is the robot with the sensors added in front:
Here it is in action: