王达业

[Tuya Smart] IoT wall switch

 
Overview

IoT wall switch

Summary:

        The switch is an extremely important component of electrical equipment. As a control component, it is connected to home products. It occupies an extremely important position in smart home products and also plays a more behind-the-scenes role. Perhaps it is precisely because of this low profile that more people's understanding of switches still seems to remain at the most primitive plate-type mechanical switches connected to electric lights and electric fans, which are nailed up and down on the wall to turn them on and off. However, with the continuous development of Internet of Things technology, it is becoming more and more urgent to apply this technology to switches. Eventually, people will abandon the old understanding of switches and realize remote control and intelligent control of switches. This is What we call smart switches. This engineering design is based on the intelligent modules provided by the Tuya lot platform and designed using the Lichuang EDA platform - the Internet of Things smart wall switch.

 

  

1. Product introduction

         Smart switches or smart wall switches evolved on the basis of electronic wall switches. They are a disruptive revolution in the original rocker-type mechanical switches. Since Edison invented the light bulb in 1879, there have been simple mechanical switches, and more than a hundred Years have passed, and there have been no fundamental changes in contemporary wall switches, without any breakthrough developments. They still use mechanical switches. It was not until 1992 that electronic technology began to enter the field of wall switches. At first, they were only used for voice control in public corridors. Delay switch, touch delay switch. By 2000, with the widespread application of human body thermo-release sensors, delay switches had undergone significant development. Human body induction switches gradually replaced voice-activated delay switches and touch delay switches. At the same time, thyristor phase-controlled dimming and speed-adjusting switches were used. Also born, the knob-type dimmer switch is mainly suitable for incandescent lamps, and the knob-type speed switch is mainly suitable for fan motors. Although the above switches have entered the electronic mode from the traditional mechanical mode, their functions are relatively simple and are only used in specific situations. They cannot impact or replace the traditional mechanical switches. In addition, due to the wiring of the existing wall switches The vast majority of the layout only has a single live wire access method, and the neutral wire is directly connected to the load. In the switch, there is only a live wire and no neutral wire. It cannot form a loop and cannot supply power normally. This has restricted the introduction and application of many electronic technologies. For more than ten years, The development of electronic technology in wall switches has been lingering in the early stage of simple functions, and there have always been only five types: touch delay switch, voice-activated delay switch, human body induction delay switch (PIR), knob dimmer switch, knob speed switch .

        In recent years, with the development of science and technology, there have been major breakthroughs in the power supply technology for single live wire access of wall switches. At the same time, microcomputer processing chips have been introduced into electronic wall switches, making electronic wall switches with various functions feasible. , using this technology, some companies began to launch a series of new electronic wall switch products. At this time, the types of electronic wall switches have been greatly enriched and developed, so it is necessary to summarize and classify them. Electronic wall switches are classified by function as follows: 1 .Human body sensor switch 2. Electronic dimmer switch 3. Electronic speed switch 4. Electronic timing switch, etc. The above type of electronic wall switch is mainly used for the most commonly used lights and fans in the home.

 

2. Function introduction

      The equipment uses Tuya WB3S module + STC microcontroller, which locally controls the relay through the microcontroller. The relay controls the load connected to the switch, and is connected to the Tuya cloud server through the Tuya WB3S module. Use the Tuya Smart APP on your mobile phone to achieve remote control, timing functions, and linkage with other smart products to achieve intelligent control.

 

1. Introduction to Tuya WB3S module

WB3S module specification sheet

WB3S is a low-power embedded Wi-Fi+BLE dual-protocol module developed by Tuya Smart. It consists of a highly integrated wireless radio frequency chip BK7231T and a small number of peripheral devices. It has a built-in Wi-Fi network protocol stack and rich library functions.

product description

WB3S also includes a low-power 32-bit MCU, 1T1R WLAN, a maximum frequency of 120MHz, built-in 256K SRAM, 2Mbyte flash and rich peripheral resources.

WB3S is an RTOS platform that integrates all Wi-Fi MAC and TCP/IP protocol function libraries. Users can develop embedded Wi-Fi products that meet their own needs based on these.

characteristic

  • Built-in low-power 32-bit CPU, which can double as an application processor
  • Main frequency 120MHz
  • Peripherals: 9×GPIOs, 1×UART, 1×ADC
  • Wi-Fi connectivity
    • 802.11 b/g/n
    • Channel 1-14@2.4GHz
    • Supports WEP, WPA/WPA2, WPA/WPA2 PSK (AES) security mechanism
    • Maximum +16dBm output power in 802.11b mode
    • Support SmartConfig function (including Android and IOS devices)
    • Onboard PCB antenna, antenna gain 1.5dBi
    • Working temperature: -20℃ to 85℃
  • BLE
    • Support Bluetooth Low Energy (V4.2)
    • Maximum output power +6dBm
    • Onboard PCB antenna, antenna gain 1.5dBi

 

Size package

  WB3S has 2 rows of pins, and the pin spacing is 2mm.

  Dimensions: 16mm (W) × 24mm (L) × 2.8mm (H).

  Note : The default dimensional tolerance is ± 0.35mm.

 

 

 

image.png

2. Main control chip

       The STC8A8K microcontroller is used to accept the data requests received by the WB3S module through the serial port and process the data commands to control the local relays.ie5TGm43KdKw9mc2zHHWUlTp7WbmNuEeEpHeqmRf.png

3. Power supply part

     I have some 220ADC converted to 5DC V that I bought previously , which are used for 5V power supply of products. Since Tuya WB3S and the main control chip need to be powered by 3.3V, AMS1117-3.3 is used for level conversion. (The picture comes from the Internet. If there is any infringement, please contact the author to delete it)

 

 

 

ttlVrSJuC3FkPmIXwYJT5yidG5BSn9A4Vh6qQ71d.pngQDuywwobdQj0IE12CAp3Tb3s4uVcpNVcqvFOXEAe.png

3. Special thanks

  Thanks to Tuya Technology and Lichuang EDA platform

   Thanks to Tuya Technology and Lichuang EDA Platform for co-organizing the second practical training camp.

   A technical exchange platform for us personal electronic DIY enthusiasts

            Tuya lot platform:         https://iot.tuya.com/

           LiChuang EDA platform: https://lceda.cn/

   Lichuang oshwhub open source platform: https://oshwhub.com/

 

WgXImxcIXG9KT4sMMUxpfxHlgeP7OGSc3y8xVOe7.pngMaHns9rFOLsGhWrGVGPiS0FhYoOlyzGgy3ILTGVL.png

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-22 18:41:20

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号