You Are Here: Home » AVR ATmega Projects » Interfacing(USB - RS232 - I2c -ISP) Projects » Ultrasonic Rangefinder HC-SR04 Interfacing with ATmega8

Ultrasonic Rangefinder HC-SR04 Interfacing with ATmega8




In this article I will describe how to interface a Ultrasonic Range Finder Module with a AVR ATmega8 microcontroller. I will provide a HEX file which you can burn into your ATmega8 directly to quickly test this whole setup.

Ultrasonic Rangefinder HC-SR04 Interfacing with ATmega8Ultrasonic range finder modules helps find the exact distance to an object. This can have vast application in robotics.

These are more expensive than IR based obstacle detectors but the advantage is that they give accurate distance to the obstacle and also their performance is not affected by the colour of obstacle.

Connection for xBoard MINI v2.1

You can also use the xBoard MINI v2.1 development board to run this demo. The connection is same as the 28 PIN Development board with a difference that you don’t need the LCD board because xBoard MINI v2.1 has built in LCD Module. So you just need to connect the sensor module on PORTC pins and supply the module from 5 volt output pins. See the image below.

Ultrasonic Rangefinder HC-SR04 Interfacing with ATmega8

Supplying External Boards

External boards such as the LCD Board and Ultrasonic Range Finder Module requires 5v supply. You can easily supply them from the extra power output from the development board. The image below shows their position.

For more detail:  Ultrasonic Rangefinder HC-SR04 Interfacing with ATmega8

Leave a Comment

You must be logged in to post a comment.

Read previous post:
Microwave Controller using ATmega8 – AVR Project
Microwave Controller using ATmega8 – AVR Project

Pause Function You can press STOP/Clear button during countdown phase to pause the timer and to switch of the associated...

Close
Scroll to top