Shenzhen ZTRON Microelectronics Co., Ltd
Telephone
0755-8299 4126

smart home

Smart Switch Solution


Smart home is one of the hottest topics in modern society with high-tech development at the speed of light. The ultimate goal is to realize intelligent control of household appliances through network and other information methods, so that it can work and run according to people's ideas, but it does not Consider distance. Intelligence and remote control are two major features of smart home. At present, more and more enterprises and individuals have started research on smart home. With the development of network communication technology, especially the development of Bluetooth communication technology, the smart home system can provide remote control, home appliance control, lighting control, indoor and outdoor remote control, curtain automatic control, anti-theft alarm, telephone remote control and computer control. Make life more comfortable, convenient and safe. The development of electronic technology has greatly optimized people's lives. The Bluetooth wireless home appliance switch control system based on single-chip microcomputer and mobile communication technology has been gradually promoted and applied in high-end residential occasions and has achieved unanimous praise.


1. The working principle of the smart switch solution


Single-chip microcomputer, also known as single-chip microcomputer or single-chip microcomputer. It is a microcomputer that integrates main computer functional components such as the central processing unit (CPU), random access memory (RAM), read-only memory (ROM), and input/output ports (I/O) on an integrated circuit chip. . This smart home control system takes 51 single-chip microcomputer as the core, and feeds back the data collected by the sensor in real time to the smart phone terminal control platform through Bluetooth communication technology. The smart phone control platform analyzes and processes the received feedback data, and returns corresponding instruction information to the 51 single-chip microcomputer through Bluetooth communication technology. The 51 single-chip microcomputer receives and analyzes the instructions, and uses the circuit and various components (counter, signal generator, etc.) to send out corresponding level signals. The electromagnetic relay receives a given level signal and responds to control the opening or closing of smart home appliances, thereby realizing automatic control of home appliances. The remote control of the system uses the Bluetooth module, and the user can check the status of the household appliances in real time through the mobile phone APP, so as to realize remote control.


2.The wireless communication technology required by the smart switch


In modern communication technology, most of the wireless communication technologies used in residential buildings are based on Bluetooth communication and WiFi communication. Compared with the two wireless communication technologies, the signal of WiFi is more stable, the transmission distance is longer, and the scope of application is wider. However, in the process of using smart home appliances on or off, it will be more troublesome to use WiFi, and the mobile phone needs to be connected from time to time. Different WiFi networks can be used to remotely control smart home appliances, but Bluetooth can make up for this problem well. Mobile phones can connect to Bluetooth and WiFi at the same time, which can enable stable and reliable multi-point control of smart home appliances.


This design is based on Bluetooth communication technology, with 51 single-chip microcomputer as the core. The bluetooth module adopts the industrial grade HC-05 bluetooth module to complete the reception and communication of the bluetooth command of the mobile phone, and then completes the data transmission with the single-chip microcomputer control circuit through the serial port communication circuit. The single-chip microcomputer control unit analyzes the received bluetooth command, and then performs the operation of turning on and off the corresponding household appliance switch.


深圳智能开关方案设计


3. Intelligent switch system design


3.1 Hardware circuit design


(1) Single-chip microcomputer system circuit: Considering the requirements of economy and control precision, the hardware design of the system uses 51 single-chip microcomputers. The MCU has 4KB Flash memory, 32 I/O lines external memory, 2 16bit timers/counters, 5 interrupt sources, 2 interrupt priorities and full-duplex serial port, fully satisfying this design control needs. In addition, 51 single-chip microcomputer has a large number of application channels in electronic design, with good stability, moderate price and good compatibility.


(2) Drive circuit: As an important part of the entire smart home control system, the drive circuit realizes the switch control of the smart home by receiving the commands issued by the single-chip control unit after analyzing the Bluetooth commands. Therefore, it is an integral part. For the selection of the driving mechanism, there are three different methods, bidirectional thyristor, triode, and electromagnetic relay.


(a) Bidirectional thyristor: bidirectional thyristor is a power switch with better performance, which has a large driving capacity and can be used for AC non-contact switches. Although the bidirectional thyristor conducts reversely, it is easy to break down, so the bidirectional thyristor must be able to withstand this reverse voltage.


(b) Triode: The triode can be used as a non-contact switch, which has the function of current amplification and can be used for power amplification. But in most cases, its DC switch function is used, and its responsiveness can reach 100KHz, and it has very good sensitivity.


(c) Electromagnetic relay: Electromagnetic relay is a "new type switch" that controls large current and high voltage with small current and low voltage, and has the function of automatic opening or closing, and has functions such as electrical isolation, conversion circuit, safety protection, and automatic adjustment. .


After comparative analysis, the three methods all use small voltage to control large voltage. Transistors are suitable for use as DC switches. Triacs can conduct in reverse, but are prone to breakdown. Therefore, we chose to use electromagnetic relays. The electromagnetic relay control circuit adopts the control principle of weak current controlling strong current, and the single-chip microcomputer controls the on-off of external household appliances by controlling the disconnection and pull-in of the relay.


3.2 Software Design


Both the single-chip microcomputer and the mobile phone exchange signals through the Bluetooth module, and the single-chip microcomputer program and software program need to be written, and the system control system is composed of the single-chip microcomputer, the Bluetooth module and the relay.


Start the mobile phone control platform (APP) and perform initialization (reset) operations. Start the bluetooth module of the home appliance terminal, the indicator light is red (not matched with bluetooth). The Bluetooth of the mobile phone is connected with the Bluetooth module of the home appliance terminal to complete the Bluetooth matching, and the indicator light turns green. Use the mobile phone intelligent control platform to send the "on" command to household appliances (such as air conditioners, curtains, water heaters, etc.), the Bluetooth module of the home appliance terminal accepts and parses the commands, and transmits the data to the microcontroller through serial communication. The single-chip microcomputer learns the data and generates a corresponding level signal to control the relay, so that the household appliances are energized and work.

智能开关芯片价格


4. Design scheme of smart switch based on Internet of Things technology


Mankind's endless pursuit of daily life comfort and intelligent needs has promoted the development and innovation of the information industry time and time again. The application of the Internet of Things in the field of smart homes has also emerged as the times require along with the continuous emergence of emerging technologies. Smart home will allow users to have more convenient means to manage home devices, for example, control home devices through touch screen, wireless remote control, telephone, Internet or voice recognition, and can also perform scene operations to make multiple devices form linkage; on the other hand , Various devices in the smart home can communicate with each other, and can interact and operate according to different states without user command, thus bringing users the greatest degree of efficiency, convenience, comfort and safety.


(1) Demand analysis. Scene 1: Before going to bed at night, I found that the lights in other rooms were still on, but I was too lazy to move in bed. Scene 2: After going out in a hurry, I faintly feel that the water heater or other electrical appliances at home are not turned off. Scene 3: Get up in the middle of the night and go to turn on the lights in other rooms in the dark.


(2) Design ideas. The above scenarios exist from time to time in daily life, but most of the products in the home appliance market are expensive and not suitable for large-scale promotion and use, especially for ordinary families, it is a lot of money, so ordinary families will choose ordinary mechanical switches Save capital, but in today's pursuit of high-quality life, the use of mechanical switches is obviously contrary to the quality of life. Is it possible to develop a low-cost and stable smart switch that connects home appliances and controls the smart switch through a pad or smart phone under wireless network or cellular mobile data, so as to control the activation of the electrical equipment used? with shutdown.


(3) Device selection. In the experimental stage, considering the cost and stability of the device, 51 single-chip microcomputer was selected as the main control. It has 4 G PIO interfaces and a dedicated serial communication interface, which can be connected to the Wi-Fi receiver through the serial port. In this way, there are two feasible One is to directly connect to the mobile phone through the Wi-Fi receiver, and the other is to connect to the wireless router at home, and upload the data to the server, and the mobile phone is connected to the server through the APP software. In these two ways, the user can control the home appliance by clicking the button of the mobile phone. After receiving the control command, the home appliance will return the data, and the indicator light on the mobile APP will light up, and the user can know whether the appliance is powered. up. In this aspect, due to the consideration of data security, numbers and passwords are set up in the data format, that is, each user is under the same server, and the user can only control the electrical appliances of his own home. In terms of switches, a relay module is required, that is, a single-chip microcomputer is used to send a control signal to the relay to realize corresponding switch control.


(4) Software and hardware design. Hardware part: use a voltage stabilizer to ensure stable output voltage, 51 single-chip microcomputer as the controller, use n relays and LED lights to form the IoT switch of each electrical equipment, and use n conventional switches to directly control a certain Or some electrical appliances.


Software part: The programs are all written in C language, and the terminal control is mainly based on the mobile phone. You can make an APP to control the relay on the mobile phone. There are n buttons corresponding to control n relays. The whole process is realized within the range of wireless local area network.


In the simulation experiment, the cost is very low, so we can see that it is very cheap and easy to achieve intelligence and make life more comfortable and convenient. Therefore, the smart switch based on the Internet of Things technology has certain feasibility, safety and popular reliability.


(5) Server side. As the remote control of the Internet of Things, a similar server needs to be built. This server can use any chat software to reserve a port in the chat software, which is responsible for transmitting and receiving remote control signals. Of course, a special software for sending and receiving command signals can also be made. That is to say, the user first transmits the instruction to the software platform, and then the software platform transmits it to the home appliances, which is not difficult to achieve.


(6) Security. Safety issues are issues that must be considered in any scientific research, so analysis is also required here. When transmitting signals, use serial port communication, and set up numbers and passwords in the data format, that is, each user is under the same server, and users can only control their own electrical appliances. The password includes a header, a checksum and a trailer, and the three items must match exactly to achieve effective communication, otherwise the communication cannot be completed.


Compared with the high security of previous IoT works, this is also the innovation and superiority of smart switches. Ordinary IoT products simply realize the control, let’s realize the remote use of 4G network control, but if the user’s mobile phone is lost, there will be many hidden dangers. Even if the mobile phone has a password lock, swiping the phone to unlock it is as easy as picking something out. Based on such considerations, we have come up with several solutions for different users, different departments, and different occasions:


a. Set the user name and password. When opening the smart home mobile phone control software, you need to enter the user name and password. If the user name and password do not match, you cannot log in. If you enter the wrong password three times, the software will be locked. These need to rely on the main server to control the locking of the software. b. Combining with fingerprint identification, when opening the control software, you need to enter the fingerprint, and it can be opened only after matching. c. Set up the self-destruct system operation. It is not just a mobile phone that controls the entire home. Once a mobile phone is stolen, the mobile phone of other members of the family can still start self-destructing, making the control program garbled, and the electrical appliances are no longer controlled by the mobile phone. Electrical or property safety. d. Binding a mobile phone number is like logging in to QQ or WeChat. Once the mobile phone control software is turned on when the mobile phone is lost, the main server can be notified to lock the software.


With the popularity of smart cities, the continuous advancement of science and technology, and people's pursuit of a higher quality of life, the smart home will definitely be popularized in the future. The main server based on the smart home system in each city will definitely be built in succession in the future. Therefore, here is an idea, a plan and a system. Previous experiments have proved its low-cost feasibility. Throughout the world of the Internet of Things, it extends the scope of human digital management from the virtual information world to the physical world, strengthens real-time processing and remote control capabilities, and greatly expands and enriches existing information systems. This paper designs not only a new type of low-cost smart switch, but also considers extending this product to remote terminals, with the help of existing wireless sensing, Internet and many other IT technologies, to realize remote control and further improve the processing of automatic management level of performance and intelligence. It is easy to maintain, easy to install, and has high cost performance. Among the functions that can be realized by the combination of 51 single-chip microcomputer and relay, it can be said to have certain creativity, and also has strong research and thinking.


Summarize


Nowadays, the scientific development awareness of low-carbon environmental protection has been deeply rooted in the hearts of the people, and building a conservation-oriented society is also a major goal. This kind of smart switch is not only highly intelligent, but also its most prominent feature is its low cost. Intelligence fully demonstrates the necessity and feasibility of researching smart home.


With the 51 single-chip microcomputer as the core, combined with the HC-05 Bluetooth module and the electromagnetic relay module, we have formed a set of intelligent home appliance control system through the programming design of the single-chip microcomputer, and realized the remote control of home appliances. In this information society, people are overwhelmed by intelligent equipment. Smart home realizes a high-efficiency management system of residential facilities and family daily affairs, improves home comfort, safety, convenience, and artistry, and realizes Environmentally friendly and energy-saving living environment not only improves people's living efficiency but also improves the ecological environment, which can be said to kill two birds with one stone. During the design process of this program, many problems such as hardware failure and software error were encountered. After searching and reading documents, and then discussing with each other, the design was finally perfected. Comfortable and stylish home life is a symbol of social progress. The smart home control system can conveniently control home appliances, lighting, power supply, and home environment without changing any home appliances, so that people can enjoy the high-tech belt. Come to the simple and stylish modern life.


The above are the details of the smart switch solution introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have electronic function development needs for smart switches, you can trust us. We have rich experience in customized development of electronic products, and can evaluate the development cycle and IC price as soon as possible, and can also calculate PCBA quotations. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, Bluetooth IC and module, wifi module. Our development capabilities cover PCB design, single-chip microcomputer development, Bluetooth technology development, software customization development, APP customization development, WeChat official account development and other hardware and software design. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.

  • TOP