Accéder au contenu principal
Publicités

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.

Publicités

Yassine Tout afficher

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

3 commentaires sur “Easy use of ToF 10120 LASER Rangefinder to measure distance with Arduino + LCD Laisser un commentaire

Répondre

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion /  Changer )

Photo Google

Vous commentez à l'aide de votre compte Google. Déconnexion /  Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion /  Changer )

Connexion à %s

%d blogueurs aiment cette page :