CN115941049A - Infrared communication method, system and storage medium - Google Patents
Infrared communication method, system and storage medium Download PDFInfo
- Publication number
- CN115941049A CN115941049A CN202211453780.6A CN202211453780A CN115941049A CN 115941049 A CN115941049 A CN 115941049A CN 202211453780 A CN202211453780 A CN 202211453780A CN 115941049 A CN115941049 A CN 115941049A
- Authority
- CN
- China
- Prior art keywords
- resistor
- infrared
- signal
- receiving
- single chip
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Optical Communication System (AREA)
Abstract
The application discloses an infrared communication method, an infrared communication system and a storage medium, and relates to the technical field of communication. An infrared communication method, comprising: setting a receiving mode of a signal receiving pin to an interrupt input mode; setting the singlechip to a sleep mode when the receiving mode is an interrupt input mode; when the signal receiving pin receives a trigger signal from the trigger circuit, the singlechip is awakened and the receiving mode of the signal receiving pin is set to be the working mode. The infrared communication method can timely respond to the outside and has good communication real-time performance.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to an infrared communication method, system, and storage medium.
Background
In the related art, infrared communication, also called infrared communication, is a communication method for transmitting information by using infrared rays, and is capable of transmitting information such as language, characters, data, and images. At present, infrared communication is widely applied to terminals of the internet of things due to the characteristics of strong confidentiality, good anti-interference battery performance and the like. At present thing networking terminal, mostly battery powered, consequently, when not having the task, thing networking terminal can get into the dormant state, under the dormant state, if need operate thing networking terminal, then need awaken up this thing networking terminal. However, in the current wake-up operation, a button is usually set as an external trigger to wake up the terminal of the internet of things, and due to the existence of the process of triggering by manually operating the button, infrared communication is difficult to respond at a higher speed, more compact communication is difficult to perform in time, and the real-time performance of communication is poor. Therefore, how to improve the real-time performance of infrared communication becomes a technical problem to be solved urgently.
Disclosure of Invention
The present application is directed to solving at least one of the problems in the prior art. Therefore, the infrared communication method, the infrared communication system and the storage medium are provided, can respond to the outside in time, and have good communication real-time performance.
The infrared communication method according to the embodiment of the first aspect of the present application is applied to an infrared communication system, and the infrared communication system includes:
the single chip microcomputer is provided with a signal receiving pin;
the receiving circuit comprises an infrared receiving diode and a trigger circuit, the infrared receiving diode is electrically connected with the input end of the trigger circuit, and the output end of the trigger circuit is electrically connected with the signal receiving pin;
the infrared communication method comprises the following steps:
setting a receiving mode of the signal receiving pin to an interrupt input mode;
setting the single chip microcomputer to be in a sleep mode when the receiving mode is an interrupt input mode;
when the signal receiving pin receives a trigger signal from the trigger circuit, the single chip microcomputer is awakened, and the receiving mode of the signal receiving pin is set to be a working mode, wherein the trigger signal is generated when the trigger circuit receives an induction signal generated by the infrared receiving diode.
According to the infrared communication method, the following beneficial effects are achieved: firstly, setting a receiving mode of a signal receiving pin as an interrupt input mode; secondly, when the receiving mode is an interrupt input mode, the singlechip is set to be in a sleep mode; and finally, when the signal receiving pin receives a trigger signal from the trigger circuit, waking up the singlechip and setting the receiving mode of the signal receiving pin to be a working mode, wherein the trigger signal is generated when the trigger circuit receives an induction signal generated by an infrared receiving diode. The infrared communication method is characterized in that the single chip microcomputer is set to be in the interrupt trigger mode in advance, when the single chip microcomputer enters the sleep mode, the single chip microcomputer can be awakened from the sleep mode through interrupt trigger, and therefore the single chip microcomputer enters the working mode, manual operation is not needed to be additionally performed through setting of the keys to trigger, only the infrared receiving diode needs to generate induction signals, response time can be well shortened, and repeated key operation is not needed. Therefore, the infrared communication method can respond to the outside in time and has better communication real-time performance.
According to some embodiments of the present application, the trigger circuit includes an operational amplifier, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, and a sixth resistor, wherein one end of the first resistor is connected to one end of the second resistor and an output end of the operational amplifier, the other end of the first resistor is connected to the signal receiving pin, the other end of the second resistor is connected to one end of the fifth resistor and a positive input end of the operational amplifier, the other end of the fifth resistor is connected to one end of the fourth resistor and one end of the third resistor, the other end of the fourth resistor is connected to a power supply and one end of the sixth resistor, the other end of the third resistor and an anode of the infrared receiving diode are both grounded, and a cathode of the infrared receiving diode is connected to the other end of the sixth resistor and an inverted input end of the operational amplifier; the third resistor and the fourth resistor are used for adjusting a trigger threshold of the operational amplifier, so that the trigger circuit generates the sensing signal according to the trigger threshold, and the sensing signal and the operational amplifier generate the trigger signal.
According to some embodiments of the present application, the single chip microcomputer is further provided with a signal transmission pin, the infrared communication system further comprises a transmission circuit, and the transmission circuit is electrically connected to the signal transmission pin;
the infrared communication method further comprises:
the single chip microcomputer carries out serial port communication through the sending circuit and transmits data to the outside.
According to some embodiments of the present application, the transmitting circuit includes an MOS transistor, an infrared emitting diode, a seventh resistor, and an eighth resistor, one end of the eighth resistor is connected to the signal transmitting pin, the other end of the eighth resistor is connected to the gate of the MOS transistor, the source of the MOS transistor is connected to one end of the seventh resistor, the other end of the seventh resistor is connected to the power supply, the drain of the MOS transistor is connected to the anode of the infrared emitting diode, and the cathode of the infrared emitting diode is grounded;
the singlechip passes through sending circuit carries out serial communication, to outside transmission data, includes:
when the single chip microcomputer is in a working mode, the single chip microcomputer controls the on and off of the MOS tube so that the infrared emitting diode sends infrared rays bearing data to the outside.
According to some embodiments of the present application, the infrared communication method further comprises:
and after the single chip microcomputer transmits data to the outside through the sending circuit, the single chip microcomputer enters the interrupt input mode from the working mode.
An infrared communication system according to an embodiment of a second aspect of the present application includes:
the receiving circuit comprises an infrared receiving diode and a trigger circuit, and the infrared receiving diode is electrically connected with the input end of the trigger circuit; the infrared receiving diode is used for generating an induction signal according to infrared rays; the trigger circuit is used for outputting the trigger signal according to the induction signal;
the single chip microcomputer is provided with a signal receiving pin, the output end of the trigger circuit is electrically connected with the signal receiving pin, the single chip microcomputer is used for setting the receiving mode of the signal receiving pin to be an interrupt input mode when a preset condition is met, setting the single chip microcomputer to be a sleep mode when the receiving mode is the interrupt input mode, and awakening the single chip microcomputer and setting the receiving mode of the signal receiving pin to be a working mode when the signal receiving pin receives the trigger signal.
According to some embodiments of the present application, trigger circuit includes operational amplifier, first resistance, second resistance, third resistance, fourth resistance, fifth resistance and sixth resistance, the one end of first resistance is connected the one end of second resistance the output of operational amplifier, the other end of first resistance is connected the signal reception pin, the other end of second resistance is connected the one end of fifth resistance the forward input of operational amplifier, the other end of fifth resistance is connected the one end of fourth resistance the one end of third resistance, the other end of fourth resistance connect the power the one end of sixth resistance, the other end of third resistance the positive pole of infrared receiving diode all grounds, the negative pole of infrared receiving diode connects the other end of sixth resistance the inverting input of operational amplifier.
According to some embodiments of the present application, the single chip microcomputer is further provided with a signal transmission pin, and the infrared communication system further comprises a transmission circuit, wherein the transmission circuit is electrically connected with the signal transmission pin; the single chip microcomputer is also used for carrying out serial port communication through the sending circuit and transmitting data to the outside;
the transmitting circuit comprises an MOS tube, an infrared emitting diode, a seventh resistor and an eighth resistor, one end of the eighth resistor is connected with the signal transmitting pin, the other end of the eighth resistor is connected with a grid electrode of the MOS tube, a source electrode of the MOS tube is connected with one end of the seventh resistor, the other end of the seventh resistor is connected with a power supply, a drain electrode of the MOS tube is connected with an anode of the infrared emitting diode, and a cathode of the infrared emitting diode is grounded; the single chip microcomputer is also used for controlling the on and off of the MOS tube so as to enable the infrared emitting diode to send infrared rays bearing data to the outside.
An infrared communication system according to an embodiment of a third aspect of the present application includes:
at least one memory;
at least one processor;
at least one program;
the programs are stored in the memory and the processor executes at least one of the programs to implement the method as described in the embodiments of the first aspect.
A computer-readable storage medium according to an embodiment of the fourth aspect of the present application, the computer-readable storage medium storing computer-executable instructions for causing a computer to perform the method as described in the embodiment of the first aspect.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The present application is further described with reference to the following figures and examples, in which:
fig. 1 is a schematic flowchart of an infrared communication method according to an embodiment of the present application;
FIG. 2 is a functional block diagram of an infrared communication system provided in one embodiment of the present application;
FIG. 3 is a schematic diagram of a receiving circuit provided in one embodiment of the present application;
FIG. 4 is a schematic diagram of a transmit circuit provided in one embodiment of the present application;
fig. 5 is a schematic flowchart of an infrared communication method according to another embodiment of the present application;
fig. 6 is a schematic structural diagram of an infrared communication system according to another embodiment of the present application.
Reference numerals:
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
It is noted that while a division of functional blocks is depicted in the system diagram, and logical order is depicted in the flowchart, in some cases the steps depicted and described may be performed in a different order than the division of blocks in the system or the flowchart. The terms etc. in the description and claims and the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In the description of the present application, the meaning of a plurality is one or more, the meaning of a plurality is two or more, and the above, below, exceeding, etc. are understood as excluding the present number, and the above, below, within, etc. are understood as including the present number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present application, unless otherwise expressly limited, terms such as set, mounted, connected and the like should be construed broadly, and those skilled in the art can reasonably determine the specific meaning of the terms in the present application by combining the detailed contents of the technical solutions.
In the description of the present application, reference to the description of the terms "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
In the related art, if the internet of things terminal in the sleep mode is to be awakened, the internet of things terminal is required to be provided with a key and to enter the working mode from the sleep mode in a key triggering mode, and then the internet of things terminal can be operated. This has a drawback, and the thing networking terminal is when needing transmission data, is difficult to do timely response, and especially host computer need obtain even when acquireing relevant data and handling, can only wait for relevant personnel to awaken the thing networking terminal and just can carry out infrared communication, and this has just caused the inconvenience in the use.
Based on this, the embodiment of the application provides an infrared communication method, an infrared communication system and a storage medium, and an internet of things terminal can be awakened by infrared rays emitted by an upper computer or other equipment through infrared communication, so that the terminal can respond to the outside in time, and better communication real-time performance is achieved.
The infrared communication method of the embodiment of the present application is described below with reference to fig. 1 to 4.
It will be appreciated that the embodiments shown in fig. 1-2 apply to an infrared communication system comprising:
the single chip microcomputer 100 is provided with a signal receiving pin;
the receiving circuit 110, the receiving circuit 110 includes an infrared receiving diode and a trigger circuit, the infrared receiving diode is electrically connected with the input end of the trigger circuit, and the output end of the trigger circuit is electrically connected with the signal receiving pin;
the infrared communication method comprises the following steps:
step S100, setting a receiving mode of a signal receiving pin as an interrupt input mode;
step S110, when the receiving mode is the interrupt input mode, the singlechip 100 is set to the sleep mode;
step S120, when the signal receiving pin receives a trigger signal from the trigger circuit, the single chip microcomputer 100 is woken up and the receiving mode of the signal receiving pin is set to the working mode, where the trigger signal is generated when the trigger circuit receives an induction signal generated by the infrared receiving diode.
Firstly, setting a receiving mode of a signal receiving pin as an interrupt input mode; secondly, when the receiving mode is the interrupt input mode, the single chip microcomputer 100 is set to the sleep mode; finally, when the signal receiving pin receives a trigger signal from the trigger circuit, the single chip microcomputer 100 is woken up and the receiving mode of the signal receiving pin is set to be the working mode, wherein the trigger signal is generated when the trigger circuit receives an induction signal generated by an infrared receiving diode. According to the infrared communication method, the singlechip 100 is set to be in the interrupt trigger mode in advance, when the singlechip 100 enters the sleep mode, the singlechip 100 can be awakened from the sleep mode through interrupt trigger, so that the singlechip enters the working mode, manual operation is not needed to be additionally set for triggering, only the infrared receiving diode is required to generate a sensing signal, the response time can be well shortened, and repeated key operation is not needed. Therefore, the infrared communication method can respond to the outside in time and has better communication real-time performance.
It should be noted that the interrupt input mode and the sleep mode may be set simultaneously, or the interrupt input mode may be set first and then the sleep mode may be set.
It should be noted that, according to the infrared communication method, by arranging the infrared receiving diode and the trigger circuit, when the external device communicates with the infrared communication system, only infrared rays need to be emitted, the infrared receiving diode generates a sensing signal according to the infrared rays, and the trigger circuit generates a trigger signal according to the sensing signal, so that manual operation is not needed to be additionally arranged for triggering, the infrared rays are normally sent in order, and convenience and rapidness are achieved.
It can be understood that, as shown in fig. 3, the trigger circuit includes an operational amplifier, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, and a sixth resistor, one end of the first resistor is connected to one end of the second resistor and the output end of the operational amplifier, the other end of the first resistor is connected to the signal receiving pin, the other end of the second resistor is connected to one end of the fifth resistor and the positive input end of the operational amplifier, the other end of the fifth resistor is connected to one end of the fourth resistor and one end of the third resistor, the other end of the fourth resistor is connected to the power supply and one end of the sixth resistor, the other end of the third resistor and the anode of the infrared receiving diode are both grounded, and the cathode of the infrared receiving diode is connected to the other end of the sixth resistor and the inverting input end of the operational amplifier; the third resistor and the fourth resistor are used for adjusting a trigger threshold of the operational amplifier, so that the trigger circuit generates a sensing signal according to the trigger threshold, and the sensing signal and the operational amplifier generate a trigger signal.
It is understood that the infrared communication method further includes:
setting a trigger threshold value according to the third resistor and the fourth resistor;
the infrared receiving diode generates a sensing signal according to the infrared rays;
when the voltage value of the induction signal is larger than the trigger threshold value, the trigger circuit generates a trigger signal.
As shown in fig. 3, the operational amplifier is U1, the first resistor, the second resistor, the third resistor, the fourth resistor, the fifth resistor, and the sixth resistor are R1, R2, R3, R4, R5, and R6, respectively, in sequence, and the infrared receiving diode is D1.
It should be noted that the signal receiving pin of the single chip microcomputer 100 is UART _ RX.
The receiving circuit 110 includes an operational amplifier U1, an infrared receiving diode D1, and the like, U1 constitutes a hysteresis flip-flop mode, an induction signal generated by infrared rays is input to an inverting input terminal of the flip-flop through D1, and a trigger threshold of the flip-flop can be adjusted by adjusting voltage dividing resistors R3 and R4. Further, this thing networking terminal is the water gauge, when the inside data of water gauge needs to be read, first, outside communication equipment is provided with infrared communication module, be used for carrying out infrared communication, communication equipment's infrared emission diode can send infrared ray as communication signal, send to D1 on, when the infrared ray intensity of receiving is higher than the trigger threshold value, U1 output among receiving circuit 110 can be stood immediately and is changed into the high level from the low level, when the infrared ray intensity of receiving is lower than the trigger threshold value, receiving circuit 110 output can be stood immediately and is changed into the low level from the high level, transmit infrared communication signal inside singlechip 100 like this, accomplish data transmission.
It can be understood that, as shown in fig. 4, the single chip microcomputer 100 is further provided with a signal sending pin, the infrared communication system further includes a sending circuit 120, and the sending circuit 120 is electrically connected to the signal sending pin;
the infrared communication method further comprises:
the single chip microcomputer 100 performs serial communication through the transmission circuit 120 and transmits data to the outside.
It should be noted that the signal transmission pin of the single chip microcomputer 100 is UART _ TX.
It should be noted that, part of the terminals only need to receive and execute signals, and therefore, only signal receiving pins, such as an air conditioner and a fan, need to be set; and the other part of the terminal also needs to provide data feedback, such as a water meter and an electric meter.
It can be understood that, as shown in fig. 4, the transmitting circuit 120 includes a MOS transistor, an infrared emitting diode, a seventh resistor, and an eighth resistor, one end of the eighth resistor is connected to the signal transmitting pin, the other end of the eighth resistor is connected to the gate of the MOS transistor, the source of the MOS transistor is connected to one end of the seventh resistor, the other end of the seventh resistor is connected to the power supply, the drain of the MOS transistor is connected to the anode of the infrared emitting diode, and the cathode of the infrared emitting diode is grounded;
the single chip microcomputer 100 performs serial communication through the transmission circuit 120, and transmits data to the outside, including:
when the single chip microcomputer 100 is in a working mode, the single chip microcomputer 100 controls the on and off of the MOS transistor, so that the infrared emitting diode sends infrared rays bearing data to the outside.
As shown in fig. 4, the MOS transistor is Q1, the infrared emitting diode is D2, and the seventh resistor and the eighth resistor are R7 and R8, respectively.
It should be noted that the sending circuit 120 includes an MOS transistor Q1 and an infrared emitting diode D2, and controls the infrared emitting diode to send out the required infrared data by controlling a gate of the MOS transistor, when the UART _ TX is at a low level, Q1 turns on D2 to emit an infrared light wave outwards, and when the UART _ TX is at a high level, Q1 does not turn on D2 to emit an infrared light wave outwards.
It is understood that the infrared communication method further includes:
after the single chip microcomputer 100 transmits data to the outside through the transmission circuit 120, the single chip microcomputer 100 enters an interrupt input mode from an operating mode.
Note that, as shown in fig. 5, before the setting of the chip microcomputer 100 to the interrupt input mode triggered by the signal reception pin, the method further includes:
initializing the infrared communication parameters of the single chip microcomputer 100.
It should be noted that, when serial port communication is adopted, the infrared communication parameter may be a serial port parameter.
It should be noted that, as shown in fig. 5, after the initialization of the single chip microcomputer 100 is completed, the UART _ RX pin is set to the interrupt input mode, then, when the infrared communication system enters the sleep mode, the power consumption of the system is as low as the UA-level standby current, when the infrared receiving diode receives the infrared communication signal, an induction signal is generated, the UART _ RX pin is triggered by the receiving circuit 110, and then the single chip microcomputer 100 is woken up to enter the working mode, the received infrared communication signal is converted into an internal digital signal, and then internal data processing is performed, at this time, the single chip microcomputer 100 may send an infrared emission signal to the outside through the sending circuit 120, after the infrared emission signal is sent, the single chip microcomputer 100 resets the UART _ RX pin to the interrupt input mode again, and then reenters the sleep mode, and waits for the next infrared triggering and waking up.
It is understood that, as shown in fig. 2, the infrared communication system according to the embodiment of the present application includes:
the receiving circuit 110, the receiving circuit 110 includes an infrared receiving diode and a trigger circuit, the infrared receiving diode is electrically connected with the input end of the trigger circuit; the infrared receiving diode is used for generating an induction signal according to infrared rays; the trigger circuit is used for outputting a trigger signal according to the sensing signal;
the single chip microcomputer 100 is provided with a signal receiving pin, an output end of the trigger circuit is electrically connected with the signal receiving pin, and the single chip microcomputer 100 is used for setting a receiving mode of the signal receiving pin to an interrupt input mode when a preset condition is met, setting the single chip microcomputer 100 to a sleep mode when the receiving mode is the interrupt input mode, and awakening the single chip microcomputer 100 and setting the receiving mode of the signal receiving pin to a working mode when the signal receiving pin receives a trigger signal.
It can be understood that, as shown in fig. 3, the trigger circuit includes an operational amplifier, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor and a sixth resistor, one end of the first resistor is connected to one end of the second resistor and an output end of the operational amplifier, the other end of the first resistor is connected to the signal receiving pin, the other end of the second resistor is connected to one end of the fifth resistor and a positive input end of the operational amplifier, the other end of the fifth resistor is connected to one end of the fourth resistor and one end of the third resistor, the other end of the fourth resistor is connected to a power supply and one end of the sixth resistor, the other end of the third resistor and a positive electrode of the infrared receiving diode are both grounded, and a negative electrode of the infrared receiving diode is connected to the other end of the sixth resistor and a negative input end of the operational amplifier.
It can be understood that, as shown in fig. 2 and fig. 3, the single chip microcomputer 100 is further provided with a signal sending pin, the infrared communication system further includes a sending circuit 120, and the sending circuit 120 is electrically connected to the signal sending pin; the single chip microcomputer 100 is also used for serial port communication through the sending circuit 120 and transmitting data to the outside;
the transmitting circuit 120 comprises an MOS tube, an infrared emitting diode, a seventh resistor and an eighth resistor, one end of the eighth resistor is connected with the signal transmitting pin, the other end of the eighth resistor is connected with the grid electrode of the MOS tube, the source electrode of the MOS tube is connected with one end of the seventh resistor, the other end of the seventh resistor is connected with the power supply, the drain electrode of the MOS tube is connected with the anode of the infrared emitting diode, and the cathode of the infrared emitting diode is grounded; the single chip microcomputer 100 is further configured to control on and off of the MOS transistor, so that the infrared emitting diode sends infrared rays bearing data to the outside.
An infrared communication system according to an embodiment of the present application is described below with reference to fig. 6.
It is to be understood that, as shown in fig. 6, the infrared communication system includes:
at least one memory 200;
at least one processor 300;
at least one program;
the program is stored in the memory 200, and the processor 300 executes at least one program to implement the infrared communication method described above. Fig. 6 illustrates an example of a processor 300.
The processor 300 and the memory 200 may be connected by a bus or other means, and fig. 6 illustrates a connection by a bus as an example.
The memory 200 is used as a non-transitory computer readable storage medium for storing non-transitory software programs, non-transitory computer executable programs and signals, such as program instructions/signals corresponding to the infrared communication system in the embodiments of the present application. The processor 300 executes various functional applications and data processing, i.e., the infrared communication method of the above-described method embodiments, by executing the non-transitory software programs, instructions and signals stored in the memory 200.
The memory 200 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data related to the above-described failure determination method, and the like. Further, the memory 200 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 200 optionally includes memory located remotely from processor 300, which may be connected to an infrared communication system over a network. Examples of such networks include, but are not limited to, the internet of things, software defined networks, sensor networks, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more signals are stored in the memory 200 and, when executed by the one or more processors 300, perform the infrared communication method of any of the method embodiments described above. For example, the method of fig. 1 described above is performed.
A computer-readable storage medium according to an embodiment of the present application is described below with reference to fig. 6.
As shown in fig. 6, a computer-readable storage medium stores computer-executable instructions that, when executed by one or more processors 300, for example, by one of processors 300 in fig. 6, may cause the one or more processors 300 to perform the infrared communication method in the above-described method embodiment. For example, the method of fig. 1 described above is performed.
The above-described system embodiments are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
From the above description of embodiments, those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media and communication media. The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information as is known to one of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. In addition, communication media typically embodies computer readable signals, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
The embodiments of the present application have been described in detail with reference to the drawings, but the present application is not limited to the embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present application.
Furthermore, the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
Claims (10)
1. An infrared communication method, applied to an infrared communication system, the infrared communication system comprising:
the single chip microcomputer is provided with a signal receiving pin;
the receiving circuit comprises an infrared receiving diode and a trigger circuit, the infrared receiving diode is electrically connected with the input end of the trigger circuit, and the output end of the trigger circuit is electrically connected with the signal receiving pin;
the infrared communication method comprises the following steps:
setting a receiving mode of the signal receiving pin to an interrupt input mode;
setting the single chip microcomputer to be in a sleep mode when the receiving mode is an interrupt input mode;
when the signal receiving pin receives a trigger signal from the trigger circuit, the single chip microcomputer is awakened, and the receiving mode of the signal receiving pin is set to be a working mode, wherein the trigger signal is generated when the trigger circuit receives an induction signal generated by the infrared receiving diode.
2. The infrared communication method according to claim 1, wherein the trigger circuit includes an operational amplifier, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, and a sixth resistor, one end of the first resistor is connected to one end of the second resistor and an output end of the operational amplifier, the other end of the first resistor is connected to the signal receiving pin, the other end of the second resistor is connected to one end of the fifth resistor and a positive input end of the operational amplifier, the other end of the fifth resistor is connected to one end of the fourth resistor and one end of the third resistor, the other end of the fourth resistor is connected to a power supply and one end of the sixth resistor, the other end of the third resistor and a positive electrode of the infrared receiving diode are both grounded, and a negative electrode of the infrared receiving diode is connected to the other end of the sixth resistor and an inverted input end of the operational amplifier; the third resistor and the fourth resistor are used for adjusting a trigger threshold of the operational amplifier, so that the trigger circuit generates the sensing signal according to the trigger threshold, and the sensing signal and the operational amplifier generate the trigger signal.
3. The infrared communication method according to claim 1, wherein the single chip microcomputer is further provided with a signal transmission pin, the infrared communication system further comprises a transmission circuit, and the transmission circuit is electrically connected to the signal transmission pin;
the infrared communication method further comprises:
the single chip microcomputer carries out serial port communication through the sending circuit and transmits data to the outside.
4. The infrared communication method according to claim 3, wherein the transmission circuit includes a MOS transistor, an infrared emitting diode, a seventh resistor, and an eighth resistor, one end of the eighth resistor is connected to the signal transmission pin, the other end of the eighth resistor is connected to a gate of the MOS transistor, a source of the MOS transistor is connected to one end of the seventh resistor, the other end of the seventh resistor is connected to a power supply, a drain of the MOS transistor is connected to an anode of the infrared emitting diode, and a cathode of the infrared emitting diode is grounded;
the singlechip passes through sending circuit carries out serial communication, to outside transmission data, includes:
when the single chip microcomputer is in a working mode, the single chip microcomputer controls the on and off of the MOS tube so that the infrared emitting diode sends infrared rays bearing data to the outside.
5. The infrared communication method according to claim 3, further comprising:
and after the single chip microcomputer transmits data to the outside through the sending circuit, the single chip microcomputer enters the interrupt input mode from the working mode.
6. An infrared communication system, comprising:
the receiving circuit comprises an infrared receiving diode and a trigger circuit, and the infrared receiving diode is electrically connected with the input end of the trigger circuit; the infrared receiving diode is used for generating an induction signal according to infrared rays; the trigger circuit is used for outputting the trigger signal according to the induction signal;
the single chip microcomputer is provided with a signal receiving pin, the output end of the trigger circuit is electrically connected with the signal receiving pin, and the single chip microcomputer is used for setting the receiving mode of the signal receiving pin to be an interrupt input mode when a preset condition is met, setting the single chip microcomputer to be a sleep mode when the receiving mode is the interrupt input mode, and awakening the single chip microcomputer and setting the receiving mode of the signal receiving pin to be a working mode when the signal receiving pin receives the trigger signal.
7. The infrared communication system according to claim 6, wherein the trigger circuit includes an operational amplifier, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, and a sixth resistor, one end of the first resistor is connected to one end of the second resistor and an output terminal of the operational amplifier, the other end of the first resistor is connected to the signal receiving pin, the other end of the second resistor is connected to one end of the fifth resistor and a positive input terminal of the operational amplifier, the other end of the fifth resistor is connected to one end of the fourth resistor and one end of the third resistor, the other end of the fourth resistor is connected to the power supply and one end of the sixth resistor, the other end of the third resistor and an anode of the infrared receiving diode are both grounded, and a cathode of the infrared receiving diode is connected to the other end of the sixth resistor and an inverting input terminal of the operational amplifier.
8. The infrared communication system of claim 6, wherein the single chip is further provided with a signal transmission pin, the infrared communication system further comprises a transmission circuit, and the transmission circuit is electrically connected with the signal transmission pin; the single chip microcomputer is also used for carrying out serial port communication through the sending circuit and transmitting data to the outside;
the transmitting circuit comprises an MOS tube, an infrared emitting diode, a seventh resistor and an eighth resistor, one end of the eighth resistor is connected with the signal transmitting pin, the other end of the eighth resistor is connected with the grid electrode of the MOS tube, the source electrode of the MOS tube is connected with one end of the seventh resistor, the other end of the seventh resistor is connected with a power supply, the drain electrode of the MOS tube is connected with the anode of the infrared emitting diode, and the cathode of the infrared emitting diode is grounded; the single chip microcomputer is also used for controlling the on and off of the MOS tube so as to enable the infrared emitting diode to send infrared rays bearing data to the outside.
9. An infrared communication system, comprising:
at least one memory;
at least one processor;
at least one program;
the programs are stored in the memory, and the processor executes at least one of the programs to implement the method of any one of claims 1 to 5.
10. Computer-readable storage medium, characterized in that it stores computer-executable instructions for causing a computer to perform the method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211453780.6A CN115941049B (en) | 2022-11-21 | 2022-11-21 | Infrared communication method, system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211453780.6A CN115941049B (en) | 2022-11-21 | 2022-11-21 | Infrared communication method, system and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115941049A true CN115941049A (en) | 2023-04-07 |
CN115941049B CN115941049B (en) | 2024-07-23 |
Family
ID=86649990
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211453780.6A Active CN115941049B (en) | 2022-11-21 | 2022-11-21 | Infrared communication method, system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115941049B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117498945A (en) * | 2023-12-25 | 2024-02-02 | 广东恩威视科技有限公司 | UART signal infrared receiving and transmitting circuit |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080195874A1 (en) * | 2004-07-05 | 2008-08-14 | Xianpu Zhou | Control Device for a Power Supply with Zero Power Consumption in Standby Mode |
CN110061786A (en) * | 2019-04-09 | 2019-07-26 | 江苏东海半导体科技有限公司 | A kind of IR signal reception processing circuit module |
CN110351817A (en) * | 2019-07-09 | 2019-10-18 | 杭州博联智能科技股份有限公司 | Method for realizing low power consumption, device, terminal, medium and wireless telecommunication system |
WO2020038406A1 (en) * | 2018-08-24 | 2020-02-27 | 深圳市道通智能航空技术有限公司 | Wake-up circuit and battery management system |
CN111638660A (en) * | 2020-06-05 | 2020-09-08 | 南京大陆豪智能电子科技有限公司 | Intelligent switch control circuit and control method thereof |
CN114116029A (en) * | 2021-11-16 | 2022-03-01 | 珠海格力电器股份有限公司 | Control method, device, equipment and medium for awakening low power consumption of infrared receiver |
-
2022
- 2022-11-21 CN CN202211453780.6A patent/CN115941049B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080195874A1 (en) * | 2004-07-05 | 2008-08-14 | Xianpu Zhou | Control Device for a Power Supply with Zero Power Consumption in Standby Mode |
WO2020038406A1 (en) * | 2018-08-24 | 2020-02-27 | 深圳市道通智能航空技术有限公司 | Wake-up circuit and battery management system |
CN110061786A (en) * | 2019-04-09 | 2019-07-26 | 江苏东海半导体科技有限公司 | A kind of IR signal reception processing circuit module |
CN110351817A (en) * | 2019-07-09 | 2019-10-18 | 杭州博联智能科技股份有限公司 | Method for realizing low power consumption, device, terminal, medium and wireless telecommunication system |
CN111638660A (en) * | 2020-06-05 | 2020-09-08 | 南京大陆豪智能电子科技有限公司 | Intelligent switch control circuit and control method thereof |
CN114116029A (en) * | 2021-11-16 | 2022-03-01 | 珠海格力电器股份有限公司 | Control method, device, equipment and medium for awakening low power consumption of infrared receiver |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117498945A (en) * | 2023-12-25 | 2024-02-02 | 广东恩威视科技有限公司 | UART signal infrared receiving and transmitting circuit |
Also Published As
Publication number | Publication date |
---|---|
CN115941049B (en) | 2024-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111132283A (en) | Power consumption control method and equipment | |
EP3200512A1 (en) | Method, apparatus and device for waking up devices in batches | |
TWI577211B (en) | System and method for optimizing power consumption associated with processing group addressed messages | |
CN110572868B (en) | Method and device for reducing power consumption of electronic device | |
CN107968713B (en) | Remote wake-up method, device and system | |
TWI853826B (en) | Measuring device comprising near field interaction device, method of operating the measuring device, program element, and computer-readable medium | |
WO2020083258A1 (en) | Data transmission method, vehicle-mounted communication device, and computer-readable storage medium | |
CN115941049A (en) | Infrared communication method, system and storage medium | |
CN106648021B (en) | Data broadcasting method of low power consumption circuit and low power consumption circuit | |
CN108495361B (en) | Electronic tag, data exchange host and electronic tag system | |
KR20160121876A (en) | Changing method from sleep mode to awake mode in wifi system | |
CN113193631A (en) | Power supply control device, power supply control method, storage medium, and electronic device | |
CN113014898A (en) | Projector wake-up control method, projector and readable storage medium | |
CN113687711A (en) | Terminal wake-up circuit and wake-up method | |
CN113721946A (en) | OTA (over the air) upgrading method, OTA upgrading system, readable storage medium and vehicle | |
CN109936638B (en) | Low-power consumption irrigation controller based on agricultural Internet of things | |
CN110729788A (en) | Power supply control method, system and equipment | |
CN113920621B (en) | NFC-based access control of Internet of things and setting method thereof | |
CN210181734U (en) | Low-power consumption intelligence doorbell control circuit and intelligence doorbell | |
CN106455111A (en) | Wireless communication system based on wireless sensor | |
CN212649624U (en) | High-performance transmitting base station for factory intelligence | |
CN117956007A (en) | Vehicle-mounted remote control method, device and system | |
EP3820203B1 (en) | Interactive electronic label device communication system and method | |
CN107172691B (en) | Dormancy method of communication module of meter and meter | |
CN117411162B (en) | Unmanned aerial vehicle battery low-power consumption control device and system |
Legal Events
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |