0% found this document useful (0 votes)
13 views11 pages

Tof 050 H

The TOF050F is a laser ranging sensor module designed for accurate short-distance measurements up to 50cm, utilizing ST's FlightSense technology and offering multiple communication modes including serial and Modbus. It features high precision, fast measurement times, and is suitable for various applications such as autofocus and obstacle detection. The document provides detailed specifications, operational modes, and instructions for debugging and calibration.

Uploaded by

btssnllb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views11 pages

Tof 050 H

The TOF050F is a laser ranging sensor module designed for accurate short-distance measurements up to 50cm, utilizing ST's FlightSense technology and offering multiple communication modes including serial and Modbus. It features high precision, fast measurement times, and is suitable for various applications such as autofocus and obstacle detection. The document provides detailed specifications, operational modes, and instructions for debugging and calibration.

Uploaded by

btssnllb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

TOF050F

Time-of-Flight ranging Sensor-50CM


1、Descriptiion

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:

Item Attributes Data Period


0 High period
100ms 20cm
1 precision
Middle 100ms 40cm
2 distance
Long 100ms 50cm
distance
Features Applications
・ 850nm laser meets the Class 1 operating ・ High-speed autofocus
conditions specified in the third edition of IEC ・ Video continuous auto focus
60825-1:2014 ・ User detection of computers and other
・ Sensor size (20×16.8×6.0mm) equipment
・ The maximum measurement distance ・ Obstacle detection
indoors can reach 0.5 meters, the accuracy is ・ Automatic gesture recognition of white
within 5% goods (such as faucets, refrigerators, etc.)
・ The measurement range has nothing to do
with the reflectivity of the target object
・ Can work in high infrared light environment
・ High optical crosstalk compensation
・ Measurement time is less than 30ms
・ No need for additional optics
・ Single power supply
・ Standard TTL level serial port I2C
・ High optical crosstalk compensation

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.

Serial communication protocol description


Bits per Second: 115200
Data Bits : 8
Parity : None
Stop bits : 1
Stop bits : None
3.1.1modbus Format description
Read command (take slave 0x01 as an example)
Slave Function Register Register Data Data CRC Check CRC
addr number High Low addr H L L Check H
addr
DR RW RegH RegL DH DL CL CH
0x01 0x03 RegH RegL DH DL CL CH
Sensor return
Number
Slave Function Data byte 1 Data byte CRC Check CRC
of data ···
addr number high bit 1 low bit L Check H
bytes
DR RW D DATA1H DATA1L ··· CL CH
0x01 0x03 D DATA1H DATA1L ··· CL CH
Example: Host 01 03 00 10 00 01 85 CF Read the ranging value of 1 slave
sends:
Module reply: 01 03 02 00 15 79 8B Ranging value is 0x0015 (21mm)
Write command (take slave 0x01 as an example)
Slave Function Register Register Data Data CRC Check CRC
addr number High Low addr H L L Check H
addr
DR RW RegH RegL DH DL CL CH
0x01 0x06 RegH RegL DH DL CL CH
Sensor return
Number
Slave Function Data byte 1 Data byte CRC Check CRC
of data ···
addr number high bit 1 low bit L Check H
bytes
DR RW RegH RegL DH DL CL CH
0x01 0x06 RegH RegL DH DL CL CH
Host Set the ranging mode of 1 slave to
Example: 01 06 00 04 00 01 09 CB
sends: high precision
Module
01 06 00 04 00 01 09 CB Set successful response
reply:
Special note: CRC check rule is CRC-16/MODBUS
X16+X15+X2+1
The check code can be generated by the existing CRC check code generator
or the matching module, which is convenient to use.

3.1.2Register list

Category Data addr Data Function W/R


0xAA55 Restore default parameters
Special register 0x0001 0x1000 Reboot write
0x0000 Test communication
Device address Read
0x0002 0xXXXX 0 : Broadcast addr
register &write
0x0001 1:38400
Baud rate Read
0x0003 0x0002 2:9600
register &write
0x0003/other Others:115200
s
0x0001 1: High precision, 100ms, 0.2m
Read
Range register 0x0004 0x0002 2: Middle distance, 100ms, 0.4m
&write
0x0003 3: Long distance, 100ms, 0.5m
Continuous output 0x0000 0: no self-output Read
0x0005
control register 0xXXXX XX:XXms &write
Load calibration 0x0000 0: do not load Read
0x0006
register 0x0001 1:load &write
Offset correction Read
0x0007 0xXXXX Offset correction value
value register &write
xtalk correction Read
0x0008 0xXXXX xtalk correction value
value register &write

Disable iic 0x0000 0: not prohibited (default) Read


0x0009
enable register 1: Prohibited (MCU releases &write
0x0001
io)
Measurement 0x0010 0x0001 Distance value: mm Read
result
offset xx:The actual value is xx,
calibration 0x0020 0xXXXX write
5cm is recommended
register
xtalk calibration
0x0021 0xXXXX xx:The actual value is xx write
register
Gray Indicates that the setting needs to be restarted to take effect

Set the distance measurement


Set mode 01 06 00 04 00 01 09 CB
mode of unit 1 to high precision

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.

4.2Supporting host computer debugging instructions


4.2.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. Refer to section 4.1.1 for details.

4.2.2PC debugging (take TOF200H as an example)

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.

接线及演示效果

接线及演示效果

4.3.3 Raspberry Pi demo

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)

Parameter Precision Minimu Typical Max unit


Minimum distance (indoor ±5% m1 3 mm
Maximumwhite)
range distance ±4% 400 500 600 mm
(indoor
Maximum white)
range distance ±7% / 400 / mm
(indoor
Maximum gray)
range distance ±7% 70 200 mm
(whiterange
Maximum outdoor)
distance ±12% 60 200 mm
(greyspeed
Ranging outdoor)
(fastest) 100 msec
5.Comes with a cover
glass
It is important to keep the cover window surface finish smooth.
Typically the TOF050H ranging module will be used in conjunction with a window covering.
The cover window serves two main purposes:
1. Provides physical protection of the module, including dust ingress prevention.
2. To provide optical filtering for the module.

改为实物或者仿真图
6 .Outline Dimensions

You might also like