Introduction: Laser Pointer Ultrasonic Distance Finder

Picture of Laser Pointer Ultrasonic Distance Finder

This is a ultrasonic distance measuring tool with a laser pointer to find the exact range for that particular point in space. It's also a nice touch if you want to have 'spidey' senses at a comic-con.

This is instructables is made with the request of fellow author @watchmeflyy as well as other members of the community.

Step 1: Circuit

Picture of Circuit

Step 2: Mount Laser

Picture of Mount Laser

Glue the laser on top of the Ultrasonic sensor. The closer it is to the centroid of the sensor the more accurate the readings will be as the offset source of error will be very limited.

Step 3: Code

Picture of Code
#include  <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
const int trigPin = 9;
const int echoPin = 10;
long duration;
int distanceCm, distanceInch;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
void loop() {
digitalWrite(trigPin, LOW);
digitalWrite(trigPin, HIGH);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distanceCm= duration*0.034/2;
distanceInch = duration*0.0133/2;
// cm distance
// column 0 row 0
lcd.print("Distance: "); 
lcd.print("  cm");
//imperial distance
// coloumn 0, row 1
lcd.print("Distance: ");

Step 4: Enjoy!

Picture of Enjoy!

Wear it as a wrist watch for your spidey senses or just hold it on your hand like a normal person. Aim and measure!



ItsGraGra (author)2017-09-04

This is a good candidate for the 'NewPing' library, better timing and simpler code.

Get library here :

scofision1 (author)2017-09-03

this is a wrong project, i think the Ultrasonic cannt measure a laser pointer

grayl (author)2017-08-31

Just so we are clear, the laser has nothing to do with the operation of the sensor, except to help visualize where the sensor is pointed, right?

EdwardF2005 (author)grayl2017-09-01


TechMartian (author)grayl2017-09-01

Yes you are correct.

About This Instructable




Bio: Aerospace Engineer working in Software Development with a passion for Hardware.
More by TechMartian:Flying Captain America's Shield - RC PlaneWide Angle ShotsLED Ping Pong With Shift Register
Add instructable to: