Remote control air switch system based on GSM network

文档序号:1395625 发布日期:2020-02-28 浏览:29次 中文

阅读说明:本技术 一种基于gsm网络的远程遥控空气开关系统 (Remote control air switch system based on GSM network ) 是由 刘伟 于 2019-11-20 设计创作,主要内容包括:本发明涉及电子技术领域,特别涉及一种基于GSM网络的远程遥控空气开关系统,包括硬件系统和软件系统,所述硬件系统包括手机端发射模块、所述手机端发射模块通过GSM网络发送信息至GSM接收模块,所述GSM接收模块将信息传输至单片机,所述单片机连接有继电器模块,所述继电器模块连接有空气开关模块,所述软件系统包括硬件初始化程序,GSM模块程序,时钟芯片程序和中断服务程序,本发明不受时间、地点限制,利用手机遥控实现瞬时跳闸、指定时间合闸的空气开关控制系统,开关通断的时间点可通过手机键盘实时修改。(The invention relates to the technical field of electronics, in particular to a remote control air switch system based on a GSM network, which comprises a hardware system and a software system, wherein the hardware system comprises a mobile phone end transmitting module, the mobile phone end transmitting module transmits information to a GSM receiving module through the GSM network, the GSM receiving module transmits the information to a single chip microcomputer, the single chip microcomputer is connected with a relay module, the relay module is connected with an air switch module, the software system comprises a hardware initialization program, a GSM module program, a clock chip program and an interruption service program.)

1. A remote control air switch system based on GSM network, its characterized in that: the mobile phone terminal transmitting module sends information to the GSM receiving module through the GSM network, the GSM receiving module transmits the information to the single chip microcomputer, the single chip microcomputer is connected with the relay module, the relay module is connected with the air switch module, and the software system comprises a hardware initialization program, a GSM module program, a clock chip program and an interrupt service program.

2. A remote air switch system based on GSM network according to claim 1, characterized in that: the single chip microcomputer is connected with a clock module, the clock module and the clock module are coordinated and controlled with each other, the clock module adopts a PCF8563 chip to be externally connected with a 32.768kHz crystal oscillator, and a clock line and a data line are respectively connected with a positive power supply through a pull-up resistor.

3. A remote air switch system based on GSM network according to claim 1, characterized in that: the GSM receiving module can be set on a computer by using an AT instruction to send a command through a serial port, so that the GSM receiving module becomes a GSM terminal product which is universal on data communication, and the GSM receiving module consists of two parts of circuits: TC35I circuit and SIM card circuit.

4. A remote air switch system based on GSM network according to claim 1, characterized in that: the hardware initialization comprises single chip microcomputer initialization and GSM module initialization, the single chip microcomputer initialization comprises serial port, timer and IO port initialization, and the GSM receiving module initialization comprises the steps of setting a short message receiving and sending control mode to a Text mode, setting a short message service center to be a Guangdong mobile mode and setting the short message service center to be a serial port echo mode.

5. A remote air switch system based on GSM network according to claim 1, characterized in that: the implementation flow of the main program is as follows: firstly, initializing a singlechip and a GSM receiving module, delaying for 30 seconds, judging whether the system has interruption or not, if the system has interruption, entering the interruption, and if the system does not have interruption, providing a clock signal by a clock chip, enabling the system to be in a time detection state, setting trip time, automatically tripping an air switch, setting allowable closing time, allowing closing at the moment, and returning the online state of the system to a mobile phone user in a short message form.

6. A remote air switch system based on GSM network according to claim 1, characterized in that: the implementation flow of the interrupt service program is as follows: firstly, judging whether the information of a specific mobile phone number is received, then displaying the content of the short message back to the single chip microcomputer by the GSM receiving module, intercepting the serial number of the short message by the single chip microcomputer and sending a reading command.

Technical Field

The invention relates to the technical field of electronics, in particular to a remote control air switch system based on a GSM network.

Background

At present, an air switch plays an important protection role in industrial power utilization or household power utilization, but the air switch does not have the functions of timing tripping and remote control tripping, and manual close-range control cannot be achieved. If the staff forgets to turn off the power supply of the electric equipment after work, people who can contact the power switch can switch off the power supply and turn off all the electric equipment in the building in a long-distance emergency manner if the power switch is needed, or the power switch is turned off regularly after work, so that the staff on site can be aware of leaving the building, and manual operation is needed.

The common remote control switches in the current market are mostly based on short-distance electromagnetic wave or Ethernet transmission form, and have the defects of short transmission distance, limitation on the power of remote control equipment, single function and the like. With the continuous development of global mobile communication technology, Short Message Service (SMS) of GSM wireless communication technology is widely used in various data communication devices because of its characteristics of on-line at any time, wide coverage and high reliability.

Disclosure of Invention

The invention aims to provide a remote control air switch system based on a GSM network, aiming at the defects and shortcomings of the prior art, the air switch control system realizes instantaneous trip and closing at a specified time by utilizing the remote control of a mobile phone, and the on-off time point of a switch can be modified in real time through a mobile phone keyboard.

In order to achieve the purpose, the invention adopts the technical scheme that:

the invention relates to a remote control air switch system based on a GSM network, which comprises a hardware system and a software system, wherein the hardware system comprises a mobile phone end transmitting module, the mobile phone end transmitting module transmits information to a GSM receiving module through the GSM network, the GSM receiving module transmits the information to a single chip microcomputer, the single chip microcomputer is connected with a relay module, the relay module is connected with an air switch module, and the software system comprises a hardware initialization program, a GSM module program, a clock chip program and an interrupt service program.

On the basis of the scheme, the single chip microcomputer is preferably connected with a clock module, the clock module and the clock module are coordinated and controlled with each other, the clock module is externally connected with a 32.768kHz crystal oscillator by adopting a PCF8563 chip, and a clock line and a data line are respectively connected with a positive power supply by using a pull-up resistor.

On the basis of the above scheme, preferably, the GSM receiving module can be set on a computer by sending a command through a serial port by using an AT command, so that the GSM receiving module becomes a GSM terminal product which is commonly used in data communication, and the GSM receiving module comprises two parts of circuits: TC35I circuit and SIM card circuit.

On the basis of the scheme, the hardware initialization comprises single chip microcomputer initialization and GSM module initialization, the single chip microcomputer initialization comprises serial port, timer and IO port initialization, and the GSM receiving module initialization comprises the steps of setting a short message transceiving control mode to be a Text mode, setting a short message service center to be Guangdong mobile and setting the short message service center to be a serial port echo mode.

On the basis of the above scheme, preferably, the main program implementation flow is as follows: firstly, initializing a singlechip and a GSM receiving module, delaying for 30 seconds, judging whether the system has interruption or not, if the system has interruption, entering the interruption, and if the system does not have interruption, providing a clock signal by a clock chip, enabling the system to be in a time detection state, setting trip time, automatically tripping an air switch, setting allowable closing time, allowing closing at the moment, and returning the online state of the system to a mobile phone user in a short message form.

On the basis of the above scheme, preferably, the implementation flow of the interrupt service program is as follows: firstly, judging whether the information of a specific mobile phone number is received, then displaying the content of the short message back to the single chip microcomputer by the GSM receiving module, intercepting the serial number of the short message by the single chip microcomputer and sending a reading command.

After adopting the structure, the invention has the beneficial effects that: the invention is not limited by time and place, and the air switch control system realizes instantaneous trip and closing at the appointed time by utilizing the remote control of the mobile phone, and the on-off time point of the switch can be modified in real time through a mobile phone keyboard.

Drawings

FIG. 1 is a general structural view of the present invention;

FIG. 2 is a schematic diagram of the master control of the single chip microcomputer of the present invention;

FIG. 3 is a circuit diagram of a clock module of the present invention;

FIG. 4 is a circuit diagram of a relay module of the present invention;

FIG. 5 is a circuit diagram of an air switch module of the present invention;

FIG. 6 is a flow chart of the main routine of the present invention;

fig. 7 is a flow chart of the terminal service procedure of the present invention.

Detailed Description

The invention will be further described with reference to the accompanying drawings.

As shown in fig. 1 to 7, the remote control air switch system based on the GSM network of the present invention includes a hardware system and a software system, wherein the hardware system includes a mobile phone terminal transmitting module, the mobile phone terminal transmitting module transmits information to a GSM receiving module through the GSM network, the GSM receiving module transmits the information to a single chip, the single chip is connected with a relay module, the relay module is connected with an air switch module, and the software system includes a hardware initialization program, a GSM module program, a clock chip program and an interrupt service program.

On the basis of the scheme, the single chip microcomputer is preferably connected with a clock module, the clock module and the clock module are coordinated and controlled with each other, the clock module is externally connected with a 32.768kHz crystal oscillator by adopting a PCF8563 chip, and a clock line and a data line are respectively connected with a positive power supply by using a pull-up resistor.

On the basis of the above scheme, preferably, the GSM receiving module can be set on a computer by sending a command through a serial port by using an AT command, so that the GSM receiving module becomes a GSM terminal product which is commonly used in data communication, and the GSM receiving module comprises two parts of circuits: TC35I circuit and SIM card circuit.

On the basis of the scheme, the hardware initialization comprises single chip microcomputer initialization and GSM module initialization, the single chip microcomputer initialization comprises serial port, timer and IO port initialization, and the GSM receiving module initialization comprises the steps of setting a short message transceiving control mode to be a Text mode, setting a short message service center to be Guangdong mobile and setting the short message service center to be a serial port echo mode.

On the basis of the above scheme, preferably, the main program implementation flow is as follows: firstly, initializing a singlechip and a GSM receiving module, delaying for 30 seconds, judging whether the system has interruption or not, if the system has interruption, entering the interruption, and if the system does not have interruption, providing a clock signal by a clock chip, enabling the system to be in a time detection state, setting trip time, automatically tripping an air switch, setting allowable closing time, allowing closing at the moment, and returning the online state of the system to a mobile phone user in a short message form.

On the basis of the above scheme, preferably, the implementation flow of the interrupt service program is as follows: firstly, judging whether the information of a specific mobile phone number is received, then displaying the content of the short message back to the single chip microcomputer by the GSM receiving module, intercepting the serial number of the short message by the single chip microcomputer and sending a reading command.

The invention firstly sets a unique mobile phone number which can control the device in a singlechip program, and a mobile phone end transmitting module of the number sends a group of identifiable information to control the timing and the tripping of the air switch at any time. After the air switch acts each time, the system sends the state information of the air switch to the mobile phone, and a mobile phone user can acquire feedback information in real time and know whether the system works normally. After the number of the short messages in the SIM card reaches 50, the singlechip sends a command of clearing the short messages to ensure the normal operation of the GSM module, thereby ensuring the long-time stable operation of the whole system.

As shown in fig. 3, the clock module PCF8563 of the present invention provides a clock signal, and the single chip obtains the standard time of the mobile network when the GSM module receives information, corrects the time of the clock chip, and ensures the accuracy of the time; the time set by the main control chip is compared with the time of the clock module to send out a control command, the set time can be modified at any time by a mobile phone signal command, the time and the state of the air switch after each modification are stored in an E2PROM (electrically erasable programmable read only memory) of the single chip microcomputer, the state of the last air switch is kept after the system is powered off, and the requirement of controlling the air switch in a timing mode is met.

As shown in figure 2, the system adopts an STC12C5052AD singlechip, the instruction codes are completely compatible with the traditional 8051, and the system is a singlechip with single clock, machine period and low power consumption. The working voltage range is 2.4-3.8V; the program space available to the user is up to 5 kbytes; 256 bytes of RAM are integrated on the chip; supporting ISPs (programmable at the system) and IAPs (programmable at the application).

As shown in FIG. 2, the design of the core control module of the single chip microcomputer mainly comprises the connection design of a minimum system of the MCU single chip microcomputer, a clock chip, a GSM module and a relay. Wherein P3.0 and P3.1 are used as serial ports for communicating with the GSM module; p3.5 is a relay leading-out end driven by a triode 9013; p1.5 and P1.4 are respectively used as a data line and a clock line of I2C communication of the clock chip PCF 8563; the single chip microcomputer is externally connected with an 11.0592MHz crystal oscillator, so that the accuracy of a clock is ensured.

As shown in fig. 5, the air switch module of the invention selects a Zhengtai air switch DZ47LE, the switch adopts a VG54123 chip to form a leakage protector, and has the functions of leakage and overcurrent protection, the internal circuit of the air switch is shown in fig. 5, D1-D4 are rectifier bridges, KM is a relay, SB is a normally open button, ZTA is a zero sequence current transformer, leakage current is monitored, SCR is a thyristor, and the internal circuit diagram of the VG54123 chip is shown in a dashed box. When the SB button is pressed, the air switch automatically trips. Based on the principle, an output loop of the relay is connected with the SB button in parallel, and the air switch is controlled to trip through the closing of the relay, so that a novel remote-controlled switch is formed.

The invention is not limited by time and place, and the air switch control system realizes instantaneous trip and closing at the appointed time by utilizing the remote control of the mobile phone, and the on-off time point of the switch can be modified in real time through a mobile phone keyboard.

The above description is only a preferred embodiment of the present invention, and all equivalent changes or modifications of the structure, characteristics and principles described in the present invention are included in the scope of the present invention.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于校园固定无线电话机智能计费的方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!