Ultrasonic Distance Finder

by Kanjo Noel Ngarka in Circuits > Arduino

71 Views, 1 Favorites, 0 Comments

Ultrasonic Distance Finder

Fantastic Snaget.png

This project uses an ultrasonic sensor to detect distance ranges which is then indicated by the leds. So as the distance increases, the leds come ON progressively indicating the distances ranges. This project is applicable in cases like measuring hole depths, distance for ceiling to floor etc

Supplies

  1. Arduino uno or any
  2. Ultrasonic Sensor
  3. Leds
  4. Battery and connector
  5. Jumper wires
  6. 200 - 330 ohms resistors

Code

Here in the code we delclare the various pins for the ultrasoning Trig and Echo pins and set them as OUTPUT and INPUT respectively. then we also set the led pins as output

We then get the distance in the void loop and use it to turn on the leds progressively with each representing a given value of the distance

Schematic

Fantastic Snaget.png