Machine Heart Report
Participation: Xiao Qing
is fully open source from PCB to computer software, and all the materials in the project can be purchased, so you are not afraid that you can't make it.
LiDAR can help robots quickly obtain their surrounding environment information, and has the advantages of wide detection range, high accuracy, and strong anti-interference ability. It is an important part of a series of autonomous ground mobile robots such as autonomous driving cars, sweeping robots, and warehousing robots. However, industrial-grade lidars are often expensive at present. For example, those unmanned vehicles built by Google and Baidu, the cost of lidar even exceeds the value of the vehicle itself, which discourages ordinary people. Even a single-line lidar with a detection range of only 25m was sold at the level of 1,000 yuan on Taobao.
Want to get into the trap of autonomous driving but can't withstand the high price of lidar? This recent open source project by a Russian Github master may be very suitable for you, allowing you to make your own lidar at low cost.
Project address: https://github.com/iliasam/OpenTOFLidar
Effect demonstration
Let’s first look at the parameters of the lidar after the project is completed. This may be the most concerned issue for everyone. After all, putting aside the accuracy and price, you are all hooliganism!
- Scanning speed: 15 times per second
- Resolution: about 1% of the detection distance, but not better than ±2 cm
- Minimum detection distance: 5 cm
- Maximum detection distance: about 25 meters (white reflection plane)
- Angle resolution: 0.5 degrees
- Scan frequency: about 11 kHz
- Scanning angle range: about 230 degrees, there is still room for improvement to change the corresponding structure
- Power: 5 V/0.1 A (that is, 0.5 watts), the voltage may exceed 0.8A
- Size: 50x50x120 mm
The following figure is the CAD model and finished product diagram of this lidar.
in the author's apartment's detection effect is shown in the figure below
Project author said that the total cost of making the large parts of the lidar is only about US$114, and the optical lenses used in the laser transmitter and receiver are standard lenses for the monitoring camera. After seeing this, do you have to try it yourself? Let’s talk about the production process one by one for you.
LiDAR ranging principle and its production process
This lidar uses the TOF (Time-of-Flight) ranging principle. Since subsequent lens selection, installation, debugging and calibration involve knowledge of the TOF principle, we will briefly introduce it here.
ranging principle
As shown in the figure below, laser emits a series of light pulses, and is captured by the photosensitive element after encountering the object reflection. After the electrical signal generated by the photosensitive element passes through the amplifier, the operation circuit is used to capture its rising or falling edge to calculate the flight time of the light pulse in the air. Combined with the speed of light, the distance of the measured object from the lidar can be obtained.
TOP distance measurement principle diagram (Picture source: Wikipedia)
We can see from the principle of TOP distance measurement that the following factors determine the measurement performance of lidar:
1. The color of objects in the environment and their reflective surface
0 Since TOP distance measurement works by calculating the time difference between the transmission and reception of the optical pulse signal, if the emitted light pulse is absorbed by the object in the environment or reflected outside the measurement range of the photosensitive element, the lidar cannot collect the correct measurement data at this time. Here we give an extreme view. Stealth fighter jets achieve "stealth" by using a coating that can absorb radar and a smaller radar reflection area.
Of course, since most indoor walls are mainly white or light colors, there is no need to worry. It should be noted that when there are mirrors or darker objects in the environment, the measurement accuracy of the lidar will be greatly affected.
2. The relative position of the laser and the photosensitive element and its lens focal length
To effectively capture the pulse signal emitted by the laser, the photosensitive element needs to be located at a suitable position from the laser.And it is necessary to install lenses with appropriate focal lengths for the laser and photosensitive elements according to measurement requirements. The following picture is the picture after the installation of the lidar lens in this project is completed.
3. The pulse width of the laser signal generator, amplified current and operation unit resolution
There is also a crucial impact on the sensor performance. The pulse width of the laser signal emitter, which determines the maximum distance that the lidar can measure. Assuming the speed of light is c = 300,000,000 m/s, the farthest measured distance is 7.5 m when the pulse width of light is 50 ns.
Because the electrical signals generated by the photosensitive element need to be amplified, the key indicators such as the gain, bandwidth, noise, power supply rejection ratio, common mode rejection ratio, , linearity, and output impedance of the corresponding amplification element are also factors that need to be considered during the production process. Finally, there is the resolution of the computing unit, which determines whether the sensor can accurately calculate the time difference between the laser pulse round trip.
production process
First of all, the production of laser pulse circuit. The author chose the relatively cheap but powerful pulsed laser diode "SPL PL90_3", which works at a wavelength of 905 nm and can generate laser pulses with a power of up to 75 watts. The corresponding driving circuit diagram is shown in the lower left. In the detection circuit part, the author chose the avalanche photodiode (APD) as the photodetection element, and designed a DC-DC converter to generate a high enough bias voltage for it. Laser pulse detection requires an op amp with large signal bandwidth and low input capacitance, so the author chose the MAX3658 as the op amp. The chip is specially designed for photodiodes with a magnification of 18000 and a bandwidth of 580 MHz. In addition, the chip also includes a built-in filter that reduces low-frequency noise. The detection circuit diagram is shown in the figure:
pulse laser driving circuit diagram; pulse detection unit circuit diagram.
In the time node measurement part, the author selected the ready-made chip TDC-GP21 for ultrasonic liquid flowmeters. The time resolution of this microcircuit is about 90 ps, and the MCU can control it through the SPI bus. The author chose STM32F303CBT6 as the microcontroller to realize the transmission and reception of laser pulses, the reading and calibration of measurement data, the control of the speed of the mirror motor, and communication with the upper computer. The finished PCB is shown in the figure below.
front diagram + back diagram.
In terms of optical components, the standard M12 lens is used as the laser lens, with a divergence angle of about 0.45 degrees. A lens with a focal length of 25 mm was also used for the photosensitive element. The lens has a large aperture and can allow as much reflected light to fall on the photodiode as possible to obtain a higher signal-to-noise ratio. If lidar is to be used under high light exposure conditions, such as outdoors, the authors recommend installing an interference filter designed for a wavelength of 905 nm between the photodiode and the lens. Since this project was tested under indoor lighting conditions, it was not installed.
rotation type lidar has two ways to detect the surrounding environment, namely, by rotating the entire rangefinder or by rotating the reflector with a 45-degree inclination relative to the optical axis of the lidar. The corresponding working method is shown in the figure below. Both methods:
each have their own advantages and disadvantages. Since the second method only requires rotating the mirror, and the first method requires considering the power supply and communication problems of the rangefinder when rotating, a scanning method that only rotates the mirror is adopted here. After the mirror and drive motor are installed, the entire lidar hardware part is completed. The following can be used to debug and measure using the host computer software provided by the project author.
upper computer software diagram.
The use of lidar for SLAM can be said to be a relatively mature technology today, with advantages such as high accuracy, fast speed, and strong anti-interference ability. However, due to its high cost, it has limited its popularity in the field of civil unmanned driving. Even the Tesla Model S, which costs more than 1 million yuan, is still mainly cameras.Perhaps such low-cost lidar open source projects can facilitate our understanding of this technology.