Arduino Proximity Alarm

Do you have a pesky sibling or pet that sneaks up on you? Are cars always in your blind spot? Create a proximity alarm that alerts you to approaching objects. This simple guide will teach you how to create a proximity alarm that will light up and make noise when something approaches.

 

Arduino Proximity Alarm

 

An ultrasonic rangefinder and Arduino microcontroller will check for nearby objects and if need be, alert you with a piezo-buzzer and RGB LED. Learn about these components using electronics lab simulations and eventually design, code, simulate, and build the proximity alarm itself! This is great if you are looking for a quick project to learn about digital electronics.

To sense distance, we will use the Parallax PING))) ultrasonic rangefinder. To sense distance, the rangefinder rapidly sends out ultrasonic sound waves. Each wave will travel outwards, and if there is an object in its path, it will collide and bounce back to the rangefinder. The time it takes for the wave to bounce back determines the distance of that object. The Parallax PING))) can only sense objects from around 2 inches to 10 ft.

The PING))) has onboard ICs (integrated circuits) that do most of the heavy lifting. All we need to do is send the rangefinder a quick 5V pulse from the Arduino and use the pulseIn() function to check the time it took for the wave to bounce back. See the ‘Code' step for more information on how to code the rangefinder.

To alert the user we will use a piezo buzzer. This device will emit a click sound when a DC voltage is applied. To make a tone, we can use the Arduino tone() function. This will cause the device to emit an annoying sound at that tone. String enough of these tones together and you can create music!

Change the frequency in the simulation below to see how the tone changes:

For more detail: Arduino Proximity Alarm


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top