Abstract: A remote automatic control system design scheme applied in smart home environments was studied and proposed. It transmits operation instructions from the GSM mobile phone to the on duty GSM module at home through the GSM network, and then the GSM module controls the operation of the household appliances by transmitting infrared information through the infrared wireless local area network controlled by the microcontroller, completing the control intention of the information household appliances and feedback the information of the information household appliances for the next step of control. The system is safe and reliable, with stable performance. At the same time, the system can be used not only for remote automatic control of household devices, but also for home communication and home safety prevention, jointly building a smart home control system.
MR-S11-200-Z37
The 21st century is a century of information. Various technologies such as communications and the Internet have promoted the great progress of human civilization. The emergence of smart home control system enables people to remotely control any electrical appliances (air conditioners, water heaters, rice cookers, lights, audio, DVD recorders) at home at any time and anywhere through mobile phones or the Internet; Can you turn on the air conditioning at home in advance, let the water heater cook hot water in advance, and cook delicious rice in an electric rice cooker on the way to work? And all of this is just a few gentle clicks on the phone buttons or mouse. In addition, the system can also enable households to have multiple functions such as multi-channel alarm, remote monitoring, digital messaging, etc. If unfortunately a certain dangerous situation occurs, you and 110 can be notified at the first time for further action. Comfortable and fashionable home life is a sign of social progress. Without changing any home appliances in the home, the smart home system can easily control the home appliances, lights, power supplies and home environment both inside and outside the home (through wireless LAN, telecommunications or the Internet outside the home), so that people can enjoy the simple and fashionable modern life brought by high-tech.
The working principle of smart home system control
This system is a remote automatic control system based on infrared and GSM networks for use in smart home environments. The working principle is that the user sends a command short message through their own mobile phone, and the GSM module on duty at home receives the command and sends it to the host (microcontroller). The host processes the command and transmits it through infrared to the corresponding extension (microcontroller). After the extension processes the command, it starts the corresponding device, completes the command given by the user, and replies to the host. After the host receives the response, it sends a reply short message through the GSM module, reporting that the user has completed the command. If the host does not receive a reply message from the extension within the specified time (timed at 60 seconds here), the operation will be considered invalid. If the reply operation is invalid, a short message will be sent to the user’s phone, requesting the user to resend the command. If the received short message is incorrect, the host will immediately reply to the user that the operation is invalid and request to resend the command. The system composition is shown in Figure 1.
Figure 1 System composition diagram
Figure 1 System composition diagram
2 Hardware Design
2.1 MCU and GSM communication module
This microcontroller communicates with the GSM module through the RS232 serial communication interface. MR-S11-200-Z37 extracts SMS from the GSM device, sends relevant information, and connects to the infrared module through the serial communication interface. Using the infrared module, communication between the main and extension units is achieved. Therefore, the AT89S52 chip is selected. Two serial interfaces are required for control, but 89S52 only has one serial port, so it is necessary to simulate serial interface communication in the program. The simplest external wiring circuit is shown in Figure 2.
Figure 2 A T 89S52 External Wiring
Figure 2 A T 89S52 External Wiring
The communication between 89S52 and TC35 is carried out through an asynchronous serial interface, with a communication rate of 9600b? s. Has 1 start bit, 8 data bits, 1 stop bit, no parity check.
After the microcontroller starts, it issues the A T+CM GD=2 command to clear the data in the second storage space, and then continuously sends instructions to read the second storage space. If there is data, it means that the data has been received and processing has begun. After processing, the spatial data will be deleted. When the microcontroller sends a short message to the mobile phone, it will send a series of instructions to the GSM module, including A T, A T+CM GF=0, A T+CM GS=X. After receiving the reply message, the microcontroller will finally send the content of the short message.