Introduction: Simple LiDAR Using the Laser Rangefinder Uni-T UT390b, Arduino and Turbo Pascal

Hello!

Some days ago I bought a laser rangefinder (Uni-T UT390b, f.e.

http://www.dx.com/de/p/uni-t-ut390b-45m-laser-dist...) to realise a simple LiDAR. The rangefinder has an accuracy of +/- 2mm and is able to measure distances up to 45m. This will be enough for my living room ;-)

You'll also need:

* Arduino Mega (because of more than one Serial Outputs)

* 2 Servos

* Servo tilt (f.e. http://physicalcomputing.at/epages/f46ab952-295a-4f65-8ffa-38a4b8eec267.sf/de_AT/?ObjectID=156007)

* LM317 and some other parts for the 3V-power-supply

* 5V/3A power supply for the servos and the voltage Regulator

* cable, different connectors etc.

Step 1: The UT390b Laser Rangefinder and His Outputs

In the web you can find some interesting articles about the UT390b and the serial read out of the data.

* https://github.com/erniejunior/UT390B_Arduino_Library

* http://blog.qartis.com/arduino-laser-distance-mete...

* http://blog.qartis.com/laser-distance-meter-update-serial-commands-timing-measurements/

There's even a special UT390b-library for the arduino.

You just need 3 pins (GND, RX and TX), placed under the batteries on the back of the unit. Open the rangefinder (instruction: http://blog.qartis.com/arduino-laser-distance-meter/) and solder 3 wires on the outputs.

Attention:

* The Tx-signals coming from the arduino have a 5V-level. This is too high for the UT390b and may destroy the electronics. Therefore you'll need a voltage devider with two 10kOhm resistors! The 2.7V-output doesn't need to be connected.

* A further problem is, that the UT390b will sometimes turn automatically off during the measurement or will stop because of an error message (f.e. 190). To be able to continue the measurement without problems you should replace the batteries with an external power supply and a switch for the restart! I use a LM317 as a voltage regulator.

If the UT390b shows an error on its Display you'll just have to switch it off and on again followed by pressing the ON-button. If the UT390 turns off automatically you'll just have to push the ON-button.

Step 2: The Measurement

To start the measurement I have to push a button. Then the two servos move zigzag and for each direction the measured distance and alignment (horizontal angle phi, vertical angle Theta) are sent to the computer. To save the values I use the program teraterm.

Step 3: Visualization of the Data

When you have the data (phi, theta, distance) you want to visualize them. I haven't found a suitable prgram in the Internet to do that. The problem is, that the values aren't regularly. Most of the Commercial programs need regular (x/y)-Points to draw a net.

Luckily I've written a program in Turbo Pascal 20 years ago to visualize 3D-data. The intention was to display topographic surfaces like my hometown. For this I had to read the altitudes of 1600 points in a map ;-)

For the LiDAR I use this program to visualize the detected surrounding. With keys I'm able to Change the Point of view, the magnification and the offset.

Step 4: The Results

Scanning my living room was the first test of my LiDAR. At this time I didn't have the option switching off the UT390b manually yet. Therefore some lines are a bit distorted and displaced, because I had to take the rangefinder out of the mount a few times during the measurement.

Equipped with the external switch and a more stable mounting I'll now produce better results ;-)

Thank's for spending your time. Maybe you're interested in my other projects:

https://www.youtube.com/user/stopperl16/videos

more physics projects: https://stoppi-homemade-physics.de/