Designing a lighting product prototype (PWM & IIC, development-free solution)

Last Updated onInvalid date

Overview

Technology is constantly progressing, and more and more smart homes are entering our daily life. Smart lights are commonly used at home and the workplace.

After the smart lights are installed, you can easily adjust the indoor color and brightness by using APP, and can set different lighting scene for different occasions, creating a warm, relaxing, interesting and inspiring living space, which greatly enriches our lives.

Based on the Tuya Smart platform, a smart light can be developed simply and quickly. This demo introduces how to use the Tuya sandwich development board to quickly complete a smart light product prototype.

Materials

Hardware (3)
  • Tuya Sandwich (PWM+IIC) Lighting Panel

    Count:1

    more

  • TUYA Sandwich Power Board

    Count:1

    more

  • TYWE3S

    Count:1

    more

Steps

  • Step 1: Create a product

    1. Log on to Tuya IoT platform, create five channels (RGBCW) _Wi-Fi lighting product.

    2. Select the function and display panel of the product, and configure the firmware information according to the hardware circuit of the sandwich development board. For more information, see Creating a Plug-and-Play RGBCW Lamp on the Tuya Smart Platform.

      demolighting2.png

      Sandwich development board is used in this demo, you need to configure the IIC signals-IICSDA as GPIO4, and IIC clock signal-IICSCL configured as GPIO5.

      image.png

      Also, set the drive mode of the product to SM726EB, and the red, green, blue light drive pin are None, the white light output pins configured for GPIO14, warm drive pin-W/CCT as GPIO12. Keep the rest fields unchanged as the default values.

      image.png

  • Step 2: Download the firmware

    To make the function of the equipment with the first step, download the related configuration information onto the module.

    1. Visit the tuya sandwich development board management platform, and register the development board, apply for an authorization code and an account.

    2. Choose the authorization code, log on the software, and enter the authorization code to download. For more information, see Download firmware and authorization code process.

      image.png

      image.png

  • Step 3: Test the APP network

    In this demo, the control light is power on and off for three times.

    If the light flicker rapidly, it enters the network configuration state. You can connect and use it via Tuya Smart app, choose lighting (Wi-Fi) category, for the next operation under the orders of the APP, connect the device to the cloud, you can use the APP to control the device now.

    image.png

    image.png

    image.png

  • Step 4: Testing of the smart speaker testing for extended functionality

    Tuya provides the most popular smart speaker control devices. You can visit the IoT Platform Value-added Service, activate the speaker service.

    image.png

    You can view the brand of the speaker at the product details page. Subsequently, you can refer to the Quick Guide of Using Amazon Echo to Control Smart Devices to grant the device to the smart speaker platform. Also, you can use the smart speaker to control the device, for more information, see Third-party Access.

  • Step 5: Product test for extended functionality

    During mass production, you must test the communication and control capabilities of the products to pick out defective products, and guarantee the quality of the products. Tuya integrates the test process at the time of production into the module, for more information, see Production test of Wi-Fi lighting products.

Summary

Based on the Tuya platform and the Tuya sandwich development board, the prototype construction of a smart lighting product can be completed quickly and conveniently, which greatly accelerated the development of the product.