Page 2
Address: No.28, Xinxi Road, Haidian District, Beijing, PRC Copyright This document is protected by copyright. All rights related to it belong to Benewake (Beijing) Co. Ltd. Reproduction of all or part of this document is permitted only within the scope of copyright law. No modification, deletion, or translation of this document is permitted without the official written permission of Benewake (Beijing) Co.
Page 3
Benewake (Beijing) Co. Ltd. Foreword Dear users, Thanks you for choosing Benewake products and it’s our pleasure to help you with any technical question. To have a better experience, please read this manual carefully. We try to contain all common problems and hope you find the deployment and installation easy and fun.
Page 4
SJ-PM-TF-Luna A05 Product Manual Benewake (Beijing) Co. Ltd. Catalog Revisions ..........................7 Cautions ............................ 7 2.1 About document ........................ 7 2.2 About product ........................8 2.3 Common errors and other notes ..................8 Principle description and key parameters ................... 8 3.1 Ranging Principle......................
Page 5
SJ-PM-TF-Luna A05 Product Manual Benewake (Beijing) Co. Ltd. 6.11 Ultra-low Power Mode ....................17 6.11.1 Ultra-low Power Mode with Serial Port Communication ........18 6.11.2 Ultra-low Power Mode with I2C communication ........... 19 6.11.3 Caveats ........................20 6.12 Single Frequency Mode ....................20 6.13...
Page 6
SJ-PM-TF-Luna A05 Product Manual Benewake (Beijing) Co. Ltd. I2C slave machine address configuration ID_I2C_SLAVE_ADDR=0x0B ....... 28 10. Restore default setting ID_RESTORE_DEFAULT=0x10 ..........29 11. Save current setting ID_SAVE_SETTINGS=0x11............29 12. Output product bar code ID_READ_MANU_BIN=0x12 ..........29 13. Get full-length version number ID_GET_FULL_VERSION=0x14 ......... 30 14.
SJ-PM-TF-Luna A05 Product Manual Benewake (Beijing) Co. Ltd. 1 Revisions Version No. History Date Original 2020.1.15 1. Old serial port formats are removed. 2020.3.15 2. Module size and related pictures are updated. 3. More description of function. 4. I2C interface is now available.
3 Principle description and key parameters 3.1 Ranging Principle TF-Luna is using Time of Flight (ToF) principle to measure the distance and it periodically emits near infrared modulated waves. TF-Luna calculates the time by measuring the phase difference between the original wave and the reflection wave and uses that time to get relative distance, as shown in Figure 1.
Page 9
③ 100 Hz is default and only any factor (500/n, n can be any integer in [2, 500]) of 500Hz is available. 3.3 Repeatability TF-Luna's ranging accuracy is positively correlated with the strength value (amp) and negatively correlated with the output frame rate (frequency). The tables below show the standard deviation (STD) using 100Hz output rate.
Page 10
TF-Luna minimizes the impact of external environment on ranging performance by optimizing light path and algorithm. TF-Luna’s ranging blind zone is 20 cm. Any distance output less than 20 cm is unreliable. The operating range of black and white targets is different: The operating range of TF-Luna detecting black target with 10% reflectivity is 0.2-2.5m;...
SJ-PM-TF-Luna A05 Product Manual Benewake (Beijing) Co. Ltd. Figure 2 Detecting two objects at different location 4 Appearance and Structure 4.1 Appearance Figure 3 TF-Luna appearance and size drawing 5 Electrical Characteristics Table 5 Major Electrical Parameters of TF-Luna Description Value range Power supply voltage 3.7V-5.2V...
Page 12
Serial port communication starts when pin 5 is disconnected or connected to 3.3v. It will set TF-Luna receiving RXD on pin 2 and sending TXD on pin 3. The serial port communication protocol is defined as follows: 8 data bits, 1 stop bit with no parity check and default baud rate of 115200 bps.
Page 13
6.3 I2C Communication When pin 5 is connected to ground, TF-Luna enters I2C mode, then its pin 2 is used as SDA data and pin 3 is the SCL clock sending data. TF-Luna supports up to 400kps clock speed as slave machine and its default address is 0x10.
Page 14
After a write operation on the I2C register, it takes TF-Luna some time to process. If users need to read the value from the register for validation purposes, we recommend waiting for 100ms after the write operation, prior to the next read operation.
ID_OUTPUT_FORMAT=0x05” section. 6.5 Continuous Ranging Mode TF-Luna will keep tracking the distance 500 times per second, but as the customized output frequency is lower, the output may take the average. For instance, if the output frequency is 100Hz as default, then the output values are the average (arithmetic mean) of 5 previous range data.
Dist + Zone to avoid false output. 6.8 Amp Threshold The distance calculation may get false result if the Amp value is too low, so TF-Luna set the Dist value to dummy_dist(Default 0) when Amp is lower than amp_threshold (Default 100). If a user needs to change the Amp threshold value, please follow instructions in “Amp threshold setting...
Benewake (Beijing) Co. Ltd. The user can change TF-Luna's luminous duty cycle in two ways. The first is to use the command trigger mode. TF-Luna does not emit light when it does not receive a ranging command. At this time, the power consumption is about 42.5mW (5V power supply).
Page 18
Users can wake up TF-Luna and make it perform range-finding once by sending a random byte to the serial port. TF-Luna will send back the range-finding result in a specific format, and then enter Ultra-low Power Mode once again. The following graph shows the case in which the baud rate is 115200 with 9-byte output format.
Page 19
Users can attempt reading any one of valid or invalid register addresses (which will not make us receive ACK from the slave device). In this way, TF-Luna will detect the change of voltage on Pin 2 and thus it will be awaken. TF-Luna will perform range-finding once upon each awakening, and update the result on the register.
Assuming there is a highly reflective object at 16 meters; TF-Luna may mistake it as at 1 meter. In order to extend the periodic distance, TF-Luna sets the default work mode to Dual Frequency Mode. The periodic distance in such a mode is over 65 meters, far wider than the sensor’s measuring range.
Page 21
② Connecting hardware and cables Figure 9 Schematic Diagram of Correct Connection Please connect TF-Luna, TTL-USB converter, and USB cable properly as shown in Figure 9. Please check if there is any loose connection, and then plug the USB cable into your PC.
Page 22
TF-Luna output in millimeter. For instance, suppose the actual measurement is one meter and the distance value from TF-Luna is 1000 mm, then the value read by the PC software is 1000. Thus, the software will display 1000 with unit cm.
TTL-USB convertor to connect TF-Luna with PC. Open the Updater.exe after connecting TF-Luna to your PC, and then select the correct port and baud rate, “①COM8” and “② 115200” in this case. Click “④ Open Bin” to choose the updating firmware, then the file directory will be displayed in the textbox above.
SJ-PM-TF-Luna A05 Product Manual Benewake (Beijing) Co. Ltd. Appendix I Serial port output format 1. 9-byte/cm (Default) This format is supported for any firmware after Ver. 0.0.5 Byte Description 0x59 0x59 Dist_L Dist_H Amp_L Amp_H Temp_L Temp_H Check_sum Dist: cm Amp: Signal strength indicator.
Page 25
SJ-PM-TF-Luna A05 Product Manual Benewake (Beijing) Co. Ltd. Dist: cm Amp: Signal strength indicator. Dist value is unreliable when Amp < 100 or Amp = 65535 (Overexposure) Timestamp: Timestamp (ms) is in small-end format 7. Output with Device ID This format is supported for any firmware after Ver. 3.0.8...
SJ-PM-TF-Luna A05 Product Manual Benewake (Beijing) Co. Ltd. Appendix II Serial communication protocol 1. Version information ID_GET_VERSION=0x01 This format is supported for any firmware after Ver. 0.0.5 Downward: byte Len-1 Description Head(0x5A) Check_sum Upward: byte Len-1 Descri Head(0x5A) *Version Check_sum ption *Version: For instance, if the third, fourth, and fifth bytes are 112, 50, 9, then the version is 9.50.112...
Page 27
Upward byte Len-1 Description Head(0x5A) Format Check_sum Format: TF-Luna’s current output format setting Example: [5A 05 05 02 00] means PIX 6. Baud rate setting ID_BAUD_RATE=0x06 This format is supported for any firmware after Ver. 0.0.5 Downward byte Len-1 Description...
Page 29
SJ-PM-TF-Luna A05 Product Manual Benewake (Beijing) Co. Ltd. Default 0x10 [0x08, 0x77] I2c_slave_addr: range Upward byte Len-1 Description Head(0x5A) I2c_slave_addr Check_sum Example: Change to 0x20 [5A 05 0B 20 00] 10. Restore default setting ID_RESTORE_DEFAULT=0x10 This format is supported for any firmware after Ver. 0.0.5...
Page 30
SJ-PM-TF-Luna A05 Product Manual Benewake (Beijing) Co. Ltd. Receive: U0900018010001, then the code is from the third byte to the sixteenth: 0x55 0x30 0x39 0x30 0x30 0x30 0x31 0x38 0x30 0x31 0x30 0x30 0x30 0x31 13. Get full-length version number ID_GET_FULL_VERSION=0x14 This format is supported for any firmware after Ver.
Page 31
SJ-PM-TF-Luna A05 Product Manual Benewake (Beijing) Co. Ltd. Example: Dual Frequency Mode [5A 05 29 01 00] Single Frequency Mode [5A 05 29 00 00] 16. Timestamp synchronization ID_TIMESTAMP_SYNC =0x31 This format is supported for any firmware after Ver. 0.0.5...
Page 32
SJ-PM-TF-Luna A05 Product Manual Benewake (Beijing) Co. Ltd. Filter off [5A 05 39 00 00] Filter on [5A 05 39 03 00] 19. Distance limit setting ID_DIST_LIMIT=0x3A This format is supported for any firmware after Ver. 0.0.5 Downward byte Len-1...
Page 33
SJ-PM-TF-Luna A05 Product Manual Benewake (Beijing) Co. Ltd. Downward byte Len-1 Description Head(0x5A) Check_sum Id: The same as we mentioned above. Upward: The same format of relevant Id. Example: Read output frequency [5A 05 3F 03 00] 22. Ultra-low Power Mode ID_ ULTRA_LOW_POWER_MODE=0x58 This format is supported for any firmware after Ver.
Need help?
Do you have a question about the TF-Luna and is the answer not in the manual?
Questions and answers