2021-05-12 21:14:26 +02:00
|
|
|
SM2135 LED driver
|
|
|
|
==================
|
|
|
|
|
|
|
|
.. seo::
|
|
|
|
:description: Instructions for setting up SM2135 LED drivers in ESPHome.
|
|
|
|
:keywords: SM2135, Calex Smart RGB Reflector
|
|
|
|
|
|
|
|
.. _sm2135-component:
|
|
|
|
|
2021-05-15 01:31:31 +02:00
|
|
|
Component/Hub
|
|
|
|
-------------
|
2021-05-12 21:14:26 +02:00
|
|
|
|
2023-02-09 19:24:22 +01:00
|
|
|
The SM2135 component represents a SM2135 LED driver chain
|
2021-05-12 21:14:26 +02:00
|
|
|
(`SM2135 description <https://github.com/arendst/Sonoff-Tasmota/files/3656603/SM2135E_zh-CN_en-US_translated.pdf>`__,
|
|
|
|
`SM2135 description <https://github.com/arendst/Sonoff-Tasmota/files/3656603/SM2135E_zh-CN_en-US_translated.pdf>`__) in
|
|
|
|
ESPHome. Communication is done with two GPIO pins (MOSI and SCLK).
|
|
|
|
It is used in some smart light bulbs:
|
|
|
|
|
|
|
|
- Calex Smart RGB Reflector LED lamp (GU10)
|
2021-05-15 01:31:31 +02:00
|
|
|
- LSC Smart GU10
|
2021-05-12 21:14:26 +02:00
|
|
|
|
|
|
|
To use the channels of this components, you first need to setup the
|
|
|
|
global ``sm2135`` hub and give it an id, and then define the
|
|
|
|
:ref:`individual output channels <sm2135-output>`.
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
sm2135:
|
|
|
|
data_pin: GPIO12
|
|
|
|
clock_pin: GPIO14
|
|
|
|
|
|
|
|
# Individual outputs
|
|
|
|
output:
|
|
|
|
- platform: sm2135
|
|
|
|
id: output_red
|
|
|
|
channel: 0
|
|
|
|
max_power: 0.8
|
|
|
|
- platform: sm2135
|
|
|
|
id: output_green
|
|
|
|
channel: 1
|
|
|
|
max_power: 0.8
|
|
|
|
- platform: sm2135
|
|
|
|
id: output_blue
|
|
|
|
channel: 2
|
|
|
|
max_power: 0.8
|
|
|
|
- platform: sm2135
|
|
|
|
id: output_white
|
|
|
|
channel: 3
|
|
|
|
max_power: 0.8
|
|
|
|
- platform: sm2135
|
|
|
|
id: output_warmwhite
|
|
|
|
channel: 4
|
|
|
|
max_power: 0.8
|
|
|
|
|
|
|
|
Configuration variables:
|
|
|
|
************************
|
|
|
|
|
2021-11-28 19:57:01 +01:00
|
|
|
- **data_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin used for MOSI.
|
|
|
|
- **clock_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin which SCLK is
|
2021-05-12 21:14:26 +02:00
|
|
|
connected to.
|
|
|
|
- **id** (*Optional*, :ref:`config-id`): The id to use for
|
|
|
|
this ``sm2135`` component. Use this if you have multiple SM2135 chains
|
|
|
|
connected at the same time.
|
2023-05-10 01:07:01 +02:00
|
|
|
- **cw_current** (*Optional*, current): The current used for the white channel.
|
|
|
|
Defaults to ``10mA``.
|
|
|
|
Can be one of ``10mA``, ``15mA``, ``20mA``, ``25mA``, ``30mA``, ``35mA``, ``40mA``, ``45mA``, ``50mA``, ``55mA``, ``60mA``.
|
|
|
|
- **rgb_current** (*Optional*, current): The current used for the RGB channel.
|
|
|
|
Defaults to ``20mA``.
|
|
|
|
Can be one of ``10mA``, ``15mA``, ``20mA``, ``25mA``, ``30mA``, ``35mA``, ``40mA``, ``45mA``.
|
2021-05-12 21:14:26 +02:00
|
|
|
|
|
|
|
.. _sm2135-output:
|
|
|
|
|
2021-05-15 01:31:31 +02:00
|
|
|
Output
|
|
|
|
------
|
2021-05-12 21:14:26 +02:00
|
|
|
|
|
|
|
The SM2135 output component exposes a SM2135 channel of a global
|
|
|
|
:ref:`sm2135-component` as a float output.
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
sm2135:
|
|
|
|
data_pin: GPIO12
|
|
|
|
clock_pin: GPIO14
|
|
|
|
|
|
|
|
# Individual outputs
|
|
|
|
output:
|
|
|
|
- platform: sm2135
|
|
|
|
id: output_red
|
|
|
|
channel: 0
|
|
|
|
max_power: 0.8
|
|
|
|
- platform: sm2135
|
|
|
|
id: output_green
|
|
|
|
channel: 1
|
|
|
|
max_power: 0.8
|
|
|
|
- platform: sm2135
|
|
|
|
id: output_blue
|
|
|
|
channel: 2
|
|
|
|
max_power: 0.8
|
|
|
|
- platform: sm2135
|
|
|
|
id: output_white
|
|
|
|
channel: 3
|
|
|
|
max_power: 0.8
|
|
|
|
- platform: sm2135
|
|
|
|
id: output_warmwhite
|
|
|
|
channel: 4
|
|
|
|
max_power: 0.8
|
|
|
|
|
|
|
|
Configuration variables:
|
|
|
|
************************
|
|
|
|
|
|
|
|
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
|
|
|
|
- **channel** (**Required**, int): Chose the channel of the SM2135 chain of
|
|
|
|
this output component.
|
|
|
|
- **sm2135_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the
|
|
|
|
:ref:`sm2135-component`.
|
|
|
|
Use this if you have multiple SM2135 chains you want to use at the same time.
|
|
|
|
- All other options from :ref:`Output <config-output>`.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
2021-05-15 01:31:31 +02:00
|
|
|
The white LEDs are much brighter than the color LEDs. To get uniform brightness
|
2021-05-12 21:14:26 +02:00
|
|
|
for both color and white you will need to limit the white led power.
|
|
|
|
|
2023-05-10 01:07:01 +02:00
|
|
|
.. warning::
|
|
|
|
|
|
|
|
Setting to high currents (either RGB, CW or both) could damage your bulb.
|
|
|
|
|
2021-05-12 21:14:26 +02:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
This driver does not support enabling of both the color and the white channels
|
|
|
|
at the same time. Therefore, the :ref:`rgbw_color_interlock` should be set to true
|
|
|
|
when using this driver.
|
|
|
|
|
|
|
|
See Also
|
|
|
|
--------
|
|
|
|
|
|
|
|
- :doc:`/components/output/index`
|
|
|
|
- :doc:`/components/output/esp8266_pwm`
|
|
|
|
- :doc:`/components/output/sm16716`
|
|
|
|
- :doc:`/components/light/rgb`
|
|
|
|
- :doc:`/components/light/rgbw`
|
|
|
|
- :doc:`/components/light/rgbww`
|
|
|
|
- :doc:`/components/power_supply`
|
|
|
|
- :apiref:`output/sm2135_output_component.h`
|
|
|
|
- :ghedit:`Edit`
|