mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-11-14 10:35:27 +01:00
88e315e0e4
* Many example yaml tidy-ups * Update components/sensor/hlw8012.rst --------- Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
170 lines
6.7 KiB
ReStructuredText
170 lines
6.7 KiB
ReStructuredText
SM2335 LED driver
|
|
==================
|
|
|
|
.. seo::
|
|
:description: Instructions for setting up SM2335 LED drivers in ESPHome.
|
|
:keywords: SM2335, SwitchBot Color Bulb W1401400
|
|
|
|
.. _sm2335-component:
|
|
|
|
Component/Hub
|
|
-------------
|
|
|
|
The SM2335 component represents a SM2335 LED driver chain in
|
|
ESPHome. Communication is done with two GPIO pins (DATA and CLK).
|
|
It is used in some smart light bulbs:
|
|
|
|
- SwitchBot Color Bulb W1401400
|
|
|
|
To use the channels of this components, you first need to setup the
|
|
global ``sm2335`` hub and give it an id, and then define the
|
|
:ref:`individual output channels <sm2335-output>`.
|
|
|
|
.. code-block:: yaml
|
|
|
|
# Example configuration entry
|
|
sm2335:
|
|
data_pin: GPIOXX
|
|
clock_pin: GPIOXX
|
|
max_power_color_channels: 9
|
|
max_power_white_channels: 9
|
|
|
|
Configuration variables:
|
|
************************
|
|
|
|
- **data_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin used for DATA.
|
|
- **clock_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin which CLK is
|
|
connected to.
|
|
- **id** (*Optional*, :ref:`config-id`): The id to use for
|
|
this ``sm2335`` component. Use this if you have multiple SM2335 chains
|
|
connected at the same time.
|
|
- **max_power_color_channels** (*Optional*, int 0-15): Adjusts the current supplied to the
|
|
color channels, higher is more power. Default is 2 per SM2335 datasheet. See table below.
|
|
- **max_power_white_channels** (*Optional*, int 0-15): Adjusts the current supplied to the
|
|
white channels, higher is more power. Default is 4 per SM2335 datasheet. See table below.
|
|
|
|
.. note::
|
|
|
|
The LED driver may be able to tolerate more power than
|
|
the bulb is designed to handle, start with lower values
|
|
and increase slowly, comparing to a stock bulb to verify
|
|
what is safe for your model.
|
|
|
|
+---------------------------------+-----------------+
|
|
| max_power_white_channels value | actual current |
|
|
+=================================+=================+
|
|
| 0 | 5 mA |
|
|
+---------------------------------+-----------------+
|
|
| 1 | 10 mA |
|
|
+---------------------------------+-----------------+
|
|
| 2 | 15 mA |
|
|
+---------------------------------+-----------------+
|
|
| 3 | 20 mA |
|
|
+---------------------------------+-----------------+
|
|
| 4 | 25 mA (default) |
|
|
+---------------------------------+-----------------+
|
|
| 5 | 30 mA |
|
|
+---------------------------------+-----------------+
|
|
| 6 | 35 mA |
|
|
+---------------------------------+-----------------+
|
|
| 7 | 40 mA |
|
|
+---------------------------------+-----------------+
|
|
| 8 | 45 mA |
|
|
+---------------------------------+-----------------+
|
|
| 9 | 50 mA |
|
|
+---------------------------------+-----------------+
|
|
| 10 | 55 mA |
|
|
+---------------------------------+-----------------+
|
|
| 11 | 60 mA |
|
|
+---------------------------------+-----------------+
|
|
| 12 | 65 mA |
|
|
+---------------------------------+-----------------+
|
|
| 13 | 70 mA |
|
|
+---------------------------------+-----------------+
|
|
| 14 | 75 mA |
|
|
+---------------------------------+-----------------+
|
|
| 15 | 80 mA |
|
|
+---------------------------------+-----------------+
|
|
|
|
+---------------------------------+-----------------+
|
|
| max_power_color_channels value | actual current |
|
|
+=================================+=================+
|
|
| 0 | 10 mA |
|
|
+---------------------------------+-----------------+
|
|
| 1 | 20 mA |
|
|
+---------------------------------+-----------------+
|
|
| 2 | 30 mA (default) |
|
|
+---------------------------------+-----------------+
|
|
| 3 | 40 mA |
|
|
+---------------------------------+-----------------+
|
|
| 4 | 50 mA |
|
|
+---------------------------------+-----------------+
|
|
| 5 | 60 mA |
|
|
+---------------------------------+-----------------+
|
|
| 6 | 70 mA |
|
|
+---------------------------------+-----------------+
|
|
| 7 | 80 mA |
|
|
+---------------------------------+-----------------+
|
|
| 8 | 90 mA |
|
|
+---------------------------------+-----------------+
|
|
| 9 | 100 mA |
|
|
+---------------------------------+-----------------+
|
|
| 10 | 110 mA |
|
|
+---------------------------------+-----------------+
|
|
| 11 | 120 mA |
|
|
+---------------------------------+-----------------+
|
|
| 12 | 130 mA |
|
|
+---------------------------------+-----------------+
|
|
| 13 | 140 mA |
|
|
+---------------------------------+-----------------+
|
|
| 14 | 150 mA |
|
|
+---------------------------------+-----------------+
|
|
| 15 | 160 mA |
|
|
+---------------------------------+-----------------+
|
|
|
|
.. _sm2335-output:
|
|
|
|
Output
|
|
------
|
|
|
|
The SM2335 output component exposes a SM2335 channel of a global
|
|
:ref:`sm2335-component` as a float output.
|
|
|
|
.. code-block:: yaml
|
|
|
|
# Individual outputs
|
|
output:
|
|
- platform: sm2335
|
|
id: output_red
|
|
channel: 1
|
|
|
|
Configuration variables:
|
|
************************
|
|
|
|
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
|
|
- **channel** (**Required**, int): Chose the channel of the SM2335 chain of
|
|
this output component.
|
|
- **sm2335_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the
|
|
:ref:`sm2335-component`.
|
|
Use this if you have multiple SM2335 chains you want to use at the same time.
|
|
- All other options from :ref:`Output <config-output>`.
|
|
|
|
.. note::
|
|
|
|
This driver does support enabling of both the color and the white channels
|
|
at the same time, but it is not encourage. Therefore, the :ref:`rgbw_color_interlock`
|
|
should be set to true when using this driver for safest operation.
|
|
|
|
See Also
|
|
--------
|
|
|
|
- :doc:`/components/output/index`
|
|
- :doc:`/components/output/esp8266_pwm`
|
|
- :doc:`/components/output/sm2135`
|
|
- :doc:`/components/output/sm2235`
|
|
- :doc:`/components/light/rgb`
|
|
- :doc:`/components/light/rgbw`
|
|
- :doc:`/components/light/rgbww`
|
|
- :doc:`/components/power_supply`
|
|
- :ghedit:`Edit`
|