Adventures in Science: LIDAR

Let's take a look at how LIDAR works and how we can use it in robots.

Favorited Favorite 3

It’s been a while since the last Adventures in Science, and I wanted to take a break from the super basics of Arduino programming to discuss something slightly more advanced: LIDAR! While the principles behind LIDAR are not very complicated (shoot a laser at something and measure the time it takes for the reflected light to return), it has a variety of applications in science, robotics and law enforcement. This week, we examine the fundamentals of LIDAR and show how to make a simple sweeping distance scanner out of a servo and the LIDAR-Lite v3.

In the case of the LIDAR-Lite v3, an infrared laser is shot out of the transmitter and the time it takes for that reflection to return to the receiver is measured. We can calculate the distance by using the equation:

Calculate distance from a timed reflection

Here, d is the distance to the object (in meters), c is the speed of light (3.0 x 108 m/s) and t is the time it takes (in seconds) for the light to leave the transmitter, bounce off the object and return to the receiver. We divide by two to account for the fact that the light has to make a round trip (to the object and back).

By strapping the LIDAR unit to a servo, we can sweep it back and forth, taking distance measurements at every degree. This creates a sort of “distance map” of a 180-degree slice in front of the system, which we can store as an array. With this information, we can look for objects (smaller numbers in the array) or gaps and passageways (larger numbers in the array). When applied to robotics, we can create a simple vision system where the robot can drive toward the open areas to navigate down a hallway or between hay bales.

The big issue with the servo sweeping unit is that it takes two seconds to take one full scan, which can result in a painfully slow robot. For a faster scan, a slightly more advanced unit is required, such as the Scanse Sweep, which continually rotates and can perform a full 360° scan around 10 times per second. Fun fact: the Scanse Sweep uses a LIDAR-Lite v3 on top of a motor with a slip ring to pass data.

If you are looking for a more advanced method of object detection and avoidance in your next robotics project, LIDAR is a great solution, as it gives you good accuracy and precision over a relatively far distance (up to 40 m for the LIDAR-Lite v3).

Comments 6 comments

  • Hi Shawn!

    Great video!

    I do have a couple of (hopefully “constructive”) comments: First, is it me, or is it getting to be about time for a new pen? (The ink doesn’t seem to be as bold as it was a few months ago.)

    Second, my inclination would have been to have a couple of “obstacles” on the table for the LIDAR to detect. (I’m sure you can think of something – a vase of flowers, a table lamp, a soldering station, even just a stack of red boxes.)

    I have a somewhat general question about LIDARs: is there some sort of “modulation” imposed on the “outgoing” laser signal to make it easier to identify the return signal? I can see potential problems when you get multiple LIDAR units in a close area, e.g., several robots in a competition. BTW, I’ve seen one or two of the “self-driving cars” over in the Tempe, AZ area – the spinning LIDAR on the roof makes it pretty obvious. I can see the potential for some confusion amongst them (at some point in the future) when you get, say, 3 or 4 lined up at every side of an intersection, waiting for the pedestrians to clear so at least one direction gets a green light… (in AZ, crosswalks get “walk” when the corresponding direction gets “green”, but in some states, such as CT, the pedestrians have a separate “cycle”)

    • I came here to ask the exact same question. I’d love to see the results of pointing two of these LIDAR modules directly at one another and trying to measure the distance.

      Seeing as I don’t have $300+ to spend to do this test, maybe SparkFun could do a quick one. =)

  • Good job Shawn.

    I’ve got a few LIDAR lite units and I intend to use them for the AVC. Have you actually tried these with hay bales? I’m concerned about the consistency of the return signal and the range for reliable return.

    I intend to do some experiments soon–just wondering what your data looks like.

    Or has anyone else tested these with hay or straw bales?

    • We had the same thoughts last year, and actually made a video where we tested various sensors on the haybales. They worked surprisingly well. The LIDAR Lite wasn’t one of them as it was out of production at the time. As we get closer to AVC we’ll give it a shot, but if you do your own testing please let us know what you find.

  • On your servo sweep unit, why not have it scan in both sweep directions? That should double the “frame rate” for most of the sweep.

    Also on the Scanse Sweep, it’s interesting to note that the corners of the room don’t show up as well. Is this because the angle of incidence of the sensor is to acute allowing the wall to scatter most of the IR beam in directions that aren’t right back to the receiver?

    A commercial application of something very similar to the Scanse Sweep is in the Neato Robotics robotic vacuum cleaners. In fact, before the Scanse Sweep, the cheapest way to get a hold of a 360° scanning LIDAR was to buy one of those robots and then tear it down for the LIDAR. (The wheel motors and drop sensors could be considered bonus “free” parts with the $500-$600 LIDAR when buying the lowest end robotic vacuum cleaner…)

    • I originally had it scanning in both directions, but there was about a 10 degree offset, and I was too lazy to write the code to make sure the measurements lined up (not for a video demo, anyway).

      Not sure why the Sweep can’t get the right corner, but I know that my laptop was blocking view to the left corner :)

Related Posts

Recent Posts


All Tags