Information sending device, information receiving device and information transmission system
By introducing a signal switch circuit into the information sending device, a signal that can be used for signal restoration is output only when the signal restoration circuit exists, the problem of malicious intercepting of the encrypted signal transmitted by the UART interface is solved, and the security of information transmission is improved.
Patent Information
- Application Number
- CN202011148724.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-23
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2040-10-23
AI Technical Summary
In the process of transmitting encrypted signals using the UART interface, there is a possibility that the encrypted signals are maliciously intercepted, because the signal waveform of the encrypted signals can be measured and decrypted through an oscilloscope or logic analyzer.
An information transmission device is designed, including a UART interface and a signal switching circuit. The signal switching circuit outputs a signal with no level change when the signal reduction circuit is not connected, and only outputs a signal that can be used for signal reduction when the signal reduction circuit exists, thereby preventing the signal waveform from being measured.
It effectively prevents encrypted signals from being maliciously intercepted during information transmission, improving the security of information transmission, because even if the oscilloscope or logic analyzer is connected, the signal waveform cannot be measured for decryption.
Smart Images

Figure CN112165340B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to an information sending device, an information receiving device, and an information transmission system. Background Art
[0002] In an embedded SOC (System-on-a-Chip), low-speed external transmission of information can be achieved through a UART (Universal Asynchronous Receiver / Transmitter) interface. Among them, in order to ensure information security, an encryption chip is usually used or a software key algorithm is used to encrypt the information to be transmitted to obtain an encrypted signal. After that, the encrypted signal is transmitted through the UART interface. However, when the encrypted signal is directly output from the UART interface, the signal waveform of the encrypted signal can be measured by an analysis device such as an oscilloscope or logic analyzer connected to the UART interface, and then the encrypted signal can be decrypted according to the signal waveform. It can be seen that there is a possibility that the encrypted signal is maliciously identified and intercepted in the process of transmitting the encrypted signal using the UART interface. Summary of the invention
[0003] The embodiments of the present application provide an information sending device, an information receiving device and an information transmission system, which can improve the security of information transmission. The technical solution is as follows:
[0004] On the one hand, an information sending device is provided, which includes: a universal asynchronous receiver / transmitter (UART) interface and a signal switching circuit, wherein the UART interface is connected to the signal switching circuit; the UART interface is used to output a first signal carrying first information; the signal switching circuit is used to output a second signal to the signal restoration circuit according to the first signal when a signal restoration circuit is connected, and output a third signal without level change when the signal restoration circuit is not connected, and the signal restoration circuit is a circuit external to the information sending device.
[0005] In some possible implementations, the signal switching circuit includes an electronic switch, and a control terminal of the electronic switch is connected to the signal restoration circuit.
[0006] In some possible implementations, the electronic switch includes: a first transistor, a first resistor, and a second resistor; the base of the first transistor is connected to the UART interface, the collector of the first transistor is connected to one end of the first resistor, the other end of the first resistor and one end of the second resistor are both connected to the control end of the electronic switch, and the other end of the second resistor and the emitter of the first transistor are both grounded.
[0007] In some possible implementations, the signal switch circuit further includes a third resistor, and the UART interface is connected to the electronic switch via the third resistor.
[0008] On the other hand, an information receiving device is provided, the information receiving device comprising: an information output interface and a signal restoration circuit, the information output interface being connected to the signal restoration circuit;
[0009] The signal restoration circuit is used to trigger the signal switching circuit to output a second signal according to the first signal, and receive the second signal, convert the second signal, and output a conversion signal. The first signal and the conversion signal both carry first information. The signal switching circuit is a circuit external to the information receiving device; the information output interface is used to output the conversion signal.
[0010] In some possible implementations, the signal restoration circuit includes a signal trigger module and a signal conversion module, the signal trigger module is connected to the signal conversion module, and the output end of the signal trigger module and the input end of the signal conversion module are both connected to the signal switch circuit;
[0011] The signal trigger module is used to trigger the signal switch circuit to output a second signal obtained by converting the first signal. The signal conversion module is used to receive the second signal, restore the second signal to the first signal, and output the first signal. The converted signal is the first signal.
[0012] In some possible implementations, the signal trigger module includes a fourth resistor and a voltage source;
[0013] One end of the fourth resistor is connected to the signal switch circuit, and the other end of the fourth resistor is connected to the voltage source.
[0014] In some possible implementations, the signal conversion module includes a second triode and a fifth resistor;
[0015] The base of the second transistor is connected to the signal switching circuit, the collector of the second transistor is respectively connected to one end of the fifth resistor and the information output interface, the emitter of the second transistor is grounded, and the other end of the fifth resistor is connected to the voltage source.
[0016] In some possible implementations, the signal conversion module further includes a sixth resistor, and the base of the second transistor is connected to the signal switching circuit via the sixth resistor.
[0017] In some possible implementations, the information output interface is a UART interface;
[0018] Alternatively, the information receiving device further includes a level conversion module, the information output interface is a standard signal interface, the signal restoration circuit is connected to the information output interface via the level conversion module, and the level conversion module is used to perform level conversion on the conversion signal obtained by the signal restoration circuit.
[0019] On the other hand, an information transmission system is provided, the information transmission system comprising: an information sending device and an information receiving device, the information sending device comprising a first UART interface and a signal switching circuit, the information receiving device comprising a signal restoration circuit and an information output interface;
[0020] The first UART interface is used to output a first signal carrying first information;
[0021] The signal switch circuit is used to output a second signal according to the first signal under the action of the signal restoration circuit;
[0022] The signal restoration circuit is used to receive the second signal and convert the second signal to obtain a converted signal;
[0023] The information output interface is used to output the conversion signal.
[0024] In some possible implementations, the signal switching circuit includes an electronic switch, and a control end of the electronic switch is connected to the signal restoration circuit.
[0025] In some possible implementations, the electronic switch includes: a first triode, a first resistor, and a second resistor;
[0026] The base of the first transistor is connected to the first UART interface, the collector of the first transistor is connected to one end of the first resistor, the other end of the first resistor and one end of the second resistor are both connected to the control end of the electronic switch, and the other end of the second resistor and the emitter of the first transistor are both grounded.
[0027] In some possible implementations, the signal switch circuit further includes a third resistor, and the first UART interface is connected to the electronic switch via the third resistor.
[0028] In some possible implementations, the signal restoration circuit includes a signal trigger module and a signal conversion module, the signal trigger module is connected to the signal conversion module, and the output end of the signal trigger module and the input end of the signal conversion module are both connected to the signal switch circuit;
[0029] The signal trigger module is used to trigger the signal switch circuit to output the second signal according to the first signal, and the signal conversion module is used to receive the second signal, restore the second signal to the first signal, and output the first signal. The converted signal is the first signal.
[0030] In some possible implementations, the signal trigger module includes a fourth resistor and a voltage source;
[0031] One end of the fourth resistor is connected to the signal switch circuit, and the other end of the fourth resistor is connected to the voltage source.
[0032] In some possible implementations, the signal conversion module includes a second triode and a fifth resistor;
[0033] The base of the second transistor is connected to the signal switching circuit, the collector of the second transistor is respectively connected to one end of the fifth resistor and the information output interface, the emitter of the second transistor is grounded, and the other end of the fifth resistor is connected to the voltage source.
[0034] In some possible implementations, the signal conversion module further includes a sixth resistor, and the base of the second transistor is connected to the signal switching circuit via the sixth resistor.
[0035] In some possible implementations, the information output interface is a second UART interface;
[0036] Alternatively, the information output device further includes a level conversion module, the information output interface is a standard signal interface, the signal restoration circuit is connected to the information output interface via the level conversion module, and the level conversion module is used to perform level conversion on the conversion signal obtained by the signal restoration circuit.
[0037] The technical solution provided by the embodiments of the present application can at least bring the following beneficial effects:
[0038] In an embodiment of the present application, the first signal output by the UART interface will be transmitted to the signal switching circuit. Since the signal switching circuit outputs a third signal without level change when the signal restoration circuit is not connected, the second signal can only be output to the signal restoration circuit for signal restoration when the signal switching circuit and the signal restoration circuit are used in conjunction with each other. Therefore, even if an oscilloscope or logic analyzer or other analysis equipment is connected to the output end of the signal switching circuit, no signal waveform can be measured. In this way, it is impossible to decrypt the measured signal waveform to obtain the decrypted information, thereby avoiding the situation where the information is maliciously intercepted during the transmission process. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0040] Figure 1 It is a structural schematic diagram of an information sending device provided in an embodiment of the present application;
[0041] Figure 2 is a structural diagram of another information sending device provided in an embodiment of the present application;
[0042] Figure 3 is a schematic diagram of a first signal provided in an embodiment of the present application;
[0043] Figure 4 is a schematic diagram of a second signal provided in an embodiment of the present application;
[0044] Figure 5 is a structural diagram of an information receiving device provided in an embodiment of the present application;
[0045] Figure 6 is a structural schematic diagram of another information receiving device provided in an embodiment of the present application;
[0046] Figure 7 It is a structural diagram of an information transmission system provided in an embodiment of the present application;
[0047] Figure 8 It is a circuit diagram provided in the related art for realizing the self-locking function of a light touch key;
[0048] Fig. 9 It is a schematic diagram of a counter-based touch button circuit provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0050] Before a detailed introduction to the information sending device, information receiving device and information transmission system provided in the embodiments of the present application, the application scenarios involved in the embodiments of the present application are first introduced.
[0051] At present, in embedded SOC, general low-speed external transmission, basic debugging printing, etc. generally use UART signals. When transmitting UART signals to the outside through the UART interface, in order to ensure the information security carried by the transmitted signal, it is usually adopted to encrypt the information to be transmitted by using an encryption chip or a software key algorithm to obtain encrypted information, which will involve additional software and hardware development work, occupy a large amount of SOC system resources, and cause cost increase. In addition, the encrypted information obtained after encryption by the above method, after being directly output through the UART interface, can be measured by an oscilloscope or logic analyzer connected to the UART interface. The signal waveform of the encrypted information. Through the signal waveform, illegal users can decrypt the encrypted information, which will easily lead to the information being maliciously identified and intercepted. Based on this, the embodiment of the present application provides an information sending device, an information receiving device, and an information transmission system to prevent the information from being maliciously identified and intercepted during the transmission process.
[0052] Next, the information sending device provided in the embodiment of the present application is introduced.
[0053] Figure 1 is a structural diagram of an information sending device provided in an embodiment of the present application, such as Figure 1 As shown, the information sending device includes a UART interface 10 and a signal switch circuit 11, wherein the UART interface 10 is connected to the signal switch circuit 11; the UART interface 10 is used to output a first signal carrying first information; the signal switch circuit 11 is used to output a second signal to the signal restoration circuit according to the first signal when a signal restoration circuit is connected, and output a third signal without level change when the signal restoration circuit is not connected. The signal restoration circuit is a circuit outside the information sending device.
[0054] In an embodiment of the present application, the first signal output by the UART interface will be transmitted to the signal switching circuit. Since the signal switching circuit outputs a third signal without level change when the signal restoration circuit is not connected, the second signal can only be output to the signal restoration circuit for signal restoration when the signal switching circuit and the signal restoration circuit are used in conjunction with each other. Therefore, even if an oscilloscope or logic analyzer or other analysis equipment is connected to the output end of the signal switching circuit, no signal waveform can be measured. In this way, it is impossible to decrypt the measured signal waveform to obtain the decrypted information, thereby avoiding the situation where the information is maliciously intercepted during the transmission process.
[0055] In some possible implementations, see Figure 2The signal switch circuit 11 includes an electronic switch 111, and a control terminal 111a of the electronic switch is connected to the signal restoration circuit. In this way, the signal restoration circuit can control the signal switch circuit to output the second signal or the third signal without level change by controlling the electronic switch.
[0056] See also Figure 2 The electronic switch includes a first triode 1111, a first resistor 1112 and a second resistor 1113. The base of the first triode 1111 is connected to the UART interface 10, the collector of the first triode 1111 is connected to one end of the first resistor 1112, the other end of the first resistor 1112 and one end of the second resistor 1113 are both connected to the control end 111a of the electronic switch, and the other end of the second resistor 1113 and the emitter of the first triode 1111 are both grounded.
[0057] It should be noted that the UART interface 10 outputs the first signal carrying the first information to the base of the first transistor 1111. Since the control terminal 111a of the electronic switch is connected to the collector of the first transistor 1111 through the first resistor 1112, when the control terminal 111a of the electronic switch is not connected to the signal restoration circuit, the collector of the first transistor 1111 has no voltage pull-up. At the same time, since the control terminal 111a of the electronic switch is also grounded through the second resistor 1113, the first signal, after passing through the collector and the first resistor 1112, is presented as a third signal without level change at the control terminal 111a of the electronic switch. In this case, an analysis device such as an oscilloscope or a logic analyzer is connected to the control terminal 111a of the electronic switch, and the third signal without level change is received.
[0058] Among them, see, for example, Figure 3 The first signal output by the UART interface 10 may be a rectangular waveform signal that alternates between 0V and 3.3V. The third signal without level change refers to a level signal that is always 0V.
[0059] Optionally, when the control terminal 111a of the electronic switch is connected to the signal restoration circuit, the signal restoration circuit provides a pull-up voltage. At this time, since the collector of the first triode 1111 has a voltage pull-up, the first signal undergoes a reverse transformation after passing through the collector of the first triode 1111, thereby obtaining a second signal. Afterwards, the second signal is transmitted to the control terminal of the electronic switch, and then output to the signal restoration circuit.
[0060] As an example, see Figure 4 , when the first signal is Figure 3 When the first signal is shown, the second signal obtained after the reverse transformation is as follows Figure 4It should be noted that, since the level of the first signal will be reduced after passing through the first transistor 1111 and the first resistor 1112, the high level value of the second signal after reverse conversion will be lower than the high level value of the first signal, that is, lower than 3.3V.
[0061] Optionally, in the embodiment of the present application, the first transistor 1111 may also be replaced by a MOS tube or a photocoupler, which is not limited in the embodiment of the present application.
[0062] Optionally, in the embodiment of the present application, Figure 2 As shown, the signal switch circuit further includes a third resistor 112, and the UART interface 10 is connected to the electronic switch 111 via the third resistor 112. For example, Figure 2 As shown, the UART interface 10 is connected to the base of the first transistor 1111 included in the electronic switch 111 through the third resistor 112. In this case, the first signal output by the UART interface 10 reaches the base of the first transistor 1111 after the current limiting of the third resistor 112, which can play a role in protecting the circuit.
[0063] In addition, it is worth noting that in the related art, since the highest level of the signal directly output by the UART interface is 3.3V, the UART interface may mistakenly contact an external high-voltage power supply, for example, it may mistakenly connect to an external 12V voltage source. In this case, the UART interface will be damaged due to overvoltage. In the embodiment of the present application, the UART interface 10 is connected to the signal switch circuit 11, and the control end of the electronic switch in the signal switch circuit 11 outputs the second signal or the third signal. Since the base of the first triode 1111 included in the electronic switch of the UART interface and the signal switch circuit 11, the control end 111a of the electronic switch is connected to the collector of the first triode 111, and the collector and base of the triode often have a higher withstand voltage, for example, the withstand voltage can usually reach 40V or 60V, therefore, even if the control end 111a of the electronic switch mistakenly contacts the high-voltage power supply, due to the higher withstand voltage between the collector and base of the triode and between the collector and the emitter, the UART interface will not be damaged. It can be seen that the signal switching circuit in the embodiment of the present application can also provide effective overvoltage protection for the UART interface, thereby avoiding damage to the UART interface.
[0064] Figure 5 is a schematic diagram of the structure of an information receiving device provided in an embodiment of the present application. The information receiving device can be Figure 2 Used in conjunction with the information sending device shown. Figure 5The information receiving device includes an information output interface 20 and a signal restoration circuit 21, wherein the information output interface 20 is connected to the signal restoration circuit 21; the signal restoration circuit 21 is used to trigger the signal switching circuit to output a second signal according to the first signal, and receive the second signal, convert the second signal to obtain a conversion signal, and the first signal and the conversion signal both carry the first information; the information output interface 20 is used to output the conversion signal.
[0065] In the embodiment of the present application, the information receiving device can be used with Figure 2 The signal restoration circuit 21 can trigger the signal switch circuit to output the second signal according to the first signal, so that when the signal switch circuit is connected to the signal restoration circuit 21, the second signal can be directly sent to the signal restoration circuit 21, and the signal restoration circuit 21 converts the second signal to obtain a conversion carrying the first information, thereby realizing safe transmission of the signal.
[0066] Among them, Figure 5 As shown, the signal restoration circuit 21 includes a signal trigger module 211 and a signal conversion module 212. The signal trigger module 211 is connected to the signal conversion module 212, and the output end 211a of the signal trigger module and the input end 212a of the signal conversion module are both connected to the signal switch circuit; the signal trigger module 211 is used to trigger the signal switch circuit to output the second signal according to the first signal, and the signal conversion module 212 is used to receive the second signal, restore the second signal to the first signal, and output the first signal. The first signal is the conversion signal.
[0067] It should be noted that, from the introduction of the signal switch circuit 11 in the above embodiment, when the signal switch circuit is not connected to the signal restoration circuit, since the collector of the first transistor 1111 has no voltage pull-up and the second resistor 1113 is grounded, the first signal will be presented as a third signal without level change when it reaches the control end 111a of the electronic switch connected to the collector of the first transistor 1111 and the second resistor 1113. When the signal switch circuit 11 is connected to the signal restoration circuit 21 provided in the embodiment of the present application, the signal trigger module 211 included in the signal restoration circuit 21 can provide a voltage pull-up for the collector of the first transistor 1111 of the signal switch circuit 11, so that the first signal undergoes a reverse conversion after passing through the first transistor 1111 to obtain a second signal, and then the second signal is output by the control end 111a of the electronic switch. Correspondingly, the signal conversion module 212 included in the signal restoration circuit 21 receives the second signal, restores the second signal, and obtains the first signal.
[0068] As an example, see Figure 6The signal trigger module 211 includes a fourth resistor 2111 and a voltage source 2112 ; the fourth resistor 2111 is connected to the signal switch circuit, and the other end of the fourth resistor 2111 is connected to the voltage source 2112 .
[0069] Among them, the voltage provided by the voltage source 2112 is loaded on the collector of the first triode 1111 after passing through the fourth resistor 2111, the control terminal 111a of the electronic switch in the signal switching circuit, and the first resistor 1112, thereby providing a pull-up voltage for the collector of the first triode 1111. In this way, the first signal undergoes a reverse transformation after passing through the collector of the first triode 1111, and a second signal is obtained. Subsequently, the signal switching circuit 11 outputs the second signal to the signal restoration circuit 21. Accordingly, the signal restoration circuit 21 receives the second signal, and the signal conversion module 212 restores the second signal.
[0070] Among them, see Figure 6 The signal conversion module 212 includes a second triode 2121 and a fifth resistor 2122; the base of the second triode 2121 is connected to the signal switching circuit, the collector of the second triode 2121 is respectively connected to one end of the fifth resistor 2122 and the information output interface 20, the emitter of the second triode 2121 is grounded, and the other end of the fifth resistor 2122 is connected to the voltage source 2112.
[0071] After the signal restoration circuit receives the second signal sent by the signal switch circuit, the second signal passes through the base and collector of the second triode 2121 in sequence. Since the collector of the second triode 2121 is connected to the voltage source 2112 through the fifth resistor 2122, the voltage source 2112 provides a pull-up voltage for the second triode 2121, so that the second signal undergoes a reverse transformation after passing through the base and collector of the second triode 2121, thereby restoring to the first signal. Afterwards, the restored first signal will be transmitted to the information output interface 20 connected to the collector of the second triode 2121, so that the information output interface 20 transmits the restored first signal to subsequent other devices for use. Among them, the information output interface 20 is a UART interface.
[0072] Optionally, in the embodiment of the present application, by adjusting the voltage value of the voltage source 2112, pull-up voltages of different magnitudes can be provided for the collector of the second triode 2121 of the signal conversion module 212, so that the signal obtained by reverse conversion after the second signal passes through the base and collector of the second triode 2121 is different from the level value of the first signal. However, the phase and rate of the converted signal are the same as those of the first signal. That is, in the embodiment of the present application, by adjusting the voltage value of the voltage source 2112, the converted signal can be made to be a signal with the same phase and rate as the first signal but a different level value.
[0073] Optionally, in the embodiment of the present application, the second transistor 2121 may also be replaced by a MOS tube or a photocoupler, which is not limited in the embodiment of the present application.
[0074] Optionally, in the embodiments of the present application, see Figure 6 The signal conversion module 212 also includes a sixth resistor 2123 , and the base of the second transistor 2121 is connected to the signal switch circuit through the sixth resistor 2123 .
[0075] It should be noted that, since the signal conversion module is connected to the UART interface and receives the signal sent by the information sending device through the signal conversion module, when the input terminal 212a of the signal conversion module mistakenly contacts the external high voltage, the voltage is loaded on the base of the second triode 2121 after passing through the sixth resistor 2123, thereby turning on the second triode 2121, so that the second triode 2121 has no overvoltage risk. In addition, since the voltage source 2112 is connected to the signal switching circuit through the fourth resistor 2111, the voltage can reduce the overvoltage risk of the voltage source 2112 after being stepped down by the fourth resistor 2111.
[0076] Optionally, in some possible implementations, the information receiving device further includes a level conversion module. In this case, the information output interface 20 is a standard signal interface that matches the output interface of the level conversion module. The signal switching circuit 21 is connected to the information output interface 20 through the level conversion module 21. In this way, after the signal restoration circuit 21 outputs the conversion signal, the level conversion module can perform level conversion on the conversion signal. For example, a decrypted signal with a level value of 3.3V is converted into a signal with a level value of 5V. Afterwards, the level conversion module outputs the converted signal to the information output interface 20. Among them, the level conversion module can be a level conversion chip with a standard signal interface, for example, the level conversion module is a level conversion chip of an RS232 interface, and accordingly, the information output interface is also an RS232 interface.
[0077] Figure 7 Schematic diagram of the structure of an information transmission system provided by an embodiment of the present application. Figure 7As shown, the information transmission system includes an information sending device 01 and an information receiving device 02, wherein the information sending device 01 includes a first UART interface 30 and a signal switching circuit 31, and the information receiving device includes a signal restoration circuit 32 and a second UART interface 33. The first UART interface 30 is used to output a first signal carrying first information; the signal switching circuit 31 is used to output a second signal according to the first signal under the action of the signal restoration circuit 32; the signal restoration circuit 32 is used to receive the second signal and convert the second signal to obtain a converted signal; the second UART interface 33 is used to output the converted signal.
[0078] The signal switching circuit 31 and the signal restoration circuit 32 are connected via a connector or a cable, thereby realizing the transmission of information from the information sending device to the information receiving device.
[0079] Optionally, the signal switch circuit 31 includes an electronic switch, and the control end of the electronic switch is connected to the signal restoration circuit 32. The electronic switch includes a first transistor, a first resistor, and a second resistor; the base of the first transistor is connected to the first UART interface, the collector of the first transistor is connected to one end of the first resistor, the other end of the first resistor and one end of the second resistor are both connected to the control end of the electronic switch, and the other end of the second resistor and the emitter of the first transistor are both grounded. For the relevant introduction of the first transistor, the first resistor, the second resistor and the control end of the electronic switch, please refer to the above description of Figure 3 The related introduction of the embodiments of the present application will not be repeated here.
[0080] Optionally, the signal switch circuit 31 further includes a third resistor, and the first UART interface is connected to the base of the first transistor via the third resistor. Figure 3 The relevant introduction of the third resistor in the embodiment of the present application will not be repeated here.
[0081] Optionally, the signal restoration circuit 32 includes a signal trigger module and a signal conversion module, the signal trigger module is connected to the signal conversion module, and the output end of the signal trigger module and the input end of the signal conversion module are both connected to the signal switch circuit; the signal trigger module is used to trigger the signal switch circuit to output the second signal according to the first signal, and the signal conversion module is used to receive the second signal, restore the second signal to the first signal, and output the first signal, wherein the conversion signal is the restored first signal. Among them, the specific implementation of the signal trigger module and the signal conversion module can refer to the signal trigger module and the signal conversion module introduced in the aforementioned embodiment, and the embodiments of the present application will not be repeated here.
[0082] Optionally, the signal trigger module includes a fourth resistor and a voltage source; one end of the fourth resistor is connected to the signal switch circuit, and the other end of the fourth resistor is connected to the voltage source. The specific implementation of the fourth resistor and the voltage source can refer to the fourth resistor and the voltage source introduced in the above embodiment, and the embodiments of the present application will not be repeated here.
[0083] Optionally, the signal conversion module includes a second triode and a fifth resistor; the base of the second triode is connected to the signal switch circuit, the collector of the second triode is respectively connected to one end of the fifth resistor and the second UART interface, the emitter of the second triode is grounded, and the other end of the fifth resistor is connected to the voltage source. The specific implementation of the second triode and the fifth circuit can refer to the second triode and the fifth circuit introduced in the aforementioned embodiment, and the embodiments of the present application will not be repeated here.
[0084] Optionally, the signal conversion module further includes a sixth resistor, and the base of the second transistor is connected to the signal switch circuit via the sixth resistor. For the introduction of the sixth resistor, refer to the introduction of the sixth resistor in the aforementioned embodiment, and the present embodiment will not be repeated here.
[0085] Optionally, the information transmission system further includes a level conversion module, the information output interface is a standard signal interface, and the signal restoration circuit is connected to the information output interface via the level conversion module. For the relevant introduction of the level conversion module and the information output interface, reference can be made to the relevant introduction in the aforementioned embodiment, and the embodiments of the present application will not be repeated here.
[0086] In the embodiment of the present application, the information sending device 01 is used in conjunction with the information receiving device 02. Among them, the signal restoration circuit 32 in the information receiving device 02 can trigger the signal switch circuit to reversely transform the first signal into the second signal, and output the second signal to the information receiving device 02. After receiving the second signal, the information receiving device 02 converts the second signal through the signal restoration circuit 32 to obtain a conversion signal carrying the first information. When the information sending device 01 is not used with the information receiving device 02, since there is no signal restoration circuit 32 that can trigger the signal switch circuit to reversely convert the first signal into the second signal, the signal switch circuit in the information sending device 01 will output a signal without level change. It can be seen that in the embodiment of the present application, when the information sending device 01 is connected to the information receiving device 02, the safe transmission of information from the information sending device 01 to the information receiving device 02 can be achieved. However, when the information sending device 01 is not connected to the information receiving device 02, the information sending device 01 prevents analysis equipment such as an oscilloscope or a logic analyzer from maliciously intercepting information by outputting a signal without level change, thereby improving the security of information transmission.
[0087] In addition, from the previous Figure 3 The signal switch circuit introduced and Figure 6 From the structure of the introduced signal restoration circuit, it can be seen that the embodiment of the present application can realize encrypted transmission of information by using basic components such as resistors and transistors, and can realize overvoltage protection of the UART interface, with low cost and high reliability.
[0088] In addition, an embodiment of the present application also provides a counter-based touch button circuit.
[0089] A touch button is a micro switch. When the button is pressed, the switch is turned on. When the button is released, the metal spring inside the button bounces up and the switch is turned off. Touch buttons are widely used in household appliances due to their small size and light weight.
[0090] At present, in the application of electronic products, sometimes it is necessary to use touch buttons, and at the same time, the touch buttons are required to have a self-locking function. The so-called self-locking function means that when the button is pressed, the switch is turned on, and the on state of the switch does not change when it is released. When the button is pressed again, the switch is turned off, and the off state of the switch does not change when it is released. In other words, each time the button is pressed and released once, the switch remains on or off and does not change. The switch state will change only when the above action is performed again.
[0091] At present, the related technology mainly realizes the self-locking function of the touch button by executing software code through a single chip microcomputer. Figure 8 This is a circuit diagram for realizing the self-locking function of a light touch key in the related art. Figure 8 As shown in , the touch button is pressed and released once, and a touch signal is output to the microcontroller. After receiving the touch signal, the microcontroller outputs a high-level signal or a low-level signal to indicate a switch state. After that, the touch button is pressed again, and after receiving the touch signal, the microcontroller outputs a signal with a different level from the most recent output to indicate another switch state. In this way, the self-locking function of the touch button can be realized.
[0092] However, the related art requires a single-chip microcomputer to execute software code to implement the above process, which is relatively complicated and costly. Based on this, the embodiment of the present application provides a touch button circuit based on a touch button and a counter to implement the self-locking function of the touch button, which does not require single-chip microcomputer control, is simple and has low cost. Fig. 9 The light touch key circuit includes a light touch key 40 , a counter 41 and a first voltage source 42 .
[0093] The touch button 40 is connected to an input pin 41 a of a counter 41 , a power pin 41 b of the counter 41 is connected to a first voltage source 42 , and an output pin 41 c of the counter 41 is used to output a count value.
[0094] It should be noted that when the touch button 40 is not pressed, the circuit is disconnected, and at this time, a low-level signal is output. When the touch button 40 is pressed, the circuit is connected, and at this time, a high-level signal is output. After that, when the touch button 40 is released, the circuit is disconnected, and at this time, a low-level signal is output. In this way, when the touch button 40 is not pressed, a continuous action of pressing and releasing the touch button 40 will form a low-level-high-level-low-level pulse signal. That is, each time the touch button 40 is actuated once, a pulse signal will be output. Among them, the so-called action of the touch button 40 once refers to the continuous action of the aforementioned touch button being pressed and then released.
[0095] The light touch button 40 outputs a pulse signal to the counter 41 once, and after the counter 41 receives the pulse signal through the input pin 41a, the count value is accumulated by 1. In the embodiment of the present application, the counter 41 is an even-base counter, such as a binary counter, a decimal counter, etc. Since the lowest bit of the count value changes from 0 to 1 or from 1 to 0 every time the count value of the counter is accumulated by 1, that is, the lowest bit of the count value changes from 0 to 1 or from 1 to 0 every time the light touch button 40 is activated, therefore, by identifying whether the lowest bit of the count value output by the counter is 0 or 1, different switch states can be locked.
[0096] Exemplarily, a four-bit binary counter is used as an example for explanation. Assuming that the circuit has not output a pulse signal after power-on, the initial count value of the counter 41 is 0000, and at this time, the touch button 40 is in the switch-off state. When the touch button 40 outputs the first pulse signal for the first time, after receiving the pulse signal, the count value of the counter 41 is accumulated by 1, changing from 0000 to 0001, that is, the count value output by the output pin 41c of the counter 41 is 0001. At this time, since the lowest bit of the count value changes from 0 to 1, the switch state changes from the previous disconnected state to the connected state. Afterwards, when the touch button 40 outputs the second pulse signal for the second time, after receiving the pulse signal, the count value of the counter 41 is accumulated by 1, changing from 0001 to 0010. At this time, the output pin 41c of the counter 41 will output the count value 0010. Since the lowest bit of the count value changes from 1 to 0, the switch state changes again, from the previous connected state to the disconnected state. This cycle repeats, and each time the counter 41 receives a pulse signal, the lowest bit of the count value will change, and accordingly, the switch state will also change. When the lowest bit of the count value of the counter is 0, the switch state of the touch button is locked in the off state, and when the lowest bit of the count value of the counter is 1, the switch state of the touch button is locked in the on state. And, when the lowest bit of the count value changes from 1 to 0, it will move one bit to the higher bit. When the count value is 1111, if a pulse signal is received again, the count value will become 0000 after accumulating 1, and then the cycle will start again.
[0097] Optionally, in some scenarios, it may be necessary to set the initial state of the switch to a certain state by setting the initial count value of the counter when the circuit is powered on for the first time. In this case, the touch button circuit may also include a second voltage source 44, a first resistor 45, and a first capacitor 46. Among them, the second voltage source 44 is connected to one end of the first resistor 45, the other end of the first resistor 45 is connected to one end of the first capacitor 46, the end of the first capacitor 46 connected to the first resistor is also connected to the input pin 41a of the counter 41, and the other end of the first capacitor 46 is grounded. In this way, when the circuit is powered on for the first time, the second voltage source 44 will charge the first capacitor 46 through the first resistor 45, and since the charging process is a slow process from a low level to a high level, that is, the level of one end of the first capacitor 46 connected to the first resistor 45 will gradually change from a low level to a high level, therefore, the first capacitor 46 will output a pulse signal on the line connected to the input pin 41c of the counter 41. In this way, after receiving the pulse signal, the counter 41 accumulates the count value by 1, so that the output count value is 0001. It can be seen that, through the second voltage source 44, the first resistor 45 and the first capacitor 46, when the circuit is powered on for the first time and the button is not activated by lightly touching it, the initial count value of the counter can be set to 0001, and accordingly, the switch state will change once, thereby realizing the configuration of the initial state of the switch. In other words, through the coordinated use of the second voltage source 44, the first resistor 45 and the first capacitor 46, the switch state when the circuit is powered on for the first time can be automatically configured, thereby avoiding the configuration of the initial state of the switch by manual operation.
[0098] Optionally, the counter 41 further includes a reset pin 41d and a ground pin 41e. The reset pin 41d is grounded, thereby providing a low level configuration for the counter 41, thereby preventing the counter 41 from being in a reset state during the counting process.
[0099] Optionally, the first voltage source 43 and the voltage pin 41b of the counter 41 may also be connected to one end of the second capacitor 47, and the other end of the second capacitor 47 is grounded, so as to achieve a voltage stabilization effect on the voltage at the voltage pin 41b.
[0100] In the embodiment of the present application, the touch button and the counter are used together to realize the self-locking function of the touch button. Compared with the related art that realizes the self-locking function of the touch button by executing software code through a single-chip microcomputer, the touch button circuit provided by the embodiment of the present application is simpler and does not require software code development investment, thereby reducing costs. In addition, the embodiment of the present application can also realize automatic configuration of the initial state of the switch through the cooperation of the resistor and the capacitor, avoiding the manual configuration of the initial state of the switch, which is more convenient.
[0101] The above description is not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the embodiments of the present application.
Claims
1. An information sending device, characterized in that: The information sending device comprises: a universal asynchronous receiver / transmitter UART interface and a signal switch circuit, wherein the UART interface is connected to the signal switch circuit; The UART interface is used to output a first signal carrying first information; The signal switching circuit is used to output a second signal to the signal restoration circuit according to the first signal when the signal restoration circuit is connected, and to output a third signal without level change when the signal restoration circuit is not connected. The signal restoration circuit is a circuit external to the information sending device.
2. The information transmitting device according to claim 1, characterized in that: The signal switching circuit comprises an electronic switch, and a control end of the electronic switch is connected to the signal restoration circuit.
3. The information transmitting device according to claim 2, characterized in that: The electronic switch comprises: a first triode, a first resistor and a second resistor; The base of the first transistor is connected to the UART interface, the collector of the first transistor is connected to one end of the first resistor, the other end of the first resistor and one end of the second resistor are both connected to the control end of the electronic switch, and the other end of the second resistor and the emitter of the first transistor are both grounded.
4. The information transmitting device according to claim 2 or 3, characterized in that: The signal switch circuit further includes a third resistor, and the UART interface is connected to the electronic switch via the third resistor.
5. An information receiving device, characterized in that: The information receiving device comprises: an information output interface and a signal restoration circuit, wherein the information output interface is connected to the signal restoration circuit; The signal restoration circuit is used to trigger the signal switch circuit to output the second signal according to the first signal, and receive the second signal, convert the second signal to obtain a conversion signal; wherein the signal switch circuit is a circuit outside the information receiving device, and the signal switch circuit is connected to a universal asynchronous receiver / transmitter (UART) interface, the first signal is output by the UART interface, the first signal and the conversion signal both carry first information, and the signal switch circuit is also used to output a third signal without level change when the signal restoration circuit is not connected; The information output interface is used to output the conversion signal.
6. The information receiving device according to claim 5, characterized in that: The signal restoration circuit includes a signal trigger module and a signal conversion module, the signal trigger module is connected to the signal conversion module, and the output end of the signal trigger module and the input end of the signal conversion module are both connected to the signal switch circuit; The signal trigger module is used to trigger the signal switch circuit to output a second signal obtained by converting the first signal. The signal conversion module is used to receive the second signal, restore the second signal to the first signal, and output the first signal. The converted signal is the first signal.
7. The information receiving device according to claim 6, characterized in that: The signal trigger module includes a fourth resistor and a voltage source; One end of the fourth resistor is connected to the signal switch circuit, and the other end of the fourth resistor is connected to the voltage source.
8. The information receiving device according to claim 7, characterized in that: The signal conversion module includes a second triode and a fifth resistor; The base of the second transistor is connected to the signal switching circuit, the collector of the second transistor is respectively connected to one end of the fifth resistor and the information output interface, the emitter of the second transistor is grounded, and the other end of the fifth resistor is connected to the voltage source.
9. The information receiving device according to claim 8, characterized in that: The signal conversion module further includes a sixth resistor, and the base of the second transistor is connected to the signal switch circuit via the sixth resistor.
10. The information receiving device according to any one of claims 5 to 9, characterized in that: The information output interface is a UART interface; Alternatively, the information receiving device further includes a level conversion module, the information output interface is a standard signal interface, the signal restoration circuit is connected to the information output interface via the level conversion module, and the level conversion module is used to perform level conversion on the conversion signal obtained by the signal restoration circuit.
11. An information transmission system, characterized in that: The information transmission system comprises: an information sending device and an information receiving device, wherein the information sending device comprises a first UART interface and a signal switching circuit, and the information receiving device comprises a signal restoration circuit and an information output interface; The first UART interface is used to output a first signal carrying first information; The signal switch circuit is used to output a second signal to the signal restoration circuit according to the first signal when the signal restoration circuit is connected, and output a third signal without level change when the signal restoration circuit is not connected; The signal restoration circuit is used to receive the second signal and convert the second signal to obtain a converted signal; The information output interface is used to output the conversion signal.
12. The information transmission system according to claim 11, characterized in that: The signal switching circuit comprises an electronic switch, and a control end of the electronic switch is connected to the signal restoration circuit.
13. The information transmission system according to claim 12, characterized in that: The electronic switch comprises: a first triode, a first resistor and a second resistor; The base of the first transistor is connected to the first UART interface, the collector of the first transistor is connected to one end of the first resistor, the other end of the first resistor and one end of the second resistor are both connected to the control end of the electronic switch, and the other end of the second resistor and the emitter of the first transistor are both grounded.
14. The information transmission system according to claim 12 or 13, characterized in that: The signal switch circuit further includes a third resistor, and the first UART interface is connected to the electronic switch via the third resistor.
15. The information transmission system according to any one of claims 11 to 14, characterized in that: The signal restoration circuit includes a signal trigger module and a signal conversion module, the signal trigger module is connected to the signal conversion module, and the output end of the signal trigger module and the input end of the signal conversion module are both connected to the signal switch circuit; The signal trigger module is used to trigger the signal switch circuit to output the second signal according to the first signal, and the signal conversion module is used to receive the second signal, restore the second signal to the first signal, and output the first signal. The converted signal is the first signal.
16. The information transmission system according to claim 15, characterized in that: The signal trigger module includes a fourth resistor and a voltage source; One end of the fourth resistor is connected to the signal switch circuit, and the other end of the fourth resistor is connected to the voltage source.
17. The information transmission system according to claim 16, characterized in that: The signal conversion module includes a second triode and a fifth resistor; The base of the second transistor is connected to the signal switching circuit, the collector of the second transistor is respectively connected to one end of the fifth resistor and the information output interface, the emitter of the second transistor is grounded, and the other end of the fifth resistor is connected to the voltage source.
18. The information transmission system according to claim 17, characterized in that: The signal conversion module further includes a sixth resistor, and the base of the second transistor is connected to the signal switch circuit via the sixth resistor.
19. The information transmission system according to any one of claims 11 to 18, characterized in that: The information output interface is a second UART interface; Alternatively, the information receiving device further includes a level conversion module, the information output interface is a standard signal interface, the signal restoration circuit is connected to the information output interface via the level conversion module, and the level conversion module is used to perform level conversion on the conversion signal obtained by the signal restoration circuit.
Citation Information
Patent Citations
Information transmission device, information reception device, and information transmission system
CN213426150U