RADAR Lidar System VL53L0X Laser Time-of-Flight

by RonFrtek in Circuits > Arduino

3487 Views, 10 Favorites, 0 Comments

RADAR Lidar System VL53L0X Laser Time-of-Flight

RADAR Lidar System VL53L0X Laser Time-of-Flight Arduino

In this tutorial we will learn how to make a RADAR Lidar System using VL53L0X Laser Time-of-Flight sensor.

Watch the video!

What You Will Need

images (4).jpg
oled.jpg
HTB1TMikbyjrK1RjSsplq6xHmVXa3.jpg
New-Mini-Universal-Test-Protoboard-400-Tie-Points-PCB-Breadboard-for-Arduino.jpg
jumper-wires.jpg
arduino.jpg
VisuinoAdvrtisementESPCopterDSTIKEWatch.jpg

  • Arduino UNO (or any other Arduino)
  • VL53L0X Laser Time-of-Flight sensor
  • OLED Display
  • Servo motor
  • Breadboard
  • Jumper wires
  • Visuino program: Download Visuino

The Circuit

2020-08-09_13-01-41.jpg
  • Connect OLED Display pin[VCC] to Arduino pin[5V]
  • Connect OLED Display pin[GND] to Arduino pin[GND]
  • Connect OLED Display pin[SDA] to Arduino pin[SDA]
  • Connect OLED Display pin[SCL] to Arduino pin[SCL]
  • Connect TimeOfFlight Sensor pin[VCC] to Arduino pin[3.3V]
  • Connect TimeOfFlight Sensor pin[GND] to Arduino pin[GND]
  • Connect TimeOfFlight Sensor pin[SDA] to Arduino pin[SDA]
  • Connect TimeOfFlight Sensor pin[SCL] to Arduino pin[SCL]
  • Connect Servo motor "Orange" pin to Arduino Digital pin[7]
  • Connect Servo motor "Red" pin to Arduino positive pin[5V]
  • Connect Servo motor "Brown" pin to Arduino negative pin[GND]

Attach TimeOfFlight Sensor with a duct tape to the servo motor.

Start Visuino, and Select the Arduino UNO Board Type

FRWQB80K1RVKKV9.LARGE.jpg
F4ZIK22K5ADILII.LARGE.jpg

The Visuino: https://www.visuino.eu needs to be installed. Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

In Visuino Add Components

2020-08-09_22-33-08.jpg
2020-08-09_22-32-45.jpg
2020-08-09_22-32-23.jpg
2020-08-09_22-31-53.jpg
2020-08-09_22-31-17.jpg
2020-08-09_22-30-56.jpg
2020-08-09_22-35-15.jpg
2020-08-09_22-34-52.jpg
2020-08-09_22-34-21.jpg
2020-08-09_22-33-57.jpg
2020-08-09_22-33-33.jpg

  • Add "Time Of Flight Laser Ranger VL53L0X' component
  • Add "Divide Analog By Value' component
  • Add "Analog To Unsigned' component
  • Add "SSD1306/SH1106 OLED Display (I2C)' component
  • Add "Clock Generator" component
  • Add "Triangle Analog Generator' component
  • Add "Clock Generator" component
  • Add 2X "Compare Analog Value" component
  • Add "Map Range Analog" component
  • Add "Servo" component
  • Add "Inverse Analog (Change Sign)" component
  • Add "Analog Multi Source" component

In Visuino Set Components

2020-08-09_22-40-58.jpg
2020-08-09_22-41-15.jpg
2020-08-09_22-41-34.jpg
2020-08-09_22-41-48.jpg
2020-08-09_22-42-01.jpg
2020-08-09_22-42-36.jpg
2020-08-09_22-43-17.jpg
2020-08-09_22-43-46.jpg
2020-08-09_22-44-21.jpg
2020-08-09_22-44-43.jpg
  • Select "DivideByValue1" and in the properties window set Value to 2
  • Select "ClockGenerator1" and in the properties window set Frequency to 5
  • Select "TriangleAnalogGenerator1" and in the properties window set Frequency to 0.1
  • Select "CompareValue1" and in the properties window set Compare Type to "ctBiggerOrEqual" and Value to 0.98
  • Select "CompareValue2" and in the properties window set Compare Type to "ctSmallerOrEqual" and Value to 0.02
  • Select "MapRange1" and in the properties window set "Output Range" > "Max" to 180
  • Double click on the DisplayOLED1 and in the Elements window
  • Drag "Draw Angled Line" to the left
  • In the properties window set "Angle" to -10, "End" to 60, "X" to 64, "Y"to 63
  • Click on the "Angle" pin icon and select "FloatSinkPin"
  • Click on the "End" pin icon and select "IntegerSinkPin"
  • Drag "Fill Screen" to the left side in the elements window

  • Close the Elements window

In Visuino Connect Components

lx.png
2020-08-09_23-00-04.jpg
2020-08-09_22-59-47.jpg
2020-08-09_23-00-19.jpg

Connect LaserRanger1 pin Sensor I2C to arduino board pin I2C In

Connect DisplayOLED1 pin I2C Out to arduino board pin I2C In

  • Connect LaserRanger1 pin Distance (mm) to DivideByValue1 pin In
  • Connect DivideByValue1 pin Out to AnalogToUnsigned1 pin In
  • Connect AnalogToUnsigned1 pin Out to DisplayOLED1>Draw Angled Line1 pin End
  • Connect ClockGenerator1 pin Out to TriangleAnalogGenerator1 pin Clock
  • Connect TriangleAnalogGenerator1 pin Out to CompareValue1 and CompareValue2 pin In
  • Connect TriangleAnalogGenerator1 pin Out to MapRange1 and Servo1 pin In
  • Connect CompareValue1 and CompareValue2 pin Out to DisplayOLED1>Fill Screen1 pin Clock
  • Connect MapRange1 pin Out to AnalogMultiSource1 pin In
  • Connect Servo1 pin Out to Arduino digital pin 7
  • Connect AnalogMultiSource1 pin [0] to Inverse1 pin In
  • Connect AnalogMultiSource1 pin [1] to DisplayOLED1>Draw Angled Line1 pin Clock
  • Connect Inverse1 pin Out to DisplayOLED1>Draw Angled Line1 pin Angle

Generate, Compile, and Upload the Arduino Code

2020-08-09_23-22-01.jpg

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Play

If you power the Arduino UNO module, the OLED Display will start to show the Radar distance and the servo motor will turn left and right.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it and open it in Visuino: https://www.visuino.eu

Check My Other Projects

Please take a moment to check out my other Cool Project here: https://www.instructables.com/member/RonFrtek/instructables/