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 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.
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.
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.
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.
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)
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/
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet