Benewake LiDAR's Posts (22)

Sort by

At the WAIC 2026 expo, nearly every embodied AI robot demonstrating real-world tasks was enclosed within a protective barrier. Safety personnel kept their eyes glued to the same vulnerable spots: feet, flanks, and arm trajectories.

These three areas share a fundamental flaw—they all lie outside the FOV of the head-mounted primary camera, occluded by the robot’s own body.

This is not a limitation of AI model capacity. Even the most advanced end-to-end model cannot infer spatial physics in areas occluded by the robot’s frame. This is a geometry problem. Yet, for a robot to walk autonomously among humans, it must first master this 5cm-to-1m proximity zone: Is there a drop-off under its feet when stepping forward? Is there a human beside its body when turning around?

 

The industry currently offers multiple approaches, each with distinct trade-offs.

Industry leaders like Tesla and Figure place vision, multimodal AI, and end-to-end learning at the core of their control architecture, attempting to use a unified neural network to handle all sensing and execution. While this approach offers indisputable value in scene understanding and generalizability, it fails to address two critical bottlenecks: body-occluded blind spots, and the massive compute overhead required for high-frequency, low-semantic spatial judgments (“Is an object nearby, and how far is it?”).

 

Thus, the architecture shifts toward a division of labor: The AI model handles high-level understanding and task planning, while an independent ranging pipeline guards the safety baseline at close range. Based on this deterministic input, low-level controllers handle real-time deceleration, evasion, or emergency stops.

This independent safety pathway features a shorter execution loop, predictable response latency, and easily quantifiable failure modes—making it vastly easier to benchmark, validate, and certify for mass-production acceptance.

Read more…

In 2022, a smart pool-cleaning robot project was quietly launched on Kickstarter. Back then, no one called smart pool robotics an "industry sector"—it was just a niche, forgotten branch within consumer robotics.

Four years later, in 2026, this product category stands on the precipice of crossing the chasm: mainstream flagship models from leading OEMs ship millions of units annually; the world's first flagship model powered by a 360° underwater LiDAR debuted its mass-production version in late 2025; and the category has taken center stage at major trade platforms like Black Friday (North America), PSP Expo, and CES.

Throughout these four years, Benewake’s underwater LiDAR has never missed a beat. From early crowdfunding exploration to mass-market volume supply, and onto world-first flagship integration—Benewake has partnered with the pool robotics industry through a complete cycle.

This story is about that journey.

I. Three Types of Vendors vs. One Full-Cycle Partner

Across the aquatic robotics sensing market, suppliers generally fall into three categories:

  • Type 1: "Accidental Off-the-Shelf Fit"
  • Type 2: "Opportunistic Hype Followers"
  • Type 3: "Full-Cycle Co-Builders"

These three types represent vastly different capability ceilings. The first delivers a single part with zero customization. The second delivers once, becoming unresponsive when next-gen platforms demand innovation. Only the third category can navigate a complete industry cycle alongside its customers.

Very few suppliers across the global industry can check all four boxes: Pre-Research, Engineering Breakthrough, Mass Production, and Real-World Field Execution.

II. Four Products = Four Milestones of a Full Cycle

This classification is grounded in reality. Laying out Benewake’s roadmap over the past four years reveals a clear, step-by-step trajectory.

Phase 1 · What sensors can actually work underwater? (2022–2024)

Before 2022, pool robots relied heavily on mechanical bumpers and acoustic sensors. However, ultrasonic sensors frequently fail at steep angles or pool corners, while optical vision collapses in murky water. At the time, the entire industry was stuck on a foundational question: Besides sonar, what sensor can survive underwater?

Benewake's strategic thesis was clear: The bottleneck in underwater perception isn't algorithms—it's optoelectronic components. Over the past decade, massive demand for smartphone ToF and automotive LiDAR drove the single-photon avalanche diode (SPAD) chip supply chain to maturity—reaching a consumer-grade mass-production tipping point around 2023.

In August 2024, the first unit of the Benewake TF-Luna Underwater Edition shipped—transitioning underwater LiDAR from "theoretically feasible" to "manufacturable and commercially viable."

Early customer feedback was raw and straightforward: "Can you reach 20 meters? 10 meters? What about at 10 NTU turbidity?"

"Entering a completely uncharted industry, early customers didn't know their exact LiDAR specs. You must first optimize a mature architecture for underwater deployment and bring costs down. Only when they deploy it can feedback flow in, cognitive models iterate, requirements consolidate, and purpose-built underwater generations be solidly engineered."

Phase 2 · How good is "good enough" for real-world deployment? (2024–2025)

In the year following the first shipment, customer feedback poured in: U-shaped pool floors stretched range limits; bright sunlight, low-reflectivity surfaces, mirrored tiles, and murky water presented complex optical challenges on OEMs' testing tables.

Benewake responded by clearing multiple hurdles simultaneously: Performance, Cost, and Mass-Production Yield Stability.

In October 2025, the TF-UW500 entered mass production—delivering the industry's first perception solution capable of full-coverage residential pool mapping.

The ramp-up phase was intense: meeting North American Black Friday delivery windows meant scaling monthly capacity from prototype builds to tens of thousands of units within four months.

"When the UW500 rolled off the line, we realized what flagship customers were really buying. It wasn't just 5 meters in clear water—it was the engineering headroom to eliminate corner cases."

Phase 3 · OEMs entrust us with frontier customization (2025–2026)

Following the mass production of the UW500, customer demands evolved from edge mapping to full-environment 3D mapping. Freeform pools, kidney-shaped layouts, and multi-tier depth transitions required flagship models to construct real-world 3D spatial awareness underwater.

This presented a significant engineering leap: expanding single-point sensing into a 360° omni-directional rotating scan while maintaining long-term waterproof and operational stability underwater. Tier-1 OEMs entrusting this exploratory customization to Benewake was the direct result of trust built over the preceding two years.

Thus, the VLS-H5 was born—the industry's first 360° omni-directional underwater LiDAR integrated into mass-produced pool robots.

A common industry misconception is that the VLS-H5 is simply an "upgraded" UW500. In reality, both lines share a unified platform architecture—the UW500 single-point engine serves as the underlying technology stack for the VLS-H5's rotating assembly. Flagship robots often integrate both to deliver multi-layered perception.

"The VLS-H5 isn't an upgrade to the UW500; it's its sibling. One handles long-range forward perception, the other handles full spatial coverage. OEMs deploy them in tandem based on algorithmic needs."

Phase 4 · Proactive Market Penetration (2026)

Immediately following flagship mass production, Benewake launched its value-tier lineup—a move that defies conventional hardware logic. Most players prefer to maximize margins at the high end before entering price wars. But consumer robotics follows a different rhythm: mainstream market adoption doesn't happen automatically; upstream component makers must deliver cost-optimized solutions first to unlock the market.

Benewake's two value-tier offerings target the two largest segments of the end market:

文章内容
  1. TF-UW300 (3m Underwater Single-Point): Engineered for standard residential pools, freeing mid-tier models from paying a premium for unnecessary 5-meter range redundancy.
  2. TF-UW150 (1.5m Underwater Single-Point): Brings underwater LiDAR to entry-level price points for the first time, empowering budget models to tackle curved pool floors and edge cases that traditional ultrasonics fail to solve.
"The market doesn't mature on its own before we build value models—the market matures because we build value models. Reaching high-end benchmarks proves capability; building what the market needs reflects pragmatism; doing both at scale proves comprehensive strength."

Three years, four products. Over the past year alone, Benewake has shipped over 100,000 single-point underwater LiDAR units to global pool-cleaning robot OEMs. Every entry in today's "Full Portfolio" is battle-tested—built to deliver tangible value to both robot manufacturers and end users.

III. Back to 2022

Looking back at that Kickstarter machine in 2022, no one called smart pool robotics a dedicated industry sector. Today, the category stands at the tipping point of crossing the chasm. Through every step of these four years, Benewake's underwater LiDAR has been an active participant.

Building a "Full Portfolio" was never the ultimate goal—it is simply the tangible proof of years spent deeply rooted in the industry.

"A product portfolio is not a target; it is a result. Looking back, every footprint is a product we built—reflecting our evolving insights alongside our customers at every stage of market maturity. On this journey of exploration, Benewake remains committed to moving forward together with the entire industry..."
Read more…

While consumer robotics frequently make headlines with humanoid form factors and futuristic drones, a quieter revolution is taking place beneath the surface. Pool cleaning robots have quietly emerged as the most commercially mature and steady champions of the consumer robotics race. Today, Chinese solid-state LiDAR pioneer Benewake has unlocked the next generation of underwater mobility with the commercial launch of its VLS-H5—the world's first mass-produced 360° underwater omnidirectional scanning LiDAR designed specifically to bring precise spatial awareness to extreme aquatic environments.

For years, underwater perception has remained a notorious challenge for hardware engineers. Unlike land-based robots, underwater platforms must grapple with intense sunlight reflections at the water’s surface, optical refraction from wave ripples, and severe signal scattering caused by organic debris. By launching the VLS-H5, Benewake directly addresses these physics-bound limitations, allowing pool cleaning robots to transition from blind, randomized scrubbing to highly precise, centimeter-level path planning.

First Commercial Adoption: The MOVA Rover X10

Demonstrating the immediate commercial viability of this technology, robotic innovator Surge Future has integrated the VLS-H5 into its newly unveiled flagship product: the MOVA Rover X10.

Equipped with enhanced vertical propulsion, the Rover X10 operates like an underwater drone, navigating autonomously along three axes—ascending, hovering, descending, and moving horizontally. Powered by Benewake's LiDAR-driven SLAM algorithm, the Rover X10 abandons primitive boundary-following logic. Instead, it generates a comprehensive, real-time spatial map of complex pools, capturing curved steps, variable depths, and sharp corners with accuracy that easily outclasses traditional sonar or camera-only alternatives.

文章内容

Engineered for Extremes: Three Core Capabilities

The VLS-H5 is not a modified terrestrial sensor; it is a ground-up optical solution engineered specifically for harsh underwater environments:

160 KLux Light Immunity: Standard optical sensors suffer from receiver saturation when exposed to the intense midday sun in tropical or low-latitude markets, where ambient light routinely exceeds 100 KLux. The VLS-H5 handles up to 160 KLux of light exposure, maintaining stable point-cloud outputs even under direct, harsh summer sunlight.

Penetrating Water Turbidity: Using a Class 1 eye-safe visible light source, the sensor delivers a range of over 5 meters in clear water (covering up to 78 m² in a single scan). In highly turbid water (NTU ≤ 4), it consistently maintains a detection range of ≥1.5 meters with an accuracy margin of under 3 centimeters.

Compact and Hardened Architecture: Measuring just 75 × 52 × 53 mm, the sensor fits seamlessly into the tightly constrained 5-to-10 cm depth envelopes of modern robots. Rated IPX8, the VLS-H5 operates continuously at depths of up to 4 meters, protected by specialized anti-UV, anti-corrosion materials, and high-transmittance optical coatings.

Shifting from Passive Automated to Genuinely Intelligent Cleaning

The integration of the VLS-H5 changes how a pool robot interacts with its environment. Leveraging a 360-degree sweep at a 6 Hz refresh rate, the mapping process is nearly instantaneous. Users no longer have to wait for the robot to slowly trace every edge of the pool before generating a layout on their mobile app; instead, a complete, highly accurate map is rendered almost immediately.

Furthermore, the VLS-H5 keeps blind spots under 10 centimeters. By continuously monitoring distances to walls and obstacles, the robot dynamically plans paths around toys or structural elements, decelerating smoothly and cleaning tight edges without aggressive, structural-damaging collisions. If interrupted, the robot resumes its path with millimeter-level memory, avoiding repetitive cleaning and minimizing energy consumption.

Executive Perspectives

"We have established highly mature manufacturing and delivery pipelines for pool-robotic LiDAR systems," said Dr. Yuan Li, CEO of Benewake. "The VLS-H5 underwater 360° omnidirectional scanner has officially achieved mass production with its debut on the MOVA series, and we look forward to rolling out more specialized sensors in the near future."

"Our strategic partnership with Benewake marks a major leap forward in intelligent underwater perception," noted Lei Huang, President of Surge Future & Global Head of MOVA. "Benewake's robust LiDAR technology equips our robots with peerless spatial awareness. This collaboration allows us to deliver a faster, smarter, and entirely hands-free pool cleaning experience, pushing the boundaries of what consumers can expect."

About Benewake

Benewake is a leading deep-tech company focused on "building the eyes for autonomous machines" and establishing the sensory infrastructure for physical AI. Founded and led by a distinguished executive team of PhDs—including CEO Dr. Yuan Li (alumnus of Wake Forest University, mentored by Dr. Xurong Xu, a pioneer of Chinese luminescence physics) and CTO Dr. Da Shu (alumnus of Université Paris-Saclay)—the company is bringing automotive-grade reliability to diverse robotics fields. Today, Benewake is one of the world's leading suppliers of pool-cleaning LiDAR systems, driving high-performance spatial awareness across outdoor mowing, embodied AI, and global logistics networks.

Read more…

While consumer robotics frequently make headlines with humanoid form factors and futuristic drones, a quieter revolution is taking place beneath the surface. Pool cleaning robots have quietly emerged as the most commercially mature and steady champions of the consumer robotics race. Today, Chinese solid-state LiDAR pioneer Benewake has unlocked the next generation of underwater mobility with the commercial launch of its VLS-H5—the world's first mass-produced 360° underwater omnidirectional scanning LiDAR designed specifically to bring precise spatial awareness to extreme aquatic environments.

For years, underwater perception has remained a notorious challenge for hardware engineers. Unlike land-based robots, underwater platforms must grapple with intense sunlight reflections at the water’s surface, optical refraction from wave ripples, and severe signal scattering caused by organic debris. By launching the VLS-H5, Benewake directly addresses these physics-bound limitations, allowing pool cleaning robots to transition from blind, randomized scrubbing to highly precise, centimeter-level path planning.

First Commercial Adoption: The MOVA Rover X10

Demonstrating the immediate commercial viability of this technology, robotic innovator Surge Future has integrated the VLS-H5 into its newly unveiled flagship product: the MOVA Rover X10.

Equipped with enhanced vertical propulsion, the Rover X10 operates like an underwater drone, navigating autonomously along three axes—ascending, hovering, descending, and moving horizontally. Powered by Benewake's LiDAR-driven SLAM algorithm, the Rover X10 abandons primitive boundary-following logic. Instead, it generates a comprehensive, real-time spatial map of complex pools, capturing curved steps, variable depths, and sharp corners with accuracy that easily outclasses traditional sonar or camera-only alternatives.

文章内容

Engineered for Extremes: Three Core Capabilities

The VLS-H5 is not a modified terrestrial sensor; it is a ground-up optical solution engineered specifically for harsh underwater environments:

160 KLux Light Immunity: Standard optical sensors suffer from receiver saturation when exposed to the intense midday sun in tropical or low-latitude markets, where ambient light routinely exceeds 100 KLux. The VLS-H5 handles up to 160 KLux of light exposure, maintaining stable point-cloud outputs even under direct, harsh summer sunlight.

Penetrating Water Turbidity: Using a Class 1 eye-safe visible light source, the sensor delivers a range of over 5 meters in clear water (covering up to 78 m² in a single scan). In highly turbid water (NTU ≤ 4), it consistently maintains a detection range of ≥1.5 meters with an accuracy margin of under 3 centimeters.

Compact and Hardened Architecture: Measuring just 75 × 52 × 53 mm, the sensor fits seamlessly into the tightly constrained 5-to-10 cm depth envelopes of modern robots. Rated IPX8, the VLS-H5 operates continuously at depths of up to 4 meters, protected by specialized anti-UV, anti-corrosion materials, and high-transmittance optical coatings.

Shifting from Passive Automated to Genuinely Intelligent Cleaning

The integration of the VLS-H5 changes how a pool robot interacts with its environment. Leveraging a 360-degree sweep at a 6 Hz refresh rate, the mapping process is nearly instantaneous. Users no longer have to wait for the robot to slowly trace every edge of the pool before generating a layout on their mobile app; instead, a complete, highly accurate map is rendered almost immediately.

Furthermore, the VLS-H5 keeps blind spots under 10 centimeters. By continuously monitoring distances to walls and obstacles, the robot dynamically plans paths around toys or structural elements, decelerating smoothly and cleaning tight edges without aggressive, structural-damaging collisions. If interrupted, the robot resumes its path with millimeter-level memory, avoiding repetitive cleaning and minimizing energy consumption.

Executive Perspectives

"We have established highly mature manufacturing and delivery pipelines for pool-robotic LiDAR systems," said Dr. Yuan Li, CEO of Benewake. "The VLS-H5 underwater 360° omnidirectional scanner has officially achieved mass production with its debut on the MOVA series, and we look forward to rolling out more specialized sensors in the near future."

"Our strategic partnership with Benewake marks a major leap forward in intelligent underwater perception," noted Lei Huang, President of Surge Future & Global Head of MOVA. "Benewake's robust LiDAR technology equips our robots with peerless spatial awareness. This collaboration allows us to deliver a faster, smarter, and entirely hands-free pool cleaning experience, pushing the boundaries of what consumers can expect."

About Benewake

Benewake is a leading deep-tech company focused on "building the eyes for autonomous machines" and establishing the sensory infrastructure for physical AI. Founded and led by a distinguished executive team of PhDs—including CEO Dr. Yuan Li (alumnus of Wake Forest University, mentored by Dr. Xurong Xu, a pioneer of Chinese luminescence physics) and CTO Dr. Da Shu (alumnus of Université Paris-Saclay)—the company is bringing automotive-grade reliability to diverse robotics fields. Today, Benewake is one of the world's leading suppliers of pool-cleaning LiDAR systems, driving high-performance spatial awareness across outdoor mowing, embodied AI, and global logistics networks.

Read more…

31134325879?profile=RESIZE_710x

When integrating the TF03 LiDAR into your system, correct wiring is critical. A simple mistake—such as swapping power lines or misconnecting communication pins—can lead to communication failure or even permanent device damage.
This guide walks you through the TF03 connector pinout and best practices to ensure safe and reliable installation.
  1. Connector Specifications

The TF03 utilizes a high-quality 7-pin male connector. The cable consists of six 26 AWG wires. Note that while the connector has 7 slots, only 6 wires are used (Pin 4 is vacant).
  1. Detailed Pin Assignment Table

To avoid errors, always refer to the wire color and its corresponding function before applying power.
 
PinSignalWire ColorFunction
1VCCRedPower Voltage (DC 5V ~ 24V)
2RS-485-B / RS-232-RXD / CAN_LWhiteRx / CAN-BUS Low
3RS-485-A / RS-232-TXD / CAN_HGreenTx / CAN-BUS High
4N/AN/ANone (Vacant)
5UART_RXDBlueUART Receive
6UART_TXDBrownUART Transmit
7GNDBlackGround
  1. Critical Wiring Safeguards

To ensure a successful integration and protect your device, keep the following "Golden Rules" in mind:
  • Check the Voltage Range: The TF03 supports a wide voltage range from 5V to 24V DC. Ensure your power source is stable within this range before connecting the Red (VCC) and Black (GND) wires.
  • Identify Communication Protocols: The TF03 is versatile, supporting UART, CAN, and RS-485/RS-232.
    • If using UART, focus on the Blue (RXD) and Brown (TXD) wires.
    • If using CAN-BUS, use the White (Low) and Green (High) wires.
    • Warning: Never connect a high-voltage signal to the data pins (Pins 2, 3, 5, 6).
  • The "Pin 4" Gap: Be aware that Pin 4 is empty. When looking at the connector, do not mistake the 5th wire for the 4th. Counting from the Red wire (Pin 1) is the safest way to verify positions.
  • Secure the Connection: The Molex 1.25mm pitch connector is designed for a snug fit. Ensure it "clicks" into place to avoid intermittent data loss caused by vibrations, especially in UAV or robotics applications.
  • If the tail cable is stripped, the stripped area must be sealed with glue to prevent moisture from traveling through the cable’s internal insulation paper into the LiDAR, which could cause damage.
  1. Summary

By following this color-coded wiring scheme, you can ensure your TF03 LiDAR operates at peak performance with reliable data output. Always double-check the GND (Black) and VCC (Red) connections first, as these are the most common points of failure during manual wiring.

Pro-Tip: For industrial or outdoor deployments, ensure that the junction where the wires are soldered or connected to your controller is well-insulated and protected from moisture to maintain the TF03's integrity.
  

For more information about Benewake LiDAR TF03, see https://benewake.short.gy/tf03-lidar-diy.

Read more…

31110809890?profile=RESIZE_710x

TFmini-Plus can directly be connected with the one of the serial ports of CUAV V5. There are four serial ports which can be used to interface LiDAR. The following port mapping shows hardware (left) and software (right) serial port mapping:  

  • TELEM1 > SERIAL1
  • TELEM2 > SERIAL2 (used in this tutorial)
  • GPS Port > SERIAL3
  • UART4 > SERIAL4

TFmini-Plus can be interfaced with flight controller for the purpose of Altitude Holding or Obstacle Avoidance. At the time of writing this document the controller used was CUAV V5 flashed with ArduCopter V4.0.7. But this document can be used with other flight controllers running with different ArduCopter firmware versions with slight modification in parameter names and choosing the right port on flight controller. For choosing right port, please refer to the hardware and software serial port mapping of flight controller.

Example for connecting mini-Plus to CUAV V5:

31110861671?profile=RESIZE_710x

Figure 1 Schematic Diagram of Connecting TFmini-Plus with TELEM 2 Interface (Serial Port 2) of CUAV V5

The same procedure can be followed for other serial ports like TELEM1/GPS/UART4 by looking at the pin out details given below:

31110886452?profile=RESIZE_710x

Figure 2 Pinout description of available serial ports on CUAV V5

Note: Standard output mode of LiDAR should be used instead of PIX mode in the latest firmwares. PIX mode was only required for the firmware versions older than Arducopter V3.6.2.

a) Mission Planner configuration description of TFmini-Plus for the purpose of altitude hold

Connect the flight control board to Mission Planar. Attention: the installation height should be larger than non-detection/blind zone of LiDAR. 

31040485701?profile=RESIZE_710x

Select [CONFIG/TUNING] and then click on [Full Parameter List] in the left from the below bar. Find and modify the following parameters:

SERIAL2_PROTOCOL = 9  [Rangefinder option]

SERIAL2_BAUD = 115  [Choose the current LiDAR baud rate, if haven’t been changed, the default baud rate 115200 should be selected, that is 115]

RNGFND1_TYPE = 20 [TFmini-Plus UART option]

RNGFND1_MIN_CM = 30 [It could be changed according to real application requirement and should be greater LiDAR than non-detection zone, unit is cm]

RNGFND1_MAX_CM = 300   [It could be changed according to real application requirement and should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND1_GNDCLEAR = 15 [expressed in cm, depending upon mounting height of the module and should be greater LiDAR than non-detection zone]

RNGFND1_ORIENT=25 [facing down]

PRX_TYPE=0

Upon setting of these parameters, click [Write Params] on the right of mission planner to finish. After writing the parameters you need to power off the controller and then turn it on to apply the setting changes.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct, the power supply is normal and you have restarted the controller. Also check it whether you have changed the mode from Standard mode to Pix mode while the firmware is 3.6.2 or higher. If yes, then the same error will encounter.

How to see the altitude value from LiDAR sensor: double click the area of the Mission Planner, look at the following picture:

31040486491?profile=RESIZE_710x

Select option sonarrange, see following picture:

31040486294?profile=RESIZE_710x

The altitude distance from the LiDAR will be displayed in Sonar Range (meters), see the following picture:

31040486874?profile=RESIZE_710x

B)Mission Planner configuration description of TFmini-Plus for the purpose of Obstacle Avoidance

Connect the flight control board to MP. Attention: distance between UAV margin and LiDAR should be larger than LiDAR non-detection zone. Select [Full Parameter List] in the left from the below bar- [CONFIG/TUNING]. Find and modify the following parameters:

AVOID_MARGIN=2 [Unit: m, set obstacle avoidance distance as required]

SERIAL2_PROTOCOL = 9 [Rangefinder option]

SERIAL2_BAUD = 115 [Choose the current LiDAR baud rate, if haven’t been changed, the default baud rate 115200 should be selected, that is 115]

RNGFND1_TYPE = 20 [TFmini-Plus UART option]

RNGFND1_MIN_CM = 30   [It could be changed according to real application requirement and should be greater LiDAR than non-detection zone, unit is cm]

RNGFND1_MAX_CM = 300 [It could be changed according to real application requirement and should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND1_ORIENT = 0   [It depends on the LiDAR’s real installation direction, 0~7, 24=Up and 25=Down (total ten) are supported up till now, see details in MP]

PRX_TYPE=4    [Rangefinder should be selected for proximity sensor in obstacle avoidance mode]

AVOID_ENABLE= 3 [if 3 = UseFence and UseProximitySensor doesn’t work in IIC then choose 2 = UseProximitySensor]

Upon setting of these parameters, click [Write Params] on the right of the software to finish. After writing the parameters you need to power off the controller and then turn it on to apply the settings.

If the error message “PreArm: check the proximity sensor” appears, please check if the connection is correct, the power supply is normal and you have restarted the controller. Also check it whether you have changed the mode from Standard mode to Pix mode while the firmware is 3.6.2 or higher if yes then the same error will encounter.

31040486890?profile=RESIZE_584x

 

How to see the target distance measured by the LiDAR: (distance from LiDAR in obstacle avoidance can’t be displayed in sonarrange option) press Ctrl+F button in keyboard, the following window will pop out:

31040486695?profile=RESIZE_710x

Click button Proximity, the following window will appear:

31040487455?profile=RESIZE_710x

The number in green color means the distance from LiDAR in obstacle avoidance mode(it doesn’t mean the real time distance from LiDAR and will not be influenced in Mission Planner. The mission planner version at the time of writing this tutorial was v1.3.69.

Attach: If TELEM 2 port has been used, UART4/GPS Port/TELEM1 interfaces can also be used, the other setting are same

Configuration Descriptions on Mission Planner:

Connect flight control board to MP, Select [Full Parameter List] in the left from the below bar [CONFIG/TUNING]. Find and modify following parameters:

For UART4:

SERIAL4_PROTOCOL = 9 (LiDAR)

SERIAL4_BAUD = 115

For GPS Port:

SERIAL3_PROTOCOL = 9 (LiDAR)

SERIAL3_BAUD = 115

For TELEM1:

SERIAL1_PROTOCOL = 9 (LiDAR)

SERIAL1_BAUD = 115

Upon setting of these parameters, the other parameters are same as Mission Planner configuration description of TFmini-Plus for the purpose of Obstacle Avoidance or Altitude Holding, then click [Write Params] on the right of the software to finish.

Important Note: If you have configured protocol type (SERIALX_PROTCOL: X can be 1, 2, 3, 4 etc.) for more than one UART ports as 9: Rangefinder but you have connected LiDAR to only single UART port, then it will give Bad LiDAR Health error. So you need to configure only those UART ports as 9: Rangefinder to which you will connect LiDAR. In other words we can say that if the number of serial ports configured as 9: Rangefinder is less than the number of connected LiDARs then Bad LiDAR Health will occur.

To learn more about Benewake TFmini-Plus, see: https://benewake.short.gy/tfmini-plus-lidar.

Read more…

31082517073?profile=RESIZE_710x

TFmini-Plus can be connected with the IIC port of CUAV V5. There are four IIC ports available on the flight controller, but by default, data can only be read through IIC port-2. In order to use other ports, some settings will be required like compiling the firmware from source code etc., because there is no direct settings available in Ardupilot firmware, but this is not investigated yet. In this tutorial, we will use IIC port-2. LiDAR can be interfaced with flight controller for the purpose of Altitude Holding or Obstacle Avoidance (both will be explained in this document). At the time of writing this document, the controller used was CUAV V5 flashed with ArduCopter V4.0.7, but this document can be used with other flight controllers running with different ArduPilot firmware versions with slight modification in parameter names and choosing the right port on flight controller.

1. TFmini-Plus Settings:

Note: If there are fluctuations in readings, then set the frame rate to 250Hz otherwise don’t need for it. Please see the details of “frame rate” and changing the communication interface in Section-7.4 table-11.

Standard output mode of LiDAR should be used instead of PIX mode in the latest firmwares. PIX mode was only required for the firmware versions older than Arducopter V3.6.2.

The default communication of TFmini-Plus is TTL, IIC and TTL uses the same cable, so set TFmini-Plus to IIC communication first. You can see detail commands in product manual.

We take two TFmini-Plus as an example (for obstacle) avoidance in this tutorial and set the address 0x10 and 0x11 separately.

Note:

  1. Default cable sequence of TFmini-Plus and CUAV V5 is different, please change it accordingly (SDA and SCL wires need to be interchanged) or you can make an intermediate cable for connecting mini-Plus with controller. Controller needs GH 1.25 4-pin connector to interface LiDAR with IIC port-2. Looking at the pinout of controller, pin configurations are starting from left to right:31082519660?profile=RESIZE_710x
  2. IIC connector should be purchased by user
  3. If TFmini-Plus faces down, please ensure the distance between lens and ground is larger than TFmini-Plus’s blind zone (10cm)
  4. If more TFmini-Plus need to be connected (10 LiDARs can be connected), the method is same.
  5. Power source should meet the product manual demands:5V±0.5V, larger than 140mA*number of TFmini-Plus

2. CUAV V5 Connection:

See the connection details in CUAV V5 manual and TFmini-Plus manual:

31082519886?profile=RESIZE_710x

Figure 1: Schematic Diagram of Connecting Two TFmini-Plus to I2C Interface of CUAV

3. Parameters settings (Obstacle Avoidance):

Connect the flight control board to Mission Planar. Select [CONFIG/TUNING] and then click on [Full Parameter List] in the left from the below bar. Find and modify the following parameters:

31082520852?profile=RESIZE_710x

Attention: distance between UAV margin and LiDAR should be larger than LiDAR non-detection zone.

Common settings:

AVOID_ENABLE= 3 [if 3 = UseFence and UseProximitySensor doesn’t work in IIC then choose 2 = UseProximitySensor]

AVOID_MARGIN=4 [can be set based on user requirements]

PRX_TYPE=4

Settings for first TFmini-Plus:

RNGFND1_ADDR=16 [Address of #1 TFmini-Plus in decimal]

RNGFND1_MAX_CM=400 [It could be changed according to real application requirement but should be smaller than effective measure range of LiDAR, unit is cm] 

RNGFND1_MIN_CM=30 [It could be changed according to real application requirement and should be larger than LiDAR non-detection zone, unit is cm] 

RNGFND1_ORIENT=0 [#1 TFmini-Plus real orientation]

RNGFND1_TYPE = 25 [TFmini-Plus IIC same as TFmini-S IIC]

Settings for second TFmini-Plus:

RNGFND2_ADDR=17 [Address of #2 TFmini-Plus in decimal]

RNGFND2_MAX_CM=400

RNGFND2_MIN_CM=30

RNGFND2_ORIENT=1 [#2 TFmini-Plus real orientation]

RNGFND2_TYPE=25 [TFmini-Plus IIC same as TFmini-S IIC]

Upon setting of these parameters, click [Write Params] on the right of mission planner to finish. After writing the parameters you need to power off the controller and then turn it on to apply the setting changes.

31082521460?profile=RESIZE_584x

If the error message “PreArm: check the proximity sensor” appears, please check if the connection is correct, the power supply is normal and youhave restarted the controller. Also check whether you have changed the mode from Standard mode to Pix mode while the firmware is 3.6.2 or higher. If yes, then the same error will encounter.

How to see the target distance from the LiDAR: press Ctrl+F button in keyboard, the following window will pop out:

31082521877?profile=RESIZE_710x

Click button Proximity, the following window will appear:

31082522070?profile=RESIZE_710x

The number in green color means the distance from LiDAR in obstacle avoidance mode(it doesn’t mean the real time distance from LiDAR) and will not be influenced in Mission Planner. The mission planner version at the time of writing this tutorial was v1.3.69.

4. Parameters settings (Altitude Hold):

Connect the flight control board to Mission Planar. Select [CONFIG/TUNING] and then click on [Full Parameter List] in the left from the below bar. Find and modify the following parameters:

31082522285?profile=RESIZE_710x

Note: If RNGFND1 and RNGFND2 are already configured, then use RNGFND3 or other as Altitude Hold Sensor.

RNGFND3_ADDR=18

RNGFND3_TYPE = 25 [TFmini-Plus IIC option]

RNGFND3_MIN_CM = 30 [It could be changed according to real application requirement and should be greater LiDAR than non-detection zone, unit is cm]

RNGFND3_MAX_CM = 300   [It could be changed according to real demands but should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND3_GNDCLEAR = 15 [expressed in cm, depending upon mounting height of the module and should be greater LiDAR than non-detection zone]

RNGFND3_ORIENT=25 [facing down]

Upon setting of these parameters, click [Write Params] on the right of mission planner to finish. After writing the parameters, you need to power off the controller and then turn it on to apply the setting changes.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct, the power supply is normal and you have restarted the controller. Also check whether you have changed the mode from Standard mode to Pix mode while the firmware is 3.6.2 or higher. If yes, then the same error will encounter.

How to see the altitude value from LiDAR sensor: double click the area of the Mission Planner, look at the following picture:

31082522864?profile=RESIZE_710x

Select option sonarrange, see following picture:

31082522896?profile=RESIZE_710x

The altitude distance from the LiDAR will be displayed in Sonar Range (meters), see the following picture:

31082523056?profile=RESIZE_710x

For more information about TFmini-Plus, see https://benewake.short.gy/tfminis-lidar-diy.

Read more…

31040484070?profile=RESIZE_584x

The configuring procedure is applicable to Cube Orange and Cube Black flight controllers. The interfaces available that can be used to connect TF03 are the same on both flight controllers.

TF03-100, TF03-180 and TF350 can be interfaced with the one of the serial ports of Cube Orange flight controller. There are four serial ports which can be used to interface devices having UART port. The following port mapping shows hardware (left) and software (right) serial port mapping:

  • TELEM1 > SERIAL1
  • TELEM2 > SERIAL2 (used in this tutorial)
  • GPS1 Port > SERIAL3
  • GPS2/UART4 > SERIAL4

TF03 can be interfaced with flight controller for the purpose of Altitude Hold or Obstacle Avoidance. At the time of writing this procedure the controller used was Cube Orange flashed with ArduCopter V4.0.7. But this procedure can be used with other flight controllers running with different ArduCopter firmware versions with slight modification in parameter names and choosing the right port on flight controller. For choosing right port, please refer to the hardware and software serial port mapping of flight controller.

Example for connecting TF03 to Cube Orange:

31040485479?profile=RESIZE_710x

Figure 1 Schematic Diagram of Connecting TF03 with TELEM 2 Interface (Serial Port 2) of Cube

 

The same procedure can be followed for other serial ports like TELEM1/GPS1/UART4 by looking at the pin out details given below:

31040485677?profile=RESIZE_710x

Figure 2 Pinout description of available serial ports on Cube

Note: Standard output mode of LiDAR should be used instead of PIX mode in the latest firmwares. PIX mode was only required for the firmware versions older than Arducopter V3.6.2.

a) Mission Planner configuration description of TF03 for the purpose of altitude hold

Connect the flight control board to Mission Planar. Attention: the installation height should be larger than non-detection/blind zone of LiDAR. 

31040485701?profile=RESIZE_710x

Select [CONFIG/TUNING] and then click on [Full Parameter List] in the left from the below bar. Find and modify the following parameters:

SERIAL2_PROTOCOL = 9  [Rangefinder option]

SERIAL2_BAUD = 115  [Choose the current LiDAR baud rate, if haven’t been changed, the default baud rate 115200 should be selected, that is 115]

RNGFND1_TYPE = 27 [TF03 UART option]

RNGFND1_MIN_CM = 30 [It could be changed according to real application requirement and should be greater LiDAR than non-detection zone, unit is cm]

RNGFND1_MAX_CM = 500   [It could be changed according to real application requirement and should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND1_GNDCLEAR = 15 [expressed in cm, depending upon mounting height of the module and should be greater LiDAR than non-detection zone]

RNGFND1_ORIENT=25 [facing down]

PRX_TYPE=0

Upon setting of these parameters, click [Write Params] on the right of mission planner to finish. After writing the parameters you need to power off the controller and then turn it on to apply the setting changes.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct, the power supply is normal and youhave restarted the controller. Also check whether you have changed the mode from Standard mode to Pix mode while the firmware is 3.6.2 or higher. If yes, then the same error will encounter. Switch it back to Standard mode by sending command from the manual of LiDAR.

How to see the altitude value from LiDAR sensor? Double click the area of the Mission Planner, look at the following picture:

31040486491?profile=RESIZE_710x

Select option sonarrange as shown in the following picture:

31040486294?profile=RESIZE_710x

The altitude distance from the LiDAR will be displayed in Sonar Range (meters), see the following picture:

31040486874?profile=RESIZE_710x

b)Mission Planner configuration description of TF03 for the purpose of Obstacle Avoidance

Although TF03 is long range sensor and in most cases, it is used for Altitude Hold. But there are some cases where obstacle avoidance is required at long range especially for high speed drone. So in such cases, TF03 can be used for obstacle avoidance. Connect the flight control board to MP. Attention: distance between UAV margin and LiDAR should be larger than LiDAR blind zone. Go to [CONFIG/TUNING] tab and select [Full Parameter List] on the left side. Find and modify the following parameters:

AVOID_MARGIN = 5 [Unit: m, set obstacle avoidance distance as required]

SERIAL2_PROTOCOL = 9 [Rangefinder option]

SERIAL2_BAUD = 115 [Choose the current LiDAR baud rate, if haven’t been changed, the default baud rate 115200 should be selected, that is 115]

RNGFND1_TYPE = 27 [TF03 UART option]

RNGFND1_MIN_CM = 30   [It could be changed according to real application requirement and should be greater LiDAR than non-detection zone, unit is cm]

RNGFND1_MAX_CM = 700 [It could be changed according to real application requirement and should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND1_ORIENT = 0   [It depends on the LiDAR’s real installation direction, 0~7, 24=Up and 25=Down (total ten) are supported up till now, see details in MP]

PRX_TYPE=4    [Rangefinder should be selected for proximity sensor in obstacle avoidance mode]

AVOID_ENABLE= 3 [If 3 = UseFence and UseProximitySensor doesn’t work, could choose 2 = UseProximitySensor]

Upon setting of these parameters, click [Write Params] on the right side of the software to finish configuration. After writing the parameters you need to power off the controller and then turn it on to apply the settings.

If the error message “PreArm: check the proximity sensor” appears, please check if the connection is correct, the power supply is normal and you have restarted the controller.

31040486890?profile=RESIZE_584x

How to see the target distance measured by the LiDAR? (distance from LiDAR in obstacle avoidance can’t be displayed in sonarrange option) press Ctrl+F button in keyboard, the following window will pop out:

31040486695?profile=RESIZE_710x

Click button Proximity, the following window will appear:

31040487455?profile=RESIZE_710x

The number in green color means the distance from LiDAR in obstacle avoidance mode(it doesn’t mean the real time distance from LiDAR and will not be influenced in Mission Planner. The mission planner version at the time of writing this tutorial was v1.3.76.

Attach: If TELEM2 port has been used, GPS2/UART4 and TELEM1/SERIAL1 interfaces can also be used, the other settings are same

Configuration Descriptions on Mission Planner:

Connect flight control board to MP, Select [Full Parameter List] in [CONFIG/TUNING] tab. Find and modify following parameters:

For GPS2/UART4:

SERIAL4_PROTOCOL = 9 (LiDAR)

SERIAL4_BAUD = 115

For TELEM1:

SERIAL1_PROTOCOL = 9 (LiDAR)

SERIAL1_BAUD = 115

Upon setting of these parameters, the other parameters are same as Mission Planner configuration description of TF03 for the purpose of Obstacle Avoidance or Altitude Holding, then click [Write Params] on the right of the software to finish.

Important Note: If you have configured protocol type (SERIALX_PROTCOL: X can be 1, 2, 3, 4 etc.) for more than one UART ports as 9: Rangefinder but you have connected LiDAR to only single UART port then it will give Bad LiDAR Health error. So you need to configure only those UART ports as 9: Rangefinder to which you will connect LiDAR. In other words we can say that if the number of serial ports configured as 9: Rangefinder is less than the number of connected LiDARs then Bad LiDAR Health will occur.

For more information about Benewake LiDAR products and how they can help you, please visit https://en.benewake.com/.

Read more…

TFmini-Plus can directly be connected with one of the serial ports of Pixhawk 6C or 6X from Holybro. There are four serial ports which can be used to interface LiDAR. The following port mapping shows hardware (left) and software (right) serial port mapping:

  • TELEM1 >SERIAL1
  • TELEM2 >SERIAL2 (used in this tutorial)
  • TELEM3 (USART2) >SERIAL5
  • GPS2 Port (UART8) >SERIAL4

TFmini-Plus can be interfaced with flight controller for the purpose of Altitude Holding or Obstacle Avoidance or Terrain Following. At the time of writing this document the flight controller used was PixHawk 6C from Holybro flashed with ArduCopter V4.3.3. However, this document can also be used with PixHawk 6X and other flight controllers running with different ArduCopter firmware versions with slight modification in parameter names and choosing the right port on flight controller. For choosing right port, refer to the hardware and software serial port mapping of flight controller. Please note that supported firmware of Ardupilot for PixHawk 6C and 6X is 4.2.3 stable release and later.

13698884686?profile=RESIZE_180x18013698884889?profile=RESIZE_180x180

Figure-1: Pinout sequence of available ports on PixHawk 6C

NOTE: Pin 1 starts from the flight controllers "right side" like in the diagram shown above

13698885456?profile=RESIZE_584x

Figure-2: Pinout description of available serial ports on PixHawk 6C

 

Example for connecting mini-Plus to PixHawk 6C:
13698885857?profile=RESIZE_400x

Figure 3: Schematic Diagram of Connecting TFmini-Plus with TELEM 2 Interface (Serial Port 2) of PixHawk 6C

The same procedure can be followed for other serial ports like TELEM1/TELEM3/GPS2 by looking at the pin out details given in Figure-2.

Notes:

  1.    Standardoutputmode of LiDAR needs to be used instead of PIX mode  (the default mode is Standard Output Mode, so don’t need to change it) in the latest firmware. PIX mode was only required for the firmware versions older than ArduCopter V3.6.2.
  2.    Pleasepayattention to connect right wires to the right pins of flight controller. For pin sequence refer to Figure-2.
  3.    Relatedconnectorsneed to be purchased by the user, LiDAR connector is 4-pin JST with 1.25mm pitch, while flight controller needs JST-GH with 1.25mm pitch.
  4.    IfLiDARfaces down, please take care of the  distance between lens and ground, it should be larger than LiDAR’sblind zone (10cm).
  5.    Powersourceshould meet the product manual current and voltage requirements: 5V and 140mA of peak current.

b Mission Planner configuration description for TFmini-Plus used for Altitude Hold

Connect the flight control board to mission planar, Select [Full Parameter List] in the left from the below bar-[CONFIG/TUNING]. Find and modify the following parameters:

PRX1_TYPE = 0 [on equal to 4 also gives the value if RNGFND1_ORIENT = 25] SERIAL2_PROTOCOL = 9 [Rangefinder option]

SERIAL2_BAUD = 115 [Choose the current LiDAR baud rate, if haven’t been changed, the default baud rate 115200 should be selected, that is 115]

RNGFND1_TYPE = 20 [TFmini-Plus UART option]

RNGFND1_MIN_CM = 30 [It could be changed according to real application requirement and should be greater LiDAR than non-detection zone, unit is cm]

RNGFND1_MAX_CM = 300 [It could be changed according to real application requirement and should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND1_GNDCLEAR  =  15  [expressed  in  cm,  depending  upon  mounting  height  of  the  module  and should be greater LiDAR than non-detection zone]

RNGFND1_ORIENT = 25 [facing down]
13698885488?profile=RESIZE_710x

Upon setting of these parameters, click [Write Params] on the right of mission planner to finish. After writing the parameters, you need to power off the controller and then turn it on to apply the setting changes.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct, the power supply is normal and have you restarted the controller? Also, check whether you have changed the mode from Standard mode to Pix mode if yes then the same error will encounter.

 

How to see the altitude value from LiDAR sensor: double click the area of Mission Planner, looking at the following picture:
13698887497?profile=RESIZE_584x

 

Select optionsonarrange, see following picture:
13698888263?profile=RESIZE_584x

 

The altitude distance from the LiDAR will be displayed in Sonar Range (meters), see the following picture:
13698888078?profile=RESIZE_584x

 

BMission Planner configuration description for TFmini-Plus used for Obstacle Avoidance

Connect the flight control board to MP. Select [Full Parameter List] in the left from the below bar- [CONFIG/TUNING]. Find and modify the following parameters:

AVOID_ENABLE  =  3  [If  3  =  UseFence  and  UseProximitySensor  doesn’t  work  in  IIC  then  choose  2  = UseProximitySensor]

AVOID_MARGIN = 4 [Unit: m, set obstacle avoidance distance as required.]

PRX1_TYPE = 4 [Rangefinder should be selected for proximity sensor in obstacle avoidance mode] SERIAL2_PROTOCOL = 9 [Rangefinder option]

SERIAL2_BAUD = 115 [Choose the current LiDAR baud rate, if haven’t been changed, the default baud rate 115200 should be selected, that is 115]

RNGFND1_TYPE = 20 [TFmini-Plus UART option]

RNGFND1_MIN_CM = 30 [It could be changed according to real application requirement and should be greater LiDAR than non-detection zone, unit is cm]

RNGFND1_MAX_CM = 300 [It could be changed according to real application requirement and should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND1_ORIENT = 0  [It depends on the  LiDAR’s  real  installation direction,  0~7, 24 =  Up and 25 =Down (total ten) are supported up till now, see details in MP]

AVOID_BEHAVE = 0 [This parameter will define what drone will do upon the encounter of obstacle (stop or slide to avoid the object) 0: Slide1: Stop]

Upon setting of these parameters, click  [Write Params] on the right of the software to finish. After writing the parameters you need to power off the controller and then turn it on to apply the settings.

If the error message “PreArm: check the proximity sensor” appears, please check if the connection is correct, the power supply is normal and have you restarted the controller. Also check it whether you have changed the mode from Standard mode to Pix mode if yes then the same error will encounter.
13698888453?profile=RESIZE_584x

How to see the target distance measured by the LiDAR: (distance from LiDAR in obstacle avoidance can’t be displayed in sonarrange option) press Ctrl+F button in keyboard, the following window will pop out:

13698888869?profile=RESIZE_710x

 

Click button Proximity, the following window will appear:

13698889493?profile=RESIZE_710x

The number in green color means the distance from LiDAR in obstacle avoidance mode(it doesn’t mean the real time distance from LiDAR and will not be influenced in Mission Planner. The mission planner version at the time of writing this tutorial was v1.3.79.

  If TELEM 2 port has been used, TELEM1/TELEM3/GPS2-Port interfaces can

also be used, the other settings are same

Configuration Descriptions on Mission Planner:

Connect  flight  control  board  to  MP,  Select  [Full  Parameter  List]  in  the  left  from  the  below  bar [CONFIG/TUNING]. Find and modify following parameters:

For TELEM1:

SERIAL1_PROTOCOL = 9 (LiDAR) SERIAL1_BAUD = 115

For TELEM3:

SERIAL5_PROTOCOL = 9 (LiDAR) SERIAL5_BAUD = 115

For GPS2:

SERIAL4_PROTOCOL = 9 (LiDAR) SERIAL4_BAUD = 115

Upon  setting  of these  parameters, the  other parameters  are  same  as  Mission  Planner  configuration description of TFmini-Plus for the purpose of Obstacle Avoidance or Altitude Holding, then click [Write Params] on the right of the software to finish.

Important Note: If you have configured protocol type (SERIALX_PROTCOL: X can be 1, 2, 3, 4 etc.) for more than one UART ports as 9: Rangefinder but you have connected LiDAR to only single UART port then it will give Bad LiDAR Health error. So, you need to configure only those UART ports as 9: Rangefinder to which you will connect LiDAR. In other words, we can say that if the number of serial ports configured as 9: Rangefinder is greater than the number of connected LiDARs then Bad LiDAR Health error will occur.

Read more…

TFS20-L can directly be connected with one of the serial ports of Pixhawk 6C or 6X from Holybro. There are four serial ports which can be used to interface LiDAR. The following port mapping shows hardware (left) and software (right) serial port mapping:  

  • TELEM1 > SERIAL1
  • TELEM2 > SERIAL2 (used in this tutorial)
  • TELEM3 (USART2) > SERIAL5
  • GPS2 Port (UART8) > SERIAL4

TFS20-L can be interfaced with flight controller for the purpose of Altitude Holding or Obstacle Avoidance or Terrain Following. At the time of writing this document the flight controller used was PixHawk 6C from Holybro flashed with ArduCopter V4.3.3. However, this document can also be used with PixHawk 6X and other flight controllers running with different ArduCopter firmware versions with slight modification in parameter names and choosing the right port on flight controller. For choosing right port, refer to the hardware and software serial port mapping of flight controller. Please note that supported firmware of Ardupilot for PixHawk 6C and 6X is 4.2.3 stable release and later.

 13529536101?profile=RESIZE_710x

 

Figure-1: Pinout sequence of available ports on PixHawk 6C

NOTE: Pin 1 starts from the flight controllers "right side" like in the diagram shown above

 13529536684?profile=RESIZE_710x

 

Figure-2: Pinout description of available serial ports on PixHawk 6C

 

Example for connecting TFS20-L to PixHawk 6C:13529536696?profile=RESIZE_710x

Figure 3: Schematic Diagram of Connecting TFS20-L with TELEM 2 Interface (Serial Port 2) of PixHawk 6C

The same procedure can be followed for other serial ports like TELEM1/TELEM3/GPS2 by looking at the pin out details given in Figure-2.

Notes: 

  1. Please pay attention to connect right wires to the right pins of flight controller. For pin sequence refer to Figure-2.
  2. Related connectors need to be purchased by the user, LiDAR connector is SMD HC-0.8-6PWT(PCB connector) and JST SUR 0.8mm Pitch (mating connector), while flight controller needs JST-GH with 1.25mm pitch.
  3. If LiDAR faces down, please take care of the distance between lens and ground, it should be larger than LiDAR’s blind zone (20cm).
  4. Power source should meet the product manual current and voltage requirements: peak current is 115mA @ 3.3V.

a) Mission Planner configuration description for TFS20-L used for Altitude Hold 

Connect the flight control board to mission planar, Select [Full Parameter List] in the left from the below bar-[CONFIG/TUNING]. Find and modify the following parameters:

PRX1_TYPE = 0 [on equal to 4 also gives the value if RNGFND1_ORIENT = 25]

SERIAL2_PROTOCOL = 9 [Rangefinder option]

SERIAL2_BAUD = 115 [Choose the current LiDAR baud rate, if haven’t been changed, the default baud rate 115200 should be selected, that is 115]

RNGFND1_TYPE = 20 [TFS20-L/TFmini-Plus/TFmini-S UART option]

RNGFND1_MIN_CM = 30 [It could be changed according to real application requirement and should be greater LiDAR than non-detection zone, unit is cm]

RNGFND1_MAX_CM = 300 [It could be changed according to real application requirement and should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND1_GNDCLEAR = 25 [expressed in cm, depending upon mounting height of the module and should be greater LiDAR than non-detection zone]

RNGFND1_ORIENT = 25 [facing down]

 13529537071?profile=RESIZE_710x

 

Upon setting of these parameters, click [Write Params] on the right of mission planner to finish. After writing the parameters, you need to power off the controller and then turn it on to apply the setting changes.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct, the power supply is normal and have you restarted the controller?

How to see the altitude value from LiDAR sensor: double click the area of Mission Planner, looking at the following picture:

13529536894?profile=RESIZE_710x

 

Select option sonarrange, see following picture:
13529537457?profile=RESIZE_710x

 

The altitude distance from the LiDAR will be displayed in Sonar Range (meters), see the following picture:

13529537288?profile=RESIZE_710x

 

b)Mission Planner configuration description for TFS20-L used for Obstacle Avoidance

Connect the flight control board to MP. Select [Full Parameter List] in the left from the below bar- [CONFIG/TUNING]. Find and modify the following parameters:

AVOID_ENABLE = 0 [If 0 = UseFence and UseProximitySensor doesn’t work in IIC then choose 1 = UseProximitySensor]

AVOID_MARGIN = 4 [Unit: m, set obstacle avoidance distance as required.]

PRX1_TYPE = 4 [Rangefinder should be selected for proximity sensor in obstacle avoidance mode]

SERIAL2_PROTOCOL = 9 [Rangefinder option]

SERIAL2_BAUD = 115 [Choose the current LiDAR baud rate, if haven’t been changed, the default baud rate 115200 should be selected, that is 115]

RNGFND1_TYPE = 20 [TFS20-L/TFmini-Plus/TFmini-S UART option]

RNGFND1_MIN_CM = 30 [It could be changed according to real application requirement and should be greater LiDAR than non-detection zone, unit is cm]

RNGFND1_MAX_CM = 300 [It could be changed according to real application requirement and should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND1_ORIENT = 0 [It depends on the LiDAR’s real installation direction, 0~7, 24 = Up and 25 = Down (total ten) are supported up till now, see details in MP]

AVOID_BEHAVE = 0 [This parameter will define what drone will do upon the encounter of obstacle (stop or slide to avoid the object) 0: Slide; 1: Stop]

Upon setting of these parameters, click [Write Params] on the right of the software to finish. After writing the parameters you need to power off the controller and then turn it on to apply the settings.

If the error message “PreArm: check the proximity sensor” appears, please check if the connection is correct, the power supply is normal and have you restarted the controller.

 13529537652?profile=RESIZE_584x

 How to see the target distance measured by the LiDAR: (distance from LiDAR in obstacle avoidance can’t be displayed in sonarrange option) press Ctrl+F button in keyboard, the following window will pop out:

13529537488?profile=RESIZE_710x

Click button Proximity, the following window will appear:

 13529537676?profile=RESIZE_710x

The number in green color means the distance from LiDAR in obstacle avoidance mode(it doesn’t mean the real time distance from LiDAR and will not be influenced in Mission Planner. The mission planner version at the time of writing this tutorial was v1.3.79.

² c) If TELEM 2 port has been used, TELEM1/TELEM3/GPS2-Port interfaces can also be used, the other settings are same

Configuration Descriptions on Mission Planner:

Connect flight control board to MP, Select [Full Parameter List] in the left from the below bar [CONFIG/TUNING]. Find and modify following parameters:

For TELEM1:

SERIAL1_PROTOCOL = 9 (LiDAR)

SERIAL1_BAUD = 115

For TELEM3:

SERIAL5_PROTOCOL = 9 (LiDAR)

SERIAL5_BAUD = 115

For GPS2:

SERIAL4_PROTOCOL = 9 (LiDAR)

SERIAL4_BAUD = 115

Upon setting of these parameters, the other parameters are same as Mission Planner configuration description of TFS20-L for the purpose of Obstacle Avoidance or Altitude Holding, then click [Write Params] on the right of the software to finish.

Important Note: If you have configured protocol type (SERIALX_PROTCOL: X can be 1, 2, 3, 4 etc.) for more than one UART ports as 9: Rangefinder but you have connected LiDAR to only single UART port then it will give Bad LiDAR Health error. So, you need to configure only those UART ports as 9: Rangefinder to which you will connect LiDAR. In other words, we can say that if the number of serial ports configured as 9: Rangefinder is greater than the number of connected LiDARs then Bad LiDAR Health error will occur.

Read more…

PX4 has its own unique advantages; it is preferred and liked by the majority of users. The TF series is a highly cost-effective LiDAR launched by Benewake, which is sought after by the majority of drone users. This tutorial introduces the connection method of TF series PixHawk and configuring over the PX4 firmware. The same procedure can be followed for other flight controllers as long as the right physical port is used. This document is based on QGroundControl v4.0.6 and firmware PX4 v1.11.0. If the ground station or firmware is not fully functional, please upgrade。

Hardware Connection

This article uses Pixhawk as an example to illustrate the connection, as shown below:

 12963694253?profile=RESIZE_584x

Please install the TF Series LiDAR on the multi-rotor, vertically downwards, and ensure that there are no obstacles in front of the lens. Then configure the software settings:

  • Under Settings--Parameters--EKF2--EKF2_RNG_AID, select Range aid enabled, as shown below:

 12963694082?profile=RESIZE_710x

 

User-defined settings

  • EKF2_RNG_A_VMAX:The maximum horizontal speed trigger value of multi-rotor using TF series as range finder, it means that TF series LiDAR will become active only when the flight speed is lower than this value. The default value is 1m/s, the minimum value is 0.1m/s, and the maximum value is 2m/s.
  • EKF2_RNG_A_HMAX:The maximum altitude trigger value of TF series based multi-rotor, which means that TF series will become active only when the flying altitude is less than this value. The default value is 5m, the minimum value is 1m, and the maximum value is 10m.
  • Turn on LiDAR options:UnderSetting--Sensors--SENS TFMINI CFG, select TELEM2 (this port can be changed if you are using another serial port), as shown below:

Note:If this option is not available, you need to download the source program from the official website and change the default.cmake file of the corresponding board.

https://dev.px4.io/master/en/

File locationPX4\Firmware\boards\px4\fmu-v2\default.cmake, fmu-v2 is the corresponding flight control board; please refer to the official tutorial link below for details.

Change the content:Need to add distance_sensor/tfmini

 12963696455?profile=RESIZE_710x

 12963696885?profile=RESIZE_710x

 

After completing the above steps, please restart the flight controller and QGroundControl. There is a LiDAR value display on the main interface, as shown below:

12963697075?profile=RESIZE_710x

Read more…

Benewake TF Series (mini-S, mini-Plus, 02-Pro, Luna) LiDAR can be connected with the IIC port of PixHawk 6C and 6X Flight from HolyBro. There are three IIC ports available on PixHawk 6C:

  1. On GPS-1> pin-4: SCL1, pin-5: SDA1;
  2. On GPS-2> pin-4: SCL2, pin-5: SDA2;
  3. On I2C> pin-2: I2C2_SCL, pin-3: I2C2_SDA;

but by default, data can only be read through I2C port. In order to use other ports some settings will be required like compiling the firmware from source code and directing the data flow to other ports etc., because there are no direct settings available in Ardupilot firmware. In this tutorial we will use I2C port (I2C2_SCL, I2C2_SDA). LiDAR can be interfaced with flight controller for the purpose of Altitude Holding, Obstacle Avoidance or Terrain Following (first two will be explained in this document). At the time of writing this document, the controller used was PixHawk 6C from HolyBro flashed with ArduCopter V4.3.3. However, this document can also be used with PixHawk 6X and other flight controllers running with different ArduCopter firmware versions with slight modification in parameter names and choosing the right port on flight controller. For choosing right port, refer to the port mapping of flight controller in its documentation. Please note that supported firmware of Ardupilot for PixHawk 6C and 6X is 4.2.3 stable release and later.

  1. TFSeries LiDAR Settings for IIC Interface:

Note: IIC interface is like interactive mode, you need to send command and receive the response from LiDAR. So, in order to process the command to obtain data-packet, LiDAR needs some processing time. The recommended relation is:

 

So, if LiDAR frame-rate is 100Hz then external frame-rate (the rate at which you send the command to the LiDAR) should 20Hz. If you need higher external frame-rate then you could increase LiDAR internal frame-rate by sending commands and following the above relation. Please refer to the manual of respective LiDAR. However, this is required if there are fluctuations in readings, otherwise don’t need to do so. Please see the details of “frame rate” and changing the communication interface commands in the manual.

Standard output mode of LiDAR needs to be used instead of PIX mode in the latest firmwares. PIX mode was only required for the firmware versions older than Arducopter V3.6.2.

The default communication of TF Series LiDAR is TTL (UART). Both interfaces use the same cable, so please set the LiDAR to IIC communication first, see detailed commands in product manual.

We take three LiDARs as an example for (obstacle avoidance and altitude hold) in this tutorial and set the addresses to 0x10, 0x11 and 0x12 (16, 17, 18 in decimal respectively).

 12870818101?profile=RESIZE_710x

Figure-1: Pinout sequence of available ports on PixHawk 6C

Please pay attention that Pin 1 starts from the flight controllers "right side" like in the diagram shown above.

Note:

  1. Default cable sequence of LiDAR and PixHawk (6C and 6X) is different, please pay attention to the wiring sequence. LiDAR connector is 4-pin JSTwith 1.25mm pitch and controller needs JST GH25mm 4-pin connector to interface LiDAR with I2C port. Or you can also make an intermediate cable for connecting TF series LiDAR with flight controller. Looking at the pinout of controller (6C), pin configurations are:

 12870818861?profile=RESIZE_710x

Figure-2: Pinout description of I2C port on PixHawk 6C

  1. If LiDAR faces down, please take care of the distance between lens and ground, it should be larger than LiDAR blind zone (10cm or 20cm depending upon which LiDAR you are using).
  2. If more LiDARs need to be connected (10 LiDARs can be connected), the method is same.
  3. Power source should meet the product manual requirements; Voltage: 5V±0.5V, Current: larger than (peak-current of LiDAR*number of LiDARs connected). For current and voltage requirements, please refer to the data-sheet of respective LiDAR.
  4. The communication interface of TFmini-S, TFmini-Plus and TF02-Pro can be switched by sending commands. However, in case of TF-Luna, it can be switched by connecting its 5thpin to ground. Please see TF-Luna IIC communication pin details as below:

 12870818479?profile=RESIZE_710x

 Figure 3: Pin sequence TF-Luna

If we look at the pin configuration of TF-Luna, IIC can be set by grounding pin-5 in addition to the other four pins. For this purpose, a customized cable is needed because in IIC mode we need to connect both pin-4 and pin-5 to the ground.

The modified cable is shown below. I have connected green wire (pin-4) and blue wire (pin-5) to single pin which will go to the GND pin of the source. Leave pin-6 connected. Please ignore the color standard in this case as black wire represents SDA while yellow wires represent SCL, just follow the pin numbering according to the product-manual.

 10972790082?profile=RESIZE_710x

So, based on the above discussion, you will need to add an extra wire (for TF-Luna) in the diagram (Figure 3) in order to use TF-Luna in IIC mode. For more understanding, I have added a separate connection diagram for connecting multiple TF-Luna using IIC interface.

12870820065?profile=RESIZE_710x

Figure 4: Schematic Diagram of Connecting TF-Luna to I2C Interface

  1. PixHawk 6C (from HolyBro) Connection:

Please refer to the product manual for wiring sequence of LiDAR:

12870820082?profile=RESIZE_710x

Figure 5: Schematic Diagram of Connecting three TF-LiDARs to I2C Interface of Flight Controller

  1. Parameters settings (Obstacle Avoidance and Altitude Hold):

Connect the flight control board to Mission Planar. Select [CONFIG/TUNING] and then click on [Full Parameter List] in the left from the below bar. Find and modify the following parameters:

12870820265?profile=RESIZE_710x

Attention: distance between UAV margin and LiDAR should be larger than LiDAR non-detection zone.

Common settings:

AVOID_ENABLE = 2 [if 3 = UseFence and UseProximitySensor doesn’t work in IIC then choose 2 = UseProximitySensor]

AVOID_MARGIN = 4 [can be set based on user requirements, can have different value depending upon which LiDAR you are using]

PRX1_TYPE = 4

AVOID_BEHAVE = 0 [This parameter will define what drone will do upon the encounter of obstacle (stop or slide to avoid the object) 0: Slide; 1: Stop]

Settings for First LiDAR:

RNGFND1_ADDR = 16 [Address of #1 sensor in decimal]

RNGFND1_MAX_CM = 400 [It could be changed according to real application requirement but should be smaller than effective measure range of LiDAR, depends on which LiDAR you are using, unit is cm] 

RNGFND1_MIN_CM = 30 [It could be changed according to real application requirement and should be larger than LiDAR non-detection zone, depends on which LiDAR you are using, unit is cm] 

RNGFND1_ORIENT = 0 [#1 sensor real orientation; 0~7, 24 = Up and 25 = Down (total ten are supported up till now), see details in MP]

RNGFND1_TYPE = 25 [ same for TFmini-S, TFmini-Plus, TF-Luna, TF02-Pro IIC]

Settings for Second LiDAR:

RNGFND2_ADDR = 17 [Address of #2 sensor in decimal]

RNGFND2_MAX_CM = 400

RNGFND2_MIN_CM = 30

RNGFND2_ORIENT = 4 [#2 sensor real orientation; 0~7, 24 = Up and 25 = Down (total ten are supported up till now), see details in MP]

RNGFND2_TYPE = 25 [same for TFmini-S, TFmini-Plus, TF-Luna, TF02-Pro IIC]

Settings for Third LiDAR (Altitude Hold):

RNGFND3_ADDR = 18 [Address of #3 sensor in decimal]

RNGFND3_MAX_CM = 400

RNGFND3_MIN_CM = 30

RNGFND3_ORIENT = 25 [#3 sensor real orientation; 0~7, 24 = Up and 25 = Down (total ten are supported up till now), see details in MP]

RNGFND3_TYPE = 25 [same for TFmini-S, TFmini-Plus, TF-Luna, TF02-Pro IIC]

RNGFND3_GNDCLEAR = 15 [Unit: cm, depending upon mounting height of the module and should be larger LiDAR than non-detection zone. This parameter is required for Altitude Hold.]

Upon setting of these parameters, click [Write Params] on the right of mission planner to finish. After writing the parameters you need to power off the controller and then turn it on to apply the setting changes.

12870821497?profile=RESIZE_584x

If the error message “Bad LiDAR Health” or “PreArm: check the proximity sensor” appear, please check if the connection is correct, the power supply is normal and you have restarted the controller. Also, check it whether you have changed the mode from Standard mode to Pix mode if yes then the same error will encounter.

How to see the target distance from the LiDAR: press Ctrl+F button in keyboard, the following window will pop out:

12870821886?profile=RESIZE_710x

Click button Proximity, the following window will appear:

12870822096?profile=RESIZE_710x

The number in green color means the distance from LiDAR in obstacle avoidance mode(it doesn’t mean the real time distance from LiDAR and will not be influenced in Mission Planner. The mission planner version at the time of writing this tutorial was v1.3.79.

 

How to see the altitude value from LiDAR sensor: double click the area of the Mission Planner, look at the following picture:

12870822655?profile=RESIZE_710x

 

Select option sonarrange, see following picture:

12870822667?profile=RESIZE_710x

The altitude distance from the LiDAR will be displayed in Sonar Range (meters), see the following picture:

12870822466?profile=RESIZE_400x

 

Data from Three LiDAR sensors:

You can see in the following image that RangeFinder1 (cm) does not display any data. The reason is, this LiDAR is used as Altitude Hold sensor, so its data is shown in Sonar Range (m). While the data of other two sensors is shown in Proximity window (right hand side).

12870822691?profile=RESIZE_710x

Read more…

Application of TFmini-S in PixHawk

TFmini-S can directly be connected with the serial port of PixHawk. TFmini-S can be used in flight controller for the purpose of altitude holding or obstacle avoidance. This document is suitable to PixHawk adopts ArduCopter V3.6.2 or higher firmware (Note: Standard output mode should be used instead of PIX mode by Benewake GUI in firmware V3.6.2 or above).

Example for connecting PixHawk:

12699363892?profile=RESIZE_710x

12699363892?profile=RESIZE_710x

Figure 1 Schematic Diagram of Connecting TFmini-S with TELEM 2 Interface (Serial Port 2) of PixHawk

a) Mission Planner configuration description of TFmini-S for the purpose of altitude hold 

Connect the flight control board to Mission Planar. Attention: the installation height should be larger than non-detection zone. Select [Full Parameter List] in the left from the below bar- [CONFIG/TUNING]. Find and modify the following parameters:

SERIAL2_PROTOCOL = 9  [Rangefinder option]

SERIAL2_BAUD = 115  [Choose the current LiDAR baud rate, if haven’t been changed, the default baud rate 115200 should be selected, that is 115]

RNGFND1_TYPE = 20 [TFmini-S UART option]

RNGFND1_MIN_CM = 30 [It could be changed according to real demands and should be bigger LiDAR than non-detection zone, unit is cm]

RNGFND1_MAX_CM = 300   [It could be changed according to real demands but should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND1_GNDCLEAR = 15 [expressed in cm, depending upon mounting height of the module and should be bigger LiDAR than non-detection zone]

RNGFND1_ORIENT=25 [face down]

PRX_TYPE=0

Upon setting of these parameters, click [Write Params] on the right of the software to finish.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct and the power supply is normal. Also check it whether you have changed the mode from Standard mode to Pix mode while the firmware is 3.6.2 or higher if yes then the same error will encounter.

How to see the altitude value from LiDAR sensor: double click the area of the Mission Planner, look at the following picture:

12699364865?profile=RESIZE_710x

Select option sonarrange, see following picture:

12699364889?profile=RESIZE_710x

The altitude distance from the LiDAR will be displayed in Sonar Range (meters), see the following picture:

12699365661?profile=RESIZE_710x

B)Mission Planner configuration description of TFmini-S for the purpose of Obstacle Avoidance

It’s only recommended to be used in Loiter mode, the detailed setting is as follows:

Connect the flight control board to MP. Attention: distance between UAV margin and LiDAR should be larger than LiDAR non-detection zone. Select [Full Parameter List] in the left from the below bar- [CONFIG/TUNING]. Find and modify the following parameters:

AVOID_MARGIN=2 [Unit: m, set obstacle avoidance distance as required]

SERIAL2_PROTOCOL = 9 [Rangefinder option]

SERIAL2_BAUD = 115 [Choose the current LiDAR baud rate, if haven’t been changed, the default baud rate 115200 should be selected, that is 115]

RNGFND1_TYPE = 20 [TFmini-S UART option]

RNGFND1_MIN_CM = 30   [It could be changed according to real demands and should be bigger LiDAR than non-detection zone, unit is cm]

RNGFND1_MAX_CM = 300 [It could be changed according to real demands but should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND1_GNDCLEAR = 15 [Unit: cm, depending upon mounting height of the module and should be bigger LiDAR than non-detection zone]

RNGFND1_ORIENT=0   [It depends on the LiDAR’s real installation direction, 0~7, 24=Up and 25=Down (total ten) are supported up to now, see detail in MP]

PRX_TYPE=4    [Rangefinder should be selected for proximity sensor in obstacle avoidance mode]

Upon setting of these parameters, click [Write Params] on the right of the software to finish.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct and the power supply is normal.

How to see the target distance from the LiDAR: (distance from LiDAR in obstacle avoidance can’t be displayed in sonarrange option) press Ctrl+F button in keyboard, the following window will pop out:

12699365669?profile=RESIZE_710x

Click button Proximity, the following window will appear:

12699365296?profile=RESIZE_710x

The number in green color means the distance from LiDAR in obstacle avoidance mode(the number only refresh when this window opens, closes, zooms in or zooms out, it doesn’t mean the real time distance from LiDAR and will not be influenced in Mission Planner version under v1.3.48, the problem could be solved by updating Mission Planner)

²  Attach: If TELEM 2 port has been used, SERIAL4/5 interface could be used, the other setting are same

12699365887?profile=RESIZE_710x

Figure 2: Schematic Diagram of Connecting TFmini-S with SERIAL4/5 Interface (Serial Port 4/5) of PixHawk

 

 

Configuration Descriptions of Mission Planner:

Connect flight control board to MP, Select [Full Parameter List] in the left from the below bar [CONFIG/TUNING]. Find and modify following parameters:

SERIAL4_PROTOCOL = 9 (LiDAR)

SERIAL4_BAUD = 115

Upon setting of these parameters, the other parameters should be same as Mission Planner configuration description of TFmini-S for the purpose of Obstacle Avoidance or Altitude Holding, then click [Write Params] on the right of the software to finish.

Read more…

TFmini-S can be used with PixHawk for the purpose of obstacle avoidance.

  1. TFmini-SSettings:

Note: Frame rate should be set to 250Hz, see the details in chapter 7.4 “frame rate” and changing the communication interface.

The default communication of TFmini-S is TTL, IIC and TTL uses the same cable, so please set TFmini-S to IIC communication first, see detail commands in product manual.

We take two TFmini-S as an example in this passage and set the address 0x10 and 0x11 separately.

  1. PixHawk Connection:

See the connection details in PixHawk manual and TFmini-S manual, we take example for connecting

PixHawk flight controller:

12629947677?profile=RESIZE_710x

Figure 1: Schematic Diagram of Connecting TFmini-S to I2C Interface of PixHawk

Note:

  1. Default cable sequence of TFmini-S and PixHawk are different, please change it accordingly (SDA and SCL wires need to be interchanged). Look at the pinout of controller, pin configurations are starting from left to right:

 10961543091?profile=RESIZE_710x

  1. IIC connector should be purchased by user
  2. If TFmini-S faces down, please take care the distance between lens and ground should be larger than TFmini-S’s blind zone (10cm)
  3. If more TFmini-S need to be connected (10 LiDARs can be connected), the method is same.
  4. Power source should meet the product manual demands:5V±0.5V, larger than 140mA*number of TFmini-S
  5. Parameters settings:

Common settings:

AVOID_ENABLE= 2 [if 3 = UseFence and UseProximitySensor doesn’t work in IIC then choose 2 = UseProximitySensor]

AVOID_MARGIN=4

PRX_TYPE=4

Settings for first TFmini-S:

RNGFND1_ADDR=16 [Address of #1 TFmini-S in decimal]

RNGFND1_GNDCLEAR=15 [Unit: cm, depending upon mounting height of the module and should be larger LiDAR than non-detection zone]

RNGFND1_MAX_CM=400 [It could be changed according to real demands but should be smaller than
effective measure range of LiDAR, unit is cm] 

RNGFND1_MIN_CM=30 [It could be changed according to real demands and should be larger than
LiDAR non-detection zone, unit is cm] 

RNGFND1_ORIENT=0 [#1 TFmini-S real orientation]

RNGFND1_TYPE = 25 [TFmini-S IIC same as TFmini-Plus IIC]

 

Settings for second TFmini-S:

RNGFND2_ADDR=17 [Address of #2 TFmini-S in decimal]

RNGFND2_GNDCLEAR=15

RNGFND2_MAX_CM=400

RNGFND2_MIN_CM=30

RNGFND2_ORIENT=25 [#2 TFmini-S real orientation]

RNGFND2_TYPE=25 [TFmini-S IIC same as TFmini-Plus IIC]

Upon setting of these parameters, click [Write Params] on the right of the software to finish.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct and the power supply is normal.

How to see the target distance from the LiDAR: press Ctrl+F button in keyboard, the following window will pop out:

10961543271?profile=RESIZE_710x

  

Click button Proximity, the following window will appear:

 10961543487?profile=RESIZE_710x

The number in green color means the distance from LiDAR in obstacle avoidance mode(the number only refresh when this window opens, closes, zooms in or zooms out, it doesn’t mean the real time distance from LiDAR and will not be influenced in Mission Planner version under v1.3.48, the problem could be solved by updating Mission Planner

Read more…

TFmini-i and TF02-i can be interfaced with PixHawk1 CAN port or any flight controller which has Ardupilot firmware flashed and having CAN interface. Support for CAN protocol has been added to Ardupilot firmwares, starting from Copter 4.2.0 for the purpose of obstacle avoidance and Altitude Hold.

1.  TFmini-iandTF02-i Settings:

It should be noted that TF02-i and TFmini-i have two different hardware versions for 485 and CAN. So when buying LiDAR, please pay attention to buy LiDAR with CAN interface. Multiple LiDARs can be interfaced to a single CAN bus. We need to assign different CAN IDs to each LiDAR just like we do for IIC communication. The baud-rate of each LiDAR needs to be set to the same value. On LiDAR side we have two types of CAN IDs:

    Send ID: it becomes Receive ID on CAN bus side (we need to set this ID to a new value ifwe

are connecting multiple LiDARs.)

    Receive ID: it becomes Send ID on CAN bus side

I will consider three LiDARs example but Ardupilot supports up to  10 sensors. The commands are mentioned in details in the manual of LiDAR but I will add them here for convenience. It is still advised to read the manual of LiDAR carefully there are important points.

5A 0E 51 00 08 03 00 00 00 04 00 00 00 C8 [CHANGE SEND ID TO 04]

5A 0E 51 00 08 03 00 00 00 05 00 00 00 C9 [CHANGE SEND ID TO 05]

5A 0E 51 00 08 03 00 00 00 06 00 00 00 CA [CHANGE SEND ID TO 06]

5A 04 11 6F [SAVE SETTINGS]

5A 05 60 01 C0 [Enable 120Ω Terminating Resistor]

5A 05 60 00 BF [Disable (Default) 120Ω Terminating Resistor]

5A 0E 51 00 08 03 00 00 00 03 00 00 00 C7 [CHANGE RECEIVING ID BACK TO 03]

Some  details  about terminating  resistor  on LiDAR: Although resistor  on LiDAR  is  disabled by default and LiDAR works without enabling resistor but adding resistor helps in reducing equivalent resistance of transmission wires, because adding more resistors in parallel will reduce the equivalent resistance. So in case you are experiencing any kind problem with data stability then you could enable resistors on LiDARs by sending command I added above. I have tested with total five LiDARs (two with resistors enabled and three without enabling resistors and I was able to get stable data).

For sending the above commands, you will either need CAN analyzer or TTL-USB board (because UART interface of TF02-i/TFmini-i can be used to configure its parameters).

Once you are done with above settings then it’s time to move to physical connection and Ardupilot firmware settings.

We take three TFmini-i or TF02-i CAN as an example in this passage and set the addresses to 0x03 and 0x04 and 0x05 separately. The default sending ID of LiDAR is 0x03 so leave it for one LiDAR and configure for other two LiDARs to 0x04 and 0x05.

2.   PixHawkConnection:

The following two diagrams show how to interface TFmini-i and TF02-i CAN with PixHawk flight controller. The wiring details of TFmini-i and TF02-i CAN is the same.

 12222374661?profile=RESIZE_710x

 

Figure 1: Schematic Diagram of Connecting TFmini-i CAN to CAN Interface ofPixHawk1

Note

     1.  Pleasepayattention to connect right wire to the right pin of flight controller. Look at the pinout of controller, pin configurations are starting from left to right:

12222374861?profile=RESIZE_400x

Figure 2: Pin details of CAN Interface ofPixHawk1

  1.  Relatedconnectorsneed to be purchased by user, LiDAR connector is 7-pin JST with25mm pitch.
  2.  IfLiDARfaces down, please take care the distance between lens and ground, it should be larger than LiDAR’s blind zone ( 10cm).
  3.  IfmoreLiDARs need to be connected ( 10 LiDARs can be connected), the method is same.
  4.  Powersourceshould meet the product manual current and voltage requirement: 7V to 30V, larger than 100mA*number of LiDAR. I used 12V supply.

 12222375096?profile=RESIZE_584x

 Figure 3: Schematic Diagram of Connecting TF02-i CAN to CAN Interface ofPixHawk1

 

3.  Parameterssettings:

Common settings for obstacle avoidance :

AVOID_ENABLE= 3 [if 3 = UseFence and UseProximitySensor doesn’t work in IIC then choose 2 = UseProximitySensor]

AVOID_MARGIN=4

 

PRX_TYPE=4

Settings for CAN-1 port:

CAN_P1_DRIVER = 1

CAN_D1_PROTOCOL = 11

CAN_P1_BITRATE =  [Baud-rate: For TFmini-i and TF02-i it is 250000, and for TF03 the default baud-rate needs to be set to 1000000.]

In case of pixhawk1 we only have one CAN interface but if there are more than one interfaces then configure the parameters for CAN-2 interface.

Settings for CAN-2 port:

CAN_P2_DRIVER = 1

CAN_D2_PROTOCOL = 11

CAN_P2_BITRATE =  [Baud-rate: For TFmini-i and TF02-i it is 250000, and for TF03 the default baud-rate needs to be set to 1000000.]

 

Settings for first TFmini-i or TF02-i:

RNGFND1_RECV_ID = 3 [CAN Transmit ID of #1 TFmini-i or TF02-i in decimal]

RNGFND1_GNDCLEAR=15 [Unit: cm, depending upon mounting height of the module and should be larger LiDAR than non-detection zone. This parameter is required to be configured for altitude hold, it is the installation height of LiDAR from ground.]

RNGFND1_MAX_CM = 400 [It could be changed according to real demands but should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND1_MIN_CM=30 [It could be changed according to real demands and should be larger than LiDAR non-detection zone, unit is cm]

RNGFND1_ORIENT=0 [#1 TFmini-i real orientation]

RNGFND1_TYPE = 34 [TFmini-i CAN same as TF02-i and TF03-CAN]

 

Settings for second TFmini-i or TF02-i:

RNGFND2_RECV_ID = 4 [CAN Transmit ID of #2 TFmini-i or TF02-i in decimal]

RNGFND2_MAX_CM=400

RNGFND2_MIN_CM=30

RNGFND2_ORIENT = 6 [#2 TFmini-i real orientation]

RNGFND2_TYPE = 34 [TFmini-i CAN same as TF02-i and TF03-CAN]

 

Settings for third TFmini-i or TF02-i:

RNGFND3_RECV_ID = 5 [CAN Transmit ID of #3 TFmini-i or TF02-i in decimal]

RNGFND3_MAX_CM=400

 

RNGFND3_MIN_CM=30

RNGFND3_ORIENT = 4 [#3 TFmini-i real orientation]

RNGFND3_TYPE = 34 [TFmini-i CAN same as TF02-i and TF03-CAN]

 

Upon setting of these parameters, click [Write Params] on the right of the software to finish.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct and the power supply is normal. Please turn-off completely the flight controller after configuring the parameters, otherwise changes will not take place. If your battery is connected to your flight controller, please disconnect it as well. 

How to see the target distance from the LiDAR: press Ctrl+F button in keyboard, the following window will pop out:
12222375465?profile=RESIZE_710x

  

Click button Proximity, the following window will appear:
12222375870?profile=RESIZE_584x

The number in green color means the distance from LiDAR in obstacle avoidance mode the number refreshes when the distance changes or window opens, closes, zooms in or zooms out, and this distance will not be influenced in Mission Planner, the version used at the time writing this tutorial is v1.3.72.

Altitude Hold using CAN Interface:

Let say we use fourth LiDAR for the purpose of Altitude Hold. Connect the flight control board to mission planar, Select [Full Parameter List] in the left from the below bar-[CONFIG/TUNING]. Find and modify the following parameters:

PRX_TYPE = 0 [on equal to 4 also gives the value ifRNGFND4_ORIENT = 25]

RNGFND4_RECV_ID = 6 [CAN Transmit ID of #4 TFmini-i or TF02-i in decimal]                                 

RNGFND4_GNDCLEAR = 15 [Unit: cm, depending upon mounting height of the module and should be larger LiDAR than non-detection zone. This parameter is required for Altitude Hold.]

RNGFND4_MAX_CM = 400 [It could be changed according to real demands but should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND4_MIN_CM = 30 [It could be changed according to real scenario and should be larger than LiDAR non-detection zone, unit is cm]

RNGFND4_ORIENT = 25 [#4 TFmini-i real orientation]

RNGFND4_TYPE = 34 [TFmini-i CAN same as TF02-i and TF03-CAN]

Upon setting of these parameters, click [Write Params] on the right of the software to finish.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct and the power supply is normal.

Select option sonarrange, see following picture:
12222376255?profile=RESIZE_710x

 

The altitude distance from the LiDAR will be displayed in Sonar Range (meters), see the following

picture:

12222376078?profile=RESIZE_180x180

Read more…

Application of TF-Luna in Pixhawk

TF-Luna can directly be connected with the serial port of Pixhawk. TF-Luna can be used in flight device

for the purpose of altitude holding or obstacle avoidance. This document is suitable to Pixhawk adopts ArduCopter V4.0.0 or higher firmware.

Example for connecting Pixhawk:

 12214371691?profile=RESIZE_584x

Figure 1 Schematic Diagram of Connecting TF-Luna with TELEM 2 Interface (Serial Port 2) of Pixhawk

a)MissionPlanner configuration description of TF-Luna for the purpose of altitude hold

 

Connect the flight control board to MP.Attention:the installation height should be bigger than non-detection zone.Select [Full Parameter List] in the left from the below bar- [CONFIG/TUNING] . Find and modify the following parameters:

SERIAL2_PROTOCOL = 9    [Rangefinder option]

 

SERIAL2_BAUD = 115    [Choose the current LiDAR baud rate,if haven’t been changed,the default baud rate 115200 should be selected,that is 115]

RNGFND_TYPE = 20    [Same option with TFmini]

 

RNGFND_MIN_CM = 20    [It could be changed according to real demands and should be bigger LiDAR than non-detection zone,unit is cm]

RNGFND_MAX_CM = 200      [It could be changed according to real demands but should be smaller than

effective measure range of LiDAR,unit is cm]

 

RNGFND_GNDCLEAR = 15    [expressed in cm, depending upon mounting height of the module and

should be bigger LiDAR than non-detection zone]

 

RNGFND_ORIENT=25    [face down]

 

PRX_TYPE=0

 

Upon setting of these parameters, click [Write Params] on the right of the software to finish.

 

If the error message “Bad Lidar Health” appears, please check if the connection is correct and the power supply is normal, then restart Pixhawk.

How to see the altitude value from LiDAR sensor: double click the area of the Mission Planner, see the following picture:

12214373260?profile=RESIZE_400x

Select option sonarrange,see following picture:

 12214371897?profile=RESIZE_584x

 

The altitude distance from the LiDAR will be displayed in Sonar Range(meters),see the following picture:

b)  MissionPlannerconfiguration description of TF-Luna for the purpose of Obstacle Avoidance

12214373277?profile=RESIZE_400x

It’s only recommended to be used in Loiter mode, the detail setting is as followings:

 

Connect the flight control board to MP. Attention:distance between UAV margin and LiDAR should be bigger than LiDAR non-detection zone.  Select  [Full Parameter List] in the left from the below bar- [CONFIG/TUNING] . Find and modify the following parameters:

AVOID_MARGIN=3 [Unit: m, set obstacle avoidance distance as required]

SERIAL2_PROTOCOL = 9    [Rangefinder option]

 

SERIAL2_BAUD = 115    [Choose the current LiDAR baud rate,if haven’t been changed,the default baud rate 115200 should be selected,that is 115]

RNGFND_TYPE = 20    [Same option with TFmini]

 

RNGFND_MIN_CM = 20      [It could be changed according to real demands and should be bigger LiDAR

than non-detection zone,unit is cm]

 

RNGFND_MAX_CM = 200    [It could be changed according to real demands but should be smaller than effective measure range of LiDAR,unit is cm]

RNGFND_GNDCLEAR = 15    [Unit: cm, depending upon mounting height of the module and should be bigger LiDAR than non-detection zone]

RNGFND_ORIENT=0      [It depends on the LiDAR’s real installation direction,0~7 is supported up to

now,see detail in MP]

 

PRX_TYPE=4        [RangeFinder should be selected for proximity sensor in obstacle avoidance mode]

 

Upon setting of these parameters, click [Write Params] on the right of the software to finish.

 

If the error message “Bad Lidar Health” appears, please check if the connection is correct and the power supply is normal, then restart Pixhawk.

How to see the target distance from the LiDAR:(distance from LiDAR in obstacle avoidance can’t be displayed in sonarrange option )press Ctrl+F button in keyboard,the following window will pop out:

 12214372872?profile=RESIZE_710x

Click button Proximity,the following window will appear: 

 

The number in green color means the distance from LiDAR in obstcle avoidance mode  (the number only refresh when this window open,close,zoom in or zoom out,it doesn’t mean the real time distance from LiDAR and will not be influenced in Mission Planner version under v1.3.48,the problem could be solved by updating Mission Planner)

 

    Attach:If TELEM 2 port has been used ,SERIAL4/5 interface could be used,the other setting are same

 

Figure 2 Schematic Diagram of Connecting TF-Luna with SERIAL4/5 Interface (Serial Port 4/5) of Pixhawk

Configuration Descriptions of Mission Planner

 

Connect  flight  control  board  to  MP,  Select  [Full  Parameter  List]  in  the  left  from  the  below  bar [CONFIG/TUNING] . Find and modify following parameters:

SERIAL4_PROTOCOL = 9 (LiDAR)

SERIAL4_BAUD = 115

 

Upon setting of these parameters, the other parameters should be same as Mission Planner configuration description of TF-Luna for the purpose of Obstacle Avoidance or Altitude Holding,then click [Write Params] on the right of the software to finish.

Read more…

Application of TF-Luna in Pixhawk

TF-Luna can directly be connected with the serial port of Pixhawk. TF-Luna can be used in flight device

for the purpose of altitude holding or obstacle avoidance. This document is suitable to Pixhawk adopts ArduCopter V4.0.0 or higher firmware.

Example for connecting Pixhawk:

 12163570060?profile=RESIZE_584x

 

 

 

 

 

 

 

 

 

 

 

 

Figure 1 Schematic Diagram of Connecting TF-Luna with TELEM 2 Interface (Serial Port 2) of Pixhawk

 

a)MissionPlanner configuration description of TF-Luna for the purpose of altitude hold

 

Connect the flight control board to MP.Attention:the installation height should be bigger than non-detection zone.Select [Full Parameter List] in the left from the below bar- [CONFIG/TUNING] . Find and modify the following parameters:

SERIAL2_PROTOCOL = 9    [Rangefinder option]

SERIAL2_BAUD = 115    [Choose the current LiDAR baud rate,if haven’t been changed,the default baud rate 115200 should be selected,that is 115]

RNGFND_TYPE = 20    [Same option with TFmini]

RNGFND_MIN_CM = 20    [It could be changed according to real demands and should be bigger LiDAR than non-detection zone,unit is cm]

RNGFND_MAX_CM = 200      [It could be changed according to real demands but should be smaller than

effective measure range of LiDAR,unit is cm]

RNGFND_GNDCLEAR = 15    [expressed in cm, depending upon mounting height of the module and

should be bigger LiDAR than non-detection zone]

RNGFND_ORIENT=25    [face down]

PRX_TYPE=0

Upon setting of these parameters, click [Write Params] on the right of the software to finish.

If the error message “Bad Lidar Health” appears, please check if the connection is correct and the power supply is normal, then restart Pixhawk.

How to see the altitude value from LiDAR sensor: double click the area of the Mission Planner, see the following picture:

12163575283?profile=RESIZE_584x

Select option sonarrange,see following picture:

12163575294?profile=RESIZE_584x 

The altitude distance from the LiDAR will be displayed in Sonar Range(meters),see the following picture:

 

b)  MissionPlannerconfiguration description of TF-Luna for the purpose of Obstacle Avoidance

12163576459?profile=RESIZE_584x 

It’s only recommended to be used in Loiter mode, the detail setting is as followings:

Connect the flight control board to MP. Attention:distance between UAV margin and LiDAR should be bigger than LiDAR non-detection zone.  Select  [Full Parameter List] in the left from the below bar- [CONFIG/TUNING] . Find and modify the following parameters:

AVOID_MARGIN=3 [Unit: m, set obstacle avoidance distance as required]

SERIAL2_PROTOCOL = 9    [Rangefinder option]

SERIAL2_BAUD = 115    [Choose the current LiDAR baud rate,if haven’t been changed,the default baud rate 115200 should be selected,that is 115]

RNGFND_TYPE = 20    [Same option with TFmini]

RNGFND_MIN_CM = 20      [It could be changed according to real demands and should be bigger LiDAR

than non-detection zone,unit is cm]

RNGFND_MAX_CM = 200    [It could be changed according to real demands but should be smaller than effective measure range of LiDAR,unit is cm]

RNGFND_GNDCLEAR = 15    [Unit: cm, depending upon mounting height of the module and should be bigger LiDAR than non-detection zone]

RNGFND_ORIENT=0      [It depends on the LiDAR’s real installation direction,0~7 is supported up to

now,see detail in MP]

PRX_TYPE=4        [RangeFinder should be selected for proximity sensor in obstacle avoidance mode]

Upon setting of these parameters, click [Write Params] on the right of the software to finish.

If the error message “Bad Lidar Health” appears, please check if the connection is correct and the power supply is normal, then restart Pixhawk.

How to see the target distance from the LiDAR:(distance from LiDAR in obstacle avoidance can’t be displayed in sonarrange option )press Ctrl+F button in keyboard,the following window will pop out:

12163575698?profile=RESIZE_710x

Click button Proximity,the following window will appear: 

The number in green color means the distance from LiDAR in obstcle avoidance mode  (the number only refresh when this window open,close,zoom in or zoom out,it doesn’t mean the real time distance from LiDAR and will not be influenced in Mission Planner version under v1.3.48,the problem could be solved by updating Mission Planner)

Attach:If TELEM 2 port has been used ,SERIAL4/5 interface could be used,the other setting are same

Figure 2 Schematic Diagram of Connecting TF-Luna with SERIAL4/5 Interface (Serial Port 4/5) of Pixhawk

Configuration Descriptions of Mission Planner

Connect  flight  control  board  to  MP,  Select  [Full  Parameter  List]  in  the  left  from  the  below  bar [CONFIG/TUNING] . Find and modify following parameters:

SERIAL4_PROTOCOL = 9 (LiDAR)

SERIAL4_BAUD = 115

Upon setting of these parameters, the other parameters should be same as Mission Planner configuration description of TF-Luna for the purpose of Obstacle Avoidance or Altitude Holding,then click [Write Params] on the right of the software to finish.

Read more…

TF-Luna can be used with PixHawk1 for the purpose of obstacle avoidance and Altitude Hold. But because it’s a short range sensor so in most cases it is used for obstacle avoidance.

  1. TF-Luna Settings:
  2. Note: If there are any spikes while using the LiDAR as obstacle avoidance sensor then it is advised to change the frame rate to 250Hz, see the command details having command ID as 0x03 in the manual and for the sake of convenience configuring other parameters (like setting frame-rate, changing address etc.) in UART mode is recommended if you don’t have IIC-USB converter. A simple UART-USB adapter or board should work.

At the time of writing this document latest firmware was 3.3.0. For firmware upgrade please contact our technical support.

The default communication of TF-Luna is UART. LiDAR comes with a single cable. In order to use IIC, the cable needs a little modification, details are mentioned in the coming paragraph. Please see TF-Luna IIC communication pin details as below:

 10995528260?profile=RESIZE_710x

 

If we look at the pin configuration of TF-Luna, IIC can be set by grounding pin-5 in addition to the other four pins. For this purpose a customized cable is needed because in IIC mode we need to connect both pin-4 and pin-5 to the ground.

The modified cable is shown below. I have connected green wire (pin-4) and blue wire (pin-5) to single pin which will go to the GND pin of the source. Leave pin-6 connected. Please ignore the color standard in this case as black wire represents RXD/SDA while yellow wires represents TXD/SCL, just follow the pin numbering according to the user-manual.   

 10995528097?profile=RESIZE_710x

 

TF-Luna, TFmini-S, TFmini-Plus and TF02-Pro can be interfaced with IIC port of PixHak1 flight controller. Their settings are almost same. We take two TF-Luna LiDARs as example and set the address 0x08 and 0x09 separately.

  1. PixHawk Connection:

 We take PixHawk1 flight controller as an example:

10995530287?profile=RESIZE_710x

Figure 1: Schematic Diagram of Connecting TF-Luna to I2C Interface of PixHawk

Note:

  1. Default cable sequence of TF-Luna and PixHawk are different, please change it accordingly (SDA and SCL wires need to be interchanged). Look at the pinout of controller, pin configurations are starting from left to right:

 10995529253?profile=RESIZE_710x

  1. IIC connector should be purchased by user
  2. If TF-Luna faces down, please take care the distance between lens and ground, it should be larger than TF-Luna’s blind zone (20cm)
  3. If more TF-Luna need to be connected (10 LiDARs are supported), the method is same.
  4. Power source should meet the product manual demands:5V±0.5V, larger than 150mA (peak current)*number of TF-Luna
  5. Parameters settings:

Common settings:

AVOID_ENABLE= 2 [if 3 = UseFence and UseProximitySensor doesn’t work in IIC then choose 2 = UseProximitySensor]

AVOID_MARGIN=4

PRX_TYPE=4

Settings for first TF-Luna:

RNGFND1_ADDR=08 [Address of #1 TF-Luna in decimal]

RNGFND1_GNDCLEAR=25 [Unit: cm, depending upon mounting height of the module and should be larger LiDAR than non-detection zone]

RNGFND1_MAX_CM=400 [It could be changed according to real demands but should be smaller than
effective measure range of LiDAR, unit is cm] 

RNGFND1_MIN_CM=30 [It could be changed according to real demands and should be larger than
LiDAR non-detection zone, unit is cm] 

RNGFND1_ORIENT=0 [#1 TF-Luna real orientation]

RNGFND1_TYPE = 25 [TF-Luna IIC same as TFmini-Plus IIC]

 

Settings for second TF-Luna:

RNGFND2_ADDR=09 [Address of #2 TF-Luna in decimal]

RNGFND2_GNDCLEAR=25

RNGFND2_MAX_CM=400

RNGFND2_MIN_CM=30

RNGFND2_ORIENT=25 [#2 TF-Luna real orientation]

RNGFND2_TYPE=25 [TF-Luna IIC same as TFmini-Plus IIC]

Upon setting of these parameters, click [Write Params] on the right of the software to finish the process.

If the error message “Bad LiDAR Health” or “Bad Proximity” appears, please check if the connection is correct and the power supply is normal.

How to see the target distance from the LiDAR: press Ctrl+F button in keyboard, the following window will pop out:

 10995530864?profile=RESIZE_710x

 

Click button Proximity, the following window will appear:

 10995530899?profile=RESIZE_710x

The number in green color means the distance from LiDAR in obstacle avoidance mode(the number only refresh when this window opens, closes, zooms in or zooms out, it doesn’t mean the real time distance from LiDAR and will not be influenced in Mission Planner The mission planner version at the time of writing this tutorial was v1.3.76.

Read more…

TF03 standard version comes with CAN interface and can be interfaced with PixHawk1 CAN port or any flight controller which has Ardupilot firmware flashed and having CAN interface. Support for CAN protocol has been added to Ardupilot firmwares, starting from Copter 4.2.0 for the purpose of obstacle avoidance and Altitude Hold.

  1. 1.  TF03-CANSettings:

It should be noted that TF03 has two different hardware versions for 485/RS232 and UART/CAN. So when  buying  LiDAR,  please  pay  attention  to  buy  LiDAR  with  CAN  interface  (standard  version). Multiple LiDARs can be interfaced to a single CAN bus. We need to assign different CAN IDs to each LiDAR just like we do for IIC communication. The baud-rate of each LiDAR needs to be set to the same value. On LiDAR side we have two types of CAN IDs:

    Send ID (Transmit CAN ID): it becomes Receive ID on CAN bus side (we need to set this ID

to a new value ifwe are connecting multiple LiDARs.)

    Receive ID: it becomes Send ID on CAN bus side

I will consider three LiDARs example but Ardupilot supports up to  10 sensors. The commands are mentioned in details in the manual of LiDAR but I will add them here for convenience. It is still advised to read the manual of LiDAR carefully there are important points.

5A 08 50 04 00 00 00 B6 [CHANGE SEND ID TO 04]

5A 08 50 05 00 00 00 B7 [CHANGE SEND ID TO 05]

5A 08 50 06 00 00 00 B8 [CHANGE SEND ID TO 06]

5A 05 45 02 A6 [CHANGE INTERFACE TO CAN]

5A 04 11 6F [SAVE SETTINGS]

5A 08 50 03 00 00 00 B5 [CHANGE RECEIVING ID BACK TO 03]

Some details about terminating resistor on LiDAR: Terminating resistor on LiDAR is connected by default, utilizing this resistor helps in reducing equivalent resistance of transmission wires, because adding more resistors in parallel will reduce the equivalent resistance. I have tested with total five LiDARs with all LiDARs having resistors enabled.

For sending the above commands, in case you dont have CAN analyzer and only have TTL-USB adapter, it is suggested that first configure the IDs and then switch the interface from UART to CAN because if you first switch interface then you cant use UART interface of LiDAR. In that case you have to use CAN analyzer to set different IDs. 

Once you are done with above settings then it’s time to move to physical connection and Ardupilot firmware settings.

We take three TF03-CAN as an example in this passage and set the addresses to 0x03 and 0x04 and 0x05 separately. The default sending ID of LiDAR is 0x03 so leave it for one LiDAR and configure for other two LiDARs to 0x04 and 0x05.

  1. 2.PixHawkConnection:

The following diagram shows how to interface TF03-CAN with PixHawk flight controller.

 10995521688?profile=RESIZE_710x

 

 

Figure 1: Schematic Diagram of Connecting TF03 to CAN Interface ofPixHawk1

Note

  1. 1.   Pleasepayattention to connect correct wire to correct pin of flight controller. Look at the pinout of controller, pin configurations are starting from left to right:

 10995522462?profile=RESIZE_400x

Figure 2: Pin details of CAN Interface ofPixHawk1

  1. 2.   Relatedconnectorsneed to be purchased by user, LiDAR connector is 7-pin JST with25mm pitch.
  2. 3.   IfLiDARfaces down, please take care the distance between lens and ground, it should be larger than LiDAR’s blind zone ( 10cm).
  3. 4.   IfmoreLiDARs need to be connected ( 10 LiDARs can be connected), the method is same.
  4.   Powersourceshould meet the product manual current and voltage requirement: 5V to 24V, larger than 150mA*number of LiDAR. I used 12V supply just for reference.
  5. 3.  Parameterssettings:

Common settings for obstacle avoidance :

AVOID_ENABLE = 3 [if 3 = UseFence and UseProximitySensor doesn’t work in IIC then choose 2 =

UseProximitySensor]

AVOID_MARGIN = 4

PRX_TYPE = 4

Settings for CAN-1 port:

CAN_P1_DRIVER = 1

CAN_D1_PROTOCOL = 11

CAN_P1_BITRATE = [Baud-rate: For TF03 the baud-rate needs to be set to 1000000.]

In case of pixhawk1 we only have one CAN interface but if there are more than one interfaces then configure the parameters for CAN-2 interface. 

Settings for CAN-2 port:

CAN_P2_DRIVER = 1

CAN_D2_PROTOCOL = 11

CAN_P2_BITRATE = [Baud-rate: For TF03 the baud-rate needs to be set to 1000000.] 

Settings for first TF03:

RNGFND1_RECV_ID = 3 [CAN Transmit ID of #1 TF03 in decimal]

RNGFND1_GNDCLEAR=15 [Unit: cm, depending upon mounting height of the module and should be larger LiDAR than non-detection zone. This parameter is required to be configured for altitude hold, it is the installation height of LiDAR from ground.]

RNGFND1_MAX_CM = 400 [It could be changed according to real demands but should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND1_MIN_CM=30 [It could be changed according to real demands and should be larger than LiDAR non-detection zone, unit is cm]

RNGFND1_ORIENT=0 [#1 TF03 real orientation]

RNGFND1_TYPE = 34 [TF03 same as TF02-i and TFmini-i CAN] 

Settings for second TF03:

RNGFND2_RECV_ID = 4 [CAN Transmit ID of #2 TF03 in decimal]

RNGFND2_MAX_CM=400 

RNGFND2_MIN_CM=30

RNGFND2_ORIENT = 6 [#2 TF03 real orientation]

RNGFND2_TYPE = 34 [TF03 same as TF02-i and TFmini-i CAN] 

Settings for third TF03:

RNGFND3_RECV_ID = 5 [CAN Transmit ID of #3 TF03 in decimal]

RNGFND3_MAX_CM=400 

RNGFND3_MIN_CM=30

RNGFND3_ORIENT = 4 [#3 TF03 real orientation]

RNGFND3_TYPE = 34 [TF03 same as TF02-i and TFmini-i CAN] 

Upon setting of these parameters, click [Write Params] on the right of the software to finish.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct and the power supply is normal. Please turn-off completely the flight controller after configuring the parameters, otherwise changes will not take place. If your battery is connected to your flight controller, please disconnect it as well.

How to see the target distance from the LiDAR: press Ctrl+F button in keyboard, the following window will pop out:

 10995523652?profile=RESIZE_710x

 Click button Proximity, the following window will appear:

 10995523853?profile=RESIZE_584x

The number in green color means the distance from LiDAR in obstacle avoidance mode the number refreshes when the distance changes or window opens, closes, zooms in or zooms out, and this distance will not be influenced in Mission Planner, the version used at the time writing this tutorial is v1.3.72.

Altitude Hold using CAN Interface:

Let say we use fourth LiDAR for the purpose of Altitude Hold. Connect the flight control board to mission planar, Select [Full Parameter List] in the left from the below bar-[CONFIG/TUNING]. Find and modify the following parameters:

PRX_TYPE = 0 [on equal to 4 also gives the value if RNGFND4_ORIENT = 25]

RNGFND4_RECV_ID = 6 [CAN Transmit ID of #4 TF03 in decimal]

RNGFND4_GNDCLEAR = 15 [Unit: cm, depending upon mounting height of the module and should be larger LiDAR than non-detection zone. This parameter is required for Altitude Hold.]

RNGFND4_MAX_CM = 400 [It could be changed according to real demands but should be smaller than effective measure range of LiDAR, unit is cm]

RNGFND4_MIN_CM = 30 [It could be changed according to real scenario and should be larger than LiDAR non-detection zone, unit is cm]

RNGFND4_ORIENT = 25 [#4 TF03 real orientation]

RNGFND4_TYPE = 34 [TF03 same as TF02-i and TFmini-i CAN]

Upon setting of these parameters, click [Write Params] on the right of the software to finish.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct and the power supply is normal.

Select option sonarrange, see following picture:

 10995523879?profile=RESIZE_710x

 

The altitude distance from the LiDAR will be displayed in Sonar Range (meters), see the following

picture:

 10995523891?profile=RESIZE_180x180

Read more…

Note: This document is applicable to Cube Orange and Cube Black flight controllers. The IIC interface available that can be used to connect multiple TF-Lunas is the same on both flight controllers. TF-Luna can be used with PixHawk Cube for the purpose of obstacle avoidance and Altitude Hold. But because it’s a short range sensor so in most cases it is used for obstacle avoidance.

  1. TF-Luna Settings:

Note: If there are any spikes while using the LiDAR as obstacle avoidance sensor then it is advised to change the frame rate to 250Hz, see the command details having command ID as 0x03 in the manual and for the sake of convenience configuring other parameters (like setting frame-rate, changing address etc.) in UART mode is recommended if you don’t have IIC-USB converter. A simple UART-USB adapter or board should work.

At the time of writing this document latest firmware was 3.3.0. For firmware upgrade please contact our technical support.

The default communication of TF-Luna is UART. LiDAR comes with a single cable. In order to use IIC the cable needs a little modification, details are mentioned in the coming paragraph. Please see TF-Luna IIC communication pin details as below:

10972789873?profile=RESIZE_710x

 

If we look at the pin configuration of TF-Luna, IIC can be set by grounding pin-5 in addition to the other four pins. For this purpose a customized cable is needed because in IIC mode we need to connect both pin-4 and pin-5 to the ground.

The modified cable is shown below. I have connected green wire (pin-4) and blue wire (pin-5) to single pin which will go to the GND pin of the source. Leave pin-6 connected. Please ignore the color standard in this case as black wire represents RXD/SDA while yellow wires represents TXD/SCL, just follow the pin numbering according to the user-manual.   

 10972790082?profile=RESIZE_710x

  

TF-Luna, TFmini-S, TFmini-Plus and TF02-Pro can be interfaced with IIC port of PixHak Cube Orange flight controller. Their settings are almost same. We take two TF-Luna LiDARs as example and set the addresses 0x08 and 0x09 separately.

  1. PixHawk Cube Connection:

We take PixHawk Cube Orange flight controller as an example:

 10972790471?profile=RESIZE_710x

 Figure 1: Schematic Diagram of Connecting TF-Luna to I2C Interface of PixHawk Cube

Note:

  1. Default cable sequence of TF-Luna and PixHawk Cube are different, please change it accordingly (SDA and SCL wires need to be interchanged). Look at the pinout of controller, pin configurations are:

10972790669?profile=RESIZE_710x

  1. IIC connector should be purchased by user
  2. If TF-Luna faces down, please take care the distance between lens and ground, it should be larger than TF-Luna’s blind zone (20cm)
  3. If more TF-Lunas need to be connected (10 LiDARs are supported), the method is same.
  4. Power source should meet the product manual demands:5V±0.5V, larger than 150mA (peak current)*number of TF-Luna
  5. Parameters settings:

Select [CONFIG/TUNING] and then click on [Full Parameter List] in the left from the below bar. Find and modify the following parameters.

Common settings:

AVOID_ENABLE= 2 [if 3 = UseFence and UseProximitySensor doesn’t work in IIC then choose 2 = UseProximitySensor]

AVOID_MARGIN=4

PRX_TYPE=4

Settings for first TF-Luna:

RNGFND1_ADDR=08 [Address of #1 TF-Luna in decimal]

RNGFND1_GNDCLEAR=25 [Unit: cm, depending upon mounting height of the module and should be larger LiDAR than non-detection zone]

RNGFND1_MAX_CM=400 [It could be changed according to real demands but should be smaller than
effective measure range of LiDAR, unit is cm] 

RNGFND1_MIN_CM=30 [It could be changed according to real demands and should be larger than
LiDAR non-detection zone, unit is cm] 

RNGFND1_ORIENT=0 [#1 TF-Luna real orientation]

RNGFND1_TYPE = 25 [TF-Luna IIC same as TFmini-Plus IIC]

 

Settings for second TF-Luna:

RNGFND2_ADDR=09 [Address of #2 TF-Luna in decimal]

RNGFND2_GNDCLEAR=25

RNGFND2_MAX_CM=400

RNGFND2_MIN_CM=30

RNGFND2_ORIENT= 6 [#2 TF-Luna real orientation]

RNGFND2_TYPE=25 [TF-Luna IIC same as TFmini-Plus IIC]

Upon setting of these parameters, click [Write Params] on the right of the software to finish the process. After writing the parameters you need to power off the controller and then turn it on to apply the setting changes. If the error message “Bad LiDAR Health” or “Bad Proximity” appears, please check if the connection is correct and power supply is normal. How to see the target distance from the LiDAR: press Ctrl+F button in keyboard, the following window will pop out:

And click button Proximity, the following window will appear:10972790863?profile=RESIZE_710x

 

The number in green color means the distance from LiDAR in obstacle avoidance mode(the number only refresh when this window opens, closes, zooms in or zooms out, it doesn’t mean the real time distance from LiDAR and will not be influenced in Mission Planner. The mission planner version at the time of writing this tutorial was v1.3.76.

Read more…