Skip to content
Advertisements

Easy use of ToF 10120 LASER Rangefinder to measure distance with Arduino + LCD

 

         Hey everyone, and welcome to this tutorial, it’s about the ToF 10120 (Time-of-Flight) LASER Range sensor, the ToF sensors have become very popular due to their reliability and easy use, the most known ones are the Ultrasounds like HC-SR04 (there are a lot of variations), JSN SR-04…, you can find Infrareds too.

C.jpg
ToF 10120

But today we are about a LASER one, they all have the same principle (Send signal (Ultrasound-Laser wave-Infrared), and wait for it to return back) the duration between sending and receiving is called the Time of Flight: Speed is known before, Duration is calculated and divided by 2 -> We can find the distance.

The advantage of the LASER ones is that they are very small like the one we’re using, and can be used for high frequency applications such as camera AF…

D.jpg
Scale in (cm)

The module has 6 pins (GND-VCC) then (RX-TX) for UART and (SDA-SCL) for i²c, in this tutorial we gonna use the i²c interface to wire it with Arduino also I’ll add a LCD i²c screen to see the measure in (mm) you can convert it if you want just simple calculations.

Wiring

 

Wiring.png
Both devices use i²c interface
E.jpg
N.B: The module has 6 pins and usually come with its cable (Black is GND), GND VCC RX TX SDA SCL

Libraries

The only library I used is the LCD i²c NewLiquidCrystal: Download here

 

Codes

The codes I’ve used are modified version of some codes I found on a very sketchy chinese website with no author or source:

 

Tests:

To use this module is straight forward, wire and upload the codes:

F
Using with Serial Monitor
G
Using LCD i²c screen

That’s all folks … If you have any question you can ask me on the SurtrTech Facebook page, post a comment here or on the youtube tutorial video.

Advertisements

Yassine View All

Electronics, Automation engineering student... I try to share my little experience with other electronics amateur.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: