Introduction: Distance Detector With Buzzer and LED Meter.

Overview:

This is a simple distance detection circuit with the use of an ultrasonic sensor, a buzzer, a row of LEDs, and 2 relays (optional).

The ultrasonic distance sensor will light a row of LEDs depending on distance. Then if a change in distance is detected, that exceeds your threshold, a buzzer will sound and the optional relays can toggle a device (a light).

All options are configurable such as the threshold, number of LEDs, maximum perceived distance, etc...

You can download the Fritzing application to assist in the build/codeing process here: http://fritzing.org/download/

Uses:

  • Garage parking sensor
  • Electronic measuring device
  • Security alarm
  • Motion detection
  • Add complexity to your everyday shenanigans.

This is my first project on the Arduino and using C++ so please be gentle ;)

*** Now with Mario sounds!!! ***

Step 1: Build It

Build the circuit using the listed parts:

  • 1 Ultrasonic sensor (I use the 4 prong model)
  • 1 Buzzer
  • 2 Relays (optional)
  • 8 LEDs (4 red, 2 yellow, 2 green)
  • 8 220 ohm resistors
  • A plethora of jumpers

Step 2: Code It

Using the supplied code, write your program. I have included comments in the code to explain what each section is doing. You can then modify the code to fit your needs.

Step 3: Resources

Comments

author
NickM69 made it! (author)2016-01-21

Piece of cake to make, thanks!

author
tomatoskins made it! (author)2016-01-21

Really cool! I love arduino things like this!

About This Instructable

2,746views

41favorites

License:

Bio: I work for an IT company in Boise, ID where I do computer/server/networking/IT things. I got an Arduino to work on solidifying ... More »
More by Jedimaster0:Distance Detector with Buzzer and LED meter.
Add instructable to: