mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-02-01 23:21:29 +01:00
Add docs for CT Clamp (#256)
* Add docs for CT Clamp * Fix title bar * Fix reference * 2 many changes * Update docs for new configuration * Compress index image * Update for config changes - Also remove 3.3V message, because if the user needs to calibrate anyway, then the 3.3V is also part of the calibration process. - Use calibrate_linear instead of multiply, more user-friendly - Update SEO image - Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
parent
7a78abb560
commit
961bf33861
82
components/sensor/ct_clamp.rst
Normal file
82
components/sensor/ct_clamp.rst
Normal file
@ -0,0 +1,82 @@
|
||||
CT Clamp Current Sensor
|
||||
=======================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up ct clamp sensors.
|
||||
:image: ct_clamp.jpg
|
||||
|
||||
The Current Transformer Clamp (``ct_clamp``) sensor allows you to hook up a CT Clamp to an analog
|
||||
voltage sensor (like the :doc:`ADC sensor <adc>`) and convert the readings to measured single phase AC current.
|
||||
|
||||
First, you need to set up a voltage sensor source (:doc:`ADC sensor <adc>`, but for example also
|
||||
:doc:`ADS1115 <ads1115>`) and pass it to the CT clamp sensor with the ``sensor`` option.
|
||||
|
||||
Please also see `this guide <https://learn.openenergymonitor.org/electricity-monitoring/ct-sensors/introduction>`__
|
||||
as an introduction to the working principle of CT clamp sensors and how to hook them up to your device.
|
||||
|
||||
.. figure:: images/ct_clamp-ui.png
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
sensor:
|
||||
- platform: ct_clamp
|
||||
sensor: adc_sensor
|
||||
name: "Measured Current"
|
||||
update_interval: 60s
|
||||
|
||||
# Example source sensor
|
||||
- platform: adc
|
||||
pin: A0
|
||||
id: adc_sensor
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **name** (**Required**, string): The name of the sensor.
|
||||
- **sensor** (**Required**, :ref:`config-id`): The source sensor to measure voltage values from.
|
||||
- **sample_duration** (*Optional*, :ref:`config-time`): The time duration to sample the current clamp
|
||||
with. Higher values can increase accuracy. Defaults to ``200ms`` which would be 10 whole cycles on a 50Hz system.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval
|
||||
to check the sensor. Defaults to ``60s``.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
Calibration
|
||||
-----------
|
||||
|
||||
This sensor needs calibration to show correct values, for this you can use the
|
||||
:ref:`calibrate_linear <sensor-filter-calibrate_linear>` sensor filter. First, hook up a known
|
||||
current load like a lamp that uses a known amount of current.
|
||||
|
||||
Then switch it on and see what value the CT clamp sensor reports. For example in the configuration below
|
||||
a 4.0 A device is showing a value of 0.1333 in the logs. Now go into your configuration file
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
sensor:
|
||||
- platform: ct_clamp
|
||||
sensor: adc_sensor
|
||||
name: "Measured Current"
|
||||
update_interval: 60s
|
||||
filters:
|
||||
# Measured value of 0 maps to 0A
|
||||
- 0 -> 0
|
||||
# Known load: 4.0A
|
||||
# Value shown in logs: 0.1333A
|
||||
- 0.1333 -> 4.0
|
||||
|
||||
Recompile and upload, now your CT clamp sensor is calibrated!
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- `EMonLib <https://github.com/openenergymonitor/EmonLib>`__
|
||||
- `CT Clamp Guide <https://learn.openenergymonitor.org/electricity-monitoring/ct-sensors/introduction>`__
|
||||
- :doc:`adc`
|
||||
- :doc:`ads1115`
|
||||
- :apiref:`sensor/ct_clamp.h`
|
||||
- :ghedit:`Edit`
|
BIN
components/sensor/images/ct_clamp-ui.png
Normal file
BIN
components/sensor/images/ct_clamp-ui.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
images/ct_clamp.jpg
Normal file
BIN
images/ct_clamp.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.8 KiB |
@ -99,6 +99,7 @@ Sensor Components
|
||||
BMP280, components/sensor/bmp280, bmp280.jpg
|
||||
CCS811, components/sensor/ccs811, ccs811.jpg
|
||||
CSE7766, components/sensor/cse7766, cse7766.svg
|
||||
CT Clamp, components/sensor/ct_clamp, ct_clamp.jpg
|
||||
Dallas, components/sensor/dallas, dallas.jpg
|
||||
DHT, components/sensor/dht, dht.jpg
|
||||
DHT12, components/sensor/dht12, dht12.jpg
|
||||
|
Loading…
Reference in New Issue
Block a user