Tag Archives: ultrasonic sensor


Arduino distance meter

HC-SR04 is a very popular ultrasonic sensor for short distance measurements in DIY projects. This Instructable describes how to use it with an Arduino board to build an inexpensive distance meter with range 2-400cm. The measured distance is displayed on a Nokia 5110 LCD screen using a large size font for improved readability. The Instructable explains the details of how the HC-SR04 sensor works and can be interfaced with the Arduino for ranging with an accuracy of 3mm.

Arduino distance meter

Arduino distance meter

In simpler words, the sensor, sends an ultrasound, then it detects wheather this ultrasound has bounced off of an object or not. If the ultrasound has bounced off, it measures the time that it took it to bounce. Since we know the speed of sound, we can easily measure the distance that the ultrasound traveled!

The following video tutorial from the author explains all these details:

Making a motion-controlled lamp using ultrasonic sensors

HC-SR04 is an inexpensive ultrasonic sensor module readily available in market these days and is extensively used in robotic applications for sensing and ranging the obstacles. With a proper arrangement of multiple ultrasonic sensors, it is possible to detect motion and its direction too. This motion-controlled ultrasonic lamp project uses three HC-SR04 sensor modules in an array to detect a waving hand in front of them and rotates the lamp to adjust its position according to the direction of motion of the hand.

Motion-controlled lamp

Motion-controlled lamp

A very simple posture sensor for your chair

If your job involves sitting in front of a computer for long hours everyday, a poor posture might result in neck, shoulder, and back pain. Sitting up straight helps to get rid of some of these problems. This ATtiny85 based posture sensor uses the HC-SR04 ultrasonic ranging module to sense the position of your head while you are sitting on a chair, and generates an acoustic alarm if you are not sitting up straight.

Ultrasonic posture sensor

Ultrasonic posture sensor

[via]