EN
Official user manual

TL-Luna TL-Luna LiDAR Module

30 pages·1.5 MB·Sensor·PDF·ENDEFRITNLJA
TL-Luna TL-Luna LiDAR Module
Table of Contents 65 sections TF-Luna Instruction Manual · Product information · Manufacturer · Copyright · … ShowHide
TF-Luna Instruction Manualp.1Product informationp.2Manufacturerp.2Copyrightp.2Certificationp.2Forewordp.31 Revisionsp.72 Cautionsp.72.1 About documentp.72.2 About productp.72.3 Common errors and other notesp.73 Principle description and key parametersp.83.1 Ranging Principlep.83.2 Basic Characteristic Parametersp.8FOV 2° ②p.83.3 Repeatabilityp.93.4 Ranging characteristicsp.94 Appearance and Structurep.104.1 Appearancep.105 Electrical Characteristicsp.116 Functional Descriptions and configurationp.116.1 Description about Line Sequence and Connectionp.116.2 Serial port Communication Protocolp.126.3 I2C communicationp.126.4 Basic data outputp.146.5 Continuous ranging modep.146.6 Trigger modep.146.7 On/off modep.146.8 Amp thresholdp.156.9 Distance limitp.156.10 Power saving modep.166.11 Additional notesp.177 Quick Test Guidep.177.1 Required tools for testingp.177.2 Stepsp.178 Firmware upgradep.19Appendix I Serial port output formatp.201. 9-byte/cm (Default)p.202. PIXp.203. 9-byte/mmp.204. 32-byte with timestampp.205. ID-0 outputp.206. 8-byte/cmp.20Appendix II Serial communication protocolp.221. Version information ID_GET_VERSION=0x01p.222. System software restore ID_SOFT_RESET=0x02p.223. Output frequency ID_SAMPLE_FREQ=0x03p.224. Trigger mode ID_SAMPLE_TRIG=0x04p.235. Output format setting ID_OUTPUT_FORMAT=0x05p.236. Baud rate setting ID_BAUD_RATE=0x06p.237. Enable/disable output ID_OUTPUT_EN=0x07p.248. Enable/disable checksum comparison ID_FRAME_CHECKSUM_EN=0x08p.249. I2C slave machine address configuration ID_I2C_SLAVE_ADDR=0x0Bp.2410. Restore default setting ID_RESTORE_DEFAULT=0x10p.2511. Save current setting ID_SAVE_SETTINGS=0x11p.2512. Output product bar code ID_READ_MANU_BIN=0x12p.2513. Get full-length version number ID_GET_FULL_VERSION=0x14p.2614. Amp threshold setting ID_AMP_THRESHOLD=0x22p.2615. Timestamp synchronization ID_TIMESTAMP_SYNC =0x31p.2616. Enable/disable Power saving mode (ECO) ID_LOW_CONSUMPTION=0x35p.2617. Distance limit setting ID_DIST_LIMIT=0x3Ap.2718. Enable/disable on-off mode ID_ON_OFF_MODE=0x3Bp.2719. Enable/disable low sample rate mode ID_LOW_SAMPLE_RATE=0x3Ep.2820. Read config by id ID_GET_CONFIG_PARA=0x3Fp.28Appendix III I2C register tablep.29
Page 1 of the TL-Luna TL-Luna LiDAR Module user manual — TF-Luna Instruction Manual
Page 1 · click to enlarge
Page 1
TL-Luna TL-Luna LiDAR Module — TF-Luna Instruction Manual diagram (page 1)
Fig. 1 · TF-Luna Instruction Manual

TF-Luna Instruction Manual

TL-Luna TL-Luna LiDAR Module — TF-Luna Instruction Manual diagram (page 1)
Fig. 2 · TF-Luna Instruction Manual

TF-Luna LiDAR Module

Page 2 of the TL-Luna TL-Luna LiDAR Module user manual — Certification
Page 2 · click to enlarge
Page 2

Product information

ModelTF-Luna
Full nameTF-Luna LiDAR Module

Manufacturer

Company: Benewake (Beijing) Co. Ltd.

AddressNo.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

All rights reserved © Benewake (Beijing) Co. Ltd.

Certification

TL-Luna TL-Luna LiDAR Module — Certification diagram (page 2)
Fig. 3 · Certification
TL-Luna TL-Luna LiDAR Module — Certification diagram (page 2)
Fig. 4 · Certification
TL-Luna TL-Luna LiDAR Module — Certification diagram (page 2)
Fig. 5 · Certification
Page 3 of the TL-Luna TL-Luna LiDAR Module user manual — Foreword
Page 3 · click to enlarge
Page 3

Foreword

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.

This manual will guide you through the installation and operation process and show you some solution

of common problems. It is still possible that you encounter some difficulties that are not included,

please check our support service (supprt@benewake.com) and don’t hesitate to contact our support

consultants or leave a message on our feedback page on our official website:

http://benewake.com/en/mfeedback.html

We hope you enjoy our product and join our community!

We are Benewake! Our goal is to make the best “Robotic Eyes” in the world!

Dear users,

Page 4 of the TL-Luna TL-Luna LiDAR Module user manual — Foreword
Page 4 · click to enlarge
Page 4
Page 4 of the TL-Luna TL-Luna LiDAR Module user manual — Foreword
Page 5 of the TL-Luna TL-Luna LiDAR Module user manual — Foreword
Page 5 · click to enlarge
Page 5
Page 5 of the TL-Luna TL-Luna LiDAR Module user manual — Foreword
Page 6 of the TL-Luna TL-Luna LiDAR Module user manual — Foreword
Page 6 · click to enlarge
Page 6
Page 6 of the TL-Luna TL-Luna LiDAR Module user manual — Foreword
Page 7 of the TL-Luna TL-Luna LiDAR Module user manual — 2.3 Common errors and other notes
Page 7 · click to enlarge
Page 7

1 Revisions

Version No.HistoryDate A00Original2020.1.15 A031. Old serial port formats are removed. 2. Module size and related pictures are updated. 3. More description of function. 4. I2C interface is now available. 5. Power supply voltage up to 3.7V-5.2V is now supported.2020.3.15

2 Cautions

2.1 About document

This manual provides all essential information you may need during the usage of this product.

Please read this manual carefully before using this product and make sure that you are fully

understand the contents of the manual.

2.2 About product

The product can only be maintained and repaired by qualified professionals, and only original

spare parts are permitted to use for performance and safety reasons.

This product DO NOT have polarity and over-voltage protection at all. Please wire and supply

power according to the instructions.

The working temperature of the product is from -10℃ to 60℃, please do not use it outside this

temperature range to avoid risk and damage.

The storage temperature of the product is from -20℃ to 75℃, please do not store it outside

this temperature range to avoid risk and damage.

For safety and performance, please DO NOT open the product casing or remove the IR-pass filter.

2.3 Common errors and other notes

Detecting object with high reflectivity, such as mirrors, smooth floor tiles, and calm milk liquid.

Blocking the product with any transparent objects, such as water or glasses.

The product’s lenses may be covered by dusts or dirt which may affect results, so please keep

Page 8 of the TL-Luna TL-Luna LiDAR Module user manual — FOV 2° ②
Page 8 · click to enlarge
Page 8

those lenses clean.

The exposed circuit board is electrostatic sensitive. Please do not touch the circuit board of the

product barehanded. Please use ESD wrist strap or antistatic gloves to ground yourself if any

operation is necessary; Otherwise, the product may be damaged by static electricity.

3 Principle description and key parameters

3.1 Ranging Principle

TF-Luna is using Time of Flight (TOF) principle to measure 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.

TL-Luna TL-Luna LiDAR Module — 3 Principle description and key parameters diagram (page 8)
Fig. 6 · 3 Principle description and key parameters
TL-Luna TL-Luna LiDAR Module — 3 Principle description and key parameters diagram (page 8)
Fig. 7 · 3 Principle description and key parameters
Figure 1Schematics of TOF Principle

3.2 Basic Characteristic Parameters

Table 1Parameters specification of TF-Luna

Operating range 0.2m~8m①

±6cm@ (0.2-3m) ②

Measurement unit cm (Default)

FOV 2° ②

Frame rate 1~250Hz ( adjustable ) ③

① Operating range measured indoor based on a standard whiteboard with reflectivity 90% .

② This is theoretical, real value may be different.

③ 100Hz as default and only any factor (500/n, n can be any integer in [2, 500]) of 500Hz are available.

Show 4 more labels / short text on this page
Description Parameter value · Accuracy · ±2%@ (3m-8m) · Range resolution 1cm
Page 9 of the TL-Luna TL-Luna LiDAR Module user manual — 3.4 Ranging characteristics
Page 9 · click to enlarge
Page 9

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. These values are for reference only, various testing environments may give

different results.

Table 2 STD Amp correlation

Amp1002004001000≥2000 STD3cm3cm2cm1cm0.5cm
TL-Luna TL-Luna LiDAR Module — 3.3 Repeatability diagram (page 9)
Fig. 8 · 3.3 Repeatability

Table 3 STD Dist correlation with 90% diffuse reflectance object

Dist200cm400cm600cm800cm Std0.5cm1cm1.5cm2cm

3.4 Ranging characteristics

TF-Luna minimize the impact of external environment on ranging performance by optimizing light

path and algorithm.

TF-Luna’s ranging dead zone is 20 cm or closer. Any distance output less than 20 cm is unreliable. The

operating range of black and white targets are different:

The operating range of TF-Luna detecting black target with 10% reflectivity is 0.2-2.5m; The operating

range of TF-Luna detecting white target with 90% reflectivity is 0.2-8m.

The ranging data are reliable only if the reflection surface fully covers the light spot, so the diameter

of the object must at least the same as the diameter of the light spot, and that diameter depends on FOV

of TF-Luna. The minimum diameter of the object surface has a formula:

d = 2 ∗D ∙tanβ

In the formula, d represents the minimum diameter, D is the distance of the object, and β is the half

FOV of TF-Luna. Common values are shown in table 4 for your convenience:

Page 10 of the TL-Luna TL-Luna LiDAR Module user manual — 4 Appearance and Structure
Page 10 · click to enlarge
Page 10

Table4 Distance and minimum diameter

Distance (D)1m2m3m4m5m6m7m8m Minimum diameter (d)3.5cm7cm10.5cm14cm17.5cm21cm24.5cm28cm
TL-Luna TL-Luna LiDAR Module — 4 Appearance and Structure diagram (page 10)
Fig. 9 · 4 Appearance and Structure

If the light spot reaches two objects with different distances as Figure 2, the output distance value

will be any value between the two actual distances of the objects, which may cause error for high-accuracy

applications. Please try to avoid this situation for better accuracy and performance.

TL-Luna TL-Luna LiDAR Module — 4 Appearance and Structure diagram (page 10)
Fig. 10 · 4 Appearance and Structure

Figure 2 Detecting two objects at different location

4 Appearance and Structure

4.1 Appearance

TL-Luna TL-Luna LiDAR Module — 4 Appearance and Structure diagram (page 10)
Fig. 11 · 4 Appearance and Structure

Figure 3 TF-Luna appearance and size drawing

Page 11 of the TL-Luna TL-Luna LiDAR Module user manual — 6 Functional Descriptions and configuration
Page 11 · click to enlarge
Page 11

5 Electrical Characteristics

Table 5Major Electrical Parameters of TF-Luna
TL-Luna TL-Luna LiDAR Module — 5 Electrical Characteristics diagram (page 11)
Fig. 12 · 5 Electrical Characteristics

This product has no overvoltage nor polarity protection, so please make sure that the product is well

connected, and the power supply voltage is inside the given range.

6 Functional Descriptions and configuration

6.1 Description about Line Sequence and Connection

TL-Luna TL-Luna LiDAR Module — 6 Functional Descriptions and configuration diagram (page 11)
Fig. 13 · 6 Functional Descriptions and configuration

Figure 4 TF-Luna’s pin numbers

Table 6The Function and Connection Description of each pin
TL-Luna TL-Luna LiDAR Module — 6 Functional Descriptions and configuration diagram (page 11)
Fig. 14 · 6 Functional Descriptions and configuration
Page 12 of the TL-Luna TL-Luna LiDAR Module user manual — 6.3 I2C communication
Page 12 · click to enlarge
Page 12

6.2 Serial port Communication Protocol

Serial port Communication starts when pin 5 is disconnected or connected to 3.3v. It will set TF-Luna

receiving RXD from 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.

Serial port Communication Protocol data byte format:

TL-Luna TL-Luna LiDAR Module — 6.2 Serial port Communication Protocol diagram (page 12)
Fig. 15 · 6.2 Serial port Communication Protocol

Head: Fixed 0x5A.

Len: The length of bytes from the head byte to check-sum at the end, and it has to between 4 to 255.

ID: Indicates how to parse the Payload data.

Payload: Payload data segment, Optional.

Checksum: The lower 8 bytes of the sum from Head the Payload.

Please check Appendix II Serial communication protocol for more information.

TF-Luna are not being check as default. Thus, ANY value is acceptable on the Checksum byte, unless

checking of those bytes are required. Please check “Enable/disable checksum comparison

ID_FRAME_CHECKSUM_EN=0x08” in Appendix II Serial communication protocol to enable the feature.

The instruction makes change immediately after sending, but the current setting is not saved and will

lose after reboot. User must use “Save current setting ID_SAVE_SETTINGS=0x11” to save the change. The

full save-current-setting11s hexadecimal string is 5A 04 11 00 in this case.

6.3 I2C communication

When pin 5 is connected to ground, TF-Luna enters I2C mode, then its pin 2 is use as SDA data and

pin 3 is the SCL clock sending data. TF-Luna support up to 400kps clock speed as slave machine and its

default address is 0x10. For more information about I2C register table Appendix III I2C register table.

Write register timing:

Start Slave Addr W Ack Register Addr Ack Data1 Ack … DataN Ack Stop

Page 13 of the TL-Luna TL-Luna LiDAR Module user manual — 6.2 Serial port Communication Protocol
Page 13 · click to enlarge
Page 13

Read register timing:

Start Slave Addr W Ack Register Addr Ack Stop

Start Slave Addr R Ack Data1 Ack … DataN Nack Stop

is also working while replacing the last Nack signal.

In the continuous ranging mode, the host must monitor pin 6 for synchronous signal and initiate the

read data operation in time. Otherwise, it may cause an error by reading and updating the data register at

the same time. In multi-machine bus mode, use command to trigger reading is strongly recommended.

TL-Luna TL-Luna LiDAR Module — 6.2 Serial port Communication Protocol diagram (page 13)
Fig. 16 · 6.2 Serial port Communication Protocol

Figure 5 Timing of reading data register in I2C mode

Pin 6 is normal low level and it switches to high as soon as the data is updated. It switches to low

level only if a read operation on any register is done. Therefore, I2C host must read the register when

receive a high level on pin 6 in the continuous ranging mode. As the figure has shown above, the first

result in red is unreliable and the rest two in green are accurate.

To writing the configuration value to the I2C register does not take effect immediately, nor will the

power outage be saved, but writing 0x01 to address 0x20 will save the current register value and take

effect after restarting. If the written configuration value is invalid, the register value remains valid.

Generally, only writable register addresses take effect immediately after being written.

Normally write registers that are only writable are saved and start working immediately. However,

changing a value of an I2C register is not. The changed value in I2C register are saved and effective after

reboot only if the new value is valid and address 0x20 is written with value 0x01.

Page 14 of the TL-Luna TL-Luna LiDAR Module user manual — 6.7 On/off mode
Page 14 · click to enlarge
Page 14

6.4 Basic data output

TF-Luna normally provide these data below:

⚫ Distance (Dist): Default in centimeters.

⚫ Signal strength (Amp): Distance value is unreliable when receiving signal is overexposure (Amp =

0xFFFF) or too low (Amp < 100 as 14).

⚫ Chip Temperature (Temp): Celsius degree = Temp/8 - 256℃

TF-Luna supports various serial format, please check Appendix I Serial port output format for more

information, and the default setting is 9-bytes/centimeter. Format setting is in “Output format setting

ID_OUTPUT_FORMAT=0x05” section.

6.5 Continuous ranging mode

TF-Luna will keep tracking the distance 500 time 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. Therefore, lower output

frequency gives less time of the averaging process as well as less fluctuation of the output. The highest

output frequency that TF-Luna supports is 250Hz (output_frequency ≤ 250Hz), and it must be 500/n Hz (n

is an integer that in the range [2, 500]). Thus, all supported values of output frequency are: 250Hz, 166Hz,

125Hz, 100Hz, …, 2Hz, 1Hz. User can change the output frequency using “Output frequency

ID_SAMPLE_FREQ=0x03”.

6.6 Trigger mode

TF-Luna enters trigger mode if the output frequency is set to be 0 with “Output frequency

ID_SAMPLE_FREQ=0x03”. In this mode, TF-Luna stops measuring and outputting unless it is triggered by

“Trigger mode ID_SAMPLE_TRIG=0x04” — in other words, TF-Luna measures and output once as soon as

it receive the hexadecimal byte string 5A 04 04 00.

6.7 On/off mode

On/off mode is designed from those users only need to detect the existence of an object. TF-Luna

can start this mode using “Enable/disable on-off mode ID_ON_OFF_MODE=0x3B” and then shows result

through pin 6. Figure 7 below shows how the mode works when a high level is set to represent an object

Page 15 of the TL-Luna TL-Luna LiDAR Module user manual — 6.9 Distance limit
Page 15 · click to enlarge
Page 15

is detected.

TL-Luna TL-Luna LiDAR Module — 6.8 Amp threshold diagram (page 15)
Fig. 17 · 6.8 Amp threshold

Figure 6 On/off mode that high level means closer

Zone value: If an object is detected closer than Dist, then Pin 6 outputs high-level, but only if an object

is detected farther than Dist + Zone, then Pin 6 outputs low-level. When zone is set to 0, pin 6 may output

up and down cause by fluctuation of the measuring when the real distance happens to be the same as

Dist. That is why a proper zone value is needed to help avoid this situation by having a hysteretic interval.

Delays is also supported to avoid inaccurate jumping output. Pin 6 changes its output depends on the

Dist value condition and the time it last. Delay1(ms) and Delay2(ms) determine how long that approaching

changes and leaving changes should wait after Dist value is already over the line.

low, then pin 6 may have false output in the on/off mode. Please follow the instructions in 6.8 Amp

threshold to set the over-threshold value greater than 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 user need to change

the Amp threshold value, please follow instructions in “Amp threshold setting

ID_AMP_THRESHOLD=0x22”. Note that the final Amp threshold in TF-Luna is 10 times the value you send

to it.

6.9 Distance limit

TF-Luna has a default maximum and minimum distance output: [min, max] = [0cm, 800cm]. User can

change the output limits using “Distance limit setting ID_DIST_LIMIT=0x3A”.

Page 16 of the TL-Luna TL-Luna LiDAR Module user manual — 6.10 Power saving mode
Page 16 · click to enlarge
Page 16

6.10 Power saving mode

TF-Luna supports power saving mode for power sensitive applications, it reduces its power

consumption by adjusting both current level and duty cycle of the light source. With 5V power supply,

TF-Luna’s power consumption on Continuous ranging mode is about 350mW as the light source switch to

highest current level and duty cycle.

When TF-Luna is on power saving mode, it dynamically adjusts the current of the light source by

switching several preset current levels according to the strength (amp) of the receiving signal. Therefore,

TF-Luna can get a stable amp value and save power consumption at the same time.

Users may reduce the duty cycle in different ways: to use trigger mode (about 42.5mW with 5V power

supply) to turn the light source off while waiting, or to enable power saving mode. Power saving mode

also turns the light source off, but it lets TF-Luna generate trigger signal periodically and automatically.

The maximum sample frequency that gives TF-Luna a stable timing is 10Hz.

Please follow the format in “Enable/disable Power saving mode (ECO)

ID_LOW_CONSUMPTION=0x35” section to enable power saving mode with listed working frequencies.

The average current and power are measured with 5V power supply and the actual value might be

different in various environment, especially different temperature or other power supply.

TL-Luna TL-Luna LiDAR Module — 6.10 Power saving mode diagram (page 16)
Fig. 18 · 6.10 Power saving mode
Page 17 of the TL-Luna TL-Luna LiDAR Module user manual — 7.2 Steps
Page 17 · click to enlarge
Page 17

6.11 Additional notes

Please check Appendix II Serial communication protocol for more options, such as version ID report,

system software restore, baud rate configuration, etc.

7 Quick Test Guide

7.1 Required tools for testing

TL-Luna TL-Luna LiDAR Module — 7 Quick Test Guide diagram (page 17)
Fig. 19 · 7 Quick Test Guide
TL-Luna TL-Luna LiDAR Module — 7 Quick Test Guide diagram (page 17)
Fig. 20 · 7 Quick Test Guide
TL-Luna TL-Luna LiDAR Module — 7 Quick Test Guide diagram (page 17)
Fig. 21 · 7 Quick Test Guide
TL-Luna TL-Luna LiDAR Module — 7 Quick Test Guide diagram (page 17)
Fig. 22 · 7 Quick Test Guide
TL-Luna TL-Luna LiDAR Module — 7 Quick Test Guide diagram (page 17)
Fig. 23 · 7 Quick Test Guide
TL-Luna TL-Luna LiDAR Module — 7 Quick Test Guide diagram (page 17)
Fig. 24 · 7 Quick Test Guide

USB cable PC PC software

7.2 Steps

① Download and install the latest Test software

Please visit our official website (en.benewake.com) and download the Test software of TF-Luna.

software may regard the ‘.exe’ file as virus. Also, released versions are only running on Windows systems

currently.

② Connecting Hardware and cables

TL-Luna TL-Luna LiDAR Module — 7.2 Steps diagram (page 17)
Fig. 25 · 7.2 Steps

Figure 7 Schematic Diagram of Correct Connection

Please connect TF-Luna, TTL - USB converter, and USB cable properly as shown in 5. Please check

if there is any loose connection, and then plug the USB cable into your PC.

TTL to USB · TF-Luna Data cable · convertor

Page 18 of the TL-Luna TL-Luna LiDAR Module user manual — 6.11 Additional notes
Page 18 · click to enlarge
Page 18

③ Open your Test software and check data output

Open the PC software and select “①TF-Luna” and select automatically recognized occupied serial port (in

this case “② COM9”) as shown in Figure 6

Now click the “CONNECT” button, and a continuous images of the output data will be displayed in area

“④ TIME LINE CHART” on the right if everything is connected successfully. The real-time data of the

Current measure distance (Dist), effective data points per second (Effective Points) and signal strength

(Strength) will be displayed in area “⑥ REAL TIME DATA” below as well.

TL-Luna TL-Luna LiDAR Module — 6.11 Additional notes diagram (page 18)
Fig. 26 · 6.11 Additional notes
Figure 8PC software Interface and Display

a) If nothing is displayed in area “④TIME LINE CHART”, please check the wire connection and

sequence. A red LED indicator inside the transmitting lens at front will light up when TF-Luna is

power-on.

b) Please select “③Pix Mode” before switching TF-Luna’s outputs to Pixhawk format to avoid

abnormal data display in the “④TIME LINE CHART” area. Note that slecting Pix Mode will

automatically set the unit of distance to meters.

c) Since TF-Luna does not pass unit information and the software always use centimeters as distance

unit, the distance unit displayed in the chart remains the same as centimeter even if 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.

④ ① ②

Page 19 of the TL-Luna TL-Luna LiDAR Module user manual — 8 Firmware upgrade
Page 19 · click to enlarge
Page 19

8 Firmware upgrade

TF-Luna allows upgrading firmware remotely when current firmware no longer support users’ new

requirements. Please contact us for the additional remote upgrading software if any relevant firmware

upgrades are available on Benewake official website.

TL-Luna TL-Luna LiDAR Module — 8 Firmware upgrade diagram (page 19)
Fig. 27 · 8 Firmware upgrade
Figure 9Firmware Upgrade PC software of TF-Luna

The tools for an upgrade are mostly the same as those in the Quick Test Guide, including a 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. Finally, click “⑤ Download Bin” to start upgrading

and the upgrading information will show up in “⑥”.

Page 20 of the TL-Luna TL-Luna LiDAR Module user manual — 6. 8-byte/cm
Page 20 · click to enlarge
Page 20

Appendix I Serial port output format

1. 9-byte/cm (Default)

This format is supported for any firmware after Ver. 0.0.5

Byte 0 1 2 3 4 5 6 7 8

Description 0x59 0x59 Dist_L Dist_H Amp_L Amp_H Temp_L Temp_H Check_sum

Distcm

Amp: Signal strength indicator. Dist value is unreliable when Amp < 100 or Amp = 65535 (Overexposure)

TempCelsius temperature = Temp / 8 - 256 ℃

2. PIX

This format is supported for any firmware after Ver. 0.0.5

“X.YZ\r\n” is a sample ASCII string and only keep two significant digits in meter where “X.YZ” is the result.

3. 9-byte/mm

This format is supported for any firmware after Ver. 0.0.5

byte 0 1 2 3 4 5 6 7 8

Description 0x59 0x59 Dist_L Dist_H Amp_L Amp_H Temp_L Temp_H Check_sum

Distmm

Amp: Signal strength indicator. Dist value is unreliable when Amp < 100 or Amp = 65535 (Overexposure)

TempCelsius temperature = Temp / 8 - 256 ℃

4. 32-byte with timestamp

This format is supported for any firmware after Ver. 0.0.5

byte 0 1 2 3 4 5 6-9 10

Description 0x59 0x59 Dist_L Dist_H Amp_L Amp_H Timestamp Check_sum

Distcm

Amp: Signal strength indicator. Dist value is unreliable when Amp < 100 or Amp = 65535 (Overexposure)

TimestampTimestamp (ms) is in small-end format

5. ID-0 output

This format is supported for any firmware after Ver. 0.0.5

byte 0 1 2 3 4 5 6 7-10 11

Description 0x5A Len 0x00 Dist_L Dist_H Amp_L Amp_H Timestamp Check_sum

Distcm

Amp: Signal strength indicator. Dist value is unreliable when Amp < 100 or Amp = 65535 (Overexposure)

TimestampTimestamp (ms) is in small-end format

6. 8-byte/cm

This format is supported for any firmware after Ver. 0.0.5

byte 0 1 2 3 4-7

Description Dist_L Dist_H Amp_L Amp_H Timestamp

Page 21 of the TL-Luna TL-Luna LiDAR Module user manual — Appendix I Serial port output format
Page 21 · click to enlarge
Page 21
Distcm

Amp: Signal strength indicator. Dist value is unreliable when Amp < 100 or Amp = 65535 (Overexposure)

TimestampTimestamp (ms) is in small-end format
Page 22 of the TL-Luna TL-Luna LiDAR Module user manual — 3. Output frequency ID_SAMPLE_FREQ=0x03
Page 22 · click to enlarge
Page 22

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 0 1 2 Len-1

Description Head(0x5A) Len ID Check_sum

Upward:

TL-Luna TL-Luna LiDAR Module — Appendix II Serial communication protocol diagram (page 22)
Fig. 28 · Appendix II Serial communication protocol

*Version: For instance, if the third, fourth, and fifth bytes are 112, 50, 9, then the version is 9.50.112

Sample instruction[5A 04 01 00]

2. System software restore ID_SOFT_RESET=0x02

This format is supported for any firmware after Ver. 0.0.5

TL-Luna TL-Luna LiDAR Module — 2. System software restore ID_SOFT_RESET=0x02 diagram (page 22)
Fig. 29 · 2. System software restore ID_SOFT_RESET=0x02
TL-Luna TL-Luna LiDAR Module — 2. System software restore ID_SOFT_RESET=0x02 diagram (page 22)
Fig. 30 · 2. System software restore ID_SOFT_RESET=0x02
*Status0 (success), otherwise (fail)
Sample instruction[5A 04 02 00]

3. Output frequency ID_SAMPLE_FREQ=0x03

This format is supported for any firmware after Ver. 0.0.5

TL-Luna TL-Luna LiDAR Module — 3. Output frequency ID_SAMPLE_FREQ=0x03 diagram (page 22)
Fig. 31 · 3. Output frequency ID_SAMPLE_FREQ=0x03

Freq: Working frequency if Freq > 0, and Trigger mode if Freq = 0.

byte 0 1 2 3~4 Len-1

Description Head(0x5A) Len ID Freq Check_sum

FreqThe current working frequency of the LiDAR

Sample instruction:

10Hz [5A 06 03 0A 00 00]

250Hz [5A 06 03 FA 00 00]

Show 4 more labels / short text on this page
Downward · Upward · Downward · Upward
Page 23 of the TL-Luna TL-Luna LiDAR Module user manual — 6. Baud rate setting ID_BAUD_RATE=0x06
Page 23 · click to enlarge
Page 23

4. Trigger mode ID_SAMPLE_TRIG=0x04

This format is supported for any firmware after Ver. 0.0.5

byte 0 1 2 Len-1

Description Head(0x5A) Len ID Check_sum

Sample instruction[5A 04 04 00]

5. Output format setting ID_OUTPUT_FORMAT=0x05

This format is supported for any firmware after Ver. 0.0.5

TL-Luna TL-Luna LiDAR Module — 5. Output format setting ID_OUTPUT_FORMAT=0x05 diagram (page 23)
Fig. 32 · 5. Output format setting ID_OUTPUT_FORMAT=0x05

Format:

0x07 = 32-byte with timestamp

byte 0 1 2 3 Len-1

Description Head(0x5A) Len ID Format Check_sum

FormatTF-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

TL-Luna TL-Luna LiDAR Module — 6. Baud rate setting ID_BAUD_RATE=0x06 diagram (page 23)
Fig. 33 · 6. Baud rate setting ID_BAUD_RATE=0x06

byte 0 1 2 3~6 Len-1

Description Head(0x5A) Len ID Baudrate Check_sum

Baudrate: TF-Luna’s current baudrate.

Example:

9600 [5A 08 06 80 25 00 00 00]

19200 [5A 08 06 00 4B 00 00 00]

Show 12 more labels / short text on this page
Downward · Upward · Data frame · Downward · 0x01 = 9-byte/cm · 0x02 = PIX · 0x06 = 9-byte/mm · 0x08 = ID-0 · 0x09 = 8-byte/cm · Upward · Downward · Upward
Page 24 of the TL-Luna TL-Luna LiDAR Module user manual — 9. I2C slave machine address configuration ID_I2C_SLAVE_ADDR=0x0B
Page 24 · click to enlarge
Page 24

38400 [5A 08 06 00 96 00 00 00]

57600 [5A 08 06 00 E1 00 00 00]

115200 [5A 08 06 00 C2 01 00 00]

230400 [5A 08 06 00 84 03 00 00]

460800 [5A 08 06 00 08 07 00 00]

921600 [5A 08 06 00 10 0E 00 00]

7. Enable/disable output ID_OUTPUT_EN=0x07

This format is supported for any firmware after Ver. 0.0.5

TL-Luna TL-Luna LiDAR Module — 7. Enable/disable output ID_OUTPUT_EN=0x07 diagram (page 24)
Fig. 34 · 7. Enable/disable output ID_OUTPUT_EN=0x07

Enable: 0 to disable, 1 to enable.

byte 0 1 2 3 Len-1

Description Head(0x5A) Len ID Enable Check_sum

Example:

Enable output [5A 05 07 01 00]

Disable output [5A 05 07 00 00]

8. Enable/disable checksum comparison ID_FRAME_CHECKSUM_EN=0x08

This format is supported for any firmware after Ver. 0.0.5

TL-Luna TL-Luna LiDAR Module — 8. Enable/disable checksum comparison ID_FRAME_CHECKSUM_EN=0x08 diagram (page 24)
Fig. 35 · 8. Enable/disable checksum comparison ID_FRAME_CHECK…

Enable: 0 to disable, 1 to enable.

byte 0 1 2 3 Len-1

Description Head(0x5A) Len ID Enable Check_sum

Example:

Enable checksum comparison [5A 05 08 01 00]

Disable checksum comparison [5A 05 08 00 67]

9. I2C slave machine address configuration ID_I2C_SLAVE_ADDR=0x0B

This format is supported for any firmware after Ver. 1.0.0

TL-Luna TL-Luna LiDAR Module — 9. I2C slave machine address configuration ID_I2C_SLAVE_ADDR=0x0B diagram (page 24)
Fig. 36 · 9. I2C slave machine address configuration ID_I2C_SL…
Show 6 more labels / short text on this page
Downward · Upward · Downward · data frame · Upward · Downward
Page 25 of the TL-Luna TL-Luna LiDAR Module user manual — 12. Output product bar code ID_READ_MANU_BIN=0x12
Page 25 · click to enlarge
Page 25
I2c_slave_addrrange [0x08, 0x77] Upward

byte 0 1 2 3 Len-1

Description Head(0x5A) Len ID 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

byte 0 1 2 Len-1

Description Head(0x5A) Len ID Check_sum

byte 0 1 2 3 Len-1

Description Head(0x5A) Len ID Status Check_sum

Status0 for success, otherwise for errors

Example:

Restore default setting [5A 04 10 00]

11. Save current setting ID_SAVE_SETTINGS=0x11

This format is supported for any firmware after Ver. 0.0.5

byte 0 1 2 Len-1

Description Head(0x5A) Len ID Check_sum

byte 0 1 2 3 Len-1

Description Head(0x5A) Len ID Status Check_sum

Status0 for success, otherwise for errors
Example[5A 04 11 00]

12. Output product bar code ID_READ_MANU_BIN=0x12

This format is supported for any firmware after Ver. 0.0.5

byte 0 1 2 Len-1

Description Head(0x5A) Len ID Check_sum

byte 0 1 2 3-16 Len-1

Description Head(0x5A) Len ID Bin Check_sum

Bin14 byte product bar code

Example:

Send [5A 04 12 00]

ReceiveU0900018010001, 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

Show 6 more labels / short text on this page
Downward · Upward · Downward · Upward · Downward · Upward
Page 26 of the TL-Luna TL-Luna LiDAR Module user manual — 16. Enable/disable Power saving mode (ECO) ID_LOW_CONSUMPTION=0x35
Page 26 · click to enlarge
Page 26

13. Get full-length version number ID_GET_FULL_VERSION=0x14

This format is supported for any firmware after Ver. 0.0.5

byte 0 1 2 Len-1

Description Head(0x5A) Len ID Check_sum

TL-Luna TL-Luna LiDAR Module — 13. Get full-length version number ID_GET_FULL_VERSION=0x14 diagram (page 26)
Fig. 37 · 13. Get full-length version number ID_GET_FULL_VERSI…

byte 0 1 2 3-10 11 12-19 20 21-22 23 24-25 26 27-28 Len-1

Example[5A 04 14 00]

14. Amp threshold setting ID_AMP_THRESHOLD=0x22

This format is supported for any firmware after Ver. 0.0.5

TL-Luna TL-Luna LiDAR Module — 14. Amp threshold setting ID_AMP_THRESHOLD=0x22 diagram (page 26)
Fig. 38 · 14. Amp threshold setting ID_AMP_THRESHOLD=0x22

Amp_Threshold: When Amp < Amp_Threshold * 10, then output Dummy_Dist instead of the result of calculation

Dummy_Dist: The output distance when Amp is too low.

byte 0 1 2 3 4-5 Len-1

Description Head(0x5A) Len ID Amp_Threshold Dummy_Dist Check_sum

Example:

To output 500 cm when Amp < 300 [5A 07 22 1E F4 01 00]

15. Timestamp synchronization ID_TIMESTAMP_SYNC =0x31

This format is supported for any firmware after Ver. 0.0.5

TL-Luna TL-Luna LiDAR Module — 15. Timestamp synchronization ID_TIMESTAMP_SYNC =0x31 diagram (page 26)
Fig. 39 · 15. Timestamp synchronization ID_TIMESTAMP_SYNC =0x3…
StdThe current std timestamp specified

Example:

To set timestamp to 1000ms [5A 08 31 E8 03 00 00 00]

16. Enable/disable Power saving mode (ECO) ID_LOW_CONSUMPTION=0x35

This format is supported for any firmware after Ver. 0.0.5

Show 6 more labels / short text on this page
Downward · Upward · Downward · Upward · Downward · Downward
Page 27 of the TL-Luna TL-Luna LiDAR Module user manual — 18. Enable/disable on-off mode ID_ON_OFF_MODE=0x3B
Page 27 · click to enlarge
Page 27
TL-Luna TL-Luna LiDAR Module — 17. Distance limit setting ID_DIST_LIMIT=0x3A diagram (page 27)
Fig. 40 · 17. Distance limit setting ID_DIST_LIMIT=0x3A
Sample_rateWork frequency if Sample_rate is positive (0 to disable power saving)

byte 0 1 2 3-4 Len-1

Description Head(0x5A) Len ID Sample_rate Check_sum

Example:

Enable power saving mode and measure at 10Hz frequency [5A 06 35 0A 00 00]

17. Distance limit setting ID_DIST_LIMIT=0x3A

This format is supported for any firmware after Ver. 0.0.5

TL-Luna TL-Luna LiDAR Module — 17. Distance limit setting ID_DIST_LIMIT=0x3A diagram (page 27)
Fig. 41 · 17. Distance limit setting ID_DIST_LIMIT=0x3A

Dist_min: minimum distance output in centimeters.

Dist_max: maximum distance output in centimeters.

Silence: Not output when the distance is out of range if silence = 1. Output limit when out of range if silence = 0

byte 0 1 2 3-4 5-6 7 Len-1

Description Head(0x5A) Len ID Dist_min Dist_max Silence Check_sum

Example:

Output limit when out of range with the minimum set to be 20cm and the maximum set to be 500cm

[5A 09 3A 14 00 F4 01 00 00]

18. Enable/disable on-off mode ID_ON_OFF_MODE=0x3B

This format is supported for any firmware after Ver. 1.0.0

TL-Luna TL-Luna LiDAR Module — 18. Enable/disable on-off mode ID_ON_OFF_MODE=0x3B diagram (page 27)
Fig. 42 · 18. Enable/disable on-off mode ID_ON_OFF_MODE=0x3B

byte 0 1 2 3 4-5 6-7 8-9 10-11 Len-1

Head(0x5A) Len ID Mode Dist Zone Delay1 Delay2 Check_sum

Mode: 0 (Normal output) , 1 (On-off mode with high level output when closer) , 2 (On-off mode with low level output

Dist: critical dist value (the closer one) in centimeters.

ZoneZone size in centimeters

Delay1: Delay time 1 in millisecond. Pin 6 switch level only if the distance detected is less than Dist and the situation last

for Delay1 long.

Show 5 more labels / short text on this page
Upward · Downward · Upward · Downward · when closer)
Page 28 of the TL-Luna TL-Luna LiDAR Module user manual — 20. Read config by id ID_GET_CONFIG_PARA=0x3F
Page 28 · click to enlarge
Page 28

Delay2: Delay time 2 in millisecond. Pin 6 switch level only if the distance detected is more than Dist + Zone and the

situation last for Delay2 long.

Example:

Enable on-off mode with high level output when closer, and set Dist = 200cm, Zone=10cm, Delay1 = Delay2 = 1000ms:

[5A 0D 3B 01 CB 00 0A 00 E8 03 E8 03 00]

19. Enable/disable low sample rate mode ID_LOW_SAMPLE_RATE=0x3E

This format is supported for any firmware after Ver. 0.0.5

TL-Luna TL-Luna LiDAR Module — 19. Enable/disable low sample rate mode ID_LOW_SAMPLE_RATE=0x3E diagram (page 28)
Fig. 43 · 19. Enable/disable low sample rate mode ID_LOW_SAMPL…

Output_period_s: Only work when a positive number is given which means the time period of outputs are longer than

one second and the output frequency is less than 1Hz.

One_shot_frames: This only work when sample_freq and output_period_s are valid. Only if output_period_s > 0, then

the laser turns on every output_period_s second and then output the average output of one_shot_frames results.

byte 0 1 2 3-6 7-10 Len-1

Description Head(0x5A) Len ID Output_period_s One_shot_frames Check_sum

Example:

To measure once every 300 seconds and keep working for 1 second, user can let sample_freq = 1, output_period_s = 300,

one_shot_frames = 1 [5A 06 03 01 00 00] [5A 0C 3E 2C 01 00 00 01 00]

20. Read config by id ID_GET_CONFIG_PARA=0x3F

This format is supported for any firmware after Ver. 0.0.5

byte 0 1 2 3 Len-1

Description Head(0x5A) Len ID Id 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]

Downward · Upward · Downward

Page 29 of the TL-Luna TL-Luna LiDAR Module user manual — Appendix III I2C register table
Page 29 · click to enlarge
Page 29

Appendix III I2C register table

TL-Luna TL-Luna LiDAR Module — Appendix III I2C register table diagram (page 29)
Fig. 44 · Appendix III I2C register table

R SN -- Production code in 14 bytes ASCI

0x20 W SAVE -- Write 0x01 to save current setting

Page 30 of the TL-Luna TL-Luna LiDAR Module user manual — Appendix III I2C register table
Page 30 · click to enlarge
Page 30
TL-Luna TL-Luna LiDAR Module — Appendix III I2C register table diagram (page 30)
Fig. 45 · Appendix III I2C register table
0x24 W TRIG_ONE_SHOT -- 0x01Trigger once (only on trigger

0x29 W RESTORE_FACTORY_DEFAULTS -- Write 0x01 to restore factory default

0x2E W/R MIN_DIST_LOW 0x00 Minimum dist in cm, but not working

0x30 W/R MAX_DIST_LOW 0x20 Maximum dist in cm, but not working

Sources

References & links

Pages referenced in this manual — manufacturer, support and downloads.

Ask about the TL-Luna TL-Luna LiDAR Module

Owners and our team usually reply within a day — and your question helps the next person too.

Add your email to get notified when it’s answered — no spam, ever.

0 questions
No questions yet about the TL-Luna TL-Luna LiDAR Module

Be the first to ask — other owners or our team will answer.

Original document

TL-Luna TL-Luna LiDAR Module manual PDF

30 pages·1.5 MB·Sensor·PDF
Click any page above to open it here
Page 1 / …
100%
Loading pages…