The use of household appliances is an essential part of people’s busy work and life, but there is often a phenomenon that people can’t walk without power off, or forget to turn off household appliances, resulting in a waste of energy, there are also security risks. For example, the street lights in the public stairs are always on when no one is passing by, which is a waste of electricity. If the street lamp can be turned on when someone walks by, and then turn off when someone walks by, it will not only save energy, but also not affect the normal use.

The life theme of energy saving and environmental protection makes the smart home system more attractive. The biggest difference between smart home system and traditional home system is that it endows all items in the family with “wisdom”, so that they can “spontaneously” and “actively” communicate with home gateway, people and realize information interaction. RFID technology can first make smart home system automatically identify and sense household appliances, and then intelligent management, so as to achieve the purpose of energy saving and automatic control.

1 overall plan

This system is a smart home energy-saving automatic control system with 51 series single chip microcomputer as the control core and RFID radio frequency technology as the identification means. The system requires personnel to carry the door card in and out of the room, and the MCU can identify whether the guest is in the room by reading the number and information on the door card. If it is not, it will capture photos, so it can quickly identify the identity of the thief after the things in the room are lost.

Intelligent lighting management system is an important part of the system. When the indoor people leave the room, each module controlled by MCU will judge whether there are people in the room. If there is no one, the power will be cut off; When people enter the room again, power the room again. In addition to the traditional functions, the intelligent lighting management system can also sense the movement of human body and the illumination of the surrounding environment, and automatically control the switch and dimming of the lamp, so that “the lamp will be on when people come, and the lamp will be off when people go”. The light regulation system in intelligent lighting can simulate the changes of natural sunlight according to the needs. Users can feel the simulated seasonal changes from summer to winter, from spring to autumn, and even simulate different periods of the day by touching the switch or the remote control in their hands.

2. System composition

What is the purpose of RFID technology in smart home system

Figure 1 system composition block diagram

The system uses a variety of sensors to collect indoor physical parameters, and then judges the indoor personnel and environment through various information. It can avoid the wrong operation of power failure and no power supply in the room. As shown in Figure 1, the system consists of the following parts: ① infrared sensor. In most cases, the sensors that use the physical effect of the interaction between infrared radiation and matter to detect infrared radiation use the electrical effect of the interaction. ② Sound sensor. It is used to receive sound wave. Sound wave makes electret film vibrate, which leads to the change of capacitance, and produces a small voltage corresponding to the change. After conversion, it is transmitted to a single-chip microcomputer. ③ Exothermic sensor. The function of the sensor is to convert the heat release signals of various objects to electrical signals. ④ RFID sensor. Generally, it includes RF signal transmitter, HF receiver and control unit. ⑤ Micro camera. Responsible for capturing images, with small size, better concealment. ⑥ Home appliance controller. It mainly includes various control interfaces and driving circuits with smart home appliances.

MCU controller collects information through infrared sensor, sound sensor and heat release sensor to analyze whether there is someone in the room. The infrared sensor is the first layer detection, when someone enters the room, the infrared sensor will sense, the sound sensor is the second layer detection, and the heat release sensor is the third layer detection. After the comprehensive analysis of single-chip microcomputer, count, and then control the driving circuit to supply power to household appliances. When people walk out of the room, the infrared sensor first determines whether there is a person in the room, then the sound sensor, and finally combined with the heat release sensor. Only when the three sensors confirm that there is no person in the room, the power will be cut off. When someone enters a room, RFID will detect whether you have a room card and whether the room card meets the requirements. If you have a room card and meet the requirements, the sensor will detect it; Otherwise, people entering the room will be photographed, the anti-theft function will be turned on, and the alarm will be given.

3 RFID module hardware design

This system adopts RFID tag and reader in accordance with Mifare one S50 format of ISO / IEC 14443a protocol. First of all, smart home system users wear RFID tags, the electrical part of the tag is only composed of an antenna and ASIC. The antenna of electronic tag is only a few groups of winding coils, which is very suitable for packaging into the IS0 electronic tag. The ASIC of electronic tag consists of a high speed (106kb baud rate) RF interface, a control unit and an EEPROM. The transmitted or received data is stored in the EEPROM in the Mifare one tag. EEPROM is divided into 16 sectors, each sector is composed of 4 blocks. Block 0 of sector 0 (i.e. absolute address 0 block) is used to store the manufacturer’s code, which has been solidified and cannot be changed. Block 0, block 1 and block 2 of each sector are data blocks, which can be used to store data. Data block can be used for two kinds of applications: one is used for general data storage, which can be used for read and write operations; The other is used as data value, which can be used for initialization value, addition value, devaluation and reading value. Block 3 of each sector is control block, including password a, access control and password B.

Secondly, the cy-14443a Series RF module of RFID reader adopts the special chip of contactless card reader based on iso14443 standard. It adopts 0.6 μ m CMOS EEPROM process, supports iso14443 type a protocol and Mifare standard encryption algorithm. The chip is highly integrated with analog modulation and demodulation circuit, which can work with a minimum of peripheral circuits. It supports UART interface (- C), I2C interface (- U), or SPI interface (- P). The digital circuit has TTL and CMOS voltage working modes.

The system control core MCU uses UART interface of RFID read-write module and its interactive information to complete the user identification of smart home system. After the MCU sends commands to the RFID read-write module chip through UART interface, the read-write module sends a group of fixed frequency modulation signals of 13.56MHz to the nearby through the antenna and its matching circuit according to the non-contact RF card protocol format for card searching. When an RFID card is within the valid working range, the card will reply to the card type, establish the first step contact between the card and the read-write module, and then read and write the card after the password verification is passed.

4 software design of RFID reading and writing module

The communication rules between MCU and RFID module are as follows: ① baud rate: 19200bps, that is, 19200 bits per second. ② The command frame format is: preamble + communication length + command word + data field + check code. ③ After sending the command frame, the format of the return value is as follows: preamble + communication length + last sent command word + data field + check code. Among them, the leading header represents two bytes of 0xaa0xbb. If the data field also contains 0XAA, then it is followed by data 0, but the length word does not increase. The communication length represents the number of bytes of the communication frame except the preamble. Check code refers to the XOR value of all communication frames except the preamble and check code bytes. The core code of the assignment of the RFID command frame array cmdsend is as follows:

#define PCD_ PN 0x01 / / the constant of the device model command word is assigned an initial value.

#Define autosearch 0x13 / / the constant of the auto seek command word is assigned an initial value.

cmdsend[0] = 0xAA;

cmdsend[1] = 0xBB; // The leading header of the command frame is composed of two bytes of 0xaa0xbb.

switch(m_ Mode) / / the command frame array cmdsend is filled according to the sequence number of the command word in the command table.

The first command word in the {case 1 / /} command table is used to obtain the 8-byte device model.

cmdsend[2]=2; // Assignment of communication length field.

cmdsend[3]=PCD_ PN; // Command word field assignment.

CheckSum(&cmdsend[2]); // Check code field assignment.


The No.6 command word in the case 6: / / command table is used to set whether the RFID read-write chip works in the automatic card searching mode.

cmdsend[2]=3; // Assignment of communication length field.

cmdsend[3]=AUTOSEARCH; // Command word field assignment.

cmdsend[4]=1;// The data field is assigned with a value of 1 for automatic card searching and a value of 0 for passive card searching.

CheckSum(&cmdsend[2]); // Check code field assignment.



5 Conclusion

This paper describes the home circuit system with a single-chip microcomputer as the control core, using RFID technology for information collection, automatically and accurately judge the situation in the room, more intelligent and more accurate control of the power supply circuit, to achieve the purpose of energy saving appliances. In the laboratory environment, the test run, stable, good performance, to achieve the effect of energy saving and energy saving, to achieve the practical purpose of energy saving and emission reduction.

Editor in charge: CT

Leave a Reply

Your email address will not be published. Required fields are marked *