技术领域technical field
本发明涉及开关检测技术领域,更具体的说,本发明涉及一种无线门磁开关检测电路。The invention relates to the technical field of switch detection, and more specifically, the invention relates to a wireless door magnetic switch detection circuit.
背景技术Background technique
无线门磁开关检测及编解码电路已经应用于生活中的方方面面,其可用于探测门、窗、抽屉等是否被非法打开或移动,使用简单,实用性和适用性广泛。Wireless door magnetic switch detection and encoding and decoding circuits have been used in all aspects of life. It can be used to detect whether doors, windows, drawers, etc. are illegally opened or moved. It is easy to use, wide in practicability and applicability.
但现有的无线开关检测电路,在开关接通后,射频发射模块持续处于发射状态,以保持检测门的开关状态,导致电路的功耗很大。因此,需要一种新的无线门磁开关检测电路。However, in the existing wireless switch detection circuit, after the switch is turned on, the radio frequency transmitting module continues to be in the transmitting state to keep the detection door open and closed, resulting in a large power consumption of the circuit. Therefore, a new wireless door magnetic switch detection circuit is needed.
发明内容Contents of the invention
为了克服现有技术的不足,本发明提供了一种无线门磁开关检测电路。In order to overcome the deficiencies of the prior art, the invention provides a wireless door magnetic switch detection circuit.
本发明解决其技术问题所采用的技术方案是:一种无线门磁开关检测电路,其改进之处在于:包括RS触发器模块、射频发射模块、射频接收模块、解码模块和D触发器模块,D触发器模块包括D触发器U4;The technical solution adopted by the present invention to solve the technical problem is: a wireless door magnetic switch detection circuit, which is improved in that it includes an RS trigger module, a radio frequency transmitting module, a radio frequency receiving module, a decoding module and a D trigger module, The D flip-flop module includes a D flip-flop U4;
RS触发器模块与射频发射模块电性连接,用于产生开关门信号并输出给射频发射模块;The RS trigger module is electrically connected to the radio frequency transmission module, and is used to generate a switch gate signal and output it to the radio frequency transmission module;
射频发射模块与射频接收模块电性连接,用于将开关门信号输出给射频接收模块;The radio frequency transmitting module is electrically connected with the radio frequency receiving module, and is used to output the switch door signal to the radio frequency receiving module;
射频接收模块与解码模块电性连接,用于将所述的开关门信号解调并输出给解码模块进行解码;The radio frequency receiving module is electrically connected to the decoding module, and is used to demodulate the switch gate signal and output it to the decoding module for decoding;
解码模块与D触发器U4电性连接,用于将解码后的信号输出给D触发器U4;The decoding module is electrically connected to the D flip-flop U4, and is used to output the decoded signal to the D flip-flop U4;
D触发器U4与外部的MCU电性连接,输出电平状态给MCU,使MCU检测到开关门状态,并一直保持输出该电平状态。The D flip-flop U4 is electrically connected to the external MCU, and outputs the state of the level to the MCU, so that the MCU detects the state of opening and closing the door, and keeps outputting the state of the level.
在上述电路中,还包括电池模块,电池模块包括两个串联的纽扣电池,该纽扣电池与所述的RS触发器模块电性连接,用于给RS触发器模块供电。In the above circuit, a battery module is also included, and the battery module includes two button batteries connected in series, and the button batteries are electrically connected to the RS trigger module for supplying power to the RS trigger module.
在上述电路中,所述的电池模块还包括PMOS管Q2,PMOS管Q2的漏极与所述纽扣电池电性连接,源极与所述的RS触发器模块电性连接,栅极接地。In the above circuit, the battery module further includes a PMOS transistor Q2, the drain of the PMOS transistor Q2 is electrically connected to the button battery, the source is electrically connected to the RS flip-flop module, and the gate is grounded.
在上述电路中,还包括发光模块,发光模块包括发光二极管D4,该发光二极管D4与RS触发器模块连接,用于在RS触发器模块产生开关门信号时发光;In the above circuit, a light-emitting module is also included, the light-emitting module includes a light-emitting diode D4, and the light-emitting diode D4 is connected to the RS flip-flop module for emitting light when the RS flip-flop module generates a switch gate signal;
该发光二极管D4还与所述的纽扣电池连接,使纽扣电池给发光二极管D4供电。The light-emitting diode D4 is also connected to the button battery, so that the button battery supplies power to the light-emitting diode D4.
在上述电路中,所述的RS触发器模块包括与非门芯片U3、NMOS管Q1和干簧管SW1,与非门芯片U3构成了第一RS触发器和第二RS触发器,第一RS触发器包括与非门芯片U3中的与非门单元U3C和与非门单元U3D,第二RS触发器包括与非门芯片U3中的与非门单元U3A和与非门单元U3B,In the above circuit, the RS flip-flop module includes a NAND gate chip U3, an NMOS transistor Q1 and a reed switch SW1, and the NAND gate chip U3 constitutes a first RS flip-flop and a second RS flip-flop, the first RS The flip-flop includes the NAND gate unit U3C and the NAND gate unit U3D in the NAND gate chip U3, and the second RS flip-flop includes the NAND gate unit U3A and the NAND gate unit U3B in the NAND gate chip U3,
干簧管SW1与与非门单元U3C的其中一个输入端口连接,与非门单元U3C的输出端口与与非门单元U3D的输入端口连接,与非门单元U3D的输出端口与所述的射频发射模块连接;The reed switch SW1 is connected to one of the input ports of the NAND gate unit U3C, the output port of the NAND gate unit U3C is connected to the input port of the NAND gate unit U3D, and the output port of the NAND gate unit U3D is connected to the radio frequency transmitting module connection;
干簧管SW1与NMOS管Q1的栅极连接,NMOS管Q1的漏极与与非门单元U3A的其中一个输入端口连接,与非门单元U3A的输出端口与与非门单元U3B的输入端口连接,与非门单元U3B的输出端口与所述的射频发射模块连接。The reed switch SW1 is connected to the gate of the NMOS transistor Q1, the drain of the NMOS transistor Q1 is connected to one of the input ports of the NAND gate unit U3A, and the output port of the NAND gate unit U3A is connected to the input port of the NAND gate unit U3B , the output port of the NAND gate unit U3B is connected to the radio frequency transmitting module.
在上述电路中,所述的射频发射模块包括无线发射模组J3,无线发射模组J3的端口K0与所述的与非门单元U3D的输出端口连接,无线发射模组J3的端口K1与所述的与非门单元U3B的输出端口连接。In the above circuit, the radio frequency transmission module includes a wireless transmission module J3, the port K0 of the wireless transmission module J3 is connected to the output port of the NAND gate unit U3D, and the port K1 of the wireless transmission module J3 is connected to the output port of the NAND gate unit U3D. The output port of the above-mentioned NAND gate unit U3B is connected.
在上述电路中,所述的射频接收模块包括无线接收芯片U2,无线接收芯片U2接收所述的无线发射模组J3发射的信号并进行解调;In the above circuit, the radio frequency receiving module includes a wireless receiving chip U2, and the wireless receiving chip U2 receives and demodulates the signal transmitted by the wireless transmitting module J3;
无线接收芯片U2与所述的解码模块连接,将解调后的信号输出给解码模块进行解码。The wireless receiving chip U2 is connected to the decoding module, and outputs the demodulated signal to the decoding module for decoding.
在上述电路中,所述的解码模块包括无线解码芯片U1,无线解码芯片U1接收所述无线接收芯片U2发出的解调后的信号;In the above circuit, the decoding module includes a wireless decoding chip U1, and the wireless decoding chip U1 receives the demodulated signal sent by the wireless receiving chip U2;
无线接收芯片U2与D触发器U4连接,将解码后的信号输出给D触发器U4。The wireless receiving chip U2 is connected with the D flip-flop U4, and outputs the decoded signal to the D flip-flop U4.
本发明的有益效果是:通过D触发器对开门和关门的状态进行输出且输出状态可保持,实现可自动长时间记忆门的开关状态,避免了在没有外部动作时对门的开关状态反复发射和接收信号、反复检测,减少电路的功耗。The beneficial effect of the present invention is: the state of opening and closing the door is output through the D flip-flop and the output state can be maintained, the switch state of the door can be automatically memorized for a long time, and the repeated transmission and switching of the door switch state is avoided when there is no external action. Receive the signal, detect it repeatedly, and reduce the power consumption of the circuit.
附图说明Description of drawings
附图1为本发明的无线门磁开关检测电路的方框图示意图。Accompanying drawing 1 is the block diagram schematic diagram of the wireless magnetic door switch detection circuit of the present invention.
附图2为图1中的RS触发器模块、射频发射模块、电池模块和发光模块的电路图示意图。Accompanying drawing 2 is a schematic circuit diagram of the RS trigger module, the radio frequency transmitting module, the battery module and the light emitting module in Fig. 1 .
附图3为本发明的无线门磁开关检测电路的射频接收模块的电路图示意图。Accompanying drawing 3 is the schematic circuit diagram of the radio frequency receiving module of the wireless door magnetic switch detection circuit of the present invention.
附图4为本发明的无线门磁开关检测电路中的解码模块的电路图示意图。Accompanying drawing 4 is the schematic circuit diagram of the decoding module in the detection circuit of the wireless door magnetic switch of the present invention.
附图5为为本发明的无线门磁开关检测电路中的D触发器模块的电路图示意图。附图6为图1中的外部电源的电路图示意图。Accompanying drawing 5 is the schematic circuit diagram of the D flip-flop module in the wireless door magnetic switch detection circuit of the present invention. Accompanying drawing 6 is a schematic circuit diagram of the external power supply in Fig. 1 .
具体实施方式Detailed ways
下面结合附图和实施例对本发明进一步说明。The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
以下将结合实施例和附图对本发明的构思、具体结构及产生的技术效果进行清楚、完整地描述,以充分地理解本发明的目的、特征和效果。显然,所描述的实施例只是本发明的一部分实施例,而不是全部实施例,基于本发明的实施例,本领域的技术人员在不付出创造性劳动的前提下所获得的其他实施例,均属于本发明保护的范围。另外,专利中涉及到的所有联接/连接关系,并非单指构件直接相接,而是指可根据具体实施情况,通过添加或减少联接辅件,来组成更优的联接结构。本发明创造中的各个技术特征,在不互相矛盾冲突的前提下可以交互组合。The idea, specific structure and technical effects of the present invention will be clearly and completely described below in conjunction with the embodiments and accompanying drawings, so as to fully understand the purpose, features and effects of the present invention. Apparently, the described embodiments are only some of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative efforts belong to The protection scope of the present invention. In addition, all the connection/connection relationships involved in the patent do not simply refer to the direct connection of components, but mean that a better connection structure can be formed by adding or reducing connection accessories according to specific implementation conditions. The various technical features in the invention can be combined interactively on the premise of not conflicting with each other.
参照图1所示,本发明提供了一种无线门磁开关检测电路,包括RS触发器模块10、射频发射模块20、射频接收模块30、解码模块40和D触发器模块50,D触发器模块50包括D触发器U4,RS触发器模块10与射频发射模块20电性连接,用于产生开关门信号并输出给射频发射模块20;射频发射模块20与射频接收模块30电性连接,用于将开关门信号输出给射频接收模块30;射频接收模块30与解码模块40电性连接,用于将所述的开关门信号解调并输出给解码模块40进行解码;解码模块40与D触发器U4电性连接,用于将解码后的信号输出给D触发器U4;D触发器U4与外部的MCU电性连接,输出电平状态给MCU,使MCU检测到开关门状态,并且D触发器U4一直保持输出该电平状态,直至有新的开关信号时,D触发器U4会重新输出电平状态。通过D触发器对开门和关门的状态进行输出,并且在无外部信号的时候,D触发器U4输出给MCU的输出状态可保持,实现可自动长时间记忆门的开关状态,避免了在没有外部动作时对门的开关状态反复发射和接收信号、反复检测,减少电路的功耗。当门磁开关闭合和断开时会分别触发一次射频发射模块的发射,之后射频发射模块会进入睡眠模式,而普通的开关检测电路在开关接通后,射频发射模块持续处于发射状态,功耗很大,并且因功耗大,导致电路在用电池作为电源时,续航较短。With reference to shown in Figure 1, the present invention provides a kind of wireless magnetic door switch detection circuit, comprises RS flip-flop module 10, radio frequency transmitting module 20, radio frequency receiving module 30, decoding module 40 and D flip-flop module 50, D flip-flop module 50 includes a D flip-flop U4, and the RS flip-flop module 10 is electrically connected to the radio frequency transmitting module 20 for generating a switch gate signal and outputting it to the radio frequency transmitting module 20; the radio frequency transmitting module 20 is electrically connected to the radio frequency receiving module 30 for The switch door signal is output to the radio frequency receiving module 30; the radio frequency receiving module 30 is electrically connected with the decoding module 40, and is used to demodulate the door switch signal and output it to the decoding module 40 for decoding; the decoding module 40 and the D flip-flop U4 is electrically connected to output the decoded signal to the D flip-flop U4; the D flip-flop U4 is electrically connected to the external MCU, and the output level state is given to the MCU, so that the MCU detects the state of the switch door, and the D flip-flop U4 keeps outputting the level state until there is a new switch signal, and the D flip-flop U4 will output the level state again. The state of opening and closing the door is output through the D flip-flop, and when there is no external signal, the output state of the D flip-flop U4 output to the MCU can be maintained, realizing the automatic long-term memory of the switch state of the door, avoiding During the action, the switch state of the door is repeatedly transmitted and received, and the signal is repeatedly detected, so as to reduce the power consumption of the circuit. When the door magnetic switch is closed and disconnected, it will trigger the transmission of the radio frequency transmission module, and then the radio frequency transmission module will enter the sleep mode, and the ordinary switch detection circuit will continue to be in the transmission state after the switch is turned on, and the power consumption will be reduced. It is very large, and due to the high power consumption, the circuit has a short battery life when it uses a battery as a power source.
结合图1和图2所示,本发明还包括电池模块60,电池模块60包括两个串联的纽扣电池(BAT1和BAT2),纽扣电池的型号为CR2032,该纽扣电池与所述的RS触发器模块10电性连接,给RS触发器模块10供电;进一步的,所述的电池模块60还包括PMOS管Q2,PMOS管Q2为增强型PMOS管,PMOS管Q2的型号为AO3401,PMOS管Q2的漏极与所述纽扣电池连接,源极与所述的RS触发器模块10电性连接,栅极接地。通过PMOS管Q2实现电池的防反接,防反接的原理为:当电池正常安装时,电池电压通过PMOS管Q2的体二极管到达PMOS管的源极,此时源极电压为高电平。PMOS管Q2的栅极连接电源地,此时Ugs<Ugs(th),PMOS管Q2导通,电池为外部电路正常供电;当电池反接时,PMOS管Q2的栅极为6V电压,漏极为接地,源极为低,PMOS管Q2不导通,电池无法为外部电路供电。Shown in conjunction with Fig. 1 and Fig. 2, the present invention also comprises battery module 60, and battery module 60 comprises two button batteries (BAT1 and BAT2) connected in series, and the model of button battery is CR2032, and this button battery and described RS flip-flop The module 10 is electrically connected to supply power to the RS trigger module 10; further, the battery module 60 also includes a PMOS transistor Q2, the PMOS transistor Q2 is an enhanced PMOS transistor, the model of the PMOS transistor Q2 is AO3401, and the PMOS transistor Q2 The drain is connected to the button battery, the source is electrically connected to the RS flip-flop module 10 , and the gate is grounded. The anti-reverse connection of the battery is realized through the PMOS transistor Q2. The principle of the anti-reverse connection is: when the battery is installed normally, the battery voltage reaches the source of the PMOS transistor through the body diode of the PMOS transistor Q2, and the source voltage is at a high level. The gate of the PMOS transistor Q2 is connected to the power ground. At this time, Ugs<Ugs(th), the PMOS transistor Q2 is turned on, and the battery supplies power to the external circuit normally; when the battery is reversed, the gate of the PMOS transistor Q2 is 6V, and the drain is grounded. , the source is extremely low, the PMOS transistor Q2 is not turned on, and the battery cannot supply power to the external circuit.
结合图2所示,还包括发光模块70,发光模块70包括发光二极管D4,该发光二极管D4与RS触发器模块10连接,用于在RS触发器模块10产生开关门信号时发光,作为提示。该发光二极管D4还与所述的纽扣电池连接,纽扣电池给发光二极管D4供电。As shown in FIG. 2 , a light emitting module 70 is also included. The light emitting module 70 includes a light emitting diode D4 connected to the RS trigger module 10 for emitting light when the RS trigger module 10 generates a switch gate signal as a reminder. The light emitting diode D4 is also connected to the button battery, and the button battery supplies power to the light emitting diode D4.
结合图1和图2所示,所述的RS触发器模块10包括与非门芯片U3、NMOS管Q1和干簧管SW1,NMOS管Q1为增强型NMOS管,NMOS管Q1的型号为2N7002/SOT,本电路使用的干簧管为常开干簧管,干簧管的型号为MKA10110 7-10,与非门芯片U3构成了第一RS触发器101和第二RS触发器102,第一RS触发器101包括与非门芯片U3中的与非门单元U3C和与非门单元U3D,第二RS触发器102包括与非门芯片U3中的与非门单元U3A和与非门单元U3B,干簧管SW1与与非门单元U3C的其中一个输入端口(本实施例中是与非门芯片U3的第9脚)连接,与非门单元U3C的输出端口与与非门单元U3D的输入端口连接,与非门单元U3D的输出端口与所述的射频发射模块连接;As shown in FIG. 1 and FIG. 2, the RS flip-flop module 10 includes a NAND gate chip U3, an NMOS transistor Q1 and a reed switch SW1, the NMOS transistor Q1 is an enhanced NMOS transistor, and the model of the NMOS transistor Q1 is 2N7002/ SOT, the reed switch used in this circuit is a normally open reed switch, the model of the reed switch is MKA10110 7-10, and the NAND gate chip U3 constitutes the first RS flip-flop 101 and the second RS flip-flop 102, the first The RS flip-flop 101 includes the NAND gate unit U3C and the NAND gate unit U3D in the NAND gate chip U3, and the second RS flip-flop 102 includes the NAND gate unit U3A and the NAND gate unit U3B in the NAND gate chip U3, The reed switch SW1 is connected to one of the input ports of the NAND gate unit U3C (the 9th pin of the NAND gate chip U3 in this embodiment), and the output port of the NAND gate unit U3C is connected to the input port of the NAND gate unit U3D Connect, the output port of the NAND gate unit U3D is connected with the radio frequency transmitting module;
干簧管SW1与NMOS管Q1的栅极连接,NMOS管Q1的漏极与与非门单元U3A的其中一个输入端口(本实施例中是与非门芯片U3的第2脚)连接,与非门单元U3A的输出端口与与非门单元U3B的输入端口连接,与非门单元U3B的输出端口与所述的射频发射模块连接。The reed switch SW1 is connected to the gate of the NMOS transistor Q1, the drain of the NMOS transistor Q1 is connected to one of the input ports of the NAND gate unit U3A (the second pin of the NAND gate chip U3 in this embodiment), and the NMOS transistor Q1 The output port of the gate unit U3A is connected to the input port of the NAND gate unit U3B, and the output port of the NAND gate unit U3B is connected to the radio frequency transmitting module.
结合图1和图2所示,所述的射频发射模块20包括无线发射模组J3,无线发射模组J3的端口K0通过二极管D2与所述的与非门单元U3D的输出端口连接,无线发射模组J3的端口K1通过二极管D3与所述的与非门单元U3B的输出端口连接,接收RS触发器模块10产生的开关门信号,并发射给射频接收模块30。Shown in conjunction with Fig. 1 and Fig. 2, described radio frequency transmission module 20 comprises wireless transmission module J3, and the port K0 of wireless transmission module J3 is connected with the output port of described NAND gate unit U3D through diode D2, wireless transmission The port K1 of the module J3 is connected to the output port of the NAND gate unit U3B through a diode D3 , receives the switch gate signal generated by the RS flip-flop module 10 , and transmits it to the radio frequency receiving module 30 .
结合图1和图3所示,所述的射频接收模块30包括无线接收芯片U2,无线接收芯片U2接收所述的无线发射模组J3发射的信号并进行解调;无线接收芯片U2与所述的解码模块40连接,将解调后的信号输出给解码模块40进行解码。Shown in conjunction with Fig. 1 and Fig. 3, described radio frequency receiving module 30 comprises wireless receiving chip U2, and wireless receiving chip U2 receives the signal that described wireless transmitting module J3 transmits and demodulates; Wireless receiving chip U2 and described The decoding module 40 is connected, and the demodulated signal is output to the decoding module 40 for decoding.
结合图1、图4和图5所示,所述的解码模块40包括无线解码芯片U1,无线解码芯片U1接收所述无线接收芯片U2发出的解调后的信号;无线接收芯片U2与D触发器U4连接,将解码后的信号输出给D触发器U4。Shown in conjunction with Fig. 1, Fig. 4 and Fig. 5, described decoding module 40 comprises wireless decoding chip U1, and wireless decoding chip U1 receives the signal after the demodulation that described wireless receiving chip U2 sends; Wireless receiving chip U2 and D trigger The device U4 is connected, and the decoded signal is output to the D flip-flop U4.
电路工作时,可将电池模块60、RS触发器模块10和射频发射模块20视为电路中的发射部分,由电池模块60中的纽扣电池给RS触发器模块10和射频发射模块20供电,电路待机电流小,在10微安左右,待机时间可以很长;射频接收模块30、解码模块40和D触发器模块50可视为电路中的接收部分,并且,参照图6所示,可以设置一个外部电源80给射频接收模块30、解码模块40和D触发器模块50供电。When the circuit works, the battery module 60, the RS trigger module 10 and the radio frequency transmitting module 20 can be regarded as the transmitting part in the circuit, and the button battery in the battery module 60 supplies power to the RS trigger module 10 and the radio frequency transmitting module 20, and the circuit The standby current is small, about 10 microamps, and the standby time can be very long; the radio frequency receiving module 30, the decoding module 40 and the D flip-flop module 50 can be regarded as the receiving part in the circuit, and, as shown in Figure 6, a The external power supply 80 supplies power to the radio frequency receiving module 30 , the decoding module 40 and the D flip-flop module 50 .
当RS触发器模块10中的干簧管SW1吸合时,第一触发器101输出一瞬间的低电平,第二触发器102输出为高电平,当干簧管SW1断开时,第二触发器102输出一瞬间的低电平,第一触发器101输出为高电平,当第一触发器101或第二触发器102的输出为低电平时,发光二极管D4发光。射频发射模块20中的无线发射模组J3,型号可以为TX(315M),对RS触发器模块10中的与非门芯片U3(型号CD4011BM96)的输出的信号进行发射传输,射频接收模块30由无线接收芯片U2及其外围电路构成,无线接收芯片U2的型号为CMT2210LB-ESR,其可把接收的信号进行解调后输出给解码模块40进行解码,解码模块40由无线解码芯片U1及发光二极管和按键构成,无线解码芯片U1的型号为RF272,无线解码芯片U1内部自带程序且可对遥控按键进行学习,发光二极管对芯片的解码是否有效起到一个提示作用,有效则亮,无效不亮。遥控解码模块40中的无线解码芯片U1对接收到的数据进行解码后输出给D触发器U4,D触发器U4的型号为SN74LVC1G175DBVR,由D触发器U4进行数据的处理后,送入外部MCU中进行高低电平的检测,普通的设备需要两个输入口对两个数据进行检测,本发明的电路,数据经过D触发器后只需要一个输入口就可以进行数据的采集,起到节约I/O的作用,且经过D触发器的信号当无外部信号的时候可长时间保持。无线解码芯片U1可进入任意键学习模式,进行发射端按键的学习,实现解码模块在任意键学习模式下,可以在发射模块按键与该芯片输出钝口编码不对应的情况下进行学习调整,从而达到不更改发射芯片端口与解码芯片相对应即可遥控输出的目的,使芯片学习的是无线解码芯片U1的端口D0对应无线发射模组J3的端口K0,端口D1对应无线发射模组J3的端口K1,无线解码芯片U1内部带程序,有三种模式(互锁、点动、自锁)可以切换,本实施例中的电路使用的是点动模式,无线解码芯片U1收到对应的遥控器(即无线发射模组J3)按键按下时,无线解码芯片U1对应的端口输出高电平,当遥控器按键松开时,无线解码芯片U1对应的端口为低电平,完成解码。When the reed switch SW1 in the RS trigger module 10 is closed, the first trigger 101 outputs a momentary low level, and the second trigger 102 outputs a high level. When the reed switch SW1 is disconnected, the second The second flip-flop 102 outputs a momentary low level, the first flip-flop 101 outputs a high level, and when the output of the first flip-flop 101 or the second flip-flop 102 is a low level, the light emitting diode D4 emits light. The wireless transmission module J3 in the radio frequency transmission module 20, the model can be TX (315M), the signal of the output of the NAND gate chip U3 (model CD4011BM96) in the RS flip-flop module 10 is transmitted and transmitted, and the radio frequency reception module 30 is composed of The wireless receiving chip U2 and its peripheral circuits are composed. The model of the wireless receiving chip U2 is CMT2210LB-ESR, which can demodulate the received signal and output it to the decoding module 40 for decoding. Composed of buttons, the model of the wireless decoding chip U1 is RF272, the wireless decoding chip U1 has a built-in program and can learn the remote control buttons, and the light-emitting diode plays a role in prompting whether the decoding of the chip is valid. . The wireless decoding chip U1 in the remote control decoding module 40 decodes the received data and outputs it to the D flip-flop U4. The model of the D flip-flop U4 is SN74LVC1G175DBVR. After the data is processed by the D flip-flop U4, it is sent to the external MCU Carry out the detection of high and low level, common equipment needs two input ports to detect two data, the circuit of the present invention, data only needs one input port just can carry out data collection after D flip-flop, plays saving I/ The function of O, and the signal passed through the D flip-flop can be maintained for a long time when there is no external signal. The wireless decoding chip U1 can enter any key learning mode to learn the keys of the transmitter, so that the decoding module can learn and adjust when the keys of the transmitting module do not correspond to the blunt port codes output by the chip in any key learning mode, so that To achieve the purpose of remote control output without changing the port of the transmitting chip corresponding to the decoding chip, so that the chip learns that the port D0 of the wireless decoding chip U1 corresponds to the port K0 of the wireless transmitting module J3, and the port D1 corresponds to the port of the wireless transmitting module J3 K1, the wireless decoding chip U1 has a program inside, and there are three modes (interlock, jog, self-locking) that can be switched. The circuit in this embodiment uses the jog mode, and the wireless decoding chip U1 receives the corresponding remote control ( That is, when the button of the wireless transmitter module J3) is pressed, the corresponding port of the wireless decoding chip U1 outputs a high level, and when the button of the remote control is released, the corresponding port of the wireless decoding chip U1 is at a low level, and the decoding is completed.
当门被打开时,本发明的无线门磁开关检测电路完成检测的工作原理:门磁磁铁远离干簧管SW1时,干簧管SW1断开,此时与非门芯片U3的第8脚为高电平,与非门芯片U3的第9脚为高电平,与非门芯片U3的第12脚、第13脚共接100K电阻到地,所以与非门芯片U3的第11脚为高电平,第9脚和第11脚相连,所以第9脚为高电平。因为第9脚和第11脚为高电平,所以与非门芯片U3的第10脚为低电平。因为射频发射模块20中无线发射模组J3的端口K0和端口K1的内部自带上拉电阻,即无线发射模组J3的K0口为高电平。由于干簧管SW1断开,NMOS管Q1的栅极为高电平,NMOS管Q1源极接地,由于Ugs>Ugs(th),所以NMOS管Q1导通,与非门芯片U3的第1脚由高电平转为低电平,此时与非门芯片U3的第3脚输出高电平,由于第3脚为高电平,则电容C4充电瞬间导通,此时与非门芯片U3的第5脚和第6脚为有一瞬间的时间为高电平,即与非门芯片U3的第4脚输出一瞬间的低电平,发光二极管D4亮起后又熄灭。因为无线发射模组J3的端口K0和端口K1的内部自带上拉电阻,即无线发射模组J3的端口K1一瞬间为低电平。端口K0为高电平,端口K1为低电平,此时数据发送给射频接收模块30中的无线接收芯片U2,无线接收芯片U2把接收的信号进行解调后输出给遥控解码模块中的无线解码芯片U1。When the door was opened, the wireless door magnetic switch detection circuit of the present invention completed the working principle of detection: when the door magnetic magnet was away from the reed switch SW1, the reed switch SW1 was disconnected, and now the 8th pin of the NAND gate chip U3 was High level, the 9th pin of the NAND gate chip U3 is high level, the 12th and 13th pins of the NAND gate chip U3 are connected to the 100K resistor to the ground, so the 11th pin of the NAND gate chip U3 is high Level, the 9th pin is connected to the 11th pin, so the 9th pin is high level. Because pin 9 and pin 11 are at high level, pin 10 of the NAND gate chip U3 is at low level. Because the ports K0 and port K1 of the wireless transmitting module J3 in the radio frequency transmitting module 20 have internal pull-up resistors, that is, the port K0 of the wireless transmitting module J3 is at a high level. Since the reed switch SW1 is disconnected, the gate of the NMOS transistor Q1 is at a high level, and the source of the NMOS transistor Q1 is grounded. Since Ugs>Ugs(th), the NMOS transistor Q1 is turned on, and the first pin of the NAND gate chip U3 is controlled by The high level turns to low level. At this time, the third pin of the NAND gate chip U3 outputs a high level. Since the third pin is high level, the capacitor C4 is charged and turned on instantly. At this time, the NAND gate chip U3 The 5th pin and the 6th pin are at a high level for a moment, that is, the 4th pin of the NAND gate chip U3 outputs a low level for a moment, and the light-emitting diode D4 lights up and then goes out. Because the ports K0 and K1 of the wireless transmitter module J3 have internal pull-up resistors, that is, the port K1 of the wireless transmitter module J3 is at low level for an instant. Port K0 is high level, and port K1 is low level. At this time, the data is sent to the wireless receiving chip U2 in the radio frequency receiving module 30, and the wireless receiving chip U2 demodulates the received signal and then outputs it to the wireless receiver in the remote control decoding module. Decoding chip U1.
发射芯片J3的端口K1为低电平,则无线解码芯片U1的端口D1输出高电平,所以D触发器U4的CLK脚转为高电平,由于此时发射芯片J3的端口K0为高电平,无线解码芯片U1的端口D0浮空,D触发器U4的CLK引脚为高电平,D触发器U4的D脚为高电平,所以此时,D触发器U4的Q脚输出高电平给外部的MCU,MCU管脚检测为开门的状态,并且此时D触发器U4的Q脚一直为高电平,实现可自动长时间记忆门的打开状态。When the port K1 of the transmitter chip J3 is at low level, the port D1 of the wireless decoding chip U1 outputs a high level, so the CLK pin of the D flip-flop U4 turns to a high level, because the port K0 of the transmitter chip J3 is at a high level at this time. Ping, the port D0 of the wireless decoding chip U1 is floating, the CLK pin of the D flip-flop U4 is high level, and the D pin of the D flip-flop U4 is high level, so at this time, the Q pin output of the D flip-flop U4 is high The level is given to the external MCU, and the MCU pin detects that the door is open, and at this time, the Q pin of the D flip-flop U4 is always at a high level, realizing the automatic long-term memory of the open state of the door.
当门被关闭时,本发明的无线门磁开关检测电路完成检测的工作原理:门磁磁铁靠近干簧管SW1时,干簧管SW1闭合,此时与非门芯片U3的第8脚为低电平,所以与非门芯片U3的第10脚输出为高电平,由于第10脚为高电平,则电容C1充电瞬间导通,此时与非门芯片U3的第12和第13脚为有一瞬间的时间为高电平,即与非门芯片U3的第11脚输出一瞬间的低电平,发光二极管D4亮起后又熄灭。因为无线发射模组J3的端口K0和端口K1的内部自带上拉电阻,即无线发射模组J3的端口K0一瞬间为低电平。由于干簧管SW1闭合,NMOS管Q1的栅极则为低电平,NMOS管Q1不导通,因为与非门芯片U3的第1脚有接上拉电阻,所以第1脚为高电平,与非门芯片U3的第2脚为高电平,与非门芯片U3的第5脚和第6脚共接100K电阻到地,所以与非门芯片U3的第4脚为高电平,第4脚和第2脚相连,所以第2脚为高电平。因为第2脚和第1脚为高电平,所以与非门芯片U3的第3脚为低电平。因为无线发射模组J3的端口K0和端口K1的内部自带上拉电阻,即无线发射模组J3的端口K1为高电平。端口K0为低电平,端口K1为高电平,此时数据发送给射频接收模块30中的无线接收芯片U2,无线接收芯片U2把接收的信号进行解调后输出给解码模块40中的无线解码芯片U1。When the door was closed, the wireless door magnetic switch detection circuit of the present invention completed the working principle of detection: when the door magnetic magnet was close to the reed switch SW1, the reed switch SW1 was closed, and now the 8th pin of the NAND gate chip U3 was low level, so the output of the 10th pin of the NAND gate chip U3 is high level, because the 10th pin is high level, the capacitor C1 is charged and turned on instantly, at this time, the 12th and 13th pins of the NAND gate chip U3 In order to have a high level for a moment, that is, the 11th pin of the NAND gate chip U3 outputs a low level for a moment, and the light-emitting diode D4 lights up and then goes out. Because the ports K0 and K1 of the wireless transmitter module J3 have internal pull-up resistors, that is, the port K0 of the wireless transmitter module J3 is at low level for an instant. Since the reed switch SW1 is closed, the gate of the NMOS transistor Q1 is at a low level, and the NMOS transistor Q1 is not turned on. Because the first pin of the NAND chip U3 is connected to a pull-up resistor, the first pin is at a high level. , the 2nd pin of the NAND gate chip U3 is high level, the 5th and 6th pins of the NAND gate chip U3 are connected to the 100K resistor to the ground, so the 4th pin of the NAND gate chip U3 is high level, Pin 4 is connected to pin 2, so pin 2 is high. Because pin 2 and pin 1 are at high level, pin 3 of the NAND gate chip U3 is at low level. Because the ports K0 and K1 of the wireless transmitting module J3 have internal pull-up resistors, that is, the port K1 of the wireless transmitting module J3 is at a high level. The port K0 is low level, and the port K1 is high level. At this time, the data is sent to the wireless receiving chip U2 in the radio frequency receiving module 30, and the wireless receiving chip U2 demodulates the received signal and outputs it to the wireless receiving chip in the decoding module 40. Decoding chip U1.
无线发射模组J3的端口K0为低电平,则无线解码芯片U1的端口D0输出高电平,D触发器U4的CLK引脚由高电平转换成低电平,由于此时无线解码芯片U1的端口K1为高电平,所以无线解码芯片U1的端口D1没有输出高电平,为浮空状态,则D触发器U4的CLK脚为X状态(即没有定义信号输出),又因D触发器U4的D脚为高电平,所以此时D触发器U4的Q脚输出低电平给外部的MCU,MCU管脚检测为关门的状态,并且此时D触发器U4的Q脚一直为低电平,实现可自动长时间记忆门的关闭状态。The port K0 of the wireless transmitter module J3 is at low level, then the port D0 of the wireless decoding chip U1 outputs a high level, and the CLK pin of the D flip-flop U4 is converted from a high level to a low level, because the wireless decoding chip at this time The port K1 of U1 is high level, so the port D1 of the wireless decoding chip U1 does not output a high level, and is in a floating state, then the CLK pin of the D flip-flop U4 is in the X state (that is, no signal output is defined), and because D The D pin of the flip-flop U4 is high level, so at this time the Q pin of the D flip-flop U4 outputs a low level to the external MCU, and the MCU pin is detected as the closed state, and at this time the Q pin of the D flip-flop U4 is always It is a low level to realize the closed state of the door that can be automatically remembered for a long time.
本发明的无线门磁开关检测电路,通过D触发器对开门和关门的状态进行输出且输出状态可保持,实现可自动长时间记忆门的开关状态,避免了在没有外部动作时对门的开关状态反复发射和接收信号、反复检测,减少电路的功耗。The wireless door magnetic switch detection circuit of the present invention outputs the state of opening and closing the door through the D flip-flop and the output state can be maintained, realizing the automatic long-term memory of the switching state of the door, and avoiding the switching state of the door when there is no external action Repeatedly transmit and receive signals and detect repeatedly to reduce power consumption of the circuit.
以上是对本发明的较佳实施进行了具体说明,但本发明创造并不限于所述实施例,熟悉本领域的技术人员在不违背本发明精神的前提下还可做出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the described embodiments, those skilled in the art can also make various equivalent deformations or replacements without violating the spirit of the present invention , these equivalent modifications or replacements are all within the scope defined by the claims of the present application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310452026.9ACN116540080A (en) | 2023-04-23 | 2023-04-23 | Wireless door magnetic switch detection circuit |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310452026.9ACN116540080A (en) | 2023-04-23 | 2023-04-23 | Wireless door magnetic switch detection circuit |
| Publication Number | Publication Date |
|---|---|
| CN116540080Atrue CN116540080A (en) | 2023-08-04 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310452026.9APendingCN116540080A (en) | 2023-04-23 | 2023-04-23 | Wireless door magnetic switch detection circuit |
| Country | Link |
|---|---|
| CN (1) | CN116540080A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH06164356A (en)* | 1992-11-26 | 1994-06-10 | Sanyo Electric Co Ltd | Photodetector |
| JPH06224724A (en)* | 1992-11-24 | 1994-08-12 | Omron Corp | Detection switch |
| JP2000196464A (en)* | 1998-12-24 | 2000-07-14 | Oki Micro Design Co Ltd | Data interface circuit |
| CN201892995U (en)* | 2010-11-04 | 2011-07-06 | 叶培生 | A wireless intelligent door sensor that can memorize and send the status of door and window switches |
| CN103634020A (en)* | 2013-11-07 | 2014-03-12 | 马雨萌 | Wireless transceiver based on door-in-door state identification of industrial overhead door |
| CN203858747U (en)* | 2014-05-19 | 2014-10-01 | 王祥青 | Anti-interference wireless remote control switch |
| CN104952184A (en)* | 2015-07-10 | 2015-09-30 | 成都凯天电子股份有限公司 | Bi-directional wireless intelligent door magnetic detector |
| CN106100347A (en)* | 2016-07-19 | 2016-11-09 | 成都启臣微电子股份有限公司 | A kind of adaptively sampled control circuit for Switching Power Supply |
| CN106941755A (en)* | 2017-04-20 | 2017-07-11 | 陈丽珍 | A kind of wireless gate controlled switch device |
| CN219799681U (en)* | 2023-04-23 | 2023-10-03 | 富柯斯(深圳)科技有限公司 | Wireless door magnetic switch detection circuit |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH06224724A (en)* | 1992-11-24 | 1994-08-12 | Omron Corp | Detection switch |
| JPH06164356A (en)* | 1992-11-26 | 1994-06-10 | Sanyo Electric Co Ltd | Photodetector |
| JP2000196464A (en)* | 1998-12-24 | 2000-07-14 | Oki Micro Design Co Ltd | Data interface circuit |
| CN201892995U (en)* | 2010-11-04 | 2011-07-06 | 叶培生 | A wireless intelligent door sensor that can memorize and send the status of door and window switches |
| CN103634020A (en)* | 2013-11-07 | 2014-03-12 | 马雨萌 | Wireless transceiver based on door-in-door state identification of industrial overhead door |
| CN203858747U (en)* | 2014-05-19 | 2014-10-01 | 王祥青 | Anti-interference wireless remote control switch |
| CN104952184A (en)* | 2015-07-10 | 2015-09-30 | 成都凯天电子股份有限公司 | Bi-directional wireless intelligent door magnetic detector |
| CN106100347A (en)* | 2016-07-19 | 2016-11-09 | 成都启臣微电子股份有限公司 | A kind of adaptively sampled control circuit for Switching Power Supply |
| CN106941755A (en)* | 2017-04-20 | 2017-07-11 | 陈丽珍 | A kind of wireless gate controlled switch device |
| CN219799681U (en)* | 2023-04-23 | 2023-10-03 | 富柯斯(深圳)科技有限公司 | Wireless door magnetic switch detection circuit |
| Publication | Publication Date | Title |
|---|---|---|
| CN202131853U (en) | A new type of lock | |
| CN105654597A (en) | Automatic charging LIFI (Light Fidelity) communication anti-theft energy-saving system | |
| CN101882332A (en) | Intelligent control method of multifunctional infrared remote control electronic coded lock | |
| CN108695956A (en) | Wireless charging and telecommunication circuit and radio-based electronic devices | |
| CN219799681U (en) | Wireless door magnetic switch detection circuit | |
| CN210323839U (en) | Low-power consumption door state detection structure | |
| CN209962405U (en) | Wireless remote control transmitter, receiver and wireless remote control system | |
| CN116540080A (en) | Wireless door magnetic switch detection circuit | |
| CN115833414A (en) | Power supply circuit and electronic equipment | |
| CN111719957A (en) | Network management non-contact electronic lock with power switch | |
| CN209942423U (en) | Intelligent lock energy-saving module | |
| CN106652132B (en) | A kind of door lock assembly based on Wifi charging | |
| CN202135141U (en) | Communication circuit between active device and passive device, and lockset | |
| CN211473721U (en) | Wisdom storehouse pipe lock | |
| CN203720901U (en) | Micro-power-consumption remote control lock device remotely controlled by mobile phone Bluetooth and supplied with power by battery | |
| CN205894890U (en) | Lock is controlled to no line light | |
| CN106023380A (en) | Energy-saving optically-controlled communication anti-theft system of mobile terminal | |
| CN216741102U (en) | Infrared type carriage door locking and identifying device | |
| CN206283607U (en) | Intelligent anti-theft door | |
| CN106476757B (en) | A kind of electric power management circuit applied to keyless gate inhibition system | |
| CN203858747U (en) | Anti-interference wireless remote control switch | |
| CN103646449A (en) | Novel remote control door lock system | |
| CN207835476U (en) | It is a kind of for wall router for electric installation | |
| CN109914929B (en) | Intelligent lock energy-saving module and energy-saving method thereof | |
| CN203213726U (en) | House entrance door remote security alarming and auxiliary opening system based on mobile communication |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |