Summary of Contents for Lightware microLiDAR LW20/HA
Page 1
Information found in this document is used entirely at the reader’s own risk and whilst every effort has been made to ensure its validity, neither LightWare Optoelectronics (Pty) Ltd, its subsidiaries, nor its representatives make any warranties with respect to the accuracy of the information contained herein.
Page 2
Welcome to LightWare Thank you for selecting LightWare as your partner in distance sensing technology. LightWare is a pioneer in microLiDAR® distance sensors, drawing upon four decades of expertise in LiDAR technology to develop application-specific products renowned for their accuracy, reliability, and durability.
Page 5
Like all LightWare’s products, it uses the time-of-flight principle to measure distance, emitting a rapid succession of laser pulses that are reflected by target objects and then received back and processed immediately.
Page 6
Laser eye safety LightWare LiDAR sensors comply with the United States Food and Drug Administration (FDA) laser eye safety regulations for safe use around humans and animals, based on the international standard IEC 60825-1 and utilizing LaserSafe PC Professional for the computations.
Page 7
17 m / 55.8ft NOHD)* * Distance beyond which binoculars may be safely used. Approximate values only. Please contact LightWare LiDAR if further information is required. LW20/HA | Product guide | Revision 0 | 24 April 2025 Page 7 of 55...
Page 8
Key technical specifications Table 2: LW20/HA microLiDAR® key technical specifications LW20/HA microLiDAR® key technical specifications Performance 0.2 to 100m / 0.6 to 328ft Range (70% albedo in sunlight conditions, 0.9 x 0.9 m target size) Update rate 48 to 1250 readings per second (customizable to suit application) Resolution 1 mm / 0.04 in 1cm for an internal unit temperature of 20°C to 30°C...
Page 9
To support configuration and integration, the following accessories are available for purchase from the LightWare website: USB adapter To configure and test your sensor in LightWare Studio via the serial cable a USB adapter is required. Figure 2: ACC_USB_Serial - Generic USB adapter Pixhawk adapter Each LW20/HA is supplied with a 5-way Pixhawk adapter to simplify system integration.
Page 10
Breakout board An optional breakout board accessory is available to facilitate the integration of the LW20/HA into a host controller such as a Pixhawk, PX4, Raspberry Pi, or Arduino. It consists of four reusable adapter boards to conveniently connect the LW20/HA communication cable to other standard cables and host controllers, without requiring soldering.
Page 11
Getting started LightWare Studio is a free application (available for Windows, macOS, and Linux) and is the gateway to configuring your microLiDAR® sensor and visualizing your data. This software empowers you to customize settings, fine-tune sensor parameters, and easily analyze data. It also facilitates firmware upgrades and in-field diagnostics and support.
Page 12
Carefully connect your LW20/HA to the USB adapter using the communication cable. Check the connectors are correctly orientated and very gently squeeze them in until they click into place. To unplug the cable, use a small flat-head screwdriver in the groove on the connector.
Page 13
Please allow the installation process to complete. LightWare Studio will automatically detect the USB adapter and present it for selection on the Welcome page. The Welcome page may show other communications ports on your computer.
Page 14
(Please refer to the section below for a more comprehensive understanding of these parameters.) Figure 11: LightWare Studio LW20/HA parameters in Distance mode page LW20/HA | Product guide | Revision 0 | 24 April 2025...
Page 15
12. Data can be downloaded and saved using the save icon above the data. Figure 12: LightWare Studio LW20/HA distance log page showing measurements LW20/HA | Product guide | Revision 0 | 24 April 2025...
Page 16
Parameters, filters, settings, and tools Setting the device parameters Your LightWare LW20/HA microLiDAR® sensor can be configured via LightWare Studio or from a host controller using the product commands through the serial UART or I communication interfaces. To set the device parameters using LightWare Studio: In the left panel, click on Parameters to open the detailed parameters page.
Page 17
Table 4: LW20/HA adjustable parameters Parameter Explanation Options/range Communication Serial UART baud Select the serial UART interface baud rate, (in bps). 9 600 to 921600 rate The address used when communicating over the I I2C address 0 to 127 interface. A whole number in decimal. Select I C bus operating speed.
Page 18
The sensor will output only the closest distance detected Select or de-select distance during each sweep. the checkbox Refer to the LightWare website FAQ for more info on scanning parameters: https://lightwarelidar.com/resources-faqs/ Alarms Warn when an object is detected closer than this user-set alarm distance.
Page 19
Parameter Explanation Options/range Scanning Alarm A The higher (right) angle used with Alarm A during scanning. -180 to 180 (high angle) (In degrees, up to two decimal places.) Scanning Alarm B The lower (left) angle used with Alarm B during scanning. (In -180 to 180 (low angle) degrees, up to two decimal places.)
Page 20
Settings and tools Additional application settings are available by clicking on the gears icon in the top menu: Figure 14: LightWare Studio application settings page You can access the specialized device tools page by clicking on the wrench icon in the top...
Page 21
For detailed CAD files, please refer to the LightWare resource center at https://lightwarelidar.com/. Figure 16: LW20/HA dimensions Mounting bracket Mounting accessories can be purchased from the LightWare website. Alternatively the CAD file can be downloaded from the LightWare resource center at https://lightwarelidar.com/ to print your own bracket.
Page 22
In cases where an offset stand is required, an aluminum stand can be purchased from the LightWare website. The kit (725-28055) is complete with a mounting bracket and mounting hardware to securely fasten the bracket to both the LW20/HA and the desired application point.
Page 23
LW20/HA. Thermally conductive tape/pads may be applied to the bottom of the chassis of the LW20/HA. The LightWare microLiDAR® sensor is designed for installation with exposed • lenses. If it is to be mounted behind glass, ensure use of non-reflective glass and mount the sensor flush with the glass to prevent false readings.
Page 24
Orientation The sensor requires a clear line-of-sight to measure distance to a target surface. It can be mounted with a vertical or horizontal lens orientation. Figure 20: Sensor mounting orientations It can be mounted in a downward-facing, angled, or forward-facing orientation, depending on your application: •...
Page 25
Communication and power cable The LW20/HA’s 40-cm five-conductor cable is permanently connected via an IP67-rated gland. This cable carries the power supply, communications signals, and servo driver signals. The cable is shielded and must be earthed to reduce electromagnetic interference (EMI). Figure 22: LW20/HA communication cable and grounding lug Figure 23: LW20/HA communication pinout Figure 24:LW20/HA pinout table...
Page 26
Although first and last pulse detection is helpful when the sensor needs to be positioned behind a protective window, this type of mounting is not recommended, as LightWare sensors are designed to be integrated with exposed lens elements.
Page 27
Most standard digital servomotors are compatible, but analog servomotors are not compatible due to their slow control signal response. Figure 26: Servo wiring schematic diagram for SF20/C and LW20/HA Refer to the LightWare website FAQs https://lightwarelidar.com/resources-faqs/ for more information on setting parameters for the servomotor sweep limits and speed, servo lag, field of view, and scan type.
Page 28
Alarms Your LightWare LW20/HA microLiDAR® measures and reports distances and has a dedicated alarm channel providing two separate live alarm status outputs, warning of potentially hazardous conditions. Alarm A and Alarm B give separate warnings when the ground (or another object) is detected closer than their user-set alarm distances.
Page 29
We suggest using LightWare’s pre-built APIs wherever possible, which are available via the LightWare website resource center. If you require more control or do not find a suitable pre- built API, you can use the information below to build a compatible system. The packet-based binary protocol is compatible with higher-level APIs like C, Python, and JavaScript.
Page 30
When a write request is issued there is no response generated. Commands Your LightWare microLiDAR® use three communication protocols for both serial UART and I communication: The packet-based binary protocol is a register based protocol that is •...
Page 31
To initialize the communication with the sensor, send the command to request the Product name. It is advisable to send the command to query the Product name twice in succession shortly after powerup. As described above the first request will not return a response, however the second request will return the product name, indicating that the sensor has indeed initialized successfully and a handshake has been successfully established with the sensor.
Page 32
10.1.2 Binary protocol - Checksum algorithm The checksum algorithm is CRC-16-CCITT 0x1021. Below are two CRC calculation examples: Table 7: Checksum algorithm C/C++ JavaScript uint16_t createCRC(uint8_t* Data, uint16_t Size) function createCRC(data, size) { let crc = 0; uint16_t crc = 0; for (let i = 0;...
Page 33
10.1.3 Binary protocol – Reading bytes Once a packet is successfully read it can be processed based on its command ID. It is vital to verify the payload length and checksum before processing. If either of the following errors are received, “invalid packet length” or “checksum is invalid”, please roll the incoming stream back to one byte after where the start byte was detected.
Page 34
10.1.4 Binary protocol - Sending commands Every request sent to the sensor will receive a response. The response also confirms that the request was received and processed. The timeout value and number of retries should be optimized for the specific application. Below is the process for sending a command request and reading the response: Figure 30: Process flow for sending commands 10.1.5...
Page 35
10.1.6 Binary protocol – Command list Table 8: Binary protocol command list Read Write ID Name Description Persists bytes bytes A 16-byte string indicating product family. Always SF20 followed by a null terminator. Product name Use to verify the LW20/HA is connected and operational over the selected interface.
Page 36
Read Write ID Name Description Persists bytes bytes The Communication mode sets the startup state. The following options are available: Mode Description Communication Auto Detect Interface (Default) Mode uint8 uint8 Serial UART Serial UART (Legacy Header) Serial UART (no startup message) Serial and USB interface only.
Page 37
Read Write ID Name Description Persists bytes bytes Last return strength (%) Int32 Background noise Int32 Reading this command will indicate the current laser firing state. Writing to this command will enable or disable laser firing. Value Description Laser firing uint8 uint8 Disabled...
Page 38
Read Write ID Name Description Persists bytes bytes The I C address value is in decimal. I2C address Reading this command will return the I C address. uint8 uint8 Writing this command will set the I C address. Reading this command will return the status of the median filter. Writing this command will set the status of the median filter.
Page 39
The host controller instructs the sensor to change a setting value. All sensor parameters can be changed in this way. (These parameters can also be changed through LightWare Studio). These commands include instructions to connect or enable/disable functions. The host controller instructs the sensor to save specific setting changes to memory.
Page 40
10.2.3 ASCII protocol - Example command and reply A typical command sent by the host controller: ?PN<CR><LF> which means, “Reply with your product name” The sensor replies with: pn:LW20 <cr><lf> which means, “Product Name: LW20” The commands list table on the following pages contains many common commands and shows how to build the command you require.
Page 41
10.2.5 ASCII protocol - Command list Table 9: LW20/HA channel commands list Build Command Typical Command reply Description Notes Each command Each reply must end with will end with <CR><LF> <CR><LF> Product channel commands Reply with the product p:LW20,1.0. Same return for name, firmware version, 0,11 both commands...
Page 42
Build Command Typical Command reply Description Notes Each command Each reply must end with will end with <CR><LF> <CR><LF> 1 = 388 2 = 194 3 = 129 Change the update rate 4 = 97 #LM,1 lm:1 to 388 readings per 5 = 78 second 6 = 65...
Page 43
Build Command Typical Command reply Description Notes Each command Each reply must end with will end with <CR><LF> <CR><LF> Reply with the raw 1 = raw ?LDF,1 ldf,1:32.78 distance to the first 2 = closest return 3 = furthest Reply with the closest ?LDF,2 ldf,2:65.12 distance to the first...
Page 44
Build Command Typical Command reply Description Notes Each command Each reply must end with will end with <CR><LF> <CR><LF> Change Alarm B distance Adjustment range #LAB,6.00 lab:6.00 to 6.00 meters is 0.00 to 100.00 Reply with the alarm ?LAH lh:0.00 hysteresis value Change the alarm Adjustment range...
Page 45
Build Command Typical Command reply Description Notes Each command Each reply must end with will end with <CR><LF> <CR><LF> Change the PWM scale of Adjustment range: #SWS,10.00 sws:10.00 the servo to 10.00 µs per 0.10 to 1000.00 degree Reply with the number of sr:4 servo steps per reading Change the number of...
Page 46
Build Command Typical Command reply Description Notes Each command Each reply must end with will end with <CR><LF> <CR><LF> Reply with the scanning ?SBL sbl:-45.0 Alarm B lower angle in degrees Change the scanning Adjustment range: #SBL,0.0 sbl:0.0 Alarm B lower angle to -180.00 to 180.00 0.0°...
Page 47
‘?’ command. The sensor has five streams (denoted by $1, $2, $3, $4, and $5), and each can be set to stream a different reading. These five streams can be seen as five columns in LightWare Studio. The streaming ASCII command strings format is as follows: <$><stream number><,><...
Page 48
The commands list table on the following pages contains several useful examples of streaming commands. Table 11: LW20/HA streaming commands list Build Command Command Typical reply Description Notes Each command Each return will end must end with with <CR><LF> <CR><LF> Streaming commands Stream servo scanning data on...
Page 49
Firmware updates Occasionally, LightWare will release new firmware for your sensor, to address bug fixes or introduce additional features. All registered customers will receive an email notification when new firmware is released for their LightWare sensor. Caution: LightWare strongly advises that all LightWare sensors are kept up to date with their latest firmware revision.
Page 50
The page will display the currently installed firmware version on the sensor, and it will indicate whether any recent upgrades are available for download. If you need to upgrade, click the Install button, followed by OK to confirm. Figure 33: Confirmation of firmware upgrade The firmware will be installed to your device, and the device will automatically reboot.
Page 51
• If using a separate power supply, ensure a common ground. Servo does not scan Ensure “Servo scan on startup” is enabled in LightWare Studio. • on startup • Ensure servo ground and sensor ground is connected to the same •...
Page 52
LW20/HA microLiDAR® key technical specifications. For issues not covered above, refer to the FAQs in the LightWare website resource center or contact LightWare’s dedicated technical support team for assistance with remote testing of your LightWare sensor. Repair and maintenance 13.1...
Page 53
LightWare Studio from the device Info page. Figure 34: LightWare Studio device information page If the unit needs to be returned to LightWare for repairs, LightWare support will assist you with the Return Merchandise Authorization (RMA) procedure. LW20/HA | Product guide | Revision 0 | 24 April 2025...
Page 54
Please do not dispose of LightWare sensors with general household or commercial waste. Figure 35: End-of-life disposal LightWare sensors consist of ABS and other plastics, acrylic, and glass components, which are widely recyclable. The electronic PC board assembly should be disposed of through a reputable electronic waste recycler in your area.
Page 55
Document revision history Table 11: Revision history Revision Date Comments Rev 0 2025/04/24 First edition LW20/HA | Product guide | Revision 0 | 24 April 2025 Page 55 of 55...
Need help?
Do you have a question about the microLiDAR LW20/HA and is the answer not in the manual?
Questions and answers