close-circle
Close
0%
0%

Open LIDAR

This project is to build a motorized gimbal mount to convert a laser distance module into a 3d LIDAR.

Similar projects worth following
The idea of this project is to use cheap laser distance modules to create 3D scans of the room. This can be done by rotating the laser distance module on 2 axis with the sensor centered on the junction of those two axis (aka: the sensor is on the center of rotation so it's always at the origin). The main goals of this project are to improve the means that cavers use to survey and map caves as citizen scientists. This device will also be useful for volumetric calculations, detecting changes over time, and may be useful in non-caving fields of study. The black and white header image for this page is an example LIDAR scan made using the Focus3D (more photos in gallery). From these LIDAR captures we are able to see how the cave formed, detect water patterns, identify rocks/mud/debris, and overlay the cave on a surface map.

Cavers are one of the few under-funded groups of people who still do mapping and surveying using old civil engineering tools. In 2016 the most common tools for cave mapping are the notebook, tape measure, and Suunto tandem (compass and clino). Some groups have upgraded to using a DistoX which is a modified laser distance meter with compass and clino readings. And a few of those have upgraded to using a PDA (yes...they still sell these on eBay) or tablet for sketching the map.

A few groups of cavers have begun using LIDAR to map caves. But this costs around $1k per weekend to rent the equipment or $40k+ to purchase the equipment. This price range is far outside of the realm of local citizen scientists.

The idea for the low cost LIDAR Gimbal originated with the Lidar Lite v2. This module costs $115 and is capable of 500 readings/second. For a LIDAR which has a physical range of (270° / 2) x 360° (thanks to Alexander for the correction). It takes 48600 samples to capture a 1° scene. For 1° resolution it should take 1 minutes 37 seconds to make a capture. For a 0.5° resolution it should take 6 minutes and 30 seconds. Using the SF30-B should result in lower times.

Options for Sensor Include:

LIDAR-Lite 3SF30-B

Price$149
$449
Field of View0.2 deg?
0.2 deg
Rate500hz
36633hz
Accuracy+/- 2.5cm10cm
Resolution
3cm
Range0 - 40m50m

OpenLidarPCB1c.zip

Gerber Files for PCB version 1c.

x-zip-compressed - 19.08 kB - 09/14/2016 at 22:58

download-circle
Download

OpenLidarPCB1c.pdf

PCB board rev 1c. Fixed multiple issues regarding via and pad sizes and decreased board size.

Adobe Portable Document Format - 60.67 kB - 09/14/2016 at 22:57

eye
Preview
download-circle
Download

OpenLidarSchematic_r1_a.pdf

OpenLidar Schematic revisions 1a. (Revision 1 was missing a connection between the +12V source and both of the VMOT pins).

Adobe Portable Document Format - 64.94 kB - 09/13/2016 at 23:52

eye
Preview
download-circle
Download

LidarGimbal303mmABSsheetInkscape_v1.svg

Laser cutting template. Delete the cyan lines or set power to 0 before using. All holes are 1mm pilot holes.

svg+xml - 31.52 kB - 06/27/2016 at 18:05

download-circle
Download

plain - 13.61 kB - 06/27/2016 at 11:26

download-circle
Download

View all 6 files

View all 18 components

  • Reviewing Project

    caver.adam05/25/2017 at 15:16 0 comments

    When I left off the status was that I had accidentally back-volted my circuit and damaged every component (including the sensor).

    I've been too busy with my Master program to tear apart the sensor to find and replace the burnt out components, but I now have a LidarLiteV3.

    As I've been looking at the components that I burnt out, I'm realizing there are some improvements I can make. First, the Teensy 3.5 had a firmware update and now supports the LidarLite (and I presume the SF30). I've compiled the code for the Teensy and it compiles! This solves all my issues with not having enough memory to bulk-write to the SD card!!!

    Another thing that I can fix while I'm at it is the motor whine. The motors were whining while using the knock-off motor drivers I had. Instead I can splurge for some $10 Pololu drivers that should work a lot nicer.

    Also, there are now other people that have validated that the point cloud for these sensors looks awesome. Good enough for cave survey (but not for historical cateloging of archeological sites). So I'm also looking at my old plan to have this kit laser cut out of ABS. The devices I've seen so far were not stand-alone and had wires hanging everywhere to a computer.

  • Lesson: headers are not secure

    caver.adam10/09/2016 at 19:41 0 comments

    I've been working to recover from accidentally pulling my Arduino out of the female header pins. Since it reconnected when it landed and burned itself up...it also burned up a number of other components. I've replaced the motor drivers, the 5V regulator and the Arduino. Next I need to replace the microSD module which also burned out. Also, the serial portion of the SF30 was damaged, but the USB side still works. So I can either switch to the LidarLite 3 which has arrived now, or I can get a usb to serial module to put between the SF30 and the Arduino (I'll eventually do both so I can compare the two sensors). I'll probably work on the LidarLite portion while I wait for a USB module to come.

    That being said...It took all of 2 seconds to accidentally yank that cable, but it will take 2 weeks to repair the damage. I had used headers to try to make it easier to switch parts and to prototype...but that seriously backfired here.

  • Conversion to XYZ works

    caver.adam10/06/2016 at 01:49 0 comments

    My processing sketch now converts from RAE to XYZ. I used a single azimuth scan to prove that the conversion works.

    Then CloudCompare imports the file and can clean it up and save it as needed (I used e57).

    Once I saved it in an LAS file it opened in ReCap without a problem.

    I'm noticing a lot of waviness in the scan. However, I'm wondering how much of that is due to the jerking motion being made because of the frequent SD card delays. Without outputting to the SD card this is MUCH more smooth running. Oh well, a problem for another day.

    Also, my LidarLite v3 arrived today. I hooked up all the electronics.

    My replacement Adafruit Trinket arrives tomorrow. Fingers crossed that the SD card module didn't get burned out. If everything else survived then it should be ready to upload the sketch and get my first scan.

    And my 8K FRAM chip arrived today. But I'm out of time...so it will have to wait until another night.

  • Update

    caver.adam10/05/2016 at 15:53 0 comments

    Making progress slowly. Last night I was ready to try a first room scan...but I picked up the unit with the USB still connected. The arduino was pulled out of the female header socket and when I set the tripod back down the pins shorted and burned out the arduino (battery power was still on). Didn't have time to check whether any other parts were damaged. New arduino arrives Thursday.

    I'm also getting strange results when I convert my spherical RAE file to Cartesian XYZ. My scan only had two pitch scans all the way around and azimuth varies 0.225 degrees. But converted to XYZ the angle appears much larger. Also, the pitch results appear to be repetitive. I suspect I may have an algorithm problem with the pitch calculation, and I may have a sin/cos decimal error with very small angles. Will try to work on the processing sketch more tonight.

    [Edit: ...and...my angles are in degrees but sin is in radians...that explains that.]

  • Running [slowly]

    caver.adam10/04/2016 at 03:34 2 comments

    So, it is running now. Slowly. It's running about 1/10th the speed I had planned on. I've ordered a memory module which should help me speed up some...but I really need a better way of writing to the SD card that is faster.

    Also, when I removed all the SD writing code it is turning slower than it was the other day. I wonder if I accidentally changed a setting while doing all the other work.

    Oh well. Speed optimization later. Now I'm charging my batteries. One of them is giving an error in the battery charger. It may be dead from me draining it too far.

    Next step is to convert the output to a point cloud that can be read by other files. Processing here I come.

  • SD cards are slow [for low RAM systems]

    caver.adam10/03/2016 at 13:03 0 comments

    I've been making progress on the project and have it very close to running. I was able to get some outputs yesterday, but VERY slowly. I've run into a problem where the SD card latency is a major issue in scanning speed. So instead of writing to the SD card every reading I need to save them up and send them in chunks. Unfortunately, I only have enough memory to save up to 640 bytes of information before sending it to the SD card. That means my scanner pauses every 320 readings [of two bytes per reading] in order to send the data to the SD card. It's taking 9 seconds to scan one pitch rotation and save to the card. This compares to 0.9 seconds to scan and throw the data out over serial.

    Other than that, I had some issues with odd values being output. But, the TestSF30 function outputs correctly, so I may just need to compare the code for collecting and converting results.

    I was trying to get a scan it late last night before I quit...but my batteries quit first. So, tomorrow night to get a scan out.

  • Progress cont'd

    caver.adam09/29/2016 at 13:12 0 comments

    The project is currently hooked up entirely on the old gimbal I made some time back. Also, the code for each individual part of the project works. Bluetooth, hall magnet detection, SD card, SF30, motor driving. Now it's just a matter of combining everything.

    Last night [before I ran out of time] I wrote the code to perform a scan of the room. But I was having the Arduino crash on me in mid sentence. Literally -- it was crashing in the middle of serial outputs over Bluetooth. I suspect I'm either running too much serial too quickly or that I'm having some sort of buffer issue with Bluetooth module. I'm going to try to mess with some strategic delays and with shorter sentences being output across Bluetooth sometime in the next couple nights.

    Soooo close to getting a first scan.

  • Progress

    caver.adam09/27/2016 at 04:36 0 comments

    Today the circuit is assembed except for the SF30-B module. I want to be rested when I check the wiring again for a third time. Really, really don't want to fry my $450 sensor. But the motors, SD card, Bluetooth, and microcontroller all work. Thanks to a local friend Tim from the local hackerspace who pointed out that I was driving my Yaw motor too fast and that's why it wasn't working. I think the pitch motor can still go 50% faster (test required). GitHub has been updated, but lots of small details left to complete the code.

    Took a boring video, but you can glance at it for 10 seconds to see it doing it's thing. I turn the scanRoom function on with bluetooth and it starts running. It's running at just over 1 cycle per second. Video was with a handheld cell phone. Hard to tell much. More videos once I connect the SF30 tomorrow.

  • Waiting on Connectors

    caver.adam09/26/2016 at 14:25 0 comments

    Didn't get nearly as much done on my project this weekend as I had planned. Tried to plan out an enclosure to be 3D printed, unfortunatly my original design wouldn't fit on my 3D printer. Leaves me with the option of redesigning for 3D printer, laser cutting, or other.

    But, after doing that my circuit boards arrived, so I stopped working on the enclosure because I already have a stand that will work for testing purposes. Started soldering my board, but my connectors from Amazon were "delayed" in transit. Hopefully they will arrive today to finish wiring the project up.

    One new problem on the circuit board: I planned to use screw terminals but I made the holes [barely] too small to hold the screw terminal pins. 5 seconds with a file and they fit. Oops.

    On the bright side, I built a new shed door, and sweat out a gallon in the heat working in the yard. That should leave me time to work evenings on the project this week.

  • SF30 mount

    caver.adam09/23/2016 at 02:32 0 comments

    Printed my SF30 mount tonight. Fits well. Nice to have this ready to go.

View all 41 project logs

  • 1
    Step 1

    Assembling the Gimbal

    Note: These instructions will soon change. A rough draft for a laser cut version of the project is in works. This will emulate the way that many acrylic 3d printers are made for easy assembly.

    Original gimbal instructions:

    To start with, it is necessary to print out the gimbal vector SVG file that has the dimensions for the project. Make sure to print this file at normal size. To compare this, the large platform is 6 inches. Measure this platform carefully to make sure your printed copy matches that scale. The file was made to match a 12" by 12" sheet of plastic. You may need to use more than 1 sheet of plastic to print the file or you may need to print individual shapes onto pieces of paper. Alternatively, you can simply use the file as a template and hand measure all the pieces. Or you can laser cut the file.

    Next, it is necessary to cut out the plastic pieces to the specifications in the file. The original project was done with a jigsaw. Any sort of cutting method will work.

    Next, drill all the holes that are specified. The first version of the file does not have the drill hole sizes indicated. A tap and drill bit guide will indicate which size holes to use for the screw holes. The motor shaft holes need to be greater than 7mm to prevent friction. To drill motor mount holes print out a nema 17 layout and tape it to the plastic piece to be drilled making sure to center the motor shaft very carefully. Then drill using a 3mm bit.

    After drilling holes I glued pieces together that needed to be glued. This includes the base that connects to the Tripod and the vertical uprights.

    After the glue was set I tapped all holes to the right thread. Then I assembled the device.

    [Need updates but will probably wait until laser cut version of mount is designed]

  • 2
    Step 2

    Setting the Stepper Driver Current

    If possible, it is recommended to wire the stepper driver on a breadboard to set the current before you solder the driver into the project. It is best to solder in the stepper driver to the main board after soldering in the 5V regulator, but before soldering in any of the other components. This way, if you make any mistakes in orientation of the chips you will not burn out any of your sensitive components. Use a multimeter to make sure that there is not any leakage of 12 volts onto any of the 5 volt traces.

    See: Pololu Instructions Link

    See: Instructables Instruction Link

    I am successfully running my motors with a Vref of 0.60V with my 1.2A 15.6 oz.in motors on a 12V power supply. This project does not require an exceptional amount of current to function. The yaw motor appears to require at lest 1ms movement time between each eighth step in order for the motor to move when commanded. The pitch motor is currently running with a 250us delay, but I haven't tried less than that yet.

  • 3
    Step 3

    Setting up the bluetooth module

    Tools: TTL (or FTDI) cable, TinySine Bluetooth Module, computer with usb port, serial monitor

    First things first, the bluetooth module comes with a default BAUD rate of 9600. Yeah, that's not going to do. So lets speed things up.

    To start this we begin by wiring the bluetooth module to our USB to TTL converter (I'm using an FTDI converter that also programs the Trinket Pro). The wiring is VCC->VCC, GND->GND, TX->TX, RX->RX. Seems obvious, but this is NOT how we will hook it up to the Arduino later.

    Next, plug the USB cable in and the bluetooth module should start flashing.

    Open a serial monitor program (I'm using the one built into the Arduino software) and make sure the port is set to the right one. For the settings the BAUD rate needs to be 9600 and the monitor needs to be set to "No line ending".

    Send the "AT" command to see if it is working. The module should reply "OK".

    Send "AT+BAUD?" to see the current BAUD rate. It should return a "2" which corresponds to 9600 [from the datasheet].

    Send "AT+BAUD6" to change the BAUD rate to 38400. Re-power the module for the settings to take effect. You can use "AT+RESET".

    Set your serial monitor to 38400! Otherwise you won't be able to talk to the module anymore. (Note: I had to set the rate of my serial monitor, close the window, and re-open the window).

    Send "AT" and make sure it responds back "OK".

    If you want to set a BLE password or change the EDR password you can do that now too.

    EDR: "AT-PINEmypassword"

    BLE: "AT-PINBmypassword"

View all 10 instructions

Enjoy this project?

Share

Discussions

caverjohn wrote 01/04/2017 at 16:29 point

Hi Adam, I stumbled across your project while googling "Lidar-Lite v3".  I just received one of those sensors yesterday. I hope to someday use it build a scanner for cave mapping similar to your design. I'm also a caver in the Louisville area (NSS40959RL). I'm very impressed with your work on this project.

  Are you sure? yes | no

Alexander wrote 07/13/2016 at 16:23 point

It is also, as globe. We have latitude and longitude.


By rotating to 360 deg of motor1 we get parallel. Trajectory of point is circle. By upping motor2 to 10 deg, we get increase of latitude by 10deg  and had another circle. So by changing from -90 to +90 of motor 2 and full 360 deg rotate of motor1 we get all sphere.

  Are you sure? yes | no

caver.adam wrote 07/13/2016 at 17:30 point

Ah. Thanks! Oops! My flow chart had me taking the same point twice! You're a lifesaver.

  Are you sure? yes | no

Alexander wrote 07/13/2016 at 13:12 point

Hello, from Russian caver . I am think you mistake: "is capable of 500 readings/second. For a LIDAR which has a physical range of 270° x 360° it takes 97,200 samples to capture a scene"

You must take 360 deg  to 180 deg range for full 360 sphere, so 64800 samples and 130 sec for 1 deg resolution.

  Are you sure? yes | no

caver.adam wrote 07/13/2016 at 14:10 point

My 270 degree figure comes from the fact that I can't shoot through the base of the LIDAR to view the ground. Ideally I would want to capture 360x360 degrees.

But this does bring up an interesting point. For instance, when the sensor is pointed straight up (in the direction the base motor points) the device will be pointing at the same point as in the previous 270 degree scan of the carriage.  This means we will have 360*resolution measurements of the same point. Similarly, the closer we are to the poles, the closer together the scan points will be. This is something that can be worked on later to decrease scan times. I've also considered using a variable scan resolution based on distance. 

  Are you sure? yes | no

caver.adam wrote 07/13/2016 at 14:11 point

If I'm confused, please feel free to shoot me a diagram. Thanks!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates