Cliff Detection with VL53L4CD
Measurement of distance within the range 1 mm to 1300 mm for cliff detection using VL53L4CD.
Last updated
Measurement of distance within the range 1 mm to 1300 mm for cliff detection using VL53L4CD.
Last updated
The B3RB can use a TOF distance sensor as a cliff detector and the appropriate software to prevent it from driving off a table, down a stairway or any other "cliff" it may encounter while moving forward. These sensors could also be used pointing in other directions for other proximity detection applications. This tutorial describes how to perform cliff detection on MR-B3RB using TOF VL53L4CD sensor with MR-CANHUBK344 and MR-CANHUBK3-ADAP boards. The example and configuration shown below is with the MR-CANHUBK344 running Zephyr and Cognipilot but is showing the board outside of the installation on a MR-B3RB. When used with a B3RB, the power is supplied in the normal fashion and not with external connectors shown.
The Time of Flight VL53L4CD sensor measures distance within the range 1 mm to 1300 mm.
The sample application "samples/sensor/vl53l4cd" polls on the sensor every 1 second and reads the current distance measured from the device. Then it prints the distance on the console (in meters).
All items except 3 (Cable), 4 (TOF sensor) and 10 (5V DC Power supply) are included with MR-B3RB-S.
Re: item no. 9, MR-CANHUBK344 kit that comes with MR-B3RB-S, includes multiple cables with "SYP" connector which could be utilized for supplying power to the MR-CANHUBK344.
S.NO. | NAME | QTY |
---|---|---|
This hardware setup shows these boards outside of MR-B3RB on a tabletop. This of course can also be done on the vehicle itself. Simply plug in the sensor and the STEMMA QT cable to the CANHUB-ADAP. The power and other connections do not change from a normal MR-B3RB configuration.
The JLINK can alternatively connect to the small DCD-LZ board if preferred.
Power may be supplied using either of the power connectors. In an assembled MR-B3RB this would be using the 5 pin JST-GH power in cable rather than the SYP cable.
Connect hardware components as shown in the block diagram above. The CANHUB-ADAP includes a I2C connector that follows the ADAFRUIT STEMMAQT standard.
Attach the MR-CANHUBK3-ADAP board on top of MR-CANHUBK344.
Power on the MR-CANHUBK344 board - connect the SYP connector to the MR-CANHUBK344, and the other end of the cable to your bench power supply or any source that could provide 5V DC.
Get the shell of MR-CANHUBK344.
The shell should display output as:
1
1
2
1
3
1
4
1
5
J-Link EDU MINI DEBUGGER (Complete set)
1
6
1
7
1
8
1
9
CABLE, SYP CONNECTOR for supplying power to MR-CANHUBK344
1
10
DC Power Supply (any) for supplying 5V to MR-CANHUBK344
1