diff --git a/components/sensor/images/jsn-sr04t-v3-mode-select-pads.jpg b/components/sensor/images/jsn-sr04t-v3-mode-select-pads.jpg new file mode 100644 index 000000000..1e3594eba Binary files /dev/null and b/components/sensor/images/jsn-sr04t-v3-mode-select-pads.jpg differ diff --git a/components/sensor/images/jsn-sr04t-v3.jpg b/components/sensor/images/jsn-sr04t-v3.jpg new file mode 100644 index 000000000..43a4847ac Binary files /dev/null and b/components/sensor/images/jsn-sr04t-v3.jpg differ diff --git a/components/sensor/jsn_sr04t.rst b/components/sensor/jsn_sr04t.rst new file mode 100644 index 000000000..700701255 --- /dev/null +++ b/components/sensor/jsn_sr04t.rst @@ -0,0 +1,66 @@ +JSN-SR04T Waterproof Ultrasonic Range Finder +============================================ + +.. seo:: + :description: Instructions for setting up JSN-SR04T waterproof ultrasonic distance sensor in ESPHome. + :image: jsn-sr04t-v3.jpg + :keywords: JSN-SR04T + +This sensor allows you to use the JSN-SR04T Waterproof Ultrasonic Range Finder **in Mode 1 and 2** +with ESPHome to measure distances. This sensor can measure +ranges between 25 centimeters and 600 centimeters with a resolution of 1 millimeter. + +Configure the JSN-SR04T for mode 1: + - **V1.0 and V2.0**: Add a 47k resistor to pad R27. + - **V3.0**: Short pad M1 or add 47k resistor to pad mode. + +Configure the JSN-SR04T for mode 2: + - **V1.0 and V2.0**: Add a 120k resistor to pad R27. + - **V3.0**: Short pad M2 or add 120k resistor to pad mode. + +.. figure:: images/jsn-sr04t-v3-mode-select-pads.jpg + :align: center + :width: 50.0% + + JSN-SR04T Waterproof Ultrasonic Range Finder Mode Select Pads. + +In mode 1 the module continuously takes measurements approximately every 100mS and outputs the distance on the TX pin at 9600 baud. +In this mode :ref:`sensor-filters` are highly recommended. + +In mode 2 the module takes a measurement only when a trigger command of 0x55 is sent to the RX pin on the module. +The module then outputs the distance on its TX pin. The frequency of the measurements can be set with the **update_interval** option. + +To use the sensor, first set up an :ref:`uart` with a baud rate of 9600 and connect the sensor to the specified pin. + +.. figure:: images/jsn-sr04t-v3.jpg + :align: center + :width: 70.0% + + JSN-SR04T Waterproof Ultrasonic Range Finder. + +.. code-block:: yaml + + # Example configuration entry + sensor: + - platform: "jsn_sr04t" + name: "Distance" + update_interval: 1s + + +Configuration variables: +------------------------ + +- **name** (**Required**, string): The name of the sensor. +- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the + sensor. Defaults to ``60s``. Not applicable in mode 1. +- **uart_id** (*Optional*, :ref:`config-id`): The ID of the :ref:`UART bus ` you wish to use for this sensor. + Use this if you want to use multiple UART buses at once. +- All other options from :ref:`Sensor `. + +See Also +-------- + +- :ref:`uart` +- :ref:`sensor-filters` +- :apiref:`jsn_sr04t/jsn_sr04t.h` +- :ghedit:`Edit` diff --git a/images/jsn-sr04t-v3.jpg b/images/jsn-sr04t-v3.jpg new file mode 100644 index 000000000..a1990876e Binary files /dev/null and b/images/jsn-sr04t-v3.jpg differ diff --git a/index.rst b/index.rst index 0ff04a26a..351b6e70e 100644 --- a/index.rst +++ b/index.rst @@ -258,7 +258,7 @@ Distance Ultrasonic Sensor, components/sensor/ultrasonic, ultrasonic.jpg, Acoustic distance VL53L0x, components/sensor/vl53l0x, vl53l0x.jpg, IR optical distance Zio Ultrasonic Sensor, components/sensor/zio_ultrasonic, zio_ultrasonic.jpg, Acoustic distance - + JSN-SR04T, components/sensor/jsn_sr04t, jsn-sr04t-v3.jpg, Acoustic distance Electricity ***********