2018-06-02 23:36:38 +02:00
|
|
|
ESP32 Hall Sensor
|
|
|
|
=================
|
|
|
|
|
2018-11-14 22:12:27 +01:00
|
|
|
.. seo::
|
|
|
|
:description: Instructions for setting up the integrated hall-effect sensor of the ESP32.
|
2021-11-16 03:19:33 +01:00
|
|
|
:image: magnet.svg
|
2018-11-14 22:12:27 +01:00
|
|
|
:keywords: esp32, hall
|
|
|
|
|
2018-06-02 23:36:38 +02:00
|
|
|
The ``esp32_hall`` sensor platform allows you to use the integrated
|
|
|
|
`hall effect sensor <https://en.wikipedia.org/wiki/Hall_effect_sensor>`__ of the
|
|
|
|
ESP32 chip to measure the magnitude and direction of magnetic field around the
|
|
|
|
chip (with quite poor accuracy).
|
|
|
|
|
|
|
|
Please make sure that nothing is connected to pins ``GPIO36`` and ``GPIO39`` if this
|
|
|
|
component is enabled, as those pins are used for the internal low-noise amplifier used
|
|
|
|
by the hall sensor.
|
|
|
|
|
|
|
|
.. figure:: images/esp32_hall-ui.png
|
|
|
|
:align: center
|
|
|
|
:width: 80.0%
|
|
|
|
|
2018-11-19 18:32:16 +01:00
|
|
|
.. code-block:: yaml
|
2018-06-02 23:36:38 +02:00
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
sensor:
|
|
|
|
- platform: esp32_hall
|
|
|
|
name: "ESP32 Hall Sensor"
|
2019-01-06 18:56:14 +01:00
|
|
|
update_interval: 60s
|
2018-06-02 23:36:38 +02:00
|
|
|
|
|
|
|
Configuration variables:
|
2018-08-24 22:44:01 +02:00
|
|
|
------------------------
|
2018-06-02 23:36:38 +02:00
|
|
|
|
|
|
|
- **name** (**Required**, string): The name of the hall effect sensor.
|
|
|
|
- **update_interval** (*Optional*, :ref:`config-time`): The interval
|
2019-01-06 18:56:14 +01:00
|
|
|
to check the sensor. Defaults to ``60s``.
|
2018-06-02 23:36:38 +02:00
|
|
|
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
2019-02-17 12:28:17 +01:00
|
|
|
- All other options from :ref:`Sensor <config-sensor>`.
|
2018-06-02 23:36:38 +02:00
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
|
|
|
The values this sensor outputs were only calibrated with a few magnets and no real "truth" sensor.
|
|
|
|
Therefore the values could very well be off by orders of magnitude. Besides, this sensor should
|
|
|
|
only be used to detect sudden high changes in the magnetic field.
|
|
|
|
|
2019-02-16 23:25:23 +01:00
|
|
|
If you have a real magnetic field calibration setup and want to contribute your values to ESPHome,
|
2018-06-02 23:36:38 +02:00
|
|
|
please feel free to do so 😺.
|
|
|
|
|
|
|
|
See Also
|
2018-08-24 22:44:01 +02:00
|
|
|
--------
|
2018-06-02 23:36:38 +02:00
|
|
|
|
|
|
|
- :ref:`sensor-filters`
|
|
|
|
- :doc:`adc`
|
2019-02-07 13:54:45 +01:00
|
|
|
- :doc:`/devices/esp32`
|
2019-05-12 22:44:59 +02:00
|
|
|
- :apiref:`esp32_hall/esp32_hall.h`
|
2019-02-07 13:54:45 +01:00
|
|
|
- :ghedit:`Edit`
|