Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document new es7210 ADC component #4534

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions components/es7210.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
ES7210
======

.. seo::
:description: Instructions for using ESPHome's ES7210 platform to configure microphone inputs.
:image: es7210.svg
:keywords: ES7210, Audio, ADC, I2S, ESP32

The ``es7210`` platform allows your ESPHome devices to use the ES7210 high performance four channels audio ADC (`datasheet <http://www.everest-semi.com/pdf/ES7210%20PB.pdf>`__).
This allows attached microphones to be used as a microphone input via :doc:`/components/microphone/i2s_audio`.
The :ref:`I²C bus <i2c>` is required in your configuration as this is used to communicate with the ES7210.

.. code-block:: yaml

# Example configuration entry
es7210:

.. _config-es7210:

Configuration variables:
------------------------
- **bits_per_sample** (*Optional*, enum): The bit depth of the audio samples. One of ``16bit``, ``24bit``, or ``32bit``. Defaults to ``16bit``.
- **sample_rate** (*Optional*, positive integer): I2S sample rate. Defaults to ``16000``.
- **mic_gain** (*Optional*, enum): The gain applied to the ADC microphones. One of ``0DB``, ``3DB``, ``6DB``, ``9DB``, ``12DB``, ``15DB``, ``18DB``, ``21DB``, ``24DB``, ``27DB``, ``30DB``, ``33DB``, ``34.5DB``, ``36DB``, or ``37.5DB``. Defaults to ``24DB``.
- **address** (*Optional*, int): The I²C address of the driver. Defaults to ``0x40``.
- **i2c_id** (*Optional*): The ID of the :ref:`I²C bus <i2c>` the ES7210 is connected to.

Configuration Examples
----------------------

**ESP32 S3 Box 3**:

.. code-block:: yaml

es7210:
id: es7210_adc
bits_per_sample: 16bit
sample_rate: 16000

i2s_audio:
- id: i2s_audio_bus
i2s_lrclk_pin: GPIO45
i2s_bclk_pin: GPIO17
i2s_mclk_pin: GPIO2

microphone:
- platform: i2s_audio
id: box_mic
sample_rate: 16000
i2s_din_pin: GPIO16
bits_per_sample: 16bit
adc_type: external

See Also
--------

- :doc:`index`
- :apiref:`es7210/es7210.h`
- :ghedit:`Edit`
1 change: 1 addition & 0 deletions images/es7210.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,13 @@ Alarm Control Panel Components
Alarm Control Panel Core, components/alarm_control_panel/index, alarm-panel.svg, dark-invert
Template Alarm Control Panel, components/alarm_control_panel/template, description.svg, dark-invert

Audio ADC Components
--------------------

.. imgtable::

ES7210, components/es7210, es7210.svg

Audio DAC Components
--------------------

Expand Down
Loading