Skip to content

Commit b9e962b

Browse files
committed
[tfluna] New component for the TF-Luna Low Cost LiDAR Distance Sensor
1 parent e3335db commit b9e962b

File tree

4 files changed

+99
-0
lines changed

4 files changed

+99
-0
lines changed

components/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ Distance
302302
HRXL MaxSonar WR, components/sensor/hrxl_maxsonar_wr, hrxl_maxsonar_wr.jpg, Acoustic distance
303303
JSN-SR04T, components/sensor/jsn_sr04t, jsn-sr04t-v3.jpg, Acoustic distance
304304
TOF10120, components/sensor/tof10120, tof10120.jpg, IR optical distance
305+
TF-Luna, components/sensor/tfluna, tfluna.jpg, IR optical distance
305306
Ultrasonic Sensor, components/sensor/ultrasonic, ultrasonic.jpg, Acoustic distance
306307
VL53L0x, components/sensor/vl53l0x, vl53l0x.jpg, IR optical distance
307308
Zio Ultrasonic Sensor, components/sensor/zio_ultrasonic, zio_ultrasonic.jpg, Acoustic distance

components/sensor/images/tfluna.jpg

21.1 KB
Loading

components/sensor/tfluna.rst

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
TF-Luna LiDAR Distance Sensor
2+
=======================================
3+
4+
.. seo::
5+
:description: Instructions for setting up TF-Luna distance sensors in ESPHome.
6+
:image: tfluna.jpg
7+
:keywords: tfluna
8+
9+
Component/Hub
10+
-------------
11+
.. _tfluna-component:
12+
13+
The ``tfluna`` sensor platform allows you to use TF-Luna distance sensor (`datasheet <https://files.waveshare.com/upload/a/ac/SJ-PM-TF-Luna_A05_Product_Manual.pdf>`__)
14+
with ESPHome to measure distances. The sensor works optically by emitting short infrared pulses
15+
and measuring the time it takes the light to be reflected back.
16+
17+
The sensor can measure distances in range 20-800 centimeters, though that figure depends significantly
18+
on several conditions like surface reflectance, field of view, temperature etc. .
19+
20+
The :ref:`I²C Bus <i2c>` is
21+
required to be set up in your configuration for this sensor to work.
22+
23+
.. figure:: images/tfluna.jpg
24+
:align: center
25+
:width: 50.0%
26+
27+
TF-Luna Time Of Flight Distance Sensor.
28+
29+
.. code-block:: yaml
30+
31+
# Example configuration entry
32+
tfluna:
33+
34+
Configuration variables:
35+
------------------------
36+
37+
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
38+
sensor. Defaults to ``60s``.
39+
- **address** (*Optional*, int): Manually specify the I^2C address of the sensor. Defaults to ``0x10``.
40+
- All other options from :ref:`Sensor <config-sensor>`.
41+
42+
Sensor
43+
------
44+
45+
The ``tfluna`` sensor allows you to use your :doc:`tfluna` to perform different
46+
measurements.
47+
48+
.. code-block:: yaml
49+
50+
sensor:
51+
- platform: tfluna
52+
distance:
53+
name: Distance
54+
signal_strength:
55+
name: Signal Strength
56+
temperature:
57+
name: TF-Luna Temperature
58+
59+
.. _tfluna-sensors:
60+
61+
Configuration variables:
62+
************************
63+
64+
- **distance** (*Optional*, int): Distance in cm.
65+
All options from :ref:`Sensor <config-sensor>`.
66+
- **signal_strength** (*Optional*, int): Signal strength. If lower than 100, the range value is considered not reliable. If over 30000, there is an ambient light overexposure, for instance, when the sensor faces the sun outside.
67+
All options from :ref:`Sensor <config-sensor>`.
68+
- **temperature** (*Optional*, float): Sensor temperature in degrees Celsius.
69+
All options from :ref:`Sensor <config-sensor>`.
70+
- **tfluna_id** (*Optional*, :ref:`config-id`): Manually specify the ID for the :doc:`tfluna` component if you are using multiple components.
71+
72+
73+
Text Sensor
74+
-----------
75+
76+
The ``tfluna`` text sensor allows you to get information about your :doc:`tfluna`.
77+
78+
.. code-block:: yaml
79+
80+
text_sensor:
81+
- platform: tfluna
82+
version:
83+
name: "firmware version"
84+
85+
Configuration variables:
86+
************************
87+
88+
- **version** (*Optional*): The firmware version.
89+
All options from :ref:`Text Sensor <config-text_sensor>`.
90+
- **tfluna_id** (*Optional*, :ref:`config-id`): Manually specify the ID for the :doc:`tfluna` component if you are using multiple components.
91+
92+
See Also
93+
--------
94+
95+
- :ref:`sensor-filters`
96+
- :apiref:`tfluna/tfluna.h`
97+
- :ghedit:`Edit`
98+

images/tfluna.jpg

21.1 KB
Loading

0 commit comments

Comments
 (0)