SlideShare a Scribd company logo
Interfacing Ultrasonic
Rangefinder with AVR MCUs
Prepared by:
Kushagra Ganeriwal (130010111009)
Kamlesh Desai (130010111006)
Sweetu Ratnani (130010111048)
Guided by:
Prof. AsifIqbal Thakor
IR and Their Drawbacks
• Obstacle detecting sensors are one of the most basic type of sensors that electronic hobbyists
use. There are several methods to make cheap obstacle sensors. These simple sensors are made
using a IR Rx/Tx pair or Normal LED and LDR pair.
• These sensor may be useful for simple requirement but they have following drawbacks :-
1) Can’t say anything about the real distance of obstacle.
2) Give different result for different coloured obstacles.
3) Need calibration (like setting up a variable resistor).
• To solve these problems we have IR Range Finder Module but they have small range.
1) Sharp GP2D12 Distance Measurement Sensor has a maximum range of 80cm
2) Sharp GP2D120 Distance Measurement Sensor has a maximum range of 30cm only.
Why Ultrasonic ?
• An Ultrasonic Range Finder Module uses ultrasonic waves (inaudible to humans) to measure distance.
These module consist of an Ultrasonic Transmitter (Tx) that emits the ultrasonic wave, the waves after
striking any obstacle bounces back and reach the Ultrasonic Receiver (Rx).
• By measuring the time it take for the whole process to complete and using simple arithmetic we can
measure the distance to the obstacle. The Ultrasonic Range Finder Modules has a wide operating range
of 1cm to 400cm with an accuracy of 1cm. These specifications makes it ideal for distance
measurement application.
• These can be used for :-
1) Contact less measurement of liquid level in tanks (even 4m deep tank!)
2) Radars for robot.
3) Obstacle sensing in Robotics.
4) Speed check in roads.
Handheld units that can be pointed on vehicles to measure their speed.
Fixed unit installed in check booths that can click pictures of over speeding vehicles
Characteristics and Advantages
• The reason for using ultrasonic wave are:-
• The speed of Ultra Sonic waves is 343m/s which is not too fast for MCUs to measure accurately.
Compare this with speed of electromagnetic waves (like light or radio waves) which is
30,00,00,000 m/s! So it takes only 20ns (nano second) to go and bounce back from an obstacle
which is 3m away! An AVR running at 16MIPS(maximum for most AVRs) takes 62ns to execute a
single instruction.
• Ultrasonic waves travels more narrow, like a beam than normal sound wave.
• This property helps the sensor detect the obstacles that are exactly in line with it only.
• The sensors can be rotated with steppers or servo motors to get a "image" of obstacle in the
surrounding area (like a radar).
Ultrasonic Range Finder Interface.
• Modules are designed to be used for microcontroller based applications hence optimized for it.
The interface is a single pin called SIG (signal). The MCU is connected to the Ultrasonic Range
Finder Module by a single i/o line. The steps required to read distance are :-
• Microcontroller make the i/o line output. The i/o line is made low Wait for 10uS
• Make the i/o line high.  Wait for 15uS Make the i/o line low Wait for 20uS Now make it
input 
• Module will keep it low. Wait till it is low, as soon as it becomes high start the timer. After that
wait till it is high, as soon as it becomes low copy the timer value and stop the timer.
• Finally we have the time required for the wave to go hit the obstacle and come back to the
module.
If the pulse width is in microseconds, the distance can be calculated by the following formula :-
• Distance in cm = Pulse width/58
• Distance in inches = Pulse width/148
Hardware for Ultrasonic Range Finder
• The test circuit will be built around ATmega32 microcontroller.
• The output device will be a 16×2 lcd module.
• The circuit will have the following :-
1) ATmega32 MCU
2) 16MHz Crystal
3) Reset Circuit.
4) 5v Power Supply Circuit.
5) ISP (For programming)
6) LCD Module.
7) LCD Module Contrast adjust pot.
SCHEMATIC
Interfacing ultrasonic rangefinder with avr mc us

More Related Content

PPTX
Obstacle Avoidance ROBOT using ARDUINO
DOC
Ultrasonic Distance Measurement NRF905 Wireless Transmission System Based on ...
PPTX
Ultrasonic radar using 8051
PDF
Distance Measurement Using Ultrasonic Sensor and Nodemcu
PPTX
PPTX
Ultrasonic radar mini project
PPTX
Navigation system for blind using GPS & GSM
PPTX
Distance Measurement by Ultrasonic Sensor
Obstacle Avoidance ROBOT using ARDUINO
Ultrasonic Distance Measurement NRF905 Wireless Transmission System Based on ...
Ultrasonic radar using 8051
Distance Measurement Using Ultrasonic Sensor and Nodemcu
Ultrasonic radar mini project
Navigation system for blind using GPS & GSM
Distance Measurement by Ultrasonic Sensor

What's hot (20)

PPTX
Ultrasonic sensor
PPTX
PDF
Radar System with Arduino Processor
PDF
Ultrasonic based distance measurement system
DOC
ULTRASONIC SENSOR DISTANCE CALCULATE
PDF
Radar system using arduino
PPT
Personal radar ppt 1
DOCX
4th-Yr-PROJECT-REPORT
PDF
Obstacle detection using ultra sonic sensor
PPTX
Final year Engineering project
PPTX
HC-SR04 Ultrasonic sensor with Arduino
PPTX
Ultrasonic range finder
PDF
B.Tech.Final Year ECE Project Report on Ultrasonic distance measure robot
PDF
Short Range Radar System using Arduino Uno
PPTX
object detection using ultra sonic sensors
PPTX
A Modified Radar With Missile Tracking and Automatic Destruction
PDF
Hc sr04 users-manual
PDF
IRJET- Automatic Luggage Follower
PDF
Project Report Distance measurement system
PPT
Ultrasound Sensor
Ultrasonic sensor
Radar System with Arduino Processor
Ultrasonic based distance measurement system
ULTRASONIC SENSOR DISTANCE CALCULATE
Radar system using arduino
Personal radar ppt 1
4th-Yr-PROJECT-REPORT
Obstacle detection using ultra sonic sensor
Final year Engineering project
HC-SR04 Ultrasonic sensor with Arduino
Ultrasonic range finder
B.Tech.Final Year ECE Project Report on Ultrasonic distance measure robot
Short Range Radar System using Arduino Uno
object detection using ultra sonic sensors
A Modified Radar With Missile Tracking and Automatic Destruction
Hc sr04 users-manual
IRJET- Automatic Luggage Follower
Project Report Distance measurement system
Ultrasound Sensor
Ad

Similar to Interfacing ultrasonic rangefinder with avr mc us (20)

PDF
Security System Based on Ultrasonic Sensor Technology
PPTX
Ultrasonic sensors
PPTX
Visually imparied_Arudino.pptx
PDF
IRJET- Iot Based Route Assistance for Visually Challenged
PPT
Physical prototyping lab5-complex_sensors
PPTX
Ultrasonic_Based_Security_System
PPTX
ULTRASONIC SENSOR BASED WALKING STICK FOR VISUALLY.pptx
PDF
Mb1003 hrlv max sonar-ez0 ultrasonic rangefinder
PPTX
Arduino Blind Aid
PPTX
Sensor technology
PPTX
Radar using ultrasonic sensor and arduino.pptx
PPTX
Radar
PDF
Impediment detection robot using Arduino
PPTX
Self Obstacle Avoiding Rover
PDF
IRJET- Smart Guide Stick For Blind
PDF
Microcontroller Based Obstacle Detection Device Using Voice Signal for the V...
PDF
Design_and_implementation_of_line_follow.pdf
PPTX
Senior Project Student's Presentation on Design of EMG Signal Recording System
PPTX
Smart walking Stick for blinds
PDF
ULTRASONIC PERIPATETIC SCANNER FOR AUTONOMOUS TEST BENCH USING RASPBERRY Pi
Security System Based on Ultrasonic Sensor Technology
Ultrasonic sensors
Visually imparied_Arudino.pptx
IRJET- Iot Based Route Assistance for Visually Challenged
Physical prototyping lab5-complex_sensors
Ultrasonic_Based_Security_System
ULTRASONIC SENSOR BASED WALKING STICK FOR VISUALLY.pptx
Mb1003 hrlv max sonar-ez0 ultrasonic rangefinder
Arduino Blind Aid
Sensor technology
Radar using ultrasonic sensor and arduino.pptx
Radar
Impediment detection robot using Arduino
Self Obstacle Avoiding Rover
IRJET- Smart Guide Stick For Blind
Microcontroller Based Obstacle Detection Device Using Voice Signal for the V...
Design_and_implementation_of_line_follow.pdf
Senior Project Student's Presentation on Design of EMG Signal Recording System
Smart walking Stick for blinds
ULTRASONIC PERIPATETIC SCANNER FOR AUTONOMOUS TEST BENCH USING RASPBERRY Pi
Ad

More from Kushagra Ganeriwal (12)

PPTX
Fm generation
PPTX
7 segment interface with avr microcontroller
PPTX
PPTX
History of computer crime
PPTX
Conductors
PPT
Coulomb's law and its applications
PPTX
DOCX
electronic mixer
DOCX
auditorium
DOCX
Prac3 LOUDSPEAKER
Fm generation
7 segment interface with avr microcontroller
History of computer crime
Conductors
Coulomb's law and its applications
electronic mixer
auditorium
Prac3 LOUDSPEAKER

Recently uploaded (20)

PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Well-logging-methods_new................
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Geodesy 1.pptx...............................................
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
Construction Project Organization Group 2.pptx
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Model Code of Practice - Construction Work - 21102022 .pdf
UNIT 4 Total Quality Management .pptx
Well-logging-methods_new................
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Safety Seminar civil to be ensured for safe working.
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Geodesy 1.pptx...............................................
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Operating System & Kernel Study Guide-1 - converted.pdf
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Sustainable Sites - Green Building Construction
bas. eng. economics group 4 presentation 1.pptx
Construction Project Organization Group 2.pptx
additive manufacturing of ss316l using mig welding
Internet of Things (IOT) - A guide to understanding
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...

Interfacing ultrasonic rangefinder with avr mc us

  • 1. Interfacing Ultrasonic Rangefinder with AVR MCUs Prepared by: Kushagra Ganeriwal (130010111009) Kamlesh Desai (130010111006) Sweetu Ratnani (130010111048) Guided by: Prof. AsifIqbal Thakor
  • 2. IR and Their Drawbacks • Obstacle detecting sensors are one of the most basic type of sensors that electronic hobbyists use. There are several methods to make cheap obstacle sensors. These simple sensors are made using a IR Rx/Tx pair or Normal LED and LDR pair. • These sensor may be useful for simple requirement but they have following drawbacks :- 1) Can’t say anything about the real distance of obstacle. 2) Give different result for different coloured obstacles. 3) Need calibration (like setting up a variable resistor). • To solve these problems we have IR Range Finder Module but they have small range. 1) Sharp GP2D12 Distance Measurement Sensor has a maximum range of 80cm 2) Sharp GP2D120 Distance Measurement Sensor has a maximum range of 30cm only.
  • 3. Why Ultrasonic ? • An Ultrasonic Range Finder Module uses ultrasonic waves (inaudible to humans) to measure distance. These module consist of an Ultrasonic Transmitter (Tx) that emits the ultrasonic wave, the waves after striking any obstacle bounces back and reach the Ultrasonic Receiver (Rx). • By measuring the time it take for the whole process to complete and using simple arithmetic we can measure the distance to the obstacle. The Ultrasonic Range Finder Modules has a wide operating range of 1cm to 400cm with an accuracy of 1cm. These specifications makes it ideal for distance measurement application. • These can be used for :- 1) Contact less measurement of liquid level in tanks (even 4m deep tank!) 2) Radars for robot. 3) Obstacle sensing in Robotics. 4) Speed check in roads. Handheld units that can be pointed on vehicles to measure their speed. Fixed unit installed in check booths that can click pictures of over speeding vehicles
  • 4. Characteristics and Advantages • The reason for using ultrasonic wave are:- • The speed of Ultra Sonic waves is 343m/s which is not too fast for MCUs to measure accurately. Compare this with speed of electromagnetic waves (like light or radio waves) which is 30,00,00,000 m/s! So it takes only 20ns (nano second) to go and bounce back from an obstacle which is 3m away! An AVR running at 16MIPS(maximum for most AVRs) takes 62ns to execute a single instruction. • Ultrasonic waves travels more narrow, like a beam than normal sound wave. • This property helps the sensor detect the obstacles that are exactly in line with it only. • The sensors can be rotated with steppers or servo motors to get a "image" of obstacle in the surrounding area (like a radar).
  • 5. Ultrasonic Range Finder Interface. • Modules are designed to be used for microcontroller based applications hence optimized for it. The interface is a single pin called SIG (signal). The MCU is connected to the Ultrasonic Range Finder Module by a single i/o line. The steps required to read distance are :- • Microcontroller make the i/o line output. The i/o line is made low Wait for 10uS • Make the i/o line high.  Wait for 15uS Make the i/o line low Wait for 20uS Now make it input  • Module will keep it low. Wait till it is low, as soon as it becomes high start the timer. After that wait till it is high, as soon as it becomes low copy the timer value and stop the timer. • Finally we have the time required for the wave to go hit the obstacle and come back to the module. If the pulse width is in microseconds, the distance can be calculated by the following formula :- • Distance in cm = Pulse width/58 • Distance in inches = Pulse width/148
  • 6. Hardware for Ultrasonic Range Finder • The test circuit will be built around ATmega32 microcontroller. • The output device will be a 16×2 lcd module. • The circuit will have the following :- 1) ATmega32 MCU 2) 16MHz Crystal 3) Reset Circuit. 4) 5v Power Supply Circuit. 5) ISP (For programming) 6) LCD Module. 7) LCD Module Contrast adjust pot.