IFREEQ Docs
  • Introduction
  • Update Log
  • General Knowledge
    • About IoT
    • Electricity
      • Plug & socket types around the world
        • Power plug & outlet Types A & B
        • Power plug & outlet Type C
        • Power plug & outlet Type D
        • Power plug & outlet Type E
        • Power plug & outlet Type F (Schuko)
        • Power plug & outlet Type G
        • Power plug & outlet Type H
        • Power plug & outlet Type I
        • Power plug & outlet Type J
        • Power plug & outlet Type K
        • Power plug & outlet Type L
        • Power plug & outlet Type M
        • Power plug & outlet Type N
        • Power plug & outlet Type O
      • Full list: Plug, socket & voltage by country
      • Map showing the spread of the different plug types worldwide
      • Useful information for travellers
      • History of domestic electricity
        • Why isn’t there a universal standard electric plug?
        • Why isn’t there a standard voltage around the world?
      • Three-phase electric power (industrial applications only)
    • Certifications
    • Home Automation Brand
    • Home Automation Catalog
    • Industry Term
    • Network Term
    • The Third-party Control
      • AliGenie
      • Amazon Alexa
        • FAQs About Amazon Alexa
      • DuerOS
        • FAQs About DuerOS
      • Google Assistant
        • FAQs About Google Assistant
      • Home Assistant
        • FAQs About Home Assistant
      • HomeKit
        • FAQs About Homekit
      • IFTTT
      • Xiao AI
      • Yandex Alice
        • FAQs About Yandex Alice
  • Developer
    • Introduction
      • What is Tuya Smart?
      • What does Tuya do?
      • Tuya Smart Cloud Platform Overview
      • Advantages
      • Terms
      • Limits
    • Quick Start
    • Configure in Platform
      • Create Products
      • Function Definition
        • Overview
        • Standard Functions
        • Custom Functions
        • Cloud Functions
      • Design App UI
      • Configure Hardware
      • Cloud Configuration
        • Introduction
        • Upgrade Firmwares
        • Set up Multilingual UI
        • Manage Alarms
        • Configure Network for Devices
        • Enable Toggles on App
        • Automate the Smart Devices
      • Mass Production
    • Device Development
      • Access Mode MCU
        • MCU Access Guide
        • Wi-Fi General Solution
          • Wi-Fi Module MCU Development Overview
          • Hardware Design Reference Wi-Fi
          • Software Reference Wi-Fi
            • Tuya Cloud Universal Serial Port Access Protocol
            • Overview of migrating Tuya's MCU SDK
        • Wi-Fi Power Off Fast Connect Device Solution
          • Overview
        • Zigbee General Solution
          • Overview
          • Software development
            • Tuya Zigbee module UART communication protocol
          • Hardware Design
        • BLE General Solution
          • BLE Module MCU Development Overview
          • BLE Hardware Design
        • NB-IoT General Solution
          • NB-IoT Development Guide
          • Introduction to NB Module - NM1
      • Access Mode SoC
        • SoC Development Overview
        • Lighting
          • Guidance
          • Design
          • Test
        • Electrician
          • Guidance
          • Design
          • Test
      • Access Mode Link
        • Wi-Fi Chip SDK
          • Tuya Wi-Fi SDK Reference
          • Development Environment Setup When Using Tuya Wi-Fi SDK
        • BLE Chip SDK
          • TUYA BLE SDK User Guide
        • Zigbee Chip SDK
          • TUYA Zigbee SDK Document
      • Cloud Mode
        • Wi-Fi&BT Dual Mode Module
        • Wi-Fi Module
        • Bluetooth Module
        • Zigbee Module
        • Sub-G Module
      • Tuya Development Boards
      • Access Mode Simmulator
        • Module Debugging Assistant Instruction
      • Embedded License
        • Embedded open source license
    • Smart Product Solution
      • Gateway
        • MCU Access
        • Link SDK Access
        • PCB Details
      • HouseHold
        • Cleaner Robot
        • Air Conditioner
      • IPC
      • Lock
        • BLE Lock
        • Wi-Fi Lock
        • Zigbee Lock
      • Remote Control
      • Voice Product
        • Domestic Voice Speaker Solution
        • Domestic Voice Infrared SoC Solution
        • Overseas Voice Solution
        • Design Reference Materials - Alexa Module
        • Design Reference Materials - Domestic Voice Module
    • Firmware
      • S8E
  • FAQs
    • Device Development
      • Cloud Module
        • Wi-Fi Module
        • Zigbee Module
        • BLE Module
        • GPRS Module
        • NB-IoT Module
        • Dual-mode Module
        • Other Module Issues
      • Access Mode SoC
      • MCU Access Mode
        • Wi-Fi General Solution
        • Zigbee General Solution
        • BLE General Solution
          • BLE Single-point Solution
          • BLE Mesh General Solution
          • Other Issues of BLE Solution
        • NB-IoT General Solution
        • Other Issues of MCU Access Mode
      • Module SDK Development
        • BLE Chip SDK(single point)
        • Linux General SDK
        • NB-IoT Chip SDK
        • Wi-Fi Chip SDK
        • Others about Module SDK
      • Other Issues of Device Development
    • Smart Product Solution
      • Electrical
        • Outlet
        • Scenario Switch
        • Switch
      • Lighting
        • Wi-Fi Lighting
        • Zigbee Lighting
        • Bluetooth Lighting
        • Other Issues of Lighting
      • Lock
        • BLE Lock
        • NB-IoT Lock
        • Wi-Fi Lock
        • Zigbee Lock
        • Other Issues of Lock
      • Sensor
      • Gateway
        • BLE Gateway
        • Wireless Gateway
        • Zigbee Gateway
        • Other Issues of Gateway
      • IPC
      • Infrared Products
        • Infrared remote control
        • Infrared Capability Introduction
        • Infrared Code Library
      • Sweeper
      • Household Appliances
      • Pet Supplier
      • BLE Mesh Typical Solution
        • BLE Mesh Lighting Solution
        • BLE Mesh Electrical Solution
        • BLE Mesh Sensor Solution
        • BLE Mesh General Solution
    • Products
      • Electric
        • Smart Switch
        • Smart Plug
        • Curtain Controller
      • Lighting
      • Security
        • E202/203 Smart Lock
    • More
  • Links
    • ifreeq.cn
    • ifreeq.com
    • AIoT Expo
    • Official Store
Powered by GitBook
On this page
  • Preface
  • Registering with and Logging In to the Tuya Smart Platform
  • Creating an SoC Plug-and-Play RGBCW Lamp
  • Viewing DPs
  • Configuring the App Control Panel
  • Debugging the Hardware
  • Configuring Advanced Features
  • Mass Production

Was this helpful?

  1. Developer
  2. Device Development
  3. Access Mode SoC
  4. Lighting

Guidance

Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform

PreviousLightingNextDesign

Last updated 4 years ago

Was this helpful?

Preface

The Tuya Smart platform provides plug-and-play solutions with the Wi-Fi, BLE Mesh (SIG), Zigbee, and BLE Mesh (Tuya) communication modes for LED lighting products, including dimmable white lamps (C), CW or CCT lamps, RGB lamps, RGBC lamps, and RGBCW or RGBCCT lamps.

This document describes how to use a plug-and-play solution to develop a Wi-Fi RGBCW lamp on the Tuya Smart platform and the precautions.

Registering with and Logging In to the Tuya Smart Platform

Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform
  1. Register with and log in to the Tuya Smart platform at https://iot.tuya.com.

  2. (Recommended) Complete enterprise certification to upgrade your account to a corporate account with more functions.

Creating an SoC Plug-and-Play RGBCW Lamp

  1. On the Product page, click Create in the Easy Access to Get Your Smart Product area.

  2. (Recommended) On the displayed Create new product page, choose Smart Lighting and select a product under Plug and Play Solution. Alternatively, select a product under Custom if the development-free solution cannot meet your product function requirements.

  1. Specify the product name, which will be displayed on the App control panel.

  2. Specify the internal or customer product model to facilitate product maintenance and order management.

  3. After the product is created, click Edit Product Information on the product configuration page to modify the product name and model.

Viewing DPs

You cannot modify data points (DPs) of a plug-and-play solution. To view the DPs, click View function details.

Configuring the App Control Panel

  1. Click App UI Design. If you have upgraded your account to a corporate account, more templates and panel UI functions are available.

  2. Select a control panel template and use the Tuya Smart or Smart Life App to scan the QR code to verify the control panel effect.

Debugging the Hardware

Selecting a Module and Checking the Reference Circuit Diagram (If you change the module, the reference circuit diagram will be updated.)

Select a module based on the product encapsulation, placement space, temperature, and antenna type. The Tuya Smart platform provides 10 Wi-Fi modules with their hardware design manuals and I/O interface connection diagrams. Note: The EN pins on the E3S and E3L modules need to be pulled up to a high level. Pay attention to the RF signal reference design. Modules recommended for different lighting products are as follows:

  • Bulbs: TYE3L

  • Filament lamps: TYLC5

  • Candle lamps or GU10 bulbs: TYLC4

  • Built-in power lamps or power lamps with metal covers: TYE1S-IPEX (supporting an external antenna)

  • Power lamps with a plastic cover: TYE1S with an onboard antenna or TYE3S

  • Compact products, such as light strip controllers: TYE2S

Configuring Module Firmware I/O Interface Information

IIC Configuration

a) IIC Data I/O Interface: indicates the data I/O interface for IIC communication. Five I/O interfaces are available. If IIC communication is not required, select None. The first I/O interface is the default I/O interface.

b) IIC Clock Signal I/O Interface: indicates the clock signal I/O interface for IIC communication. Five I/O interfaces are available. If IIC communication is not required, select None. The first I/O interface is the default I/O interface.

c) IIC-2135 Color Light Current: indicates the RGB light current when the SM2135 chip that uses the IIC protocol is used. The value range is 10 mA to 45 mA.

d) IIC-2135 White Light Current: indicates the CW light current when the SM2135 chip that uses the IIC protocol is used. The value range is 10 mA to 60 mA.

e) IIC-R, IIC-G, IIC-B, IIC-2135-W, and IIC-2135-C: indicate pins on the SM2135 that control the red, green, blue, cold white, and warm white light when the SM2135 chip that uses the IIC protocol is used.

Product Function

a) Max Brightness (%) and Min Brightness (%): indicate the maximum and minimum duty cycles of the PWM waveforms generated by the I/O interfaces for the cold and warm white light. The value range is 1 to 100.

Note: The Min Brightness (%) parameter must be set based on the dimming depth of the selected dimmable integrated circuit (IC). If they do not match, the lamp will turn off in low brightness. The default minimum brightness is 10%.

b) PWM Frequency (Hz): indicates the frequency of each PWM control signal. The value range is 100 Hz to 20,000 Hz.

Note: The PWM Frequency (Hz) parameter must be set based on the PWM frequency that the dimmable IC supports. The frequency of most PWM ICs on the market is in the range of 500 Hz to 5000 Hz. When you adjust the frequency to 8000 Hz or higher, ripples in the light are invisible under the mobile phone camera.

c) Color Temperature Drive Method: Options are CW-Cold/Warm and CCT-Brightness/Color Temperature. The two methods have the same functions and UIs in the App and can control the color temperature and adjust the light brightness. They vary in the design of the peripheral circuit. For a CCT lamp, the two channels of PWM signals are independent of each other, with one controlling the overall current and the other adjusting the current proportions of the warm and cold light. Only one channel of PWM signals changes when you adjust the brightness or color. For a CW lamp, one channel of PWM signals controls the cold light while the other controls the warm light. Both channels of PWM signals change when you adjust the brightness or color. CW and CCT lamps are Tuya's internal classification methods. In the industry, CCT lamps are those with a color temperature adjustment feature, which are different from the CCT lamps in Tuya.

Note: This parameter is important. An incorrect value will cause incorrect light control logic. If you are not sure which value to select, send the schematic diagram to Tuya engineers for confirmation.

d) Color Drive Pin Connection Method: The options are Normal PWM Output, CW-PWM+RGB-I2C(16726), and CW- I2C(sm2135)+RGB-I2C(sm2135). Normal PWM Output indicates that three I/O interfaces generate PWM signals to control the red, green, and blue light. CW-PWM+RGB-I2C(16726) indicates that the IIC communication method controls the red, green, and blue light between the module and the SM726EB linear IC. CW- I2C(sm2135)+RGB-I2C(sm2135) indicates that the IIC communication method controls the red, green, and blue light between the module and the SM2135 linear IC. Note: If you select an incorrect method, the lamp cannot be controlled.

e) First Network Configuration Trigger Mode: indicates the method for the module to enter the network configuration mode. Blink After Power Cycling indicates that you power-cycle the module several times or press and hold the network configuration button for several seconds to enter the network configuration mode. Blink After Power-on indicates that the module automatically enters the network configuration mode after being powered on.

f) Power-off Memory: The options are Power-off Memory and Restore to the Default State After Power Cycling. Power-off Memory indicates that the module status remains unchanged each time the product is powered on. However, the status must be retained for over 5s before the product is powered off. Restore to the Default State After Power Cycling indicates that the white light is displayed with the default brightness and color temperature after the module enters the network configuration mode. For details on how to set the brightness and color temperature, see "(3) Network Configuration."

g) On/Off Gradual Change: indicates whether the module's PWM signal gradually changes from the current duty cycle to 0 when the product is powered off and gradually increases from 0 when being powered on. The options are Yes and No.

Network Configuration

a) Brightness upon Network Configuration (%): indicates the blinking light brightness during network configuration. The value indicates the duty cycle of the PWM signal. The value range is 10 to 100. Note: The minimum dimming depth of some dimmable ICs is 10%. If Brightness upon Network Configuration (%) is set to 10, the lamp will turn off during network configuration and will not blink. It is recommended that Brightness upon Network Configuration (%) be greater than 20.

b) Color upon Network Configuration: indicates the light blinks in network configuration mode. The options are R, G, B, C, and W.

c) Brightness After Network Configuration (%) and Color Temperature After Network Configuration: indicate the white light brightness and color temperature after network configuration. The values are the duty cycles of the PWM signals for controlling the white light brightness and color temperature. Note: The brightness value must be greater than the minimum dimming depth of the dimmable IC, or the lamp will turn off after network configuration. Consumers may think that the lamp is faulty.

I/O Settings

Select the I/O interfaces and levels for the red, green, blue, cold white (bright), and warm white (CCT) control signals.

Network Configuration Settings

a) Network Configuration Button: indicates whether you can press and hold a button to enter the network configuration mode. The options are None and multiple I/O interfaces. The value None indicates that you cannot press and hold a button to enter the network configuration mode. If an I/O interface is selected, you can press and hold this button to enter the network configuration mode. Note: Select None if you do not need to press and hold the network configuration button to enter the network configuration mode. If an I/O interface is selected but not used, the module may be powered on or off unexpectedly.

b) Button Pressing Time (s): indicates the time for pressing and holding the button to enter the network configuration mode. The value range is from 3s to 10s. If Network Configuration Button is set to None, this parameter does not need to be specified.

c) Number of Resets: indicates the number of resets for the module firmware to enter the network configuration mode. The value range is 3 to 10. Note: To power cycle the module's Vcc pin, power cycle the lamp. During network configuration, ensure that the voltage of the Vcc pin is Approaching 0 V before you power the lamp on.

d) Low-power Control Pin: indicates the low-power pin during IIC control. Currently, the pin can be configured only under the SM16726B drive. That is, this parameter needs to be specified only if Color Drive Pin Connection Method is set to CW-PWM+RGB-I2C(16726).

Note: After all the parameters are configured, click Save on the top of the page for the parameters to take effect.

Purchasing Modules

After completing the configuration, click Purchase to purchase a small number of the modules for product debugging.

Note: The module will be burned based on the settings that you specify on this page. After the module is delivered, the settings cannot be modified. To modify the settings, repurchase a module. If you modify the settings after the module is delivered, any online upgrades will not apply to the product because the settings will be inconsistent.

Configuring Advanced Features

For details on how to configure advanced features, visit https://docs.tuya.com/en/soc/soc-dev.html.

Mass Production

  1. After you receive the sample modules and complete product debugging, send at least two product samples to Tuya for testing and verifying the product status.

  2. After the sample product passes the test, click Complete development to enter the trial production phase.

  3. After trial production is completed, click Pass test, to mass production. In the mass production phase, product settings cannot be modified to prevent misoperations and impact on consumers.

Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform
Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform

If you subscribe to a third-party service for the product, the third-party service subscription icon is highlighted for the product on the Product page.

Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform
Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform

If you select a custom panel, click Edit to change panel elements, such as the background color and image.

Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform

Perform operations in this chapter to configure the module's electrical parameters. It is recommended that engineers perform these operations because setting the parameters requires professional knowledge.

Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform
Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform
Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform
Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform
Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform
Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform

Do not delete products that are under development or have been developed to prevent data loss and causing the product to fail to function properly.

Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform
Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform
Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform
Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform
Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform
Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform