Signal acquisition circuit and signal acquisition method
By designing adjustable acquisition units and control units, combining filter units and voltage generation units, flexible acquisition of different types of signals is achieved, solving the problems of low acquisition efficiency and poor anti-interference in the prior art, and improving the acquisition efficiency and reliability.
Patent Information
- Application Number
- CN202510544586.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-04-28
AI Technical Summary
Most of the acquisition circuits in the prior art can only be collected for a single type of analog signal, resulting in low acquisition efficiency and the use of relays with large power consumption, limited life and poor anti-interference.
A signal acquisition circuit is designed. Through an adjustable acquisition unit and control unit, the acquisition method is adjusted according to the type of signal to be collected, combined with a filter unit and a voltage generation unit to achieve flexible acquisition of different types of signals, and a switch tube is used instead of relays to reduce power consumption and improve anti-interference ability.
It realizes flexible acquisition of multiple types of signals, improves acquisition efficiency, reduces power consumption, extends service life, and improves anti-interference ability.
Smart Images

Figure CN120074526B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal acquisition, and in particular to a signal acquisition circuit and a signal acquisition method. Background Art
[0002] In industrial control, intelligent sensing, and complex equipment monitoring systems, analog signal acquisition is a key step in obtaining information about external physical quantities, playing a vital role in ensuring precise control and efficient operation of the systems. There are many types of analog signals, each with different signal characteristics, measurement ranges, and accuracy requirements. However, most acquisition circuits in related technologies can only capture a single type of analog signal, resulting in low acquisition efficiency. Summary of the Invention
[0003] The present invention aims to at least partially address one of the technical problems in the related art. To this end, a first object of the present invention is to provide a signal acquisition circuit in which an acquisition unit has an adjustable acquisition mode. A control unit controls the acquisition unit according to the type of the signal to be acquired, enabling the acquisition unit to acquire different types of signals to be acquired, thereby achieving flexible acquisition of multiple types of signals and improving acquisition efficiency.
[0004] The second object of the present invention is to provide a signal acquisition method.
[0005] To achieve the above-mentioned purpose, according to an embodiment of the first aspect of the present invention, a signal acquisition circuit is proposed, comprising: an acquisition unit, wherein the acquisition mode of the acquisition unit is adjustable, and the acquisition unit is configured to acquire and process the signal to be acquired to obtain a first voltage signal; a filtering unit, wherein the filtering unit is connected to the acquisition unit, and the filtering unit is configured to filter and process the first voltage signal to obtain a second voltage signal; a voltage generating unit, configured to output a first reference voltage with an adjustable amplitude; a control unit, configured to adjust the acquisition mode according to the signal type of the signal to be acquired, so that the acquisition unit performs voltage division processing on the signal to be acquired according to the corresponding acquisition mode, and acquires the second voltage signal according to the first reference voltage to obtain an initial sampling value, and adjusts the first reference voltage according to the initial sampling value, and acquires the second voltage signal according to the adjusted first reference voltage to obtain a target sampling value.
[0006] According to an embodiment of the present invention, a signal acquisition circuit includes an acquisition unit, a filtering unit, a voltage generating unit, and a control unit. The acquisition mode of the acquisition unit is adjustable. The acquisition unit is configured to acquire and process a signal to be acquired to obtain a first voltage signal. The filtering unit is connected to the acquisition unit and is configured to filter the first voltage signal to obtain a second voltage signal. The voltage generating unit is configured to output a first reference voltage with an adjustable amplitude. The control unit is configured to adjust the acquisition mode according to the signal type of the signal to be acquired, so that the acquisition unit performs voltage division processing on the signal to be acquired according to the corresponding acquisition mode, acquires the second voltage signal according to the first reference voltage to obtain an initial sampling value, adjusts the first reference voltage according to the initial sampling value, and acquires the second voltage signal according to the adjusted first reference voltage to obtain a target sampling value. Thus, the acquisition mode of the acquisition unit can be adjusted, and the control unit controls the acquisition unit according to the type of the signal to be acquired, so that the acquisition unit can acquire different types of signals to be acquired, thereby achieving flexible acquisition of multiple types of signals and improving acquisition efficiency.
[0007] According to one embodiment of the present invention, the voltage generating unit includes: a voltage generating module, the input end of the voltage generating module is suitable for connecting to a preset power supply, the output end of the voltage generating module is connected to the power input end of the control unit, the enable end of the voltage generating module is connected to the first output end of the control unit, and the voltage generating module is configured to generate a preset voltage according to the preset power supply when receiving an enable signal sent by the control unit; a controllable switch module, one end of the controllable switch module is connected to the power input end of the control unit, the other end of the controllable switch module is grounded, the control end of the controllable switch module is connected to the second output end of the control unit, and the controllable switch module is configured to provide zero voltage to the control unit when receiving a first control signal sent by the control unit.
[0008] According to one embodiment of the present invention, the control unit includes an analog-to-digital converter, and the control unit is further configured to set the second reference voltage to a first preset voltage, so that the analog-to-digital converter generates a first digital signal based on the first preset voltage and the first reference voltage, and determines an initial sampling value based on the first digital signal, and adjusts the first reference voltage or the second reference voltage based on the initial sampling value, so that the analog-to-digital converter generates a second digital signal based on the adjusted first reference voltage or the adjusted second reference voltage, and determines a target sampling value based on the second digital signal.
[0009] According to one embodiment of the present invention, the control unit is further configured to output a first control signal and stop outputting an enable signal before setting the second reference voltage to the first preset voltage, so that the analog-to-digital converter generates a first digital signal based on the first preset voltage and zero voltage.
[0010] According to one embodiment of the present invention, the control unit is further configured to stop outputting the first control signal and output an enable signal when the initial sampling value is greater than the second preset voltage, so that the analog-to-digital converter generates a second digital signal based on the first preset voltage and the preset voltage.
[0011] According to one embodiment of the present invention, the target sampling value is calculated according to the following formula: V=(ADC / 2^n)*(Vref1-Vref)+Vref, where ADC is the second digital signal, n is the number of bits of the analog-to-digital converter, Vref1 is the first preset voltage, and Vref is the preset voltage.
[0012] According to one embodiment of the present invention, the control unit is further configured to set the second reference voltage to the second preset voltage when the initial sampling value is less than or equal to the second preset voltage, so that the analog-to-digital converter generates a second digital signal based on the second preset voltage and zero voltage.
[0013] According to one embodiment of the present invention, the target sampling value is calculated according to the following formula: V=(ADC / 2^n)*Vref2, where ADC is the second digital signal, n is the number of bits of the analog-to-digital converter, and Vref2 is the second preset voltage.
[0014] According to one embodiment of the present invention, the controllable switch module includes: a first resistor, one end of the first resistor is connected to the second output end of the control unit, and the other end of the first resistor is grounded; a first switch tube, a first end of the first switch tube is connected to the power input end of the control unit, a second end of the first switch tube is grounded, and a control end of the first switch tube is connected to one end of the first resistor.
[0015] According to one embodiment of the present invention, the acquisition unit includes: a second resistor, one end of the second resistor is suitable for inputting a signal to be acquired; a second switching tube, a first end of the second switching tube is connected to the other end of the second resistor, the second end of the second switching tube is grounded, and the control end of the second switching tube is connected to the third output end of the control unit; a third resistor, one end of the third resistor is connected to one end of the second resistor; a fourth resistor, one end of the fourth resistor is connected to the other end of the third resistor and has a first node, and the other end of the fourth resistor is grounded; a fifth resistor, one end of the fifth resistor is connected to the first node; a third switching tube, a first end of the third switching tube is connected to the other end of the fifth resistor, the second end of the third switching tube is grounded, and the control end of the third switching tube is connected to the fourth output end of the control unit.
[0016] According to one embodiment of the present invention, the control unit is further configured to, when the signal to be collected is a voltage signal and the amplitude of the signal to be collected is within a first preset range, control the second switch tube and the third switch tube to be turned off respectively; or, when the signal to be collected is a voltage signal and the amplitude of the signal to be collected is within a second preset range, control the second switch tube to be turned off and control the third switch tube to be turned on, wherein the maximum value of the second preset range is greater than the maximum value of the first preset range; or, when the signal to be collected is a current signal and the amplitude of the signal to be collected is within a third preset range, control the second switch tube to be turned on and control the third switch tube to be turned off.
[0017] According to one embodiment of the present invention, the filtering unit includes: a first filtering module, the first filtering module is connected to the acquisition unit, the first filtering module is configured to perform high-frequency filtering on the first voltage signal, and perform lead compensation on the first voltage signal to obtain a second voltage signal; a second filtering module, the second filtering module is connected to the first filtering module, and the second filtering module is configured to perform common-mode interference suppression on the first voltage signal with the first filtering module.
[0018] According to one embodiment of the present invention, the first filtering module includes: an operational amplifier, the positive input terminal of the operational amplifier is connected to the output terminal of the acquisition unit, and the output terminal of the operational amplifier is connected to the input terminal of the control unit; a sixth resistor, one end of the sixth resistor is connected to the negative input terminal of the operational amplifier and has a second node, and the other end of the sixth resistor is connected to the output terminal of the operational amplifier; a seventh resistor, one end of the seventh resistor is connected to the second node, and the other end of the seventh resistor is grounded; and a first capacitor, the first capacitor is connected in parallel with the sixth resistor.
[0019] According to one embodiment of the present invention, the second filtering module includes: a second capacitor, which is arranged between the positive input terminal and the negative input terminal of the operational amplifier.
[0020] According to one embodiment of the present invention, the signal acquisition circuit further includes: a protection unit, the input end of the protection unit is suitable for inputting the signal to be collected, the output end of the protection unit is connected to the acquisition unit, and the protection unit is configured to perform overcurrent protection and overvoltage protection on the acquisition unit.
[0021] According to one embodiment of the present invention, the protection unit includes: a thermistor, one end of the thermistor is suitable for connecting to the positive electrode of the signal to be collected; a first diode, one end of the first diode is connected to the other end of the thermistor, the other end of the first diode is grounded and suitable for connecting to the negative electrode of the signal to be collected; and a third capacitor, the third capacitor is connected in parallel with the first diode.
[0022] To achieve the above-mentioned purpose, according to an embodiment of the second aspect of the present invention, a signal acquisition method is proposed, which is applied to a signal acquisition circuit. The signal acquisition circuit includes an acquisition unit, a filtering unit and a voltage generating unit. The voltage division mode of the acquisition unit is adjustable. The acquisition unit is configured to perform voltage division processing on the signal to be acquired to obtain a first voltage signal. The filtering unit is connected to the acquisition unit. The filtering unit is configured to filter the first voltage signal to obtain a second voltage signal. The voltage generating unit is configured to output a first reference voltage with adjustable amplitude. The method includes: adjusting the voltage division mode according to the signal type of the signal to be acquired so that the acquisition unit performs voltage division processing on the signal to be acquired according to the corresponding voltage division mode; acquiring the second voltage signal according to the first reference voltage to obtain an initial sampling value; adjusting the first reference voltage according to the initial sampling value, and acquiring the second voltage signal according to the adjusted first reference voltage to obtain a target sampling value.
[0023] According to an embodiment of the present invention, a signal acquisition method adjusts an acquisition mode according to the signal type of the signal to be acquired, so that an acquisition unit performs voltage division processing on the signal to be acquired according to the corresponding acquisition mode, acquires a second voltage signal according to a first reference voltage to obtain an initial sampling value, adjusts the first reference voltage according to the initial sampling value, and acquires the second voltage signal according to the adjusted first reference voltage to obtain a target sampling value. The signal acquisition circuit includes an acquisition unit, a filtering unit, and a voltage generation unit. The acquisition mode of the acquisition unit is adjustable. The acquisition unit is configured to acquire and process the signal to be acquired to obtain a first voltage signal. The filtering unit is connected to the acquisition unit and is configured to filter the first voltage signal to obtain a second voltage signal. The voltage generation unit is configured to output a first reference voltage with an adjustable amplitude. Thus, the acquisition mode of the acquisition unit can be adjusted. The control unit controls the acquisition unit according to the type of the signal to be acquired, so that the acquisition unit can acquire different types of signals to be acquired, thereby achieving flexible acquisition of multiple types of signals and improving acquisition efficiency.
[0024] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 is a structural diagram of a signal acquisition circuit according to an embodiment of the present invention;
[0026] Figure 2 is a circuit diagram of a collection unit according to one embodiment of the present invention;
[0027] Figure 3This is a timing diagram when the signal to be collected is a voltage signal of 0-5V according to one embodiment of the present invention;
[0028] Figure 4 This is a timing diagram when the signal to be collected is a voltage signal of 0-10V according to one embodiment of the present invention;
[0029] Figure 5 This is a timing diagram when the signal to be collected is a 4-20mA current signal according to one embodiment of the present invention;
[0030] Figure 6 is a circuit diagram of a voltage generating unit according to one embodiment of the present invention;
[0031] Figure 7 is a flow chart of a method for adjusting a reference voltage according to an embodiment of the present invention;
[0032] Figure 8 is a circuit diagram of a filtering unit and a protection unit according to one embodiment of the present invention;
[0033] Figure 9 FIG. 4 is a flow chart of a signal acquisition method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The following describes embodiments of the present invention in detail, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and are not to be construed as limiting the present invention.
[0035] Most acquisition circuits in related art can only collect a single type of analog signal, lacking targeted adaptation for different signal types. This prevents flexible analog signal acquisition and requires a large number of sampling ports. Furthermore, most acquisition circuits in related art use relays for switching. Due to relays' high power consumption (requiring tens of milliamperes for stable operation), limited lifespan (approximately 50,000 cycles), and poor anti-interference capabilities (electromagnetic switching during relay operation interferes with the power supply network and signals), these acquisition circuits suffer from high power consumption, short lifespan, and poor anti-interference capabilities.
[0036] Based on this, an embodiment of the present invention provides a signal acquisition circuit and a signal acquisition method. The acquisition method of the acquisition unit can be adjusted, and the control unit controls the acquisition unit according to the type of the signal to be collected, so that the acquisition unit can collect different types of signals to be collected, thereby realizing flexible acquisition of multiple types of signals, thereby improving acquisition efficiency.
[0037] The signal acquisition circuit and signal acquisition method according to the embodiments of the present invention will be described below with reference to the accompanying drawings.
[0038] Figure 1 FIG. 1 is a schematic diagram of a signal acquisition circuit according to an embodiment of the present invention. Figure 1 As shown, the signal acquisition circuit includes: an acquisition unit 10 , a filtering unit 20 , a voltage generating unit 30 and a control unit 40 .
[0039] Among them, the acquisition mode of the acquisition unit 10 is adjustable, and the acquisition unit 10 is configured to acquire and process the signal to be acquired to obtain a first voltage signal; the filtering unit 20 is connected to the acquisition unit 10, and the filtering unit 20 is configured to filter and process the first voltage signal to obtain a second voltage signal; the voltage generating unit 30 is configured to output a first reference voltage with adjustable amplitude; the control unit 40 is configured to adjust the acquisition mode according to the signal type of the signal to be acquired, so that the acquisition unit 10 performs voltage division processing on the signal to be acquired according to the corresponding acquisition mode, and acquires the second voltage signal according to the first reference voltage to obtain an initial sampling value, and adjusts the first reference voltage according to the initial sampling value, and acquires the second voltage signal according to the adjusted first reference voltage to obtain a target sampling value.
[0040] Specifically, there are three types of signals to be collected: the first type is a voltage signal, and its amplitude is within a first preset range (e.g., 0-5V); the second type is a voltage signal, and its amplitude is within a second preset range (e.g., 0-10V); and the third type is a current signal, and its amplitude is within a third preset range (e.g., 4-20mA). Both the first and second types of signals are voltage signals, but their amplitudes differ, requiring different collection methods to ensure that the first voltage signal meets the operating range of the sampling port of the control unit 40. The third type is a current signal, which requires conversion to a voltage signal, requiring a different collection method than the first and second types. The collection unit 10 sets different collection methods for the three types of analog signals. The control unit 40 adjusts the collection method based on the type of the signal to be collected. The collection unit 10 uses the corresponding collection method to collect the first voltage signal. The filtering unit 20 filters the first voltage signal to obtain a second voltage signal, and provides the second voltage signal to the control unit 40 . Therefore, only one sampling port of the control unit 40 is occupied.
[0041] Furthermore, the signal acquisition circuit also includes a voltage generating unit 30, and the control unit 40 performs a first sampling of the second voltage signal based on the first reference voltage output by the voltage generating unit 30 to obtain an initial sampling value. If the voltage value selected for the first reference voltage is inappropriate, the resolution of the initial sampling value is low, and the first reference voltage needs to be adjusted before the second voltage signal is sampled to obtain a target sampling value with a higher resolution.
[0042] In the above embodiment, the acquisition method of the acquisition unit can be adjusted for different signal types to acquire different types of signals to be acquired, thereby achieving flexible acquisition of multiple types of signals, thereby improving acquisition efficiency. Furthermore, because the acquisition unit achieves flexible acquisition of multiple types of signals, it only needs to occupy one sampling port of the control unit, thereby solving the problem of insufficient sampling ports. In addition, the first voltage signal is filtered by the filtering unit, which can effectively suppress electromagnetic interference and enhance the anti-interference capability of the signal acquisition circuit, thereby improving the reliability of signal acquisition. In addition, the control unit can also adjust the first reference voltage based on the initial sampling value, thereby improving the acquisition resolution and outputting a more accurate target initial value.
[0043] In some embodiments, as Figure 2 As shown, the acquisition unit 10 includes: a second resistor R2, a second switch tube Q2, a third resistor R3, a fourth resistor R4, a fifth resistor R5 and a third switch tube Q3, wherein one end of the second resistor R2 is suitable for inputting a signal to be acquired; a first end of the second switch tube Q2 is connected to the other end of the second resistor R2, a second end of the second switch tube Q2 is grounded, and a control end of the second switch tube Q2 is connected to a third output end of the control unit 40; one end of the third resistor R3 is connected to one end of the second resistor R2; one end of the fourth resistor R4 is connected to the other end of the third resistor R3 and has a first node J1, and the other end of the fourth resistor R4 is grounded; one end of the fifth resistor R5 is connected to the first node J1; a first end of the third switch tube Q3 is connected to the other end of the fifth resistor R5, a second end of the third switch tube Q3 is grounded, and a control end of the third switch tube Q3 is connected to the fourth output end of the control unit 40.
[0044] Specifically, the control terminal of the second switch Q2 is adapted to receive the second control signal AI_ON1 of the control unit 40, and the control terminal of the third switch Q3 is adapted to receive the third control signal AI_ON2 of the control unit 40. When the second switch Q2 and the third switch Q3 are respectively in the off state, the third resistor R3 and the fourth resistor R4 collect the signal to be collected; when the second switch Q2 is in the off state and the third switch Q3 is in the on state, the third resistor R3, the fourth resistor R4, and the fifth resistor R5 collect the signal to be collected; and when the second switch Q2 is in the on state and the third switch Q3 is in the off state, the second resistor R2, the third resistor R3, and the fourth resistor R4 collect the signal to be collected. Therefore, by controlling the switching states of the second switch Q2 and the third switch Q3, the circuit connection mode of the collection unit 10 can be adjusted, thereby adjusting the connection mode of the collection unit 10.
[0045] It should be noted that the second switch tube Q2 and the third switch tube Q3 are both NMOS (N-Metal-Oxide-Semiconductor), but are not limited to NMOS and may also be other devices, such as transistors.
[0046] In the above embodiment, the acquisition unit is composed of a switching tube and a resistor. The switching tube has low power consumption and a long service life. Moreover, compared with the relay, there is no electromagnetic switching when the switching tube is switching. Therefore, it will not interfere with the signal acquisition circuit, thereby reducing the cost of the signal acquisition circuit, improving the service life of the signal acquisition circuit, and further improving the reliability of the signal acquisition circuit.
[0047] In some embodiments, the control unit 40 is further configured to, when the signal to be collected is a voltage signal and the amplitude of the signal to be collected is within a first preset range, control the second switch tube Q2 and the third switch tube Q3 to be turned off respectively; or, when the signal to be collected is a voltage signal and the amplitude of the signal to be collected is within a second preset range, control the second switch tube Q2 to be turned off and control the third switch tube Q3 to be turned on, wherein the maximum value of the second preset range is greater than the maximum value of the first preset range; or, when the signal to be collected is a current signal and the amplitude of the signal to be collected is within a third preset range, control the second switch tube Q2 to be turned on and control the third switch tube Q3 to be turned off.
[0048] Specifically, when the signal to be collected is a voltage signal and the amplitude of the signal to be collected is within the first preset range, the signal to be collected is as follows: Figure 3The analog signal shown is a voltage signal with an amplitude range of 0-5V. When the signal to be collected is input, the control unit 40 outputs a low-level signal to the control terminal of the second switch Q2 and the control terminal of the third switch Q3, respectively, to turn off the second switch Q2 and the third switch Q3. The third resistor R3 and the fourth resistor R4 divide the voltage of the signal to be collected to obtain a first voltage signal Vo1. The first voltage signal Vo1 is vin*R4 / (R3+R4), where vin is the signal to be collected.
[0049] When the signal to be collected is a voltage signal and the amplitude of the signal to be collected is within the second preset range, the signal to be collected is as follows Figure 4 The analog signal shown is a voltage signal with an amplitude range of 0-10V. When the signal to be collected is input, the control unit 40 outputs a low-level signal to the control terminal of the second switch tube Q2 and a high-level signal to the control terminal of the third switch tube Q3, so that the second switch tube Q2 is turned off and the third switch tube Q3 is turned on. The third resistor R3, the fourth resistor R4, and the fifth resistor R5 divide the voltage of the signal to be collected to obtain a first voltage signal Vo1. The first voltage signal Vo1 is vin*(R4 / / R5) / [R3+(R4 / / R5)], where vin is the signal to be collected.
[0050] When the signal to be collected is a current signal and the amplitude of the signal to be collected is within the third preset range, the signal to be collected is as follows Figure 5 The analog signal shown is a current signal with an amplitude range of 4-20mA. When the signal to be collected is input, the control unit 40 outputs a high-level signal to the control end of the second switch tube Q2 and outputs a low-level signal to the control end of the third switch tube Q3, so that the second switch tube Q2 is turned on and the third switch tube Q3 is turned off. The second resistor R2 converts the signal to be collected from a current signal to a voltage signal, and then divides the voltage through the third resistor R3 and the fourth resistor R4 to obtain a first voltage signal Vo1. The first voltage signal Vo1 is I*R2*R4 / (R3+R4), where I is the signal to be collected.
[0051] Furthermore, the resistance values of the second resistor R2, the third resistor R3 and the fourth resistor R4 need to be set according to the working range of the sampling port of the control unit 40. Figures 3 to 5 As shown in the example, it is assumed that the working range of the sampling port of the control unit 40 is 0-3.3V, and therefore, the range of the first voltage signal Vo1 is between 0-2.5V.
[0052] In some embodiments, as Figure 6As shown, the voltage generating unit includes: a voltage generating module 31 and a controllable switch module 32, wherein the input end of the voltage generating module 31 is suitable for connecting to a preset power supply Vcc, the output end of the voltage generating module 31 is connected to the power input end VREF- of the control unit 40, the enable end ENABLE of the voltage generating module 31 is connected to the first output end of the control unit 40, and the voltage generating module 31 is configured to generate a preset voltage Vref according to the preset power supply Vcc when receiving an enable signal REF_ON1 sent by the control unit 40; one end of the controllable switch module 32 is connected to the power input end VREF- of the control unit 40, the other end of the controllable switch module 32 is grounded, and the control end of the controllable switch module 32 is connected to the second output end of the control unit 40. The controllable switch module 32 is configured to provide zero voltage to the control unit 40 when receiving the first control signal VSS_ON1 sent by the control unit 40.
[0053] Specifically, the control unit 40 outputs an enable signal REF_ON1 to the voltage generating module 31. The voltage generating module 31 performs voltage conversion on the preset power supply Vcc to generate a preset voltage Vref, and provides the preset voltage Vref to the power input terminal VREF- of the control unit 40. One end of the controllable switch module 32 is also connected to the power input terminal VREF- of the control unit 40. When the controllable switch module 32 receives the first control signal VSS_ON1, the controllable switch module 32 pulls the power input terminal VREF- to a low level. Therefore, the voltage generating module 31 can output the preset voltage Vref or zero voltage, thereby realizing the adjustment of the first reference voltage.
[0054] In an optional embodiment, the voltage generating module 31 includes a reference voltage source chip 311, the power input pin VIN of the reference voltage source chip 311 is suitable for connecting a preset power supply Vcc, the enable pin ENABLE of the reference voltage source chip 311 is connected to the first output end of the control unit 40, the ground drive pin GND_FORCE and the ground detection pin GND_SENSE of the reference voltage source chip 311 are respectively grounded, and the voltage output pin VOUT_FORCE and the output voltage detection pin VOUT_SENSE of the reference voltage source chip 311 are the output ends of the voltage generating module 31.
[0055] In some embodiments, as Figure 6As shown, the control unit 40 includes an analog-to-digital converter (not shown), and the control unit 40 is further configured to set the second reference voltage to a first preset voltage, so that the analog-to-digital converter generates a first digital signal according to the first preset voltage and the first reference voltage, and determines an initial sampling value according to the first digital signal, and adjusts the first reference voltage or the second reference voltage according to the initial sampling value, so that the analog-to-digital converter generates a second digital signal according to the adjusted first reference voltage or the adjusted second reference voltage, and determines a target sampling value according to the second digital signal.
[0056] Specifically, the second reference voltage is an internal reference voltage of the control unit 40. The analog-to-digital converter performs analog-to-digital conversion on the second voltage signal Vo2 based on the voltage difference between the second reference voltage and the first reference voltage to generate a digital signal. The control unit 40 then determines a sampled value based on the first reference voltage, the second reference voltage, and the digital signal. It should be noted that the second reference voltage must be greater than the maximum value of the second voltage signal Vo2 to accurately sample the second voltage signal Vo2. Therefore, during the first sampling, to prevent the second voltage signal Vo2 from exceeding the second reference voltage, the second reference voltage must be set to a larger first preset voltage. The resolution of the analog-to-digital converter is correlated with the voltage difference. Assuming a 12-bit analog-to-digital converter with a resolution of 4096, its minimum measurable signal is the ratio of the voltage difference to 4096. Therefore, the larger the voltage difference, the larger the minimum measurable signal and the lower the accuracy of the analog-to-digital converter. Therefore, the control unit 40 adjusts the first reference voltage or the second reference voltage according to the initial sampling value to adjust the voltage difference, and then samples the second voltage signal Vo2 inputted thereafter according to the adjusted voltage difference, thereby obtaining a target sampling value with higher accuracy.
[0057] In some embodiments, the control unit 40 is further configured to output the first control signal VSS_ON1 and stop outputting the enable signal REF_ON1 before setting the second reference voltage to the first preset voltage, so that the analog-to-digital converter generates the first digital signal according to the first preset voltage and zero voltage.
[0058] Specifically, when sampling the second voltage signal Vo2 for the first time, since the control unit 40 does not yet have information about the amplitude of the second voltage signal Vo2, it first samples the second voltage signal Vo2 using the maximum reference voltage (i.e., the voltage difference with the largest value) to prevent the second voltage signal Vo2 from exceeding the sampling range. Therefore, before setting the second reference voltage to the first preset voltage, the control unit 40 outputs the first control signal VSS_ON1 to cause the controllable switch module 32 to connect the power input terminal VREF- of the control unit 40 to ground. As a result, the voltage difference is the first preset voltage. At this point, the voltage generation module 31 does not need to output the preset voltage Vref, so the control unit 40 simultaneously stops outputting the enable signal REF_ON1, deactivating the voltage generation module 31 and thereby reducing power consumption in the signal acquisition circuit.
[0059] In some embodiments, the control unit 40 is further configured to stop outputting the first control signal VSS_ON1 and output an enable signal REF_ON1 when the initial sampling value is greater than a second preset voltage, so that the analog-to-digital converter generates a second digital signal based on the first preset voltage and the preset voltage Vref, wherein the second preset voltage is less than the first preset voltage.
[0060] Specifically, the second preset voltage is also an internal reference voltage of the control unit 40 and is lower than the first preset voltage. When the initial sampling value of the control unit 40 is greater than the second preset voltage, it indicates that the amplitude of the second voltage signal Vo2 is between the second preset voltage and the first preset voltage. Therefore, by increasing the first reference voltage, the voltage difference can be reduced, thereby reducing the minimum measurable signal of the analog-to-digital converter and improving the accuracy of the analog-to-digital converter. The control unit 40 stops outputting the first control signal VSS_ON1 to disconnect the power input terminal VREF- of the control unit 40 from ground, and outputs the enable signal REF_ON1 to activate the voltage generation module 31 to output the preset voltage Vref to the power input terminal VREF- of the control unit 40. Therefore, the voltage difference is the difference between the first preset voltage and the preset voltage Vref. The analog-to-digital converter then samples the subsequently input second voltage signal Vo2 based on the first preset voltage and the preset voltage Vref to obtain a second digital signal. The control unit 40 determines the target sampling value based on the second digital signal.
[0061] In some embodiments, the target sampling value is calculated according to the following formula (1):
[0062] V=(ADC / 2^n)*(Vref1-Vref)+Vref(1)
[0063] Wherein, ADC is the second digital signal, n is the number of bits of the analog-to-digital converter, Vref1 is the first preset voltage, and Vref is the preset voltage.
[0064] It can be understood that, because the analog-to-digital converter samples the second voltage signal Vo2 based on the first preset voltage Vref1 and the preset voltage Vref, the control unit 40 also calculates the target sampling value based on the first preset voltage Vref1 and the preset voltage Vref when determining the target sampling value according to the analog-to-digital converter.
[0065] In some embodiments, the control unit 40 is further configured to set the second reference voltage to the second preset voltage when the initial sampling value is less than or equal to the second preset voltage, so that the analog-to-digital converter generates a second digital signal according to the second preset voltage and zero voltage.
[0066] Specifically, when the initial sampling value is less than or equal to the second preset voltage, it indicates that the amplitude of the second voltage signal Vo2 is less than or equal to the second preset voltage. Therefore, the voltage difference can be reduced by reducing the second reference voltage, thereby reducing the minimum measurable signal of the analog-to-digital converter, thereby improving the accuracy of the analog-to-digital converter. The control unit 40 sets the second reference voltage to the second preset voltage. At this time, the control unit 40 still outputs the first control signal VSS_ON1 and stops outputting the enable signal REF_ON1. In this way, the power input terminal VREF- of the control unit 40 is still connected to ground. Therefore, the voltage difference is the difference between the second preset voltage and zero voltage. The analog-to-digital converter then samples the subsequently input second voltage signal Vo2 based on the second preset voltage and zero voltage to obtain a second digital signal. The control unit 40 determines the target sampling value based on the second digital signal.
[0067] In some embodiments, the target sampling value is calculated according to the following formula (2):
[0068] V = (ADC / 2^n) * Vref2 (2)
[0069] Wherein, ADC is the second digital signal, n is the number of bits of the analog-to-digital converter, and Vref2 is the second preset voltage.
[0070] Likewise, because the ADC samples the second voltage signal Vo2 based on the second preset voltage Vref2 and zero voltage, the control unit 40 also performs calculations based on the second preset voltage Vref2 and zero voltage when determining the target sampling value according to the ADC.
[0071] It should be noted that the calculation method of the initial sampling value is similar to the calculation method of the target sampling value shown in formula (2), that is, the initial sampling value can be obtained by modifying the second preset voltage Vref2 to the first preset voltage Vref1.
[0072] For example, if Figure 7 As shown, assuming the first preset voltage is the power supply voltage (3.3V), the second preset voltage and the preset voltage are 1.5V, respectively, and the number of bits (n) of the analog-to-digital converter is 12. Before acquiring the second voltage signal, the control unit outputs a first control signal and stops outputting an enable signal to provide zero voltage to the control unit's power input terminal. The second reference voltage is then set to the power supply voltage. The analog-to-digital converter samples the second voltage signal to generate a first digital signal. The control unit calculates an initial sampling value based on the first digital signal. If the initial sampling value is less than or equal to the second preset voltage (1.5V), the second reference voltage is adjusted to 1.5V, and a target sampling value is calculated based on the second digital signal. The target sampling value is (ADC / 2^12)*1.5. If the initial sampling value is greater than the second preset voltage (1.5V), the first control signal is stopped and an enable signal is output to adjust the first reference voltage to 1.5V, while maintaining the second reference voltage unchanged. The target sampling value is (ADC / 2^12)*(3.3-1.5)+1.5. Therefore, before the reference voltage is adjusted, the resolution of the analog-to-digital converter is 4096. After the reference voltage is adjusted, the resolution of the analog-to-digital converter is 4096*2=8192, and the measurement accuracy of the analog-to-digital converter is increased by 1 times.
[0073] In the above embodiment, the first reference voltage or the second reference voltage of the analog-to-digital converter is adjusted according to the initial sampling value, thereby improving the sampling accuracy of the control unit.
[0074] In some embodiments, as Figure 6 As shown, the controllable switch module 32 includes: a first resistor R1 and a first switch tube Q1, wherein one end of the first resistor R1 is connected to the second output end of the control unit 40, and the other end of the first resistor R1 is grounded; a first end of the first switch tube Q1 is connected to the power input end VREF- of the control unit 40, a second end of the first switch tube Q1 is grounded, and a control end of the first switch tube Q1 is connected to one end of the first resistor R1.
[0075] For example, the first switch Q1 may be an NMOS transistor. When the first control signal VSS_ON1 is a high-level signal, the control unit 40 outputs the first control signal VSS_ON1 to the control terminal of the first switch Q1, thereby pulling the power input terminal VREF- of the control unit 40 to a low level. When the control unit 40 stops outputting the first control signal VSS_ON1, the control terminal of the first switch Q1 is pulled to a low level by the first resistor R1. As a result, the first switch Q1 remains in the off state, disconnecting the power input terminal VREF- of the control unit 40 from ground.
[0076] In some embodiments, as Figure 8 As shown, the filtering unit 20 includes: a first filtering module 21 and a second filtering module 22, wherein the first filtering module 21 is connected to the acquisition unit 10, and the first filtering module 21 is configured to perform high-frequency filtering on the first voltage signal and perform lead compensation on the first voltage signal to obtain a second voltage signal; the second filtering module 22 is connected to the first filtering module 21, and the second filtering module 22 is configured to perform common-mode interference suppression on the first voltage signal with the first filtering module 21.
[0077] It is understandable that the signal acquisition circuit may be affected by external interference, resulting in the presence of noise signals in the first voltage signal. Therefore, the first filter module 21 can filter out the high-frequency noise in the first voltage signal. In the related art, due to wiring, load and other reasons, the filter circuit will produce self-oscillation, and the first filter module 21 of this embodiment can also perform advance compensation to destroy the self-oscillation conditions, thereby avoiding high-frequency oscillations and improving the stability of the output signal. Furthermore, the second filter module 22 also performs common-mode interference suppression together with the first filter module 21, thereby further improving the stability of the output signal.
[0078] In some embodiments, as Figure 8 As shown, the first filtering module 21 includes: an operational amplifier OP, a sixth resistor R6, a seventh resistor R7 and a first capacitor C1, wherein the positive input terminal of the operational amplifier OP is connected to the output terminal of the acquisition unit 10, and the output terminal of the operational amplifier OP is connected to the input terminal of the control unit 40; one end of the sixth resistor R6 is connected to the negative input terminal of the operational amplifier OP and has a second node J2, and the other end of the sixth resistor R6 is connected to the output terminal of the operational amplifier OP; one end of the seventh resistor R7 is connected to the second node J2, and the other end of the seventh resistor R7 is grounded; the first capacitor C1 is connected in parallel with the sixth resistor R6.
[0079] Specifically, when the signal acquisition circuit introduces high-frequency noise, the noise gain is as shown in formula (3):
[0080] NG=1+{1 / [ω(C1 / / R6)]} / R7 (3)
[0081] Where NG is the noise gain and ω is the angular frequency.
[0082] As the noise frequency increases, the numerator decreases, reducing the overall noise gain. In an op amp circuit, when the loop gain |AF| is greater than 1, parasitic capacitance and load capacitance exist between the input and output terminals due to wiring and load factors, creating a second-order filter circuit. This causes the feedback phase to shift to -180°, leading to self-oscillation in the circuit. Therefore, a first capacitor C1 is connected in parallel with the sixth resistor R6 to reduce the phase to less than -180°, disrupting the self-oscillation condition. Furthermore, because the operational amplifier OP has high input impedance and low output impedance, it can isolate the load, ensuring that the signal does not change with changes in load parameters, resulting in a stable and reliable output waveform.
[0083] In some embodiments, as Figure 8 As shown, the second filtering module 22 includes: a second capacitor C2, and the second capacitor C2 is arranged between the positive input terminal of the operational amplifier OP and the negative input terminal of the operational amplifier OP.
[0084] Specifically, there is a momentary interference signal at the positive input terminal of the operational amplifier OP. Therefore, the voltage at the positive input terminal is higher than the voltage at the negative input terminal. The output terminal of the operational amplifier OP will instantly generate an interference signal. However, due to the presence of the second capacitor C2, the voltage across the second capacitor C2 cannot change suddenly. Therefore, the interference signal at the output terminal of the operational amplifier OP will be quickly and completely applied to the negative input terminal. Therefore, the interference signal at the positive input terminal of the operational amplifier OP and the interference signal at the negative input terminal of the operational amplifier OP will cancel each other out, thereby suppressing common-mode interference and making the output signal more stable.
[0085] In an optional embodiment, the filtering unit 20 further includes a third filtering module 23, which includes an eighth resistor R8 and a fourth capacitor C4. One end of the eighth resistor R8 is connected to the output terminal of the acquisition unit 10, and the other end of the eighth resistor R8 is connected to one end of the fourth capacitor C4 and the positive input terminal of the operational amplifier OP, respectively. The other end of the fourth capacitor C4 is grounded. The cutoff frequency fp can be set by selecting the resistance value of the eighth resistor R8 and the capacitance value of the fourth capacitor C4, where the cutoff frequency fp is 1 / (2πR8C3). The gain Au of the third filtering module 23 is 1 / (1+jf / fp). The larger the interference frequency f, the smaller the gain Au, and the better the filtering effect.
[0086] Furthermore, the filtering unit 20 also includes a second diode D2, a third diode D3, and a fourth diode D4. The second diode D2 is a transient voltage suppressor diode (TVS) having one end connected to the output of the acquisition unit 10 and the other end connected to ground. The cathode of the third diode D3 is adapted to be connected to a preset power supply Vcc. The anode of the third diode D3 is connected to the output of the operational amplifier OP. The cathode of the fourth diode D4 is connected to the output of the operational amplifier OP, and the anode of the fourth diode D4 is connected to ground. The second diode D2 can divert the overvoltage to ground when the circuit is subjected to an overvoltage or overcurrent shock, thereby protecting sensitive components of the circuit. The third diode D3 and the fourth diode D4 can clamp the voltage signal output by the operational amplifier OP when it is too large or too small, thereby protecting the control unit 40 from the shock.
[0087] In some embodiments, as Figure 8 As shown, the signal acquisition circuit also includes: a protection unit 50, the input end of the protection unit 50 is suitable for inputting the signal to be collected, the output end of the protection unit 50 is connected to the acquisition unit 10, and the protection unit 50 is configured to perform overcurrent protection and overvoltage protection on the acquisition unit 10.
[0088] It can be understood that the acquisition unit 10 is the core part of the signal acquisition circuit. Therefore, it is necessary to set a protection unit 50 before the acquisition unit 10 to perform overcurrent protection and overvoltage protection on the acquisition unit 10 to ensure that it operates within a safe current and voltage range, thereby extending the service life of the signal acquisition circuit and further improving the reliability of the signal acquisition circuit.
[0089] Optionally, in some embodiments, Figure 8 As shown, the protection unit 50 includes: a thermistor F1, a first diode D1 and a third capacitor C3, wherein one end of the thermistor F1 is suitable for connecting to the positive electrode IN+ of the signal to be collected; one end of the first diode D1 is connected to the other end of the thermistor F1, and the other end of the first diode D1 is grounded and suitable for connecting to the negative electrode IN- of the signal to be collected; the third capacitor C3 is connected in parallel with the first diode D1.
[0090] Specifically, thermistor F1 is a positive temperature coefficient thermistor, and first diode D1 is a transient voltage suppressor diode. Their combined response time and parameter characteristics effectively provide overcurrent and overvoltage protection. When a circuit experiences an overvoltage or overcurrent shock, the reverse breakdown voltage of first diode D1 responds quickly and diverts the overvoltage to ground, thereby protecting sensitive circuit components. The overvoltage shock may continue, causing a sharp increase in current, exceeding the rated current range of the circuit components. At this point, the current flowing through thermistor F1 exceeds its operating current, causing the impedance of thermistor F1 to rise rapidly, limiting the current increase and thus protecting the circuit from overcurrent shocks.
[0091] In summary, according to the signal acquisition circuit of the embodiment of the present invention, the acquisition method of the acquisition unit can be adjusted for different signal types to acquire different types of signals to be acquired, achieving flexible acquisition of multiple types of signals, thereby improving acquisition efficiency. Because the acquisition unit achieves flexible acquisition of multiple types of signals, it only needs to occupy one sampling port of the control unit, thus solving the problem of insufficient sampling ports. Furthermore, the first voltage signal is filtered by the filtering unit, which can effectively suppress electromagnetic interference, improve the anti-interference capability of the signal acquisition circuit, and thus improve the reliability of signal acquisition. In addition, the control unit can also adjust the first reference voltage based on the initial sampling value, thereby improving the acquisition resolution and outputting a more accurate target initial value. Furthermore, the acquisition unit is composed of a switching tube and a resistor. The switching tube has low power consumption and a long service life. Compared with a relay, the switching tube does not cause electromagnetic switching when it is switched, and therefore does not interfere with the signal acquisition circuit. This reduces the cost of the signal acquisition circuit, increases the service life of the signal acquisition circuit, and further improves the reliability of the signal acquisition circuit.
[0092] Corresponding to the above embodiment, the embodiment of the present invention further provides a signal acquisition method. The signal acquisition method is applied to Figure 1 The signal acquisition circuit shown in FIG. 1 includes an acquisition unit 10, a filtering unit 20, and a voltage generating unit 30. The voltage division mode of the acquisition unit 10 is adjustable. The acquisition unit 10 is configured to perform voltage division processing on the signal to be acquired to obtain a first voltage signal. The filtering unit 20 is connected to the acquisition unit 10. The filtering unit 20 is configured to perform filtering processing on the first voltage signal to obtain a second voltage signal. The voltage generating unit 30 is configured to output a first reference voltage with an adjustable amplitude. Figure 9 As shown, the signal acquisition method includes:
[0093] S201 , adjusting a voltage division method according to a signal type of a signal to be collected, so that a collection unit performs voltage division processing on the signal to be collected according to the corresponding voltage division method.
[0094] S202: Collect the second voltage signal according to the first reference voltage to obtain an initial sampling value.
[0095] S203 , adjusting the first reference voltage according to the initial sampling value, and collecting the second voltage signal according to the adjusted first reference voltage to obtain a target sampling value.
[0096] In some embodiments, the voltage generating unit 30 includes a voltage generating module 31 and a controllable switch module 32, wherein the input end of the voltage generating module 31 is suitable for connecting a preset power supply Vcc, and the voltage generating module 31 is configured to generate a preset voltage Vref according to the preset power supply Vcc when receiving an enable signal REF_ON1. The other end of the controllable switch module 32 is grounded, and the controllable switch module 32 is configured to provide zero voltage when receiving a first control signal VSS_ON1. The signal acquisition circuit also includes an analog-to-digital converter, and the method also includes: setting the second reference voltage to the first preset voltage, so that the analog-to-digital converter generates a first digital signal according to the first preset voltage and the first reference voltage, and determining an initial sampling value according to the first digital signal, and adjusting the first reference voltage or the second reference voltage according to the initial sampling value, so that the analog-to-digital converter generates a second digital signal according to the adjusted first reference voltage or the adjusted second reference voltage, and determining a target sampling value according to the second digital signal.
[0097] In some embodiments, before setting the second reference voltage to the first preset voltage, the method further includes: outputting a first control signal and stopping outputting an enable signal so that the analog-to-digital converter generates a first digital signal according to the first preset voltage and zero voltage.
[0098] In some embodiments, the first reference voltage or the second reference voltage is adjusted according to the initial sampling value, including: when the initial sampling value is greater than the second preset voltage, stopping outputting the first control signal and outputting an enable signal so that the analog-to-digital converter generates a second digital signal based on the first preset voltage and the preset voltage.
[0099] In some embodiments, the target sampling value is calculated according to the following formula:
[0100] V=(ADC / 2^n)*(Vref1-Vref)+Vref
[0101] Wherein, ADC is the second digital signal, n is the number of bits of the analog-to-digital converter, Vref1 is the first preset voltage, and Vref is the preset voltage.
[0102] In some embodiments, the first reference voltage or the second reference voltage is adjusted according to the initial sampling value, including: when the initial sampling value is less than or equal to the second preset voltage, the second reference voltage is set to the second preset voltage, so that the analog-to-digital converter generates a second digital signal based on the second preset voltage and zero voltage.
[0103] In some embodiments, the target sampling value is calculated according to the following formula:
[0104] V=(ADC / 2^n)*Vref2
[0105] Wherein, ADC is the second digital signal, n is the number of bits of the analog-to-digital converter, and Vref2 is the second preset voltage.
[0106] In some embodiments, the acquisition unit 10 includes: a second resistor R2, a second switch tube Q2, a third resistor R3, a fourth resistor R4, a fifth resistor R5, and a third switch tube Q3, wherein one end of the second resistor R2 is suitable for inputting a signal to be collected, a first end of the second switch tube Q2 is connected to the other end of the second resistor R2, a second end of the second switch tube Q2 is grounded, one end of the third resistor R3 is connected to one end of the second resistor R2, one end of the fourth resistor R4 is connected to the other end of the third resistor R3, and a first node J1 is formed between the first end of the fourth resistor R4 and the other end of the fifth resistor R5. The second end of the third switch tube Q3 is connected to the ground, and the voltage division mode is adjusted according to the signal type of the signal to be collected, including: when the signal to be collected is a voltage signal and the amplitude of the signal to be collected is within a first preset range, controlling the second switch tube and the third switch tube to be turned off respectively; or when the signal to be collected is a voltage signal and the amplitude of the signal to be collected is within a second preset range, controlling the second switch tube to be turned off and controlling the third switch tube to be turned on, wherein the maximum value of the second preset range is greater than the maximum value of the first preset range; or when the signal to be collected is a current signal and the amplitude of the signal to be collected is within a third preset range, controlling the second switch tube to be turned on and controlling the third switch tube to be turned off.
[0107] It should be noted that the specific implementation of the signal acquisition method in the embodiment of the present invention corresponds one-to-one to the specific implementation of the signal acquisition circuit in the aforementioned embodiment of the present invention, and will not be repeated here.
[0108] According to an embodiment of the present invention, a signal acquisition method adjusts an acquisition mode according to the signal type of the signal to be acquired, so that an acquisition unit performs voltage division processing on the signal to be acquired according to the corresponding acquisition mode, acquires a second voltage signal according to a first reference voltage to obtain an initial sampling value, adjusts the first reference voltage according to the initial sampling value, and acquires the second voltage signal according to the adjusted first reference voltage to obtain a target sampling value. The signal acquisition circuit includes an acquisition unit, a filtering unit, and a voltage generation unit. The acquisition mode of the acquisition unit is adjustable. The acquisition unit is configured to acquire and process the signal to be acquired to obtain a first voltage signal. The filtering unit is connected to the acquisition unit and is configured to filter the first voltage signal to obtain a second voltage signal. The voltage generation unit is configured to output a first reference voltage with an adjustable amplitude. Thus, the acquisition mode of the acquisition unit can be adjusted. The control unit controls the acquisition unit according to the type of the signal to be acquired, so that the acquisition unit can acquire different types of signals to be acquired, thereby achieving flexible acquisition of multiple types of signals and improving acquisition efficiency.
[0109] It should be noted that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and a portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.
[0110] It should be understood that various components of the present invention may be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods may be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof may be used: a discrete logic circuit having logic gate circuits for implementing logic functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field-programmable gate array (FPGA), etc.
[0111] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0112] In addition, the terms "first" and "second" used in the embodiments of the present invention are only used for descriptive purposes and should not be understood as indicating or implying relative importance, or implicitly indicating the number of technical features indicated in this embodiment. Therefore, the features defined by the terms "first" and "second" in the embodiments of the present invention can explicitly or implicitly indicate that the embodiment includes at least one of such features. In the description of the present invention, the word "plurality" means at least two or two or more, such as two, three, four, etc., unless otherwise clearly and specifically defined in the embodiments.
[0113] In the present invention, unless otherwise clearly specified or limited in the embodiments, the terms "installed," "connected," "connect," and "fixed" appearing in the embodiments should be understood in a broad sense. For example, the connection may be a fixed connection, a detachable connection, or an integral connection. It can also be a mechanical connection, an electrical connection, etc.; of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be internal communication between two elements, or an interaction between two elements. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood based on the specific implementation.
[0114] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A signal acquisition circuit, characterized in that: include: A collection unit, wherein the collection mode of the collection unit is adjustable, and the collection unit is configured to collect and process the signal to be collected to obtain a first voltage signal; a filtering unit, the filtering unit being connected to the acquisition unit and configured to filter the first voltage signal to obtain a second voltage signal; a voltage generating unit, configured to output a first reference voltage with adjustable amplitude; a control unit configured to adjust the acquisition mode according to a signal type of the signal to be acquired, so that the acquisition unit performs voltage division processing on the signal to be acquired according to the corresponding acquisition mode, acquires the second voltage signal according to the first reference voltage to obtain an initial sampling value, adjusts the first reference voltage according to the initial sampling value, and acquires the second voltage signal according to the adjusted first reference voltage to obtain a target sampling value; The voltage generating unit includes: a voltage generating module, wherein the input terminal of the voltage generating module is suitable for connecting to a preset power source, the output terminal of the voltage generating module is connected to the power input terminal of the control unit, the enable terminal of the voltage generating module is connected to the first output terminal of the control unit, and the voltage generating module is configured to generate a preset voltage according to the preset power source when receiving an enable signal sent by the control unit; a controllable switch module, one end of the controllable switch module being connected to the power input terminal of the control unit, the other end of the controllable switch module being grounded, the control end of the controllable switch module being connected to the second output terminal of the control unit, and the controllable switch module being configured to provide zero voltage to the control unit upon receiving a first control signal sent by the control unit; The control unit includes an analog-to-digital converter, and the control unit is further configured to set the second reference voltage to a first preset voltage, so that the analog-to-digital converter generates a first digital signal according to the first preset voltage and the first reference voltage, and determines the initial sampling value according to the first digital signal, and adjust the first reference voltage or the second reference voltage according to the initial sampling value, so that the analog-to-digital converter generates a second digital signal according to the adjusted first reference voltage or the adjusted second reference voltage, and determines the target sampling value according to the second digital signal; The control unit is further configured to output the first control signal and stop outputting the enable signal before setting the second reference voltage to the first preset voltage, so that the analog-to-digital converter generates the first digital signal according to the first preset voltage and the zero voltage.
2. The signal acquisition circuit according to claim 1, characterized in that: The control unit is further configured to stop outputting the first control signal and output the enable signal when the initial sampling value is greater than a second preset voltage, so that the analog-to-digital converter generates the second digital signal according to the first preset voltage and the preset voltage, wherein the second preset voltage is less than the first preset voltage.
3. The signal acquisition circuit according to claim 2, characterized in that: The target sampling value is calculated according to the following formula: V=(ADC / 2^n)*(Vref1-Vref)+Vref Wherein, ADC is the second digital signal, n is the number of bits of the analog-to-digital converter, Vref1 is the first preset voltage, and Vref is the preset voltage.
4. The signal acquisition circuit according to claim 2, characterized in that: The control unit is further configured to set the second reference voltage to the second preset voltage when the initial sampling value is less than or equal to the second preset voltage, so that the analog-to-digital converter generates the second digital signal according to the second preset voltage and the zero voltage.
5. The signal acquisition circuit according to claim 4, characterized in that: The target sampling value is calculated according to the following formula: V=(ADC / 2^n)*Vref2 Wherein, ADC is the second digital signal, n is the number of bits of the analog-to-digital converter, and Vref2 is the second preset voltage.
6. The signal acquisition circuit according to claim 1, characterized in that: The controllable switch module includes: a first resistor, one end of the first resistor being connected to the second output end of the control unit, and the other end of the first resistor being grounded; A first switching tube, wherein a first end of the first switching tube is connected to a power input end of the control unit, a second end of the first switching tube is grounded, and a control end of the first switching tube is connected to one end of the first resistor.
7. The signal acquisition circuit according to claim 1, characterized in that: The acquisition unit includes: a second resistor, one end of which is suitable for inputting the signal to be collected; a second switching tube, wherein a first end of the second switching tube is connected to the other end of the second resistor, a second end of the second switching tube is grounded, and a control end of the second switching tube is connected to the third output end of the control unit; a third resistor, one end of the third resistor being connected to one end of the second resistor; a fourth resistor, one end of the fourth resistor being connected to the other end of the third resistor and having a first node, and the other end of the fourth resistor being grounded; a fifth resistor, one end of the fifth resistor being connected to the first node; a third switch tube, wherein a first end of the third switch tube is connected to the other end of the fifth resistor, a second end of the third switch tube is grounded, and a control end of the third switch tube is connected to the fourth output end of the control unit.
8. The signal acquisition circuit according to claim 7, characterized in that: The control unit is further configured to: When the signal to be collected is a voltage signal and the amplitude of the signal to be collected is within a first preset range, controlling the second switch tube and the third switch tube to be turned off respectively; or When the signal to be collected is a voltage signal and the amplitude of the signal to be collected is within a second preset range, controlling the second switch tube to be turned off and controlling the third switch tube to be turned on, wherein the maximum value of the second preset range is greater than the maximum value of the first preset range; or When the signal to be collected is a current signal and the amplitude of the signal to be collected is within a third preset range, the second switch tube is controlled to be turned on, and the third switch tube is controlled to be turned off.
9. The signal acquisition circuit according to any one of claims 1 to 8, characterized in that: The filtering unit comprises: a first filtering module, connected to the acquisition unit, configured to perform high-frequency filtering on the first voltage signal and perform lead compensation on the first voltage signal to obtain the second voltage signal; A second filtering module, the second filtering module is connected to the first filtering module, and the second filtering module is configured to perform common-mode interference suppression on the first voltage signal together with the first filtering module.
10. The signal acquisition circuit according to claim 9, characterized in that: The first filtering module includes: an operational amplifier, wherein a positive input terminal of the operational amplifier is connected to an output terminal of the acquisition unit, and an output terminal of the operational amplifier is connected to an input terminal of the control unit; a sixth resistor, one end of the sixth resistor being connected to the negative input terminal of the operational amplifier and having a second node, and the other end of the sixth resistor being connected to the output terminal of the operational amplifier; a seventh resistor, one end of the seventh resistor being connected to the second node, and the other end of the seventh resistor being grounded; A first capacitor is connected in parallel with the sixth resistor.
11. The signal acquisition circuit according to claim 10, characterized in that: The second filtering module includes: a second capacitor, which is arranged between the positive input terminal of the operational amplifier and the negative input terminal of the operational amplifier.
12. The signal acquisition circuit according to claim 1, characterized in that: Also includes: A protection unit, wherein the input end of the protection unit is suitable for inputting the signal to be collected, the output end of the protection unit is connected to the collection unit, and the protection unit is configured to perform overcurrent protection and overvoltage protection on the collection unit.
13. The signal acquisition circuit according to claim 12, characterized in that: The protection unit includes: a thermistor, one end of which is suitable for connecting to the positive electrode of the signal to be collected; a first diode, one end of the first diode being connected to the other end of the thermistor, the other end of the first diode being grounded and suitable for being connected to the cathode of the signal to be collected; A third capacitor is connected in parallel with the first diode.
14. A signal acquisition method, characterized in that: The signal acquisition circuit according to any one of claims 1 to 13, wherein the method comprises: Adjusting the voltage division mode according to the signal type of the signal to be collected, so that the collection unit performs voltage division processing on the signal to be collected according to the corresponding voltage division mode; Setting the second reference voltage to a first preset voltage so that the analog-to-digital converter generates a first digital signal according to the first preset voltage and the first reference voltage; determining an initial sampling value according to the first digital signal; adjusting the first reference voltage or the second reference voltage according to the initial sampling value, so that the analog-to-digital converter generates a second digital signal according to the adjusted first reference voltage or the adjusted second reference voltage; determining a target sampling value according to the second digital signal; Before setting the second reference voltage to the first preset voltage, the method further includes: outputting a first control signal and stopping outputting an enable signal so that the analog-to-digital converter generates the first digital signal according to the first preset voltage and zero voltage.
Citation Information
Patent Citations
Signal receiver and operation method thereof
CN113497635A
Signal acquisition circuit
CN117783653A