I/O Output
Copyright © Nooploop LTd 2023. All Rights Reserved.
Figure 3: Configuration diagram for IIC output mode
4
I/O Output
In I/O output mode, the module cannot output distance values. The two signal lines have opposite
levels, and the level of the I/O port is inverted only when the distance changes from small to large and
exceeds the high threshold value, or when it changes from large to small and falls below the low
threshold value.
When the module is in UART mode (note that NAssistant cannot recognize modules in I/O mode),
TOFSense-F series products can be connected to the NAssistant software via a USB to TTL module
(referring to the data manual for wiring and power voltage). After successful identification, click to
enter the setting page . First, set the hysteresis starting point 'Band_Start' and the hysteresis width
'Bandwidth' to determine the hysteresis interval. The configuration diagram for I/O output mode is
shown in Figure 4. The distance value is converted to a high or low level output by hysteresis
comparison, and the TX/SCL and RX/SDA outputs are complementary. The hysteresis comparison
schematic is shown in Figure 5. After configuring the parameters, you need to click the 'Write
Parameters' button to save the parameters.
Note: After switching to I/O mode, if you need to change parameters such as Band_Start and
Bandwidth, you can refer to the FAQ section to switch back to UART mode and then configure the
parameters.
For example, if Band_Start and Bandwidth are set to 500 (unit: mm), the low threshold value is
0.5 meters, and the high threshold value is 1 meter. When the ranging value is 0.3 meters, RX is high
level and TX is low level. When the ranging value increases to 0.8 meters, RX is high and TX is low.
When the ranging value exceeds 1 meter, the level is reversed, RX is low, and TX is high. When the
ranging value drops from more than 1 meter to 0.8 meters, RX is low and TX is high, and when the
ranging value drops below 0.5 meters, the level is reversed, RX is high, and TX is low.
If only one threshold value is needed, Bandwidth can be set to 0. Also note that the high level
output by the module is 3.3V, and the output current is small. When driving other devices, be sure to
check if it can be driven. If it cannot be directly driven, you can use a relay or other methods to drive it.