Analog signal acquisition circuit and method for automatically identifying signal source interface type

By designing an analog signal acquisition circuit that automatically identifies the type of signal source interface, using voltage sources, current sources, program-controlled resistors and auxiliary ADC modules, automatic matching of different types of signal source interfaces is achieved, solving the acquisition error problem caused by matching failure in the existing technology, and improving the reliability of the acquisition circuit.

CN119986221AActive Publication Date: 2025-05-13崂山国家实验室
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510457294.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-05-13
Estimated Expiration
2045-04-14

AI Technical Summary

Technical Problem

In the prior art, the sensor signal acquisition process requires matching circuits according to the type of signal source interface. Operation errors or cognitive problems lead to matching failure, which may lead to inaccurate measurement results or equipment damage.

Method used

Design an analog signal acquisition circuit that automatically recognizes the type of signal source interface. Through the voltage source module, current source module, program-controlled resistor module, auxiliary ADC module and logic controller, it automatically detects the signal source interface type and automatically configures matching acquisition circuits.

Benefits of technology

Automatic identification and matching of different types of signal source interfaces is realized, acquisition errors caused by operational errors are avoided, reliability of acquisition circuits is improved, and equipment damage is prevented.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119986221A_ABST
    Figure CN119986221A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of sensor signal acquisition, and particularly discloses an analog signal acquisition circuit and method for automatically identifying the type of a signal source interface. The analog signal acquisition circuit can adapt to different types of signal source interfaces, the output voltage value of the voltage source module, the output current value of the current source module and the resistance value of the program control resistor module are automatically configured through the logic controller, and the auxiliary ADC module is matched to detect the types of the signal source interfaces. The analog signal acquisition method for automatically identifying the type of the signal source interface is based on the analog signal acquisition circuit, and the judgment result of the type of the signal source interface comprises a current source output type interface, a voltage source output type interface, a resistance source output type interface and a current source input type interface. The matched analog signal acquisition circuit is automatically configured according to the judgment result of the type of the signal source interface, and analog signals of different types of signal source interfaces can be acquired.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of sensor signal acquisition, and relates to an analog signal acquisition circuit and method for automatically identifying a signal source interface type. Background Art

[0002] In the process of sensor signal acquisition, it is usually necessary to match the corresponding analog signal acquisition circuit according to the signal source interface type. If the matching fails, it will lead to erroneous acquisition results or even equipment damage.

[0003] At present, some of the general signal acquisition boards on the market match specific signal sources by providing adapters, manually adjusting matching circuits, etc., and some products are compatible with multiple types of signal source interfaces, but usually require operators to identify the type of signal source interface by themselves, and then select the matching mode corresponding to the signal source interface type in the software, which requires a high level of technical skills of the operators. Due to the operator's operating errors or cognitive problems, it is easy to cause the analog signal acquisition circuit to not match the signal source interface type, which will not only make the measurement results inaccurate, but may even damage expensive high-precision data acquisition equipment or high-precision sensors, resulting in huge losses.

[0004] Based on this, there is an urgent need to propose an analog signal acquisition circuit that can automatically identify the type of signal source interface to solve the above technical problems existing in the prior art. Summary of the invention

[0005] The purpose of the present invention is to propose an analog signal acquisition circuit that automatically identifies the type of signal source interface. The acquisition circuit can automatically detect the type of signal source interface, and then automatically configure a matching analog signal acquisition circuit based on the judgment result of the signal source interface type, so as to realize the acquisition of analog signals of different types of signal source interfaces.

[0006] In order to achieve the above object, the present invention adopts the following technical scheme: An analog signal acquisition circuit for automatically identifying the type of a signal source interface, comprising an input interface, a voltage source module, a current source module, a programmable resistor module, an auxiliary ADC module, a logic controller and a common acquisition circuit; The voltage source module includes a programmable voltage source, a first programmable resistor and a first switch, the output end of the programmable voltage source is connected to the first programmable resistor, the first programmable resistor is connected to one end of the first switch, and the other end of the first switch is connected to the input interface; The current source module includes a programmable current source, a voltage and current measuring unit and a second switch, the output end of the programmable current source is connected to the voltage and current measuring unit, the voltage and current measuring unit is used to monitor the working state of the programmable current source, one end of the second switch is connected to the voltage and current measuring unit, and the other end of the second switch is connected to the input interface; The programmable resistor module includes a second programmable resistor and a third switch, the second programmable resistor is connected to the signal ground, one end of the third switch is connected to the second programmable resistor, and the other end of the third switch is connected to the input interface; The auxiliary ADC module includes a first analog-to-digital converter and a fourth switch, one end of the fourth switch is connected to the first analog-to-digital converter, and the other end of the fourth switch is connected to the input interface; The public acquisition circuit is provided with a fifth switch, an amplifying and filtering circuit and a second analog-to-digital converter. One end of the fifth switch is connected to the input interface, and the other end of the fifth switch is connected to the second analog-to-digital converter via the amplifying and filtering circuit.

[0007] In addition, the present invention also proposes an analog signal acquisition method for automatically identifying the type of signal source interface. The method is implemented based on the above-mentioned analog signal acquisition circuit. Before collecting the signal, the signal source interface type is first identified, and then the analog signals of different types of signal source interfaces are collected according to different signal source interface types.

[0008] In order to achieve the above object, the present invention adopts the following technical scheme: An analog signal acquisition method for automatically identifying the type of a signal source interface comprises the following steps: Step 1. First determine the signal source interface type of the analog signal acquisition circuit; In the signal source interface type determination, the signal source interface type determination result includes a current source output type interface, a voltage source output type interface, a resistance source output type interface, and a current source input type interface; Automatically configure a matching analog signal acquisition circuit according to the judgment result of the signal source interface type; Step 2. Use the analog signal acquisition circuit in step 1 to acquire the analog signal from the signal source.

[0009] Compared with the prior art, the present invention has the following beneficial effects: As described above, the present invention relates to an analog signal acquisition circuit that automatically identifies the type of signal source interface, and an analog signal acquisition method that automatically identifies the type of signal source interface based on the analog signal acquisition circuit. The analog signal acquisition circuit of the present invention can adapt to different types of signal source interfaces, automatically configure the output voltage value of the voltage source module, the output current value of the current source module and the resistance value of the programmable resistor module through a logic controller, and cooperate with the auxiliary ADC module for detection to achieve automatic judgment of the type of signal source interface. In addition, switches are used for control in the analog signal acquisition circuit of the present invention, which will not cause loss to the quality of the analog input signal of the sensor. The first switch to the fifth switch in the analog signal acquisition circuit of the present invention all use blocking switches to ensure that the power supply can be quickly cut off in the case of excessive current or short circuit, thereby improving the reliability of the acquisition circuit and preventing damage to the sensor or acquisition circuit due to misoperation. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0011] Figure 1 A schematic diagram of the structure of an analog signal acquisition circuit for automatically identifying the type of a signal source interface according to the present invention; Among them, 11 is a programmable voltage source, 12 is a first programmable resistor, 13 is a first switch, 21 is a programmable current source, 22 is a voltage and current measuring unit, 23 is a second switch, 31 is a second programmable resistor, and 32 is a third switch; 41 - a first analog-to-digital converter, 42 - a fourth switch, 51 - a fifth switch, 52 - an amplifier and filter circuit, 53 - a second analog-to-digital converter, 6 - a logic controller, 7 - an input interface, 8 - a post-stage circuit protection module. DETAILED DESCRIPTION

[0012] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0013] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of the present invention.

[0014] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0015] In addition, in the present invention, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0016] In the present invention, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0017] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0018] Example 1 The present invention proposes an analog signal acquisition circuit and method for automatically identifying the type of signal source interface, so as to achieve the purpose of identifying the type of signal source interface, automatically configure a matching analog signal acquisition circuit according to different signal source interface types, and collect analog signals.

[0019] Before introducing the analog signal acquisition circuit for automatically identifying the signal source interface type in the present invention, it is necessary to first explain the signal source interface type. The signal source interface type in this embodiment is divided into a voltage source output type interface, a current source output type interface, a resistance source output type interface and a current source input type interface according to the signal source output signal characteristics and circuit characteristics.

[0020] Specifically, the output characteristic of the voltage source output type interface is that the output signal is a voltage signal, and its voltage signal remains basically unchanged as the load impedance changes. The characteristic of the current source output type interface is that the output signal is a current signal, which changes with the load impedance and maintains a linear relationship. The output signal of the resistance source output type interface needs to be measured with a voltage source, and the output signal changes linearly with the change of the voltage source. The current source input type interface needs to be measured with a current source, and its output signal has nothing to do with the change of the current size of the current source.

[0021] like Figure 1 As shown, the analog signal acquisition circuit for automatically identifying the signal source interface type in this embodiment includes an input interface 7, a voltage source module, a current source module, a programmable resistor module, an auxiliary ADC module, a logic controller 6 and a common acquisition circuit.

[0022] The voltage source module includes a programmable voltage source 11, a first programmable resistor 12 and a first switch 13, wherein the output end of the programmable voltage source 11 is connected to the first programmable resistor 12, the first programmable resistor 12 is connected to one end of the first switch 13, and the other end of the first switch 13 is connected to the input interface 7. The logic controller 6 controls the output voltage of the programmable voltage source 11, the resistance value of the first programmable resistor 12 and the on-off state of the first switch 13. In this embodiment, the logic controller 6 can control the output voltage of the programmable voltage source 11 through software, and can also control the resistance of the first programmable resistor 12 and the connection of the first switch 13 through software.

[0023] Specifically, in this embodiment, the programmable voltage source 11 includes a first power chip and a first digital potentiometer. The logic controller controls the resistance of the first digital potentiometer through a serial peripheral interface (SPI). The first digital potentiometer serves as a feedback resistor of the first power chip. By adjusting the resistance value of the first power chip, the output voltage of the programmable voltage source 11 is changed. The first power chip preferably uses a LM5170 type DCDC chip, and the first digital potentiometer preferably uses a TPL0501-100 type digital potentiometer. The maximum resistance value of the TPL0501-100 type digital potentiometer is 100KΩ.

[0024] The current source module includes a programmable current source 21, a voltage and current measuring unit 22, and a second switch 23, wherein the output end of the programmable current source 21 is connected to the voltage and current measuring unit 22, the voltage and current measuring unit 22 is used to monitor the working state of the programmable current source 21, one end of the second switch 23 is connected to the voltage and current measuring unit 22, and the other end of the second switch 23 is connected to the input interface 7. The logic controller 6 controls the output current size of the programmable current source 21, the working state of the voltage and current measuring unit 22, and the on-off state of the second switch 23 respectively. In this embodiment, the logic controller 6 can control the output current size of the programmable current source 21 and the connection of the second switch 23 through software, and read the voltage and current values ​​in the voltage and current measuring unit 22 through software to realize the monitoring of the working state of the programmable current source 21. The voltage and current measuring unit 22 of this embodiment preferably adopts the INA226 model, which supports the alarm function and can realize ultra-high precision bidirectional measurement.

[0025] Specifically, in this embodiment, the programmable current source 21 includes a second power chip and a second digital potentiometer. The logic controller 6 controls the resistance of the second digital potentiometer through the SPI interface. The second digital potentiometer serves as a feedback resistor of the second power chip. By adjusting the resistance value of the second power chip, the output current of the second programmable current source 21 is changed. The second power chip is preferably an LM334 chip, and the second digital potentiometer is preferably a TPL0501-100 digital potentiometer.

[0026] The programmable resistor module includes a second programmable resistor 31 and a third switch 32, wherein the second programmable resistor 31 is connected to the signal ground, one end of the third switch 32 is connected to the second programmable resistor 31, and the other end of the third switch 32 is connected to the input interface 7. The logic controller 6 controls the resistance value of the second programmable resistor 31 and the on / off state of the third switch 32 respectively. In this embodiment, the logic controller 6 can control the resistance value of the second programmable resistor 31 and the connection state of the third switch 32 through software.

[0027] The auxiliary ADC module includes a first analog-to-digital converter 41 and a fourth switch 42, one end of the fourth switch 42 is connected to the first analog-to-digital converter 41, and the other end of the fourth switch 42 is connected to the input interface 7. The logic controller 6 controls the signal acquisition of the first analog-to-digital converter 41 and the on-off state of the fourth switch 42. In this embodiment, the logic controller 6 detects the signal voltage at the analog input interface 7 by controlling the on-off of the fourth switch 42 and the acquisition of the first analog-to-digital converter 41.

[0028] The common acquisition circuit is provided with a fifth switch 51, an amplifying and filtering circuit 52, and a second analog-to-digital converter 53. One end of the fifth switch 51 is connected to the input interface 7, and the other end of the fifth switch 51 is connected to the second analog-to-digital converter 53 through the amplifying and filtering circuit 52. The logic controller 6 controls the signal acquisition of the second analog-to-digital converter 53 and the on-off state of the fifth switch 51 respectively.

[0029] In this embodiment, the analog signal acquisition circuit further includes a post-stage circuit protection module 8 , which is respectively connected to the first switch 13 , the second switch 23 , the third switch 32 , the fourth switch 42 , the fifth switch 51 and the input interface 7 .

[0030] In addition, the logic controller 6 of this embodiment preferably adopts an STM32F207 logic controller. The first analog-to-digital converter 41 and the second analog-to-digital converter 53 preferably adopt an ADS8319 analog-to-digital converter, which is a 16-bit SAR analog-to-digital converter with a maximum sampling rate of 500ksps and a digital interface of SPI. The logic controller 6 controls the first analog-to-digital converter 41 and the second analog-to-digital converter 53 through the SPI interface and reads the data after analog-to-digital conversion. Of course, the logic controller 6 is not limited to the preferred devices of this embodiment, and DSP, FPGA, ARM or other devices with signal processing and logic control functions can also be selected.

[0031] The first switch 13, the second switch 23, the third switch 32, the fourth switch 42 and the fifth switch 51 of this embodiment are preferably AQY221R2S switches, which have an on-resistance of 0.8Ω and an output capacitance of 13pF.

[0032] It should be noted that the above-mentioned models are only preferred for this embodiment, and the logic controller 6 and switches in the analog signal acquisition circuit of the present invention are not limited to the selection of this embodiment.

[0033] The analog signal acquisition circuit of the present invention can adapt to the signal source interface type by detecting the impedance characteristics and current and voltage adaptation of the input analog signal source, automatically configure each module through the logic controller 6, use the auxiliary ADC for detection, and automatically determine the interface type. The logic controller 6 changes the voltage, current and matching resistance at the input interface 7 by controlling the voltage source module, the current source module and the programmable resistance module, and uses the auxiliary ADC module for signal acquisition, thereby determining the signal properties and circuit characteristics of the input signal source. At the same time, it can detect whether the signal at the input interface 7 is abnormal, including open circuit, voltage overload, current overload, etc., which can improve the reliability of the analog signal acquisition circuit and prevent damage to the sensor or acquisition circuit due to misoperation. Specifically, when the collected voltage value is greater than the preset threshold, it is determined to be a voltage overload, and when the collected current value is greater than the preset threshold, it is determined to be a current overload.

[0034] Example 2 This embodiment 2 describes an analog signal acquisition method for automatically identifying the type of a signal source interface. The method is based on the analog signal acquisition circuit for automatically identifying the type of a signal source interface in the above embodiment 1.

[0035] The analog signal acquisition method for automatically identifying the signal source interface type comprises the following steps: Step 1. First determine the signal source interface type of the analog signal acquisition circuit.

[0036] In the signal source interface type judgment, the judgment results of the signal source interface type include current source output type interface, voltage source output type interface, resistance source output type interface, and current source input type interface. The matching analog signal acquisition circuit is automatically configured according to the judgment results of the signal source interface type.

[0037] Step 1.1. The auxiliary ADC module is used in conjunction with the programmable resistor module to detect whether the signal source interface type is a current source output type interface or a voltage source output type interface.

[0038] The minimum resistance value of the second programmable resistor 31 is 100Ω, and the maximum resistance value is 100KΩ.

[0039] Under the control of the logic controller 6, the resistance value of the second programmable resistor 31 is set to the maximum value R 1 In this embodiment, R 1 The resistance of the second programmable resistor 31 is set to a maximum value of 100KΩ. The third switch 32 and the fourth switch 42 are closed, and the first switch 13, the second switch and the fifth switch 51 are kept in an open state.

[0040] Control the first analog-to-digital converter 41 to convert the collected analog signal into a digital signal to obtain a conversion value A 1 ; Set the resistance value of the second programmable resistor to r 1 In this embodiment, r 1 The first time the resistance value of the second programmable resistor 31 is reduced, the first analog-to-digital converter 41 is controlled to convert the collected analog signal into a digital signal, and the conversion value A is obtained. 2 The second time, the resistance value of the second programmable resistor 31 is reduced, and the first analog-to-digital converter 41 is controlled to convert the collected analog signal into a digital signal to obtain a conversion value A 3 The third time, the resistance value of the second programmable resistor 31 is reduced, and the first analog-to-digital converter 41 is controlled to convert the collected analog signal into a digital signal to obtain a conversion value A 4 .

[0041] If A 2 , A 3 , A 4 The value of is not zero, and A 1 With A 2 The ratio of A 2 With A 3 The ratio of A 3 With A 4 The ratios are all less than the preset threshold In this embodiment is 95%, that is, A1 The data collected at point A 2 The collected data, A 2 The data collected at point A 3 The collected data, A 3 The data collected at point A 4 If the proportion of collected data is less than 95%, the signal source interface type is determined to be a current source output interface, and go to step 1.5.

[0042] If A 2 , A 3 , A 4 The value of is not zero, and A 1 With A 2 The ratio of A 2 With A 3 The ratio of A 3 With A 4 The ratio is greater than or equal to the preset threshold , that is, A 1 With A 2 The ratio of A 2 With A 3 The ratio of A 3 With A 4 If the ratio is greater than or equal to 95%, then A 1 With A 2 , A 2 With A 3 , A 3 With A 4 If the difference is small or basically the same, the signal source interface type is determined to be a voltage source output interface, and go to step 1.5.

[0043] If the above judgment conditions for the signal source interface type are not met, the process goes to step 1.2 to further judge the signal source interface type.

[0044] Step 1.2. The auxiliary ADC module is used in conjunction with the voltage source module to further detect whether the signal source interface type is a voltage source output type interface.

[0045] In this embodiment, the maximum output voltage of the programmable voltage source 11 is 24V, the minimum output voltage is 1V, the programmable voltage source 11 has an overcurrent protection function, and its maximum output current is 100mA. The maximum resistance of the first programmable resistor 12 is 100KΩ, and the minimum resistance is 100Ω.

[0046] Under the control of the logic controller 6, the output voltage value of the programmable voltage source 11 is set to the minimum value U min In this embodiment, U min is 1V, and the resistance value of the first programmable resistor 12 is set to the maximum value R 2In this embodiment, R 2 The output voltage of the programmable voltage source 11 is set to a minimum value of 1V, and the resistance of the first programmable resistor 12 is set to a maximum value of 100KΩ. The first switch 13 and the fourth switch 42 are closed, and the second switch, the third switch 32 and the fifth switch 51 are kept in an open state.

[0047] Control the first analog-to-digital converter 41 to convert the collected analog signal into a digital signal to obtain a conversion value B 1 ; Then the value of the increase in the output voltage value of the programmable voltage source 11 is preset. In this embodiment, the output voltage value of the programmable voltage source 11 is increased by 10%; the output voltage value of the programmable voltage source 11 is increased by the preset value for the first time, and the first analog-to-digital converter 41 is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B 2 The second time, the output voltage value of the programmable voltage source 11 is increased according to the preset value, and the first analog-to-digital converter 41 is controlled to convert the collected analog signal into a digital signal to obtain the conversion value B 3 The third time, the output voltage value of the programmable voltage source 11 is increased according to the preset value, and the first analog-to-digital converter 41 is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B 4 .

[0048] like , , The values ​​of are all less than the preset threshold. Set to 10%, which satisfies <10%, <10%, <10%, then it is considered that B 1 , B 2 , B 3 , B 4 The value remains basically unchanged, determine that the signal source interface type is a voltage source output interface, and go to step 1.5.

[0049] If the above judgment conditions for the signal source interface type are not met, the process goes to step 1.3 to further judge the signal source interface type.

[0050] Step 1.3. The auxiliary ADC module is used in conjunction with the programmable resistor module to detect whether the signal source interface type is a resistance source output type interface.

[0051] Under the control of the logic controller 6, the output voltage value of the programmable voltage source 11 is set to the minimum value U min In this embodiment, U min is 1V, the resistance value of the second programmable resistor 31 is set to the maximum value R1 In this embodiment, R 1 The output voltage of the programmable voltage source 11 is set to a minimum value of 1V, and the resistance value of the second programmable resistor 31 is set to a maximum value of 100KΩ. The third switch 32 and the fourth switch 42 are closed, and the first switch 13, the second switch and the fifth switch 51 are kept in an open state.

[0052] Control the first analog-to-digital converter 41 to convert the collected analog signal into a digital signal to obtain a conversion value B 3 The resistance value of the second programmable resistor 31 is set to r 2 In this embodiment, the resistance value of the second programmable resistor 31 is reduced by 10% each time. The resistance value of the second programmable resistor 31 is reduced for the first time, and the first analog-to-digital converter 41 is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B 4 The second time, the resistance value of the second programmable resistor 31 is reduced, and the first analog-to-digital converter 41 is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B 5 The third time, the resistance value of the second programmable resistor 31 is reduced, and the first analog-to-digital converter 41 is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B 6 .

[0053] If B 4 and B 3 The difference, B 5 and B 4 The difference, B 6 and B 5 The difference is equal to the reduced resistance value r 2 There is a linear relationship, that is, B 3 With B 4 , B 5 With B 4 , B 6 With B 5 The value changes with the change of the resistance of the second programmable resistor 31, and it can be 3 With B 4 , B 5 With B 4 , B 6 With B 5 It is deduced that the signal source interface type is a resistor interface, and the resistance value of the input signal source can be deduced through Ohm's law. It is determined that the signal source interface type is a resistor source output interface, and go to step 1.5.

[0054] If the above judgment conditions for the signal source interface type are not met, the process goes to step 1.4 to further judge the signal source interface type.

[0055] Step 1.4. The auxiliary ADC module is used in conjunction with the current source module to detect whether the input signal source interface type is a current source input type interface.

[0056] In this embodiment, the maximum output current of the programmable current source 21 is 10 mA, the minimum output current is 100 uA, and the maximum output voltage is 24 V. The voltage and current measuring unit 22 mainly measures the output current value and output voltage value of the programmable current source 21 .

[0057] Under the control of the logic controller 6, the output current value of the programmable current source 21 is set to the minimum value I min In this embodiment, min The output current value of the programmable current source 21 is set to 100uA, that is, the output current value of the programmable current source 21 is set to the minimum value of 100uA. The second switch and the fourth switch 42 are closed, and the first switch 13, the third switch 32 and the fifth switch 51 are kept in the open state.

[0058] Control the first analog-to-digital converter 41 to convert the collected analog signal into a digital signal to obtain a conversion value B 5 ; Set the current value of the programmable current source 21 to i each time 1 In this embodiment, i 1 is 100uA, that is, the output current of the programmable current source 21 increases by 100uA each time; the output current value of the programmable current source 21 is increased for the first time, and the first analog-to-digital converter 41 is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B 8 The second time increases the output current value of the programmable current source 21, controls the first analog-to-digital converter 41 to convert the collected analog signal into a digital signal, and obtains the conversion value B 9 The third time increases the output current value of the programmable current source 21, controls the first analog-to-digital converter 41 to convert the collected analog signal into a digital signal, and obtains the conversion value B 10 .

[0059] If B 8 With B 7 The difference, B 9 With B 8 The difference, B 10 With B 9 The difference between the two is related to the increased current value a 1 If the relationship is linear, then according to Ohm's law, the signal source interface type is determined to be a resistance source output interface, and go to step 1.5; if B 8 With B 7 , B 9 With B 8 , B 10 With B 9 are all nonlinear relationships, and when the current source increases to the preset value I* back, , , The values ​​are all less than the preset threshold In this embodiment is 5%, that is , , If the values ​​of are all less than 5%, it indicates that the signal source interface type is a current source input interface, and go to step 1.5.

[0060] If all the features do not match, that is, the judgment conditions of all signal source interface types in steps 1.1 to 1.4 are not met, it is determined to be an abnormal situation, the abnormality is reported and the execution of subsequent steps is suspended.

[0061] Step 1.5. Configure the analog signal acquisition circuit that matches the signal source interface type.

[0062] If the signal source interface type is a voltage source output type interface, the first switch 13 , the second switch, the third switch 32 and the fourth switch 42 are opened, and the fifth switch 51 is closed.

[0063] If the signal source interface type is a resistance source output type interface, the second switch, the third switch 32 and the fourth switch 42 are opened, and the first switch 13 and the fifth switch 51 are closed.

[0064] If the signal source interface type is a current source output type interface, the first switch 13 , the second switch and the fourth switch 42 are opened, and the third switch 32 and the fifth switch 51 are closed.

[0065] If the signal source interface type is a current source input type interface, the first switch 13 , the third switch 32 and the fourth switch 42 are opened, and the second switch and the fifth switch 51 are closed.

[0066] According to step 1.1, it can be determined whether the signal source interface type is a voltage source output type interface or a current source output type interface. According to step 1.2, it can be determined whether the signal source interface type is a voltage source output type interface or an interface other than the voltage source output type interface. According to step 1.3, it can be determined whether the signal source interface type is a resistance source output type interface or an interface other than the resistance source output type interface. According to step 1.4, it can be determined whether the signal source interface type is a resistance source output type interface or a current source input type interface.

[0067] Step 2. Use the analog signal acquisition circuit in step 1 to acquire the analog signal from the signal source.

[0068] Specifically, the output current of the programmable current source 21 is set to 1mA, the output voltage of the programmable voltage source 11 is set to 5V, the resistance of the programmable resistance source, that is, the resistance of the second programmable resistor 31 is set to 1KΩ, and the configured analog signal acquisition circuit is used to acquire the analog signal of the signal source.

[0069] So far, the present embodiment has been described in detail in conjunction with the accompanying drawings. Based on the above description, those skilled in the art should have a clear understanding of the analog signal acquisition circuit and method for automatically identifying the signal source interface type of the present invention. Of course, the above is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural transformations made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or direct / indirect application in other related technical fields are included in the patent protection scope of the present invention and should be protected by the present invention.

Claims

1. An analog signal acquisition circuit for automatically identifying the type of signal source interface, characterized in that: It includes an input interface, a voltage source module, a current source module, a programmable resistor module, an auxiliary ADC module, a logic controller and a common acquisition circuit; The voltage source module includes a programmable voltage source, a first programmable resistor and a first switch, the output end of the programmable voltage source is connected to the first programmable resistor, the first programmable resistor is connected to one end of the first switch, and the other end of the first switch is connected to the input interface; The current source module includes a programmable current source, a voltage and current measuring unit and a second switch, the output end of the programmable current source is connected to the voltage and current measuring unit, the voltage and current measuring unit is used to monitor the working state of the programmable current source, one end of the second switch is connected to the voltage and current measuring unit, and the other end of the second switch is connected to the input interface; The programmable resistor module includes a second programmable resistor and a third switch, the second programmable resistor is connected to the signal ground, one end of the third switch is connected to the second programmable resistor, and the other end of the third switch is connected to the input interface; The auxiliary ADC module includes a first analog-to-digital converter and a fourth switch, one end of the fourth switch is connected to the first analog-to-digital converter, and the other end of the fourth switch is connected to the input interface; The public acquisition circuit is provided with a fifth switch, an amplifying and filtering circuit and a second analog-to-digital converter. One end of the fifth switch is connected to the input interface, and the other end of the fifth switch is connected to the second analog-to-digital converter via the amplifying and filtering circuit.

2. The analog signal acquisition circuit for automatically identifying the signal source interface type according to claim 1, characterized in that: The output voltage of the programmable voltage source, the resistance value of the first programmable resistor, and the on / off state of the first switch are all controlled by the logic controller respectively; The output current of the programmable current source, the working state of the voltage and current measuring unit, and the on-off state of the second switch are all controlled by the logic controller respectively; The resistance value of the second programmable resistor and the on / off state of the third switch are respectively controlled by the logic controller; The signal acquisition of the first analog-to-digital converter and the on-off state of the fourth switch are respectively controlled by the logic controller; The signal acquisition of the second analog-to-digital converter and the on-off state of the fifth switch are respectively controlled by the logic controller.

3. The analog signal acquisition circuit for automatically identifying the signal source interface type according to claim 1, characterized in that: The program-controlled voltage source includes a first power chip and a first digital potentiometer; The logic controller controls the resistance of the first digital potentiometer through the SPI interface, and the first digital potentiometer serves as a feedback resistor of the first power chip and is used to change the output voltage of the programmable voltage source; The program-controlled current source includes a second power chip and a second digital potentiometer; The logic controller controls the resistance of the second digital potentiometer through the SPI interface. The second digital potentiometer serves as a feedback resistor of the second power chip and is used to change the output current of the second programmable current source.

4. A method for collecting analog signals for automatically identifying the type of signal source interface, characterized in that: An analog signal acquisition circuit based on the automatic identification of the signal source interface type according to any one of claims 1 to 3; The analog signal acquisition method for automatically identifying the signal source interface type comprises the following steps: Step 1. First determine the signal source interface type of the analog signal acquisition circuit; In the signal source interface type determination, the signal source interface type determination result includes a current source output type interface, a voltage source output type interface, a resistance source output type interface, and a current source input type interface; Automatically configure a matching analog signal acquisition circuit according to the judgment result of the signal source interface type; Step 2. Use the analog signal acquisition circuit in step 1 to acquire the analog signal from the signal source.

5. The analog signal acquisition method for automatically identifying the signal source interface type according to claim 4, characterized in that: The step 1 is specifically as follows: Step 1.

1. The auxiliary ADC module is used in conjunction with the programmable resistor module to detect whether the signal source interface type is a current source output interface or a voltage source output interface; Step 1.

2. The auxiliary ADC module is used in conjunction with the voltage source module to detect whether the signal source interface type is a voltage source output interface; Step 1.

3. The auxiliary ADC module is used in conjunction with the programmable resistor module to detect whether the signal source interface type is a resistance source output type interface; Step 1.

4. The auxiliary ADC module is used in conjunction with the current source module to detect whether the input signal source interface type is a resistance source output type interface or a current source input type interface; Step 1.

5. Configure the analog signal acquisition circuit that matches the signal source interface type; If the signal source interface type is determined to be a voltage source output type interface, the first switch, the second switch, the third switch and the fourth switch are disconnected, and the fifth switch is closed; If the signal source interface type is determined to be a resistance source output type interface, the second switch, the third switch and the fourth switch are disconnected, and the first switch and the fifth switch are closed; If the signal source interface type is determined to be a current source output type interface, the first switch, the second switch and the fourth switch are disconnected, and the third switch and the fifth switch are closed; If the signal source interface type is determined to be a current source input type interface, the first switch, the third switch and the fourth switch are opened, and the second switch and the fifth switch are closed.

6. The analog signal acquisition method for automatically identifying the signal source interface type according to claim 5, characterized in that: The step 1.1 is specifically as follows: Under the control of the logic controller, the resistance value of the second programmable resistor is set to a maximum value R1, the third switch and the fourth switch are closed, and the first switch, the second switch and the fifth switch are kept in an open circuit state; Controlling the first analog-to-digital converter to convert the collected analog signal into a digital signal to obtain a conversion value A1; The resistance value of the second programmable resistor that is reduced each time is set to r1, and the resistance value of the second programmable resistor is reduced for the first time, and the first analog-to-digital converter is controlled to convert the collected analog signal into a digital signal to obtain a conversion value A2; The resistance value of the second programmable resistor is reduced for the second time, and the first analog-to-digital converter is controlled to convert the collected analog signal into a digital signal to obtain a conversion value A3; The resistance value of the second programmable resistor is reduced for the third time, and the first analog-to-digital converter is controlled to convert the collected analog signal into a digital signal to obtain a conversion value A4; If the values ​​of A2, A3, and A4 are not zero, and the ratio of A1 to A2, the ratio of A2 to A3, and the ratio of A3 to A4 are all less than the preset threshold , then determine that the signal source interface type is a current source output interface, and go to step 1.5; If the values ​​of A2, A3, and A4 are not zero, and the ratio of A1 to A2, the ratio of A2 to A3, and the ratio of A3 to A4 are all greater than or equal to the preset threshold , then determine that the signal source interface type is a voltage source output interface and go to step 1.

5.

7. The analog signal acquisition method for automatically identifying the signal source interface type according to claim 5, characterized in that: The step 1.2 is specifically as follows: Under the control of the logic controller, the output voltage of the programmable voltage source is set to the minimum value U min , setting the resistance value of the first programmable resistor to a maximum value R2, closing the first switch and the fourth switch, and keeping the second switch, the third switch and the fifth switch in an open circuit state; Controlling the first analog-to-digital converter to convert the collected analog signal into a digital signal to obtain a conversion value B1; For the first time, the output voltage value of the programmable voltage source is increased according to a preset value, and the first analog-to-digital converter is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B2; The output voltage value of the programmable voltage source is increased by a preset value for the second time, and the first analog-to-digital converter is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B3; The output voltage value of the programmable voltage source is increased for the third time according to a preset value, and the first analog-to-digital converter is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B4; like , , The values ​​are all less than the preset threshold , then determine that the signal source interface type is a voltage source output interface and go to step 1.

5.

8. The analog signal acquisition method for automatically identifying the signal source interface type according to claim 5, characterized in that: The step 1.3 is specifically as follows: Under the control of the logic controller, the output voltage value of the programmable voltage source is set to the minimum value U min , the resistance value of the second programmable resistor is set to a maximum value R1, the third switch and the fourth switch are closed, and the first switch, the second switch and the fifth switch are kept in an open circuit state; Controlling the first analog-to-digital converter to convert the collected analog signal into a digital signal to obtain a conversion value B3; The resistance value of the second programmable resistor that is reduced each time is set to r2, and the resistance value of the second programmable resistor is reduced for the first time, and the first analog-to-digital converter is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B4; The resistance value of the second programmable resistor is reduced for the second time, and the first analog-to-digital converter is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B5; The resistance value of the second programmable resistor is reduced for the third time, and the first analog-to-digital converter is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B6; If the difference between B4 and B3, the difference between B5 and B4, and the difference between B6 and B5 are all linearly related to the reduced resistance value r2, then the signal source interface type is determined to be a resistance source output type interface, and go to step 1.

5.

9. The analog signal acquisition method for automatically identifying the signal source interface type according to claim 5, characterized in that: The step 1.4 is specifically as follows: Under the control of the logic controller, the output current value of the programmable current source is set to the minimum value I min , close the second switch and the fourth switch, and keep the first switch, the third switch and the fifth switch in an open circuit state; Controlling the first analog-to-digital converter to convert the collected analog signal into a digital signal to obtain a conversion value B7; The current value increased each time by the programmable current source is set as i1, the output current value of the programmable current source is increased for the first time, and the first analog-to-digital converter is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B8; The output current value of the programmable current source is increased for the second time, and the first analog-to-digital converter is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B9; The output current value of the programmable current source is increased for the third time, and the first analog-to-digital converter is controlled to convert the collected analog signal into a digital signal to obtain a conversion value B 10 ; If the difference between B8 and B7, the difference between B9 and B8, B 10 The difference between B9 and B9 is linearly related to the increased current value a1. According to Ohm's law, the signal source interface type is determined to be a resistance source output interface, and go to step 1.5; If B8 and B7, B9 and B8, B 10 The relationship between the current source and B9 is nonlinear, and when the current source increases to the preset value I * back, , , The values ​​are all less than the preset threshold , then determine that the signal source interface type is a current source input interface, and go to step 1.5; If the judgment conditions of all signal source interface types are not met, it is determined to be an abnormal situation.

10. The analog signal acquisition method for automatically identifying the signal source interface type according to claim 4, characterized in that: The step 2 is specifically as follows: The output current value of the programmable current source is set to 1mA, the output voltage value of the programmable voltage source is set to 5V, and the resistance value of the programmable resistance source, i.e., the resistance value of the second programmable resistor, is set to 1KΩ; The configured analog signal acquisition circuit is used to acquire the analog signal from the signal source.

Citation Information

Patent Citations

  • Photovoltaic inverter control system and method compatible with multiple DC source inputs

    CN108631364A

  • Online rapid ground resistance measurement system

    CN109374976A

  • Signal source device and system applied to regular test of reactor protection system

    CN115482944A

  • Signal identification circuit and method and electric equipment

    CN117570550A

  • Analog multiplexer with insulation power supply

    EP2109221A1