This is a simple project that use Arduino UNO and Processing to make a simple lidar.
Lidar (also called LIDAR, LiDAR, and LADAR) is a surveying method that measures distance to a target by illuminating the target with pulsed laser light and measuring the reflected pulses with a sensor. Differences in laser return times and wavelengths can then be used to make digital 3-D representations of the target. The name lidar, now used as an acronym of light detection and ranging (sometimes light imaging, detection, and ranging), was originally a portmanteau of light and radar. Lidar sometimes is called 3D laser scanning, a special combination of a 3D scanning and laser scanning. It has terrestrial, airborne, and mobile applications.
Lidar is commonly used to make high-resolution maps, with applications in geodesy, geomatics, archaeology, geography, geology, geomorphology, seismology, forestry, atmospheric physics, laser guidance, airborne laser swath mapping (ALSM), and laser altimetry. The technology is also used in control and navigation for some autonomous cars.
Now we can start to make !
Step 1: Make the Hardware
For this project we can use:
Arduino UNO (official: https://amzn.to/2CLqfp2) (Elegoo: https://amzn.to/2Rkl7fv)
Motor g90 micro servo (https://amzn.to/2yDzZ1H)
HC-SR04 ping sensor (https://amzn.to/2COXgAq)
Some wires (https://amzn.to/2RmQBSk)
A 3D printed case for Arduino (https://www.thingiverse.com/thing:994827)
A 3D printed pieces for HC-SR04 sensor (https://www.thingiverse.com/thing:3182237)
First of all connect the sensor to the Arduino UNO pin 12 and 13. After that connect the servo motor to the Arduino UNO pin No.3 and the power supply.
<--Do Not Use Arduino UNO power to move the Servo motor -->
For Servo sg90 use USB cable to power the motor.
Step 2: Upload the Arduino UNO Code
Upload the code. Now you can see the motor moves. Try to open a Serial port 9600 baud rate to read the measures of the sensor.
Download the code from:
Step 3: Test Your Code in Processing
Open Processing and read all the serial values. Select the right port on Processing console.
Now you can see the white dots on the black window. Each dot on more biggest then the object are near.
Look the video!
See the code by this link: https://github.com/masteruan/lidar_Processing