Showing posts with label distance sensor. Show all posts
Showing posts with label distance sensor. Show all posts

Friday, April 21, 2017

Shooting Laser to measure distance



Intro

This time-of-flight sensor is a laser distance sensor, that emits a 940nm laser. It can measure distance up to 125cm quite accurate. Adafruit delivers a ready-to-use library and a functional example you should try.

Wiring


The sensor is connected via I2C. So you have to use pin 4 and 5 on the Arduino Uno/Nano (other Arduinos may have different pins for I2C). It works with 3.3 volts. But since the breakoutboard has a voltage regulator implemented, you can connect it also to 5 volt.

Video


Casing

=> work in progress

Where to buy?
You can find it on eBay, if you search for "Time of flight"
Or directly from Amazon: Time of flight
Arduino Nano

Monday, March 20, 2017

Makers most popular HC-SR05 ultrasonic sensor



Intro

If you're starting with Arduino, you won't get past this sensor. It's a cheap, easy-to-use ultrasonic distance sensor. If you ever wanted to build your own obstacle avoiding robot, you'll need at least one of these sensors.

How it works

In simple words. There is a speaker that emits an ultrasonic impulse. The pulse is not audible for the human ear. The pulse travels with the speed of sound. And when it hits a target, it's reflected back to the sensor, where a microphone can detect it. And because we know how fast sound travels, we can calculate by the duration of the impulse to came back, the distance to the object.



Wiring

Wiring is easy. The sensor works with 5V. And both data pins are also 5V tolerant. So fist the usual 5V to 5V and GND to GND.
I attached the trigger pin to Digital 2 (D2) and the echo pin to Digital 3 (D3). But you can use any digital pins.Although I wouldn't recommend using Pin 0 or Pin 1, cos' it would probably interfere with the serial monitor.


Video


Watch the video. It probably will answer all your questions.