Collision Avoidance Robot, using Sharp IR sensor

Using a DFRobot 2-wheeled platform (Turtle bot), an Arduino, and a Sharp IR sensor GP2Y0A02YK0F, a simple collision avoidance robot was built.
The arduino code is very simple, just stopping the robot upon arriving at an object and checking to both the left and right before deciding which direction to turn. It then continues to travel straight forward before finding another object in its path.
It uses the Arduino Uno to read from the analog sensor and control the servo and motors via PWM.
The idea behind the construction of this simple robot is to teach 13-16 year olds the basics behind electronics and robots. This introduces the mechanical construction of the robot and the electronic construction of the breadboard circuit. Further videos will include these in depth. It also will give them an introduction with some basic programming, so maybe they will get more involved in embedded programming later.
Credit to Ronan O’Driscoll for the design of the bot, and the original code. The code seen here has been changed to give better results.
All of the source code and instructions for this robot can now be found to download at

Duration : 0:1:3


2 responses to “Collision Avoidance Robot, using Sharp IR sensor”

  1. eskerdevs Avatar

    The source can now …
    The source can now be found online, the link is in the description?

  2. TheZadok78 Avatar

    Awesome! I’m …
    Awesome! I’m thinking about buying the robot kit.
    Please can you put the source code so we can do the same and? modify it?

Leave a Reply