Perfect Projects with Ultrasonic Range Finder for Arduino Beginners

by | | 0 comment(s)

Do you know which sensor is most widely used in electronic education? Maybe you have used it, that’s ultrasonic range sensor HC-SR04. Millions of HC-SR04 have been sold over the last serveral years. The HC-SR04 is so popular because it’s simple, useful and very cheap. Today I will show you three projects that you can finish easily with HC-SR04.

1. Measures Distance

Ultrasonic range finders are fun little modules that measure distance. You can use them to find the precise distance to an object, or also just to detect when something is within range of the sensor (like a motion detector). Ultrasonic range finders are ideal for projects involving robotic navigation, object avoidance, and home security. Because they use sound to measure distance, they work just as well in the dark as they do in the light. The ultrasonic range finder we will be using in this tutorial is the HC-SR04. The HC-SR04 can measure distances from 2 cm to 4oo cm with an accuracy of ±3 mm. >>>Video tutorial

2. Hot/Cold Led Detector

In this project, we will combine an Arduino, a Ping sensor, and a small assortment of components, to build a project that senses distances as “hot/cold.” Once built, we’ll walk through the software running our basic “sketch,” (what an Arduino program is called) and then experiment with variations of the “hot/cold” theme, all the while using the same circuit.

For the Arduino sketch files provided, the V1 sketch is detailed below. It measures distance from the sensor. The farther you are from the sensor, the “cold” blue LED begins to glow, and then the closer you get to the sensor, the “cold” LED fades away and the “hot” red LED turns up to full brightness!

The V2 sketch is a “capture the ping” game. At first, the “cold” blue LED glows, and every so often, the “hot” red LED will flash. When the red LED is on, try to move your hand in front of the sensor quickly. If you are fast enough, the red LED will flash; if you are too slow (or cheat!), the blue LED will flash.

And finally, the V3 sketch is a simple “hot/cold” switch. When no object is present in front of the sensor, the “cold” blue LED will produce a slow pulse. When it does sense an object, say when you sit down in front of your computer, the “cold” blue LED will turn off and the “hot” red one will shine at full brightness. This switch can be used to trigger other effects, such as waking your computer up from sleep mode. >>>Video tutorial

3. Avoidance Robot

This is my second robotics project. It is an Arduino controlled obstacle avoidance robot. It uses an SDM-IO ultrasonic range finder to detect objects in or near its path. It continually scans its environment and emits a tone that is dependent on the distance. If an object gets too close, the robot will veer away and sound an alarm and if an object gets too close then the robot will pivot away from the object and sound a different alarm. >>>Video Display

>>>DIY Avodidance Robot Kit

This entry was posted in no categories.

You must be logged in to post comments.