mjs513
Senior Member+
Recently I got interested in the ST Time of Flight sensors, specifically the VL53l5cx from Sparkfun after seeing a youtube video (VL53L7CX MultiZone TOF Sensor - Simple Demo) showing a visualization using LabView. Since I am a glutton for punishment wanted to see if something similar could be done using one of our displays.
Hardware:
1. @PaulStoffregen Micromod Breakout
2. ST7796 - picked up from amazon
3. VL53l5cx from Sparkfun
Software Libraries:
1. ST7735_t3 - installed with board manager or Teensyduino
2. Modified version of @KrisKasprzak ILI9341_t3_controls library: https://github.com/mjs513/ILI9341_t3_controls/tree/ILI9341_t3_controls_mods
3. Sparkfun VL53l5cx library: https://github.com/sparkfun/SparkFun_VL53L5CX_Arduino_Library
The test was basically point the sensor a few objects sitting on my messy desk:
The sensor allow you to set several options that will affect the quality of the results (see A guide to using the VL53L5CX multizone Time-of-Flight ranging sensor from ST Micro)
1. Sharpener percentage:
3. Integration Time: defines how long the sensor collects photon data before producing a measurement — longer times improve signal quality but reduce update rate. If I am interpreting the spec right when in continuous mode not used.
One of the things that I did in the sketch was allow me to set the grid size on the display, use 8, 16, 32, 64 - right now I default to 64.
With that out of the way when the sketch first starts you will see the grid you selected and the menu:
The sketch allows you to try BiLinear or BiCubic Interpolation which are the first 2 buttons.
You pretty much can display all the outputs from the sensor. With the following caveats. Distance, Reflectance all display in 64x64 grid. For Signal spad, range_sigma, target status it switches to 8x8 sensor grid. Made more sense to me. There is also the option "RawData" to dump the sensor data to the serial monitor.
Here are some images
Distance and Reflectance:
Sketch is attached
Hardware:
1. @PaulStoffregen Micromod Breakout
2. ST7796 - picked up from amazon
3. VL53l5cx from Sparkfun
Software Libraries:
1. ST7735_t3 - installed with board manager or Teensyduino
2. Modified version of @KrisKasprzak ILI9341_t3_controls library: https://github.com/mjs513/ILI9341_t3_controls/tree/ILI9341_t3_controls_mods
3. Sparkfun VL53l5cx library: https://github.com/sparkfun/SparkFun_VL53L5CX_Arduino_Library
The test was basically point the sensor a few objects sitting on my messy desk:
The sensor allow you to set several options that will affect the quality of the results (see A guide to using the VL53L5CX multizone Time-of-Flight ranging sensor from ST Micro)
1. Sharpener percentage:
2. Ranging_freq: the measurement frequency for the sensor. In 8x8 mode you can go from 1hz to 15hz max.The signal returned from a target is not a clean pulse with sharp edges. The edges slope away and may affect the distances reported in adjacent zones. The sharpener is used to remove some or all of the signal caused by a veiling glare
3. Integration Time: defines how long the sensor collects photon data before producing a measurement — longer times improve signal quality but reduce update rate. If I am interpreting the spec right when in continuous mode not used.
One of the things that I did in the sketch was allow me to set the grid size on the display, use 8, 16, 32, 64 - right now I default to 64.
C++:
#define default_grid_size 64
With that out of the way when the sketch first starts you will see the grid you selected and the menu:
The sketch allows you to try BiLinear or BiCubic Interpolation which are the first 2 buttons.
You pretty much can display all the outputs from the sensor. With the following caveats. Distance, Reflectance all display in 64x64 grid. For Signal spad, range_sigma, target status it switches to 8x8 sensor grid. Made more sense to me. There is also the option "RawData" to dump the sensor data to the serial monitor.
Here are some images
Distance and Reflectance:
Sketch is attached