SIngle ToF
From Diustou Wiki
Revision as of 17:23, 10 January 2025 by Yousimaier17 (talk | contribs) (Created page with "{{Product |images=400px |categories= {{Category|光传感器}} {{Category|传感器}} |brand=丢石头 |features= * 单点TOF激光测距传...")
| ||||||||||||||||||||||
| ||||||||||||||||||||||
| ||||||||||||||||||||||
|
Contents
测距原理
TOF是Time of Flight的缩写,即飞行时间。具体是指通过周期性的向外发出红外光调制波,当调制波遇到被测目标后反射,然后用传感器接收从被测目标反射回来的调制波。通过测量调制波往返的相位差,可得到飞行时间,从而计算出传感器与物体目标之间的相对距离。示意图如下所示。
引脚说明
产品参数
使用说明
演示示例
Modbus协议
- 单点TOF激光测距传感器采用了工业标准Modbus协议,Modbus通信指令分为两种,读命令与写命令,
- 读命令(0x03):读取相应寄存器数据。
- 写命令(0x06):向相应寄存器写入数据。
- 具体读写格式如下表:
Modbus寄存器
- 波特率设置
- 系统模式
上位机
- 硬件准备:Single ToF模块、USB转TTL模块、电脑
- 硬件连接:
- 使用步骤
- 将Single ToF接入USB转TTL模块的接口,将接好线的USB转TTL模块插入电脑USB接口,打开上位机软件。
- 点击上位机软件中的 刷新串口 ,然后选择模块对应的端口号,选择好端口号都点击 连接 。此时右侧的对话框内会出现 串口打开成功 字样。
- 点击左下角的 添加设备 ,在出现的对话框内需要输入模块ID(默认ID为0x50),然后点击 OK。
- 设置ID成功后会弹出新的界面出来用来查看测量距离以及对模块进行设置,同时主界面的右侧会出现 添加设备成功 ID:0x50 字样。
- 校准:
- 设置ID:
- 恢复出厂:
- 重启:
Arduino
- 硬件准备:Single ToF模块、Arduino
- 硬件连接:
- 使用步骤:
Raspberry Pi
- Hardware Preparation: Single ToF Module, Raspberry Pi
- Hardware Connection:
- Usage Steps
- Burn the Raspberry Pi OS onto an SD card and copy the example code to the system files on the Raspberry Pi.
- Connect the Single ToF module to the Raspberry Pi interface and insert the SD card with the burned OS into the Raspberry Pi.
- Enable the serial port function on the Raspberry Pi.
Execute Command:sudo raspi-config Select:Interfacing Options Select:Serial Select:NO(Would you like a login shell to be accessible over serial?) Select:YES(Would you like the serial port hardware to be enabled) Select:YES(The serial login shell is disabled.....) Restart the Raspberry Pi
sudo gcc vl53_tof.c -o vl53_tof
sudo ./vl53_tof
Product Information
FAQ
|