Archive Article

LIDAR 3D Imaging on a Budget

PIC-32-Based Design

Demand is on the rise for 3D image data in a variety of applications. That has spurred research into LIDAR systems capable of keeping pace. Learn how this Cornell student leveraged inexpensive LIDAR sensors to build a 3D imaging system—all within a budget of around $200.

By Chris Graef

There’s a growing demand for 3D image data in a variety of applications, from autonomous cars to military base security. This has prompted research into high precision LIDAR systems capable of creating extremely clear 3D images to meet this demand. While these high-end systems can produce accurate and precise images, they can cost on the order of multiple thousands to tens of thousands of dollars. A side effect of this research, however, is the increasing availability of LIDAR devices at a cost much more affordable for tinkerers, students, hobbyists and budget-constrained embedded system developers. Using this new supply of inexpensive LIDAR sensors, I was able to build a 3D imaging system with a budget of around $200. The major parts used for the system can be seen in Table 1.

Table 1 Shown here are the cost and quantity of the major components used in the project. Not included are some smaller components such as wires, resistors and op amps.

At a glance, my LIDAR scanner works by turning a single-point LIDAR range finder through a scan pattern. I use a Microchip PIC32 microcontroller to control two analog feedback servos—one setting azimuth angle and one setting altitude angle—to move a mounted LIDAR distance sensor through a scan pattern. By synchronizing the feedback data of these two servos with the distance readings from the LIDAR sensor, the system defines one point in 3D space in a spherical coordinate format. After allowing the system time to create 10,000 to 20,000 points, the result is a 3D image made up of distinct spatial points. These points are stored in a point cloud data file format, which can be displayed by graphing software such as MATLAB.

— ADVERTISMENT—

Advertise Here

MECHANICAL DESIGN

A CAD model of the imaging system is shown in Figure 1. The servos are shown in blue, the LIDAR is shown in red and the 3D printed mounts are shown in gray. All the components are connected using nuts and machine screws. The lower (azimuth) servo rotates the entire apparatus above it. The upper (altitude) servo rotates just the LIDAR sensor. The combined motion of the two servos results in the scan pattern of the system.

Figure 1
A CAD model of the LIDAR sensor and servo mounting. The LIDAR sensor is shown in red, the servos are shown in blue and the mounting brackets are shown in gray.

One thing to note in this design are the slots used on the mounting brackets to fasten both the altitude servo and the LIDAR sensor. One of the biggest requirements for the mechanical design of this project was to ensure that the center of rotation for the LIDAR sensor was in the center of the scanner. If the LIDAR sensor is positioned away from either axis of rotation, error gets introduced into the system. Here’s why this occurs: When converting raw data to cartesian points, we assume that the LIDAR sensor is giving us the distance to a point in 3D space from the origin of our spherical coordinate space. Deviation from the center of rotation for the azimuth or altitude angle would mean that we are recording a distance from somewhere else in our geometric plane.

It’s still possible to get accurate 3D points if the LIDAR sensor is not at the center of rotation, but this requires precise measurement of where the LIDAR sensor actually is in our coordinate space, and the use of complex mathematics to transform the measured data into accurate 3D position points. I thought that adding a couple of slots to a 3D bracket would be slightly easier and more effective. These slots allow for micro adjustments to be made in two dimensions, so that the LIDAR sensor lies in the direct center of both axes of rotation.

ELECTRICAL DESIGN

There are two main electrical circuits in this design: The power/servo control circuit and the feedback amplifier circuit.The power/servo control circuit shown in Figure 2 was designed to allow the PIC32 MCU to send a pulse width modulation (PWM) signal to the servos, while protecting the MCU from possibly harmful electrical noise made by the servo motors. The first step to reduce noise was to use an opto-isolator as a switch for the servo motors control pin. By driving pins RPB9 and RPB7 high, the MCU connects the servo motors’ control pin to the 5-V source. This converts the PIC32’s 3.3-V PWM output into a 5-V PWM usable by the two servos, while isolating the PIC32’s output pin from any electrical noise.

Figure 2
Shown here is the circuit of the power supply module. The servos are shown as motors. The RPB9 and the RPB7 are wires connected to output pins on the PIC32.

If the servos were the only things that needed to be connected to the MCUs, then the opto-isolator configuration would have been enough to protect the PIC32 from the servo motors’ electrical noise. However, the MCU must share a common ground with the LIDAR sensor, to be able to read the sensor’s analog output. This means electrical noise on the power/servo controller circuit can travel to the PIC32 through this common ground. To reduce the chance of electrical damage, two capacitors—one ceramic and one electrolytic—were connected across the 5-V source and the ground. The smaller ceramic capacitor attenuates any smaller amplitude, high frequency noise and the larger electrolytic capacitor is used to attenuate the lower frequency noise. The combination of these two capacitors ideally stops any damaging noise from travelling through the power connection by shunting the noise to ground instead.  …

Read the full article in the September 338 issue of Circuit Cellar

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!

— ADVERTISMENT—

Advertise Here

Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.
Keep up-to-date with our FREE Weekly Newsletter!

Don't miss out on upcoming issues of Circuit Cellar.


Note: We’ve made the Dec 2022 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Would you like to write for Circuit Cellar? We are always accepting articles/posts from the technical community. Get in touch with us and let's discuss your ideas.

Sponsor this Article
Website | + posts

Circuit Cellar's editorial team comprises professional engineers, technical editors, and digital media specialists. You can reach the Editorial Department at editorial@circuitcellar.com, @circuitcellar, and facebook.com/circuitcellar

Supporting Companies

Upcoming Events


Copyright © KCK Media Corp.
All Rights Reserved

Copyright © 2023 KCK Media Corp.

LIDAR 3D Imaging on a Budget

by Circuit Cellar Staff time to read: 4 min