Find Pressure Measurement, Level Measurement, Temp&Humidity Instruments on Industry Directory, Reliable Manufacturer/Supplier/Factory from China.

Inquiry Basket (0)
Home > Industry Information > A practical technical solution for remotely controlling window switches through mobile phones

A practical technical solution for remotely controlling window switches through mobile phones

2021-04-19

Summary:

Traditional manual switch windows have been unable to meet people's daily needs. In order to provide convenience and comfort to people's lives, a control system for remotely controlling architectural windows using a mobile phone APP has been designed. The system is mainly composed of a mobile terminal, a main controller and an electric window opener. The control command sent by the mobile terminal is transmitted to the main controller via the Internet, and the main controller controls the electric window regulator according to the instruction to realize the opening, suspension and closing of the window. The system design realizes the real-time display of window movement status and position on the mobile phone interface, which is convenient and intuitive, and also provides a practical technical solution for remotely controlling the window switch through a mobile phone.

0 Preface

With the rapid and prosperous development of Chinese society, the level of people’s housing needs is also rising along with the continuous improvement of living standards. The rapid development of science and technology and Internet technology has greatly promoted the development of China's construction industry in the direction of intelligence [1]. Windows are indispensable components of architecture and are closely related to people's daily life activities [2]. At present, the windows of most buildings are still controlled by manual switches. Such traditional manual switch windows are unable to meet the daily needs of modern people[3]. Doors and windows [4]; rush to work in the morning to forget to open the window to update the indoor air and so on. Therefore, people urgently need a window that can be controlled remotely to meet the needs of life.

1 overall system design

1.1 Overall System Architecture

The system is mainly composed of three parts: a mobile phone terminal, a main controller, and an electric window opener. The mobile terminal is used to remotely control the real-time motion status of windows and display windows, and provides an intuitive human-computer interaction interface. The main controller is used to receive command information from the mobile phone, control the electric window opener to switch windows and feedback the window movement status information to the mobile phone. Therefore, it is the core of the entire system; the electric window opener is directly connected with the window and controls the opening and closing of the window. The overall structure of the system is shown in Figure 1. The mobile terminal first sends the instruction message to the server. The server then sends the instruction message via the Internet to the home router, and the router passes it to the main controller. The main controller completes the corresponding control action according to the instruction message.

1.2 Master Controller Design

The remote control of the windows requires a controller for controlling the window switches. The controller plays the role of controlling windows and remote connections and is the core of the system. The three controllers commonly used to control windows are as follows.

(1) Single chip microcomputer control: The single chip microcomputer is an integrated circuit chip, and is a central processing unit (CPU), a random access memory (RAM), a read only memory (ROM), and a plurality of I that have a VLSI technology. The O/O interface and interrupt system, timer/counter functions, etc. are integrated into a small and complete microcomputer system formed on a silicon chip, and are widely used in industrial control. Its advantages: economical, relatively low cost; disadvantages: not easy to expand, strong dependence on the environment, long development cycle. The master control board produced by a single-chip microcomputer has poor anti-interference ability and high failure rate due to factors such as a board manufacturing process, a layout structure, and a device quality.

(2) PLC Control: PLC (Programmable Logic Controller) is a digital computing operating electronic system designed specifically for use in industrial environments. It uses a programmable memory and stores instructions for performing logical operations, sequence control, timing, counting, and arithmetic operations, and controls various types of mechanical equipment or production through digital or analog input and output. Process [5]. Its advantages: strong anti-interference ability, low failure rate, easy expansion of equipment, easy maintenance, short development cycle; disadvantages: the cost is relatively high compared to single-chip microcomputer.

(3) Arduino Control: The Arduino is a convenient, flexible, and easy-to-use open source electronic prototype platform developed by a European development team in the winter of 2005. At the beginning of development, Arduino clarified its application environment and designed an open source open platform [6]. It has a rich interface, a simple programming environment, a great deal of freedom, a standardized interface model, and a high degree of extensibility. It is a relatively popular electronic interactive platform [7]. Because the board is open source hardware, many expansion boards and compatible boards with matching functions are available on the market. This system uses an Arduino compatible board - ESP Duino board. The board is both compatible with the Arduino and adds networking capabilities to it, making it more convenient and cheaper to use.

2 system hardware design and selection

The hardware of the system adopts a modular design. The hardware of the system is mainly composed of a mobile terminal, a main controller, an electric window opener and a window.

2.1 Mobile Terminal Selection

Mobile phone terminals use Android system. The Android mobile phone has now become the mobile operating system with the highest market share, has a high degree of open source, and has a very high expansion, which makes other mobile phone systems not comparable to [8]. Compared to other systems, Android system development is easier and there is almost no threshold, so you can quickly develop your own program.

2.2 main controller

The main controller is the core of the entire hardware system. On the one hand, it is responsible for receiving the command message from the mobile terminal and controlling the window opener to control the opening and closing of the window. On the other hand, the movement state of the window is returned to the mobile phone. The main controller circuit diagram shown in Figure 2. The main controller is mainly composed of a main control board, an infrared radiation sensor, and a wireless transmission module.

2.2.1 Main Control Board

The main control board uses the ESD Duino board manufactured by Sibo Technology Co., Ltd. The board was developed by the company based on ESP8266-13 and is compatible with Arduino UNO. The board adopts the ESP-WROOM-02 SMD WiFi module. Compared with the traditional Arduino board, it not only saves the trouble and expense of wiring the external WiFi module, but also makes the system more reliable and smaller in size. It is connected to the network. It has a wide range of applications.

2.2.2 Selection of Infrared Sensors

The system uses a separate infrared counter-shot sensor. The sensor is NPN normally closed, that is, it outputs a low-level signal when there is a block, and a high-level signal when it does not block. The operating voltage of the launch tube is 5 V, the working current is 40 mA, the working voltage of the receiving tube is 3 to 5.5 V, and the working current is 100 mA, which can be easily connected to the development board. Its effective detection distance of 2-20 cm and fast reaction time of 2 ms make it have a good application in the system.

2.2.3 Selection of Wireless Transmitter Modules

The wireless module has the advantages of small size, long transmission distance, etc., and is widely used in various fields of life. The operating frequency of the wireless module chosen for this system is 433 MHz. The 433 MHz wireless transceiver module is a short-range wireless communication module. Due to its low cost, sleep mode of approximately 1 μA of current consumption, small package size, and fewer external pins, it is widely used in wireless networking of the Internet of Things. use. The module also features high sensitivity, good diffraction performance, low power consumption, and strong penetrating power.

2.3 Selection of Electric Window Opener

The electric window opener is selected by the Shanghai KK Electronic Technology Co., Ltd. KK-LT-300 electric chain opener. Its operating voltage is 24 V DC, operating current is 1 A, pushing force is 400 N, stroke distance is 400 mm, and speed is 7 mm/s. It has overloaded overload protection design; low noise when switching windows, double metal chain chip design, more stable and smooth operation. The window opener is directly connected to the window and controls the opening and closing of the window through the extension and retraction of the chain.

3 system programming

From the mobile terminal to issue control commands to the window to execute instructions, is to rely on the system program to complete. The system program is the core of the entire system, and its program flow chart is shown in Figure 3. The mobile phone APP uses the Message Queuing Telemetry Transport (MQTT) transmission protocol to send a command message to the server. The server packetizes the message to the home router through the Internet, and the router passes the message to the main controller via the WiFi method. The main controller resolves After the instruction message is sent to the receiving module of the electric window opener through the wireless transmitting module, the operation of the electric window opener is controlled to control the opening and closing of the window. At the same time, the infrared counting sensor continuously collects and counts the number of chain sections of the electric window opener and sends them to the server in turn. The server receives the data and pushes it to the mobile terminal one by one as feedback information. The system program mainly includes two parts: mobile phone APP software program design and controller program design.

3.1 Mobile Phone APP Software Programming

The mobile phone APP is designed using the Java programming language and the development environment is Android Studio. Android Studio is Google's new Android mobile phone integrated development tool for Android mobile phone application development and debugging. The design of the mobile phone APP is used on the one hand to send instruction messages; on the other hand, it is used to receive feedback information and update it. The mobile phone APP program sends instruction messages and receives feedback messages using the MQTT transmission protocol. The working process is as follows. When the “Open” button is clicked, the instruction message is sent to the server in the form of MQTT protocol. The server sends the instruction message to the home router through the Internet, and the instruction message is pushed to the main controller via the router. The main controller controls according to the instruction message. The electric window regulator runs, the chain extends, and the window opens. At the same time, the infrared sensor continuously collects data and feeds it back to the mobile terminal via the original link. The mobile terminal data increases at a rate of 1% until 100% or receives a “pause” instruction message to stop working. Conversely, when the "Close" button is clicked, the data of the mobile terminal is decremented by 1% until 0% or a "Pause" command message is received to stop working. Therefore, the design of the mobile terminal control program enables people to operate the switch window more clearly and intuitively, and also makes it easier for people to control the size of the window according to the actual situation.

3.2 main controller program design

The core of the main controller is the ESD Proino board. The program programming uses the Arduino IDE development environment and the programming language is C/C++. The main controller's program function is: on the one hand, it is used to receive the instruction message from the mobile terminal and control the electric window opener to perform the corresponding action; on the other hand, the infrared sensor feedbacks the data collected by the electric window opener to the mobile phone. The main controller flow chart shown in Figure 4. After receiving the instruction message sent by the mobile terminal, the main controller analyzes and controls the expansion and the extension of the chain of the electric window regulator according to the parsed instruction message, thereby controlling the opening and closing of the window. At the same time, the infrared counting sensor counts and collects the number of chain sections of the electric window opener, and converts the collected data into a window size and feeds back to the mobile terminal to display in real time.

4 operating results

Open the mobile phone network connection and connect the phone to the network. After running the mobile terminal control application, when the “open” button is clicked, the electric window opener chain extends out of the open window, and the mobile terminal starts receiving data collected by the infrared sensor from the electric window opener and displays the numerical value on the mobile terminal control interface. The cumulative change. When the "pause" button is clicked, the electric window opener stops its operation, and the value on the control interface of the mobile terminal also stops accumulating and remains unchanged. When the “Close” button is clicked, the electric window regulator chain retracts and closes the window. The value on the control interface of the mobile terminal is continuously reduced until the electric window drive operation is completed and the window is closed. The mobile phone interface value is 0%. The program is stable, reliable, and responsive during operation, and it also visually shows the opening and closing of windows.

5 Conclusion

The remote switch control system for architectural windows designed in this paper breaks the traditional windowing mode, realizes the remote control of the architectural window with a mobile phone, and solves the problem that people cannot remotely open and close windows in their lives. The system not only realizes the remote control of the windows, but also can display the movement state and the window size of the windows in real time in the mobile terminal, so that the control of the windows is more clear and intuitive.


Industrial Laser Distance Sensor, we also call it secondary development laser distance module, which support TTL level and CMOS. The laser range sensor can be widely used in professional surveying, mapping, construction, robots, hunting arrows, industrial monitoring and automated measurement applications in electricity, transportation, etc. Our laser distance module supports data communication with RS232, USB with a simple adapter. The results of laser distance sensor can be evaluated with Arduino. We are always looking ahead, hoping we can make every measurement simple in life!

 Industrial Laser Distance Sensor

Parameters of M703A:

Accuracy

±1 mm (0.04 inch)

Measuring Unit

mm

Measuring Range (without Reflection)

0.03-60m(150m can customize)

Measuring Time

0.125~3 seconds

Laser Class

Class II

Laser Type

620-690nm, <1mW

Size

45*25*12mm (±1 mm)

Weight

About 10g

Voltage

DC2.0~3.3V

Electrical Level

TTL/CMOS

Frequency

8Hz(20Hz can customize)

Operating Temperature

0-40 (32-104 )

Storage Temperature

-25~60   (-13~140 )


Laser Distance RS232, Arduino Distance Module, Laser Module RS232
Pressure Measurement,Level Measurement Co., Ltd. http://www.irdistancesensor.com