Simple obstacle avoider robot using Ultrasonic Sensor

This is the program of “simple obstacle avoider robot using ultrasonic sensor“. This program is designed for ATMega16 microcontroller.

Hardware setup

Before burning this program directly into your robot ATMega16 microcontroller, understand the hardware requirements and connection details of your robot.

The ultrasonic sensor used is HC-SR04 type. The connection details of this sensor are given below:

US sensor connection details for ATMeg16

Connection details and internal structure of Ultrasonic sensor used in ATMega16 robotic kit

The trigger pin of this sensor is connected to PA1 and echo pin is connected to PA2 of ATMega16 microcontroller.

The motors of your robot must be connected to PB3-PB0 i.e. the left motor is connected across PB3 & PB2 such that +ve terminal of the motor is connected to PB3. Similarly the right motor is connected across PB1 & PB0 such that its +ve terminal is connected to PB0.

Motor connection details image

Motor connection details and code for direction control

Now once the hardware connections are setup properly you can download the complete editable file of the program as well as the .hex file, below.

All the best…!

Icon

Program of simple obstacle avoider using ultrasonic sensor 32.28 KB 12 downloads

Vidyasagar Academy, Akola is a trusted name in the field of education. If you liked...
About the author: Admin of Vidyasagar Academy to post all types of educational material required for our students. This material is equally helpful to our online students.

Comments on this entry are closed.

  • arun

    March 7, 2017, 4:42 PM

    Dear Sir,
    I want to purchase programmer for robotics.What is discounted price of programmer for Robotics? Can you send image of programmer?

    Arun Patole

    • VSAcademy

      March 7, 2017, 5:47 PM

      Please visit this link of Robomart.com and purchase it from the website.
      IT is fully tested for AVR programming.