Skip to content

Commit 66f2f8e

Browse files
committed
Update docs for xgzp68xx component.
1 parent c891afd commit 66f2f8e

File tree

1 file changed

+51
-12
lines changed

1 file changed

+51
-12
lines changed

components/sensor/xgzp68xx.rst

Lines changed: 51 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,56 @@
1-
CFSensor XGZP68xx Series Differential Pressure Sensor
2-
=====================================================
1+
CFSensor XGZP68xx Non-C Series Differential Pressure Sensor
2+
===========================================================
33

44
.. seo::
5-
:description: Instructions for setting up the CFSensor XGZP68xx Series Differential Pressure sensor.
5+
:description: Instructions for setting up the CFSensor XGZP68xx Non-C Series Differential Pressure sensor.
66
:image: 6897d.jpg
77
:keywords: XGZP68xx, XGZP6897, XGZP6899, XGZP6899D, XGZP6897D
88

9-
The XGZP68xx Differential Pressure sensor allows you to use digital differential pressure sensors such as the 6899D
10-
(`datasheet <https://cfsensor.com/wp-content/uploads/2022/11/XGZP6899D-Pressure-Sensor-V2.8.pdf>`__) or
11-
6897D Series (`datasheet <https://cfsensor.com/wp-content/uploads/2022/11/XGZP6897D-Pressure-Sensor-V2.7.pdf>`__)
12-
sensors with ESPHome. The sensors pressure ranges are specified in the datasheets.
9+
CFSensor makes multiple generations of sensors with identical model numbers such as the 6899D or
10+
6897D, but unfortunately with completely different I²C interfaces. You can identify which from
11+
the part number:
1312

14-
Calibrating the sensor can be done by checking the value that is returned when
15-
the ports are open to the air. This value should be 0. If it is not, you can use the offset option to correct the
13+
- XGZP6897D001KPDPN is the non-C series, which this component supports.
14+
- XGZP6897D\ **C**\ 001KPDPN is the C series, which this component does NOT support.
15+
16+
Another way of telling the difference is the I²C address:
17+
18+
- If the device is one of the non-C series, it appears at I²C address ``0x6d``.
19+
- If the device is one of the C series, it appears at I²C address ``0x58``.
20+
21+
Unfortunately CFSensor have removed from their website the datasheets for the non-C series of sensors.
22+
You will need to specifically find the older datasheet from another source. **The v3.1 or
23+
later datasheets from CFSensor describe the C series which is a completely different device
24+
even though it has an identical model number to the <= v3.0 device**.
25+
26+
The sensors come in a series of pressure ranges. The now hard to find datasheet lists
27+
a table of pressure ranges to ``k_value``, which you will need to set in your configuration:
28+
29+
- -0.5 kPa to +0.5 kPa (``k_value = 16384``)
30+
- -1 kPa to +1 kPa (``k_value = 8192``)
31+
- -2.5 kPa to +2.5 kPa (``k_value = 2048``)
32+
- -5 kPa to +5 kPa (``k_value = 1024``)
33+
- -10 kPa to +10 kPa (``k_value = 512``)
34+
- -50 kPa to +50 kPa (``k_value = 128``)
35+
36+
On power up, the sensor will read an offset. You will need to calibrate the sensor which can be done
37+
by checking the value that is returned when the ports are open to the air. You can use the offset option to correct the
1638
reading. For example, if your sensor is reading -40Pa when the ports are disconnected, you can set the offset to 40.
1739

40+
If the sensor is running for a time, you will find that the zero point does drift after a while,
41+
especially if the sensor is used to detect pressure shocks.
42+
Designing in a way to periodically equalise the pressure between the ports so a new offset can be
43+
determined would be wise.
44+
45+
This non-C generation of XGZP68xx sensors is now available at a very good price from the usual
46+
sources — indeed currently nothing comes close in terms of bang for the buck for differential
47+
pressure sensors. Be aware that when air is moving, turbulence generates quite a bit more noise
48+
than the datasheet suggests. For a 9 m/sec air flow at less than 100 Pa pressure difference,
49+
2% *per port* seems typical, so if both high and low ports are
50+
connected then a total 4% noise would result. For a sensor range -500 Pa to +500 Pa, that means
51+
readings bounce around by +/- 20 Pa which is a significant fraction of a 100 Pa total pressure
52+
difference.
53+
1854
.. figure:: images/6897d.jpg
1955
:align: center
2056
:width: 30.0%
@@ -31,11 +67,13 @@ To use the sensor, set up an :ref:`I²C Bus <i2c>` and connect the sensor to the
3167
# Example configuration entry
3268
# It uses a filter offset to calibrate the sensor
3369
sensor:
34-
- platform: xgzp68xx
70+
- platform: xgzp68xx_v2
71+
k_value: 16384
3572
temperature:
3673
name: "Temperature"
3774
pressure:
3875
name: "Differential Pressure"
76+
oversampling: "32768x"
3977
filters:
4078
- offset: 40.5
4179
@@ -44,13 +82,14 @@ Configuration variables:
4482

4583
- **temperature** (*Optional*): All options from :ref:`Sensor <config-sensor>`.
4684
- **pressure** (*Optional*): All options from :ref:`Sensor <config-sensor>`.
47-
- **k_value** (*Optional*, int): The K value comes from the datasheet. It will default to 4096 if not specified, which is appropriate for a sensor with a range of +/- 0.5kPa.
85+
- **oversampling** (*Optional*): One of ``256x``, ``512x``, ``1024x``, ``2048x``, ``4096x``, ``8192x``, ``16384x``, ``32768x``. It is not possible to disable oversampling. If not specified, this defaults to ``4096x``.
86+
- **k_value** (*Optional*, int): The K value comes from the table above. It will default to 4096 if not specified.
4887
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
4988

5089

5190
See Also
5291
--------
5392
- `esphome-pressure device <https://github.com/gcormier/esphome-pressure/>`__
5493
- :ref:`sensor-filters`
55-
- :apiref:`sdp3x/sdp3x.h`
94+
- :apiref:`xgzp6xx_v2/xgzp6xx_v2.h`
5695
- :ghedit:`Edit`

0 commit comments

Comments
 (0)