Cleaned up ESP32 DAC docs (#618)
* Update esp32_dac.rst * Clean up description and add use cases * Format Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
This commit is contained in:
parent
c5fb0b194a
commit
abe3fe2a7d
|
@ -5,9 +5,14 @@ ESP32 DAC
|
|||
:description: Instructions for setting up ESP32 digital-to-analog converter.
|
||||
:image: dac.svg
|
||||
|
||||
The ESP32 DAC platform allows you to output arbitrary voltages using the 8-bit DAC on the ESP32. Two pins are supported: GPIO25 (Channel 1) and GPIO26 (Channel 2).
|
||||
The ESP32 DAC platform allows you to output analog voltages using the 8-bit digital-to-analog
|
||||
converter of the ESP32. Unlike the :doc:`/components/output/ledc`, which can simulate an analog
|
||||
signal by using a fast switching frequency, the hardware DAC can output a *real* analog signal with
|
||||
no need for additional filtering.
|
||||
|
||||
The output level is a percentage of VCC (3.3V).
|
||||
The DAC spans across two pins, each on its own channel: GPIO25 (Channel 1) and GPIO26 (Channel 2).
|
||||
|
||||
The output level is a percentage of the board supply voltage (VDD_A) - generally this will be 3.3V.
|
||||
|
||||
|
||||
.. code-block:: yaml
|
||||
|
@ -29,10 +34,21 @@ The output level is a percentage of VCC (3.3V).
|
|||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin to use DAC on. Only GPIO25 and GPIO26 are supported.
|
||||
- **pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin to use DAC on. Only GPIO25
|
||||
and GPIO26 are supported.
|
||||
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
|
||||
- All other options from :ref:`Output <config-output>`.
|
||||
|
||||
Use Cases
|
||||
---------
|
||||
|
||||
- Generating a specific (and dynamic) reference voltage for an external sensor or ADC, such as the
|
||||
:doc:`/components/sensor/ads1115`
|
||||
- Controlling the bias of a transistor
|
||||
- Driving a bar graph or large amount of LEDs using an analog-controlled LED driver like the LM3914
|
||||
(`datasheet <https://www.ti.com/lit/ds/symlink/lm3914.pdf>`__); this can allow you to make tank
|
||||
level indicators, temperature gauges, and so on from a single output pin
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
|
|
Loading…
Reference in New Issue