A 4-20 mA analog signal sensor with encryption function and method
By introducing a password output CPU processor to generate a key in the 4-20 mA analog signal sensor, the problem of lack of encryption function in the prior art is solved, and the identification and rejection of inferior sensors are realized, and the interests of professional manufacturers and users' security are protected.
Patent Information
- Application Number
- CN202110362194.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-02
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2041-04-02
AI Technical Summary
The existing 4-20 mA analog signal sensor lacks encryption function, which makes it difficult to identify inferior or counterfeit sensors, affecting the interests of professional manufacturers and the safety of users.
A 4-20 mA analog signal sensor with encryption function is designed, a key is generated by a password output CPU processor, and output through the IO/1 and IO/2 output pins. The acquisition device confirms the legitimacy of the sensor by receiving and decoding the key.
Direct encryption between 4-20 mA analog signal transmission equipment is achieved, ensuring that the acquisition equipment can identify and reject non-original sensors, protecting the interests of professional manufacturers, and avoiding the risk of users using inferior sensors.
Smart Images

Figure CN113031491B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of 4-20 mA analog signal sensors and relates to a 4-20 mA analog signal sensor with encryption function and a method. Background Art
[0002] 4-20 mA signal transmission is a common method for connecting sensors and receiving devices over long distances. According to Ampere's loop law, current signal transmission is distortion-free and can be transmitted over several kilometers through long cables without signal loss, so 4-20 mA transmission is commonly used in industry.
[0003] First, let's briefly introduce common sensors: In this case, it is a pressure sensor. The increase or decrease of current is linearly related to the increase or decrease of the measured pressure. Then the 4-20 mA current signal is connected to a dedicated data acquisition device via a cable. The data acquisition device calculates the air pressure on the sensor by measuring the signal current. Figure 1 When the air pressure changes within the measuring range, the pressure sensitive device (1) outputs a voltage change of several tens of millivolts, and outputs a current of 4 to 20 mA through the operational amplifier (2) circuit, the gain control adjustment (4) circuit, and the constant current source (3) output circuit. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a 4-20 mA analog signal sensor and method with encryption function to solve the problems existing in the prior art.
[0005] The technical solution adopted by the present invention is: a 4-20 mA analog signal sensor with encryption function, including a pressure-sensitive device, an operational amplifier, a constant current source and a gain control adjustment module, the pressure-sensitive device is connected to the operational amplifier and the constant current source in sequence, the operational amplifier is connected to the gain control adjustment module, and the gain control adjustment module is connected to the IO / 1 output pin and the IO / 2 output pin of the password output CPU processor.
[0006] An encryption method for a 4-20 mA analog signal sensor with an encryption function, the method comprising: generating a string of keys by a password output CPU processor and outputting the keys through an IO / 1 output pin and an IO / 2 output pin; when the IO / 1 output pin of the password output CPU processor is valid, a gain control adjustment module controls an operational amplifier, and a constant current source outputs a 22 mA current for 20 milliseconds, which is judged as bit (1) after receiving the signal; when the IO / 2 output pin of the password output CPU processor is valid, the constant current source outputs a 2 mA current for 20 milliseconds, which is judged as bit (0) after receiving the signal; after receiving the signal, the acquisition device processes the signal as an encryption key.
[0007] Beneficial effects of the present invention: Compared with the prior art, the present invention targets a dedicated 4-20 mA sensor that transmits analog signals to a collection device, and uses a password output CPU processor to directly encrypt the analog signal transmission between devices, so that a key confirmation function is added to the collection device. If an ordinary 4-20 mA sensor is replaced at will, the collection device can recognize that the non-original dedicated 4-20 mA sensor refuses to read and process data. The present invention targets low-quality and low-priced sensors, and can achieve the purpose of preventing genuine sensors from being imitated by knockoffs, protecting the interests of professional manufacturers, and preventing users from using knockoff and low-quality sensors. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 It is a schematic diagram showing the structural principle of an existing pressure sensor;
[0009] Figure 2 It is a 4-20 mA analog quantity curve chart;
[0010] Figure 3 To add a 4-20 mA analog curve for transmitting a string of passwords;
[0011] Figure 4 A 4-20 mA analog curve is added to transmit a string of passwords again after a certain interval;
[0012] Figure 5 It is a schematic diagram of the structural principle of the present invention. DETAILED DESCRIPTION
[0013] The invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0014] Example 1: Figure 5 As shown, a 4-20 mA analog signal sensor with encryption function includes a pressure-sensitive device 1, an operational amplifier 2, a constant current source 3 and a gain control adjustment module 4. The pressure-sensitive device 1 is connected to the operational amplifier 2 and the constant current source 3 in sequence, the operational amplifier 2 is connected to the gain control adjustment module 4, and the gain control adjustment module 4 is connected to the IO / 1 output pin and the IO / 2 output pin of the password output CPU processor 5.
[0015] Embodiment 2: An encryption method for a 4-20 mA analog signal sensor with encryption function, the method comprising: generating a string of keys by a password output CPU processor 5, and outputting the keys through the IO / 1 output pin and the IO / 2 output pin; when the IO / 1 output pin of the password output CPU processor 5 is valid, the gain control adjustment module 4 controls the operational amplifier 2, and the constant current source 3 outputs a 22 mA current for 20 milliseconds, which is received by the acquisition device and judged as bit (1); when the IO / 2 output pin of the password output CPU processor 5 is valid, the constant current source 4 outputs a 2 mA current for 20 milliseconds, which is received by the acquisition device and judged as bit (0); after receiving a string of 0 and 1 signals, the acquisition device processes the signals as an encryption key; the password is transmitted again at intervals using a rolling code (a different code is transmitted each time); the receiving device and the sensor prepare a password hardware protocol in advance to ensure smooth access to the authorized sensor.
[0016] Digital signal transmission equipment encryption is very common. The present invention is aimed at direct encryption between analog signal transmission equipment. Direct encryption is not to convert analog signals into digital signals, which are then encrypted and then converted back into analog signals.
[0017] The 4-20 mA analog quantity itself cannot be encoded, such as Figure 2 shown.
[0018] The present invention transmits a string of passwords through the hardware protocol in the first second when the sensor is connected to the collection device. Figure 3 .
[0019] The password string transmission time is only about 1 second, which does not affect normal use. When the acquisition device detects the sensor access, it immediately monitors the password string. If it fails, the sensor is rejected to achieve the purpose of the present invention. To prevent being cracked, the password is transmitted again after a certain period of time using a rolling code (a different code is transmitted each time). The receiving device and the sensor make a password hardware agreement in advance to ensure the smooth access of the authorized sensor. Figure 4 .
[0020] The hardware protocol is as follows: the normal signal transmission is a 4-20 mA current signal. Therefore, after power is turned on, it is agreed that a pulse signal greater than 20 mA (23-24 mA in this example) and lasting 20 milliseconds is recorded as bit (1), and a pulse signal less than 4 mA (2-3 mA in this example) and lasting 20 milliseconds is recorded as bit (0). 50 bits of binary data can be transmitted within 1 second as the encryption password. After the sensor is powered on and works for a certain period of time, such as one day, the password is transmitted again through the CPU control on the sensor. When the acquisition device receives a current greater than 20 mA, it immediately enters the decoding mode. In this way, even if an unauthorized sensor can imitate the first password, the subsequent code monitoring cannot pass and is rejected by the acquisition device.
[0021] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. An encryption method for a 4-20 mA analog signal sensor with encryption function, Features: The 4-20 mA analog signal sensor with encryption function comprises a pressure sensitive device (1), an operational amplifier (2), a constant current source (3) and a gain control adjustment module (4), wherein the pressure sensitive device (1) is connected to the operational amplifier (2) and the constant current source (3) in sequence, the operational amplifier (2) is connected to the gain control adjustment module (4), and the gain control adjustment module (4) is connected to the IO / 1 output pin and the IO / 2 output pin of the password output CPU processor (5); the encryption method comprises: the password output CPU processor (5) generates a string of keys, and transmits the keys to the IO / 1 output pin and the IO / 2 output pin of the password output CPU processor (5). IO / 2 output pin output, when the IO / 1 output pin of the password output CPU processor (5) is valid, the gain control adjustment module (4) controls the operational amplifier (2), and the constant current source (3) outputs 22 mA current for 20 milliseconds. After the acquisition device receives it, it is judged as bit (1). When the IO / 2 output pin of the password output CPU processor (5) is valid, the constant current source (3) outputs 2 mA current for 20 milliseconds. After the acquisition device receives it, it is judged as bit (0). After receiving a series of 0 and 1 signals, the acquisition device processes them as encryption keys.
2. The encryption method of a 4-20 mA analog signal sensor with encryption function according to claim 1, Features: After a certain period of time, a different password will be transmitted using a rolling code.
Citation Information
Patent Citations
4-20 milliampere analog signal sensor with encryption function
CN217279300U
Sensor device and encryption method
WO2020158540A1