loading

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

<p>I also would be interested if someone could find out how to do this with a 390B+. I've had a play but i'm a total noob so didn't get anywhere. One thing I did notice is that my device does not have the tx and rx pads that were pictured elsewhere in the comments.</p>
<p>I also purchased one of these. So far the serial RX and TX pins on the back of the board are non responsive. I'd guess that a serial command may be able to unlock the serial mode but that may be wishful on my part. </p><p>I did hook a scope and observed the pins while powering on. They don't do anything. Essentially low the entire time. We need to figure out some command or possibly a jumper to enable the serial. Appears to be a knock off of the UNI-T or a no name version of the latest board. I know mine differs slightly in the upper left side of the board vs. pictures I have seen of the 390B+</p>
<p>I tried the various commands with an UNO in reset and using the hardware serial to USB of the board. The 390B+ is not responding or putting anything out on the TX or RX pins. I tied a number of commands and various baud rates but nothing. I'll have to spend some time later to see if there is some easy hack or enable of the serial involved. </p><p>The pins that are exposed from the battery compartment do look more like the ARM debug port more than anything else. Unfortunately I do not have access to an ARM debug interface. </p>
Any one with knowledge on the UT390+ ?
<p>Would also be very interessted in the pins von 390B+! I hope that someone will have success and share the ideas!</p>
<p>Anybody discovered the right pins for 390B+?</p>
<p>For those interested in a laser distance meter with HID usb connection look at the sndway SW-S100. It comes with a CD with a basic application but also a list with command codes. It's a bit more expensive (about US$60 on AliExpress). The software does not seem to be very stable on my PC, but it does work - sending a command form the PC to measure and retrieve the distance on the PC. I'm now looking into implementing an application in C#, but I'm not very familiar with HID-USB, so any help is welcome</p>
<p>I also got a UT390B+. I opened it and it actually indicates the TXD and RXD on the board. Interestingly, these are not directly connected to the connectors accessible under the battery cover (I measured resistance with any of the connectors and these were all high). </p><p>I connected the TDX to the RX and RDX to the TX on an Arduino Due, together with the negative battery lead to ground. Using the <a href="https://github.com/erniejunior/UT390B_Arduino_Library" rel="nofollow">UT390B_Arduino_Library</a> as linked to above, I was however not able to read any data. </p><p>Has anyone had more luck reading data from the 390+?</p>
Hi, did you try sending the serial command which the qartis blog used? Nothing received from the Tx pin when executing commands?
<p>No, I didn't. I think I actually blew up the Tx/Rx connections as I now measure zero resistance between the two... </p>
I'll check the resistance between mine and put the results on my hackaday project. Link in my other comments here. I posted an update this morning you may find of interest (but I've not cracked it quite yet!)
Please join in this project to hack the UT390B+<br>https://hackaday.io/project/12767-peek-inside-uni-t-ut390b
<p>I started a Hackaday project here to try and get the community to find a way to talk to the UT390B+ with microcontrollers. Please get involved and share what you know!</p>
Seems like hyperlink doesn't appear in instructable app so here's the text:<br>https://hackaday.io/project/12767-peek-inside-uni-t-ut390b
<p>Hello All</p><p>Correction : I have an UT390B+ (not 380). </p><p>So I disassemble it.</p><p>GND, and power are identified.</p><p>It seams to have 1 output, and 2 inputs.</p><p>But even trying all RS232 speed, set one input to 1 or 0 during sending command, nothing never append :o(</p><p>So at this time, no success.</p><p>I order one UT390B (hop to receive it). I will try to compare with ...</p><p>So as soon as I found something I'll tell you !.... </p>
<p>Do you have oscilloscope? Have you tried to measure the voltages on those pins? Please post a picture with discovered GND, pwr pinout and internal view.</p>
Yes, I check with the scope.<br>To open is same as the 390B. Dont' forget to remove stickers to view all screews...<br>Wire directly sold and comes by the holes.<br>SO I think that :<br>- White is power (apply voltage (by a resistor) switch on the unit<br>- gray is ground (directly connect to battery)<br>- I think magenta is an output. stay to ON level ( 2.8V) even is pulldown resistor, and make &quot;reset&quot; display if connected to ground :o(<br>- blue and green are input. Blue is 0v and become 1 with pullup resistor. Green same but reverse (2.8V and become 0 with pulldown resistor)<br><br>I will compare with 390B when I will have it...
aspic, I have just been sent a UT390B+ instead of the UT390B I ordered. I'm disappointed but decided to open it up like you. On your UT390B+ were there any other pads than the ones in line which can be accessed by the battery compartment? I seem to have a couple labelled Rx and Tx which aren't anything to do with the ones in a line as far as I can see. I'm going to start a hackaday project for anyone who wants to share their findings on the UT390B+
<p>Thank you!</p><p>I will contact that seller to check if they really have &quot;B&quot; model. So many of them just pretend to. </p><p>I am thinking - is there the 'hard way' - to attach in place of LCD ? if it is non-graphical we could catch print-out version of readings?</p>
<p>What a pity! Please give us a link where you are about to order original UT-390B. I've contacted some sellers on aliexpress who listed 390b, but unfortunately all of them eventually said that they only have 390B+ but at 390B price (which is almost +80%!)<br></p>
I found 390B ! (more expensive I confirm (double than 390B+), but finaly less than a 390b+ can not use ;-))<br>Have a look here<br>http://fr.aliexpress.com/item/UNI-T-UT390B-Laser-Range-Finder-Distance-Meter-Area-Volume-LCD-Meter-0-05m-45m-Laser/1823766667.html?spm=2114.06010108.3.19.dGQsJn&amp;ws_ab_test=searchweb201556_1,searchweb201644_4_505_506_503_504_301_502_10001_10002_10017_10010_10005_10011_10006_10003_10004_10009_401_10008,searchweb201560_2,searchweb1451318400_-1,searchweb1451318411_6452&amp;btsid=261d0cd5-81ac-41f4-9d7d-8b31187e7903
<p>if you can accomplish +-2 mm of 45 m is it thinklable of accomplising sub mm over 1 meter?</p>
<p>I'm not sure what the specified accuracy actually means, but from the raw measurements given in a comment in one of the links above, which seem to yield sub-mm measurement values, I estimated a standard deviation of about 1.1 mm, which is half the accuracy. This suggests that sufficient repeating and averageing could yield sub mm accuracies. For instance, repeating them 100x would yield an accuracy of 2/sqrt(100) = 0.2 mm.</p><p>I actually did this for an ultrasound distance sensor and it worked well, so I don't see why it wouldn't work for this device. Disadvantage is of course the vastly increasing measuring time.</p>
<p>What i would like to know is; Since LIDAR technologies are very accurate over long distances, what kind of accuracy can i be expecting for distances in the 1 meter range? Or is this technology not usable for short distances?</p><p>ie 3d scanner device. For 3d printing the normal resolution of a print is .1 to .2 mm.</p>
<p>The laser rangefinder technology is definitely suitable for distances in the 1m range, just not under about 20cm where it becomes inaccurate. The accuracy under 1 meter is not much better than at larger distances, although measuring time may be somewhat reduced.</p><p>For high resolution scanning purposes I think it would be far too slow; even if the averageing method would work it would take about 30 seconds per .2 mm accuracy single point measurement. If my calculation is right, that would be about 3 months for a scan of a 100cm2 surface. (At the standard 2mm accuracy this would be less than 1 hour) </p><p>Also, the laser spot is quite large, I estimate about 2 by 4 mm at 20-100cm for the UT390B+, reducing spatial resolution. Laser beams can be focussed to sub mm range, but I think this device is not suitable for that. </p>
<p>Hello dir all.</p><p>I just buy an UT380B+ (because UT390B not available). So I try to identify the debug pin assignement but except GND and POWER (not the most difficult ;o)), I didn't identify the other... I check all pins at power on but nothing send at the startup. So not possible to simply identify the tx pin :o(</p><p>Some one try to use it or knows if it's possible to dial by rs232 (ttl) port ?</p><p>Thanks a lot if yes...</p>
<p>Do you have any progress with ut-390b+ ? Also, do you have disassembled photos?</p>
<p>Did you manage to get this working? would be really great to know if it works with UT380B+</p>
<p>Does anyone know the method the UT390b uses for its distance measurement?</p><p>&ldquo;time of flight&rdquo; , &ldquo;phase shift&rdquo; or interferometry&rdquo;.</p>
<p>Has anyone had success hacking the UT390B+? I have opened the unit, but the port under the battery is oriented parallel to the batteries. I am trying to get the serial port pin out.</p>
<p>Approximately how much does it cost to build this project?</p>
Should be possible for $100
<p>Awesome project! And to see someone use turbo pascal is just cool! I love it :)</p>
<p>What is the final precision of the scans (for example the room scan - are the wall distances measured correctly?) What is the time of scanning the whole room? </p>
<p>I once considered building such a device using stepper motors and small line lasers with camera</p>
<p>very intereting. I didn't expect that this kind of telemeter had an easily accessible Rx/Tx pinning. </p><p>This brings me to think about an adaptation of your system: I need to measures the distance on teta angle on 360&deg; (phi angle always at 0&deg;). However, the teta angle will vary at high speed (&gt;4Hz = 4RPM). Could you tell me what is the maximum time latency you observed to make a measure ?</p><p>As the measure is done with the light speed, the latency should be pretty low. But I guess the laser rangefinder itself made some calculation and averages measures before providing the final distance result. These operation should be a bit time consuming. </p>
<p>to be more understandable, my idea is to make this kind of detection lidar:</p><p>http://www.robotshop.com/media/files/images2/lidar-lite-laser-rangefinder-9.gif</p>
<p>I'm pretty sure that you can forget that project. When you use the &quot;fire-mode&quot; the UT390b sends a lot of distances within a second but other instructions f.e. for the servos will disturb the data-flow.</p><p>And when you recieve f.e. 20 distances/second, how to you select? You just want 1 distance in one direction. So you'd have to find an algorithm to select...</p><p>Otherwise when you wait until a correct distance is measured (like I do) and then step foreward it will be definitely too slow. The measure-frequency will then be around 1 distance/second, so quite too slow for your purpose. For your purpose I'd try this laser rangefinder: </p><p><a href="http://www.robotshop.com/en/pulsedlight.html">http://www.robotshop.com/en/pulsedlight.html</a></p>
<p>Yes I know these robotshop products. But the goal of my question was to know if it could be possible to build a cheaper system with this kind of rangefinder. But you answered my question. </p><p>Another solution to get a cheap LIDAR module is to find a broken vacum robot like Neato for few bucks and then dismount it. A lot of hack for these robot are available on the web.</p>
<p>The measured results that you get are a &quot;point cloud&quot;.</p><p>You can use just about any 3D design software to load and view a point cloud. Just google point cloud. </p>
Hi Steve!<br>Getting a point cloud wouldn't be the problem, even with freeware like gnuplot. The problem is how to get a grid with not-equidistant (x,y)-points like in my case. I'm sure Thatcher there are programs for that but i haven't found one. Luckily i could dig out my old Turbo-Pascal-Program ;-)
<p>I don't understand.</p><p>What do you want the grid for?</p>
<p>to create, imitate surfaces like in real... Just points aren't able to do that, I've tried this with my old ultra-sonic-scanner.</p>
<p>When we make 3D models for printing we turn a 3d model into an stl file (which is a point cloud). If you import that into a 3d software package it can be treated as having a skin or not, and the skin can be modified. Have a look at the 123D software. It has scanning to and modification functions.</p>
Of course that and Not (margret Thatcher :-))
<p>I found this for sale - it ought to work, too, right? How would the resolution be improved and the scan area / size?</p><p> <a href="http://www.robotshop.com/en/pulsedlight.html" rel="nofollow">http://www.robotshop.com/en/pulsedlight.html</a></p>
<p>I've found that models too. They look good and can also be read with an arduino. But I don't know, whether sometimes errors will occur in the same way as with the UT390b.</p>
<p>You can also use the Teensy (LC or 3.1 or 3.2) for multiple hardware serial ports. They cost around $15-20 each. </p><p><a href="https://www.pjrc.com/teensy/" rel="nofollow">https://www.pjrc.com/teensy/</a></p>
<p>You could make this both easier and more stable by using an inexpensive telescope mount with slow-motion controls. You could use a manual mount and add stepper motors to it, or get a motorized mount and hack into the motor controls. Scope mounts have to be stable with minimal vibration and control backlash, so it would enhance the accuracy of the lidar readings without having to reinvent the wheel.</p>
Good idea ;-)

About This Instructable

62,837views

595favorites

License:

More by stoppi71:scanning laser microscope with Arduino Arduino Segway Arduino Theremin With Variable Pitch and Volume 
Add instructable to: