Prototype a Smart Light with Bluetooth SoC Solution

Last Updated onInvalid date

Overview

With a smart light app, users can take full control and change the brightness and colors of lights and create personalized lighting atmospheres.

Based on the Tuya IoT Platform, you can quickly prototype a smart light with the Tuya Sandwich development board.

Materials

Hardware (4)Software (1)
  • Tuya Sandwich (PWN) lighting function board

    Count:1

    more

  • Tuya Sandwich DC power board

    Count:1

    more

  • Tuya Sandwich BLE SoC master control board (BT3L)

    Count:1

    more

  • 5V micro USB adapter or 12V adapter

    Count:1

Steps

  • Step 1: Create a product

    The following steps only describe how to create a light product. For more information, see Create Smart Light.

    1. Log in to the Tuya IoT Platform.

    2. Click Create.
      IoT Platform

    3. Click Lighting and select Light Source. In the Zero-Coding Development tab, select Bluetooth Mesh (SIG) and then Multicolor Light(RGBCW)_SIG.
      Create light

    4. Complete Function Definition and Device Panel.

    5. In Hardware Commission, select BT3L Bluetooth Module and configure firmware parameters.
      Hardware commission

    6. Set the circuit parameters as follows:

      Circuit parameters Circuit parameters
      • Trigger Mode of First Distribution Network: Manual reset and then blinking
      • Number of ON/OFF to reset: 3
      • Red drive pin-R: TL_B4
      • Green drive pin-G: TL_D2
      • Blue drive pin-B: TL_C3
      • White drive pin-C/Bright: TL_B5
      • Warm drive pin-W/CCT: TL_C2
      • Other parameters: Keep them as default.
    7. Complete Product Configure and Test Services.

  • Step 2: Program and authorize firmware

    To implement the selected functions in Function Definition, you need to program the configured firmware parameters to the module. The following steps only describe how to program the firmware. For more information, see Firmware Programming and Authorization.

    1. Go to Evaluation Kit on the Tuya IoT Platform.

    2. Click Add Evaluation Kit, enter the ID and Password printed on the back of the Sandwich SoC master control board, and then click OK.

    3. Apply for the authorization code used for programming software. Tuya will send the software authorization code to your email.

    4. Click Request a new authorization code.

      Authorization code
    5. Select your created product in Step 1.

      Select product
    6. Open the programming software and click Token to enter your authorization code. Select Burn And Auth and click OK.

      Programming software
    7. Connect the development board to the computer through Telink and USB to UART board. The connection details are as follows:

      Master control board Board pins Programmer pins Programmer
      Tuya Sandwich BLE SoC master control board (BT3L) 3V3 3V3 Telink
      SWS SWM
      GND GND
      GND GND USB to UART board
      TX RX
      RX TX
    8. Select the COM port of the USB to UART board, and click Run. When Success is displayed, you have finished programming.
      Programming

  • Step 3: Pair light with mobile app

    In Step 1, you have set the number of on/off as 3. Now you can pair the light with the Tuya Smart or Smart Life mobile app accordingly. For more information, see All-in-one Apps Overview.

    1. Open Tuya Smart app.

    2. Tap + icon in the top right corner to add a device. Select Lighting > Light Source (BLE).

      Add light
    3. Turn the light on/off three times. When the light flickers and changes colors, it is ready to be connected.

    4. Complete the following steps as per the prompts.

    5. Try controlling the light with the Tuya Smart app.

      Pair light

Summary

You have prototyped a smart light successfully. Based on the Tuya IoT Platform, you can quickly and easily build a smart prototype from scratch with Tuya Sandwich Evaluation Kit.