Tof 050 H
Tof 050 H
TOF050F ranging sensor is a laser ranging module designed and manufactured based on VL6180,
which provides accurate and repeatable short-distance measurement function. Thanks to the highly
integrated infrared transmitting and receiving mechanism and ST's innovative FlightSense
technology, faster and more accurate distance measurement and higher ambient light immunity can
be achieved.
TOF050F supports serial port mode, serial port simulation Modbus mode, and IIC mode at the
same time, which is well adapted to various application scenarios.
It is equipped with a host computer for easy debugging.
TOF050F has a range of up to 50cm, and can choose high-precision or long-distance test mode
according to needs, making it more flexible. The ranges are as follows:
2、Characteristic description
2.1Structural
parameters volume 18mmX17mmX6mm(L*W*H)
Fixing d=2mm,Spacing14/11mm
hole
weight 3g
2.2Electrical performance
parameters Project Element Minimum Typical Maximu Unit
Measurin High m
/ 200 / mm
g range precision
Middle
/ 400 / mm
distance
Long
/ 500 600 mm
distance
Operatin
/ 3.0 3.3 5 V
g Voltage
Working
/ / / 40 mA
current
Operatin
g / -20 / 70 ·c
temperat
ure
storage
temperat / -40 / 80 ·c
ure
2.3Optical parameters
Items Element Minimum Typical Max Unit
Vertical emission laser peak / / 850 / nm
wavelength
Vertical emission laser peak / / 38 / mA
current
2.4 Pin description
Pin Name Attributes Function
1 VIN / VIN+ 3~5V
2 GND / GNDGND
3 SDA Input /Output IIC clock port
4 SCL Input IIC data port
5 RX Input Serial input TTL level RXD
6 TX Output Serial output TTL level TXD
3.Operating mode
Mode Switch Detailed
Single-machine serial port data sending
and receiving, actually follow the
Serial port mode
Modbus_RTU protocol, and the supporting
(default)
host computer can facilitate debugging
and setting
No need to The standard Modbus_RTU can be used to
switch access registers to facilitate interaction
with industrial equipment. Separate
Modbus protocol
addresses can be set, and broadcast
mode
addresses can be shared. It is very
convenient to realize multi-module
cooperative work.
Command The module gives up the IIC bus and can
IIC
switch directly use the IIC to access the sensor
3.1Serial + modbus mode chip.
3.1.2Register list
Read
distance 01 03 00 10 00 01 85 CF Read the ranging value of No. 1
value
Module
02 06 00 01 10 00 D5 F9 No. 2 slave module restarts
Applicatio restart
n Change
01 06 00 02 00 04 29 C9 Slave 1 becomes slave 4
examples the slave
ID Set the baud rate of No. 4 machine
Set the
04 06 00 03 00 02 F8 5E to 9600, need to restart to take
baud rate
effect
Set the No. 1 machine to
Automatic
01 06 00 05 01 F4 99 DC automatically output the measured
output
value in 500ms
IIC mode 01 06 00 09 00 01 98 08 Set machine 1 to IIC mode
3.2 IIC mode
When set to IIC mode, the MCU releases the VL6180 sensor IIC bus. SDA and SCL are directly
connected to the sensor (SDA and SCL are pulled up by internal 10K resistors). For specific data
reading, please refer to the VL6180 data manual.
4 Commissioning instructions
4.1Serial debugging instructions
4.1.1Hardware connection
To connect to a computer, a serial port module with USB to TTL level is required. Note
that TX and RX need to cross.
4.1.2Serial software debugging
After connecting with the USB to TTL module, plug the serial port module into the computer
USB port. Make sure to find the corresponding COM port after installing the driver of the serial
port module. Open the serial port debugging software, connect for the first time, set the baud
rate to the default 115200, you must select "HEX display" and "HEX send", and select "time
stamp and sub-package display" as required. Finally, open the serial port and perform
communication configuration according to the order of instructions from top to bottom as
shown in the figure below to complete a complete debugging process. After setting, the ranging
module works in high-precision mode and outputs a ranging value every 500ms.
To connect to a computer, a serial port module with USB to TTL level is required. Note
that TX and RX need to cross. Refer to section 4.1.1 for details.
After connecting with the USB to TTL module, plug the serial port module into the computer
USB port. Make sure to find the corresponding COM port after installing the driver of the serial
port module. Open the host computer software of the TOF ranging sensor, connect for the first
time, set the baud rate to the default 115200, select the corresponding model system in "System
Configuration", and click "Start". You can see the real-time display of the measured distance
column in the "status display", and the measured value is constantly refreshed as the actual
distance changes.
Select the parameter configuration column, you can see that there are 4 groups of parameters for users to
set or observe, which is convenient for debugging. Storage parameter 1 is a commonly used setting
function. The user can set the device address, baud rate, distance mode, output cycle, etc., and the
parameters are saved immediately after setting and are effective when power off. Setting method: directly
input the value of the required option in the value of the corresponding function line, and press Enter.
The device address is written directly; please refer to the instruction set for the parameters
represented by the specific options of the baud rate/output cycle, for example, the baud rate 0 represents
the default 115200; the output cycle is also written directly in ms (note that the output cycle is changed
here) It is the serial port automatic output cycle, and the upper computer reads the data cycle is fixed). The
correction K can specify the multiple of the output distance and the actual distance, which is suitable for
special purposes. In the "Load Calibration" and "Disable iic" function lines, the value 1 means enable and 0
means disable.
Storage parameter 2 is generally used for observation. For specific values, refer to the chip
specification.
The last two calibration parameter settings apply to the calibration function. For offset calibration, it is
recommended to use a white target object with 88% reflectivity in dark conditions and calibrate at an
actual distance of 10cm. That is, the object is placed at the actual distance of 10cm, enter 10cm in the
offset calibration function line, press Enter to start the calibration, and wait for the parameter display to
return to normal to complete the calibration. The actual module has been calibrated once with a 10cm
offset before leaving the factory and can be used directly. The xtalk calibration is mainly to correct the
crosstalk factor generated by the cover window in front of the probe. This module has been equipped with
a dedicated glass cover sheet and has been calibrated at the factory. When users need to use without cover
sheet or use other cover windows, this function can be used for crosstalk calibration. The specific method is
to recommend the use of a gray target with 17% reflectivity. The crosstalk distance value needs to refer to
the chip specification and the actual use environment. After selection, refer to the upper computer
opera on process o o se ca ra on.
4.3 MCU connection
4.3.1 arduino
DEMOConnect UNO and TOF050H ranging module according to the wiring diagram, open the
matching Uno test program, and upload it to the UNO development board. The test results are
shown below.
Wiring diagram
接线及演示效果
接线及演示效果
4.3.2 stm32 demo
Connect STM32 and TOF050F ranging module according to the wiring diagram, open the
supporting STM32 test program, and upload it to the STM32 development board. The test
results are shown below.
接线及演示效果
接线及演示效果
For the wiring method, please refer to the serial port debugging section, connect the
serial port module with TOFXXXH, insert it into the USB port of the Raspberry Pi, and
execute the TOFXXX_TEST.py file on the console. The effect is as follows:
4.Detailed
performance
4.1Measurement condition
In all measurement tables in the document, it is considered that the full Field Of View (FOV)
is covered.This system FOV is 25degrees。The height of the target must meet this condition.
4.2Ranging
characteristics
Ranging conditions:
· Targets reflectance used: Grey (17 %), White (88 %)
· Offset correction done at 10 cm from sensor
· Indoor: no infrared
· Outdoor: eq. 5 kLux equivalent sunlight (10 kcps/SPAD)
改为实物或者仿真图
6 .Outline Dimensions