CN114034904A - Micro-current measuring method, device, control element and readable storage medium - Google Patents
Micro-current measuring method, device, control element and readable storage medium Download PDFInfo
- Publication number
- CN114034904A CN114034904A CN202111299231.3A CN202111299231A CN114034904A CN 114034904 A CN114034904 A CN 114034904A CN 202111299231 A CN202111299231 A CN 202111299231A CN 114034904 A CN114034904 A CN 114034904A
- Authority
- CN
- China
- Prior art keywords
- charging
- micro
- discharging
- charge
- current
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000007599 discharging Methods 0.000 claims abstract description 113
- 238000004590 computer program Methods 0.000 claims description 11
- 238000000691 measurement method Methods 0.000 claims 2
- 238000005259 measurement Methods 0.000 abstract description 25
- 239000003990 capacitor Substances 0.000 description 24
- 238000010586 diagram Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 3
- 238000009529 body temperature measurement Methods 0.000 description 2
- 238000005286 illumination Methods 0.000 description 2
- KWGKDLIKAYFUFQ-UHFFFAOYSA-M lithium chloride Chemical compound [Li+].[Cl-] KWGKDLIKAYFUFQ-UHFFFAOYSA-M 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 229920000620 organic polymer Polymers 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R19/00—Arrangements for measuring currents or voltages or for indicating presence or sign thereof
- G01R19/0092—Arrangements for measuring currents or voltages or for indicating presence or sign thereof measuring current only
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Measurement Of Current Or Voltage (AREA)
Abstract
The application discloses a micro-current measuring method, a device, a control element and a readable storage medium, wherein the micro-current measuring method is applied to a micro-current measuring circuit comprising a charging and discharging element, a charging resistor, a micro-current generating element and a control element; the minute current generated by the minute current generating element is determined according to the standard charging period. The application effectively reduces the measurement cost and the complexity of the micro-current measurement circuit.
Description
Technical Field
The invention relates to the technical field of electric signal measurement, in particular to a micro-current measuring method, a micro-current measuring device, a micro-current measuring control element and a readable storage medium.
Background
The measurement of electrical signals is an important signal in electronic products, and particularly in sensing measurement, a sensor generally converts various physical signals (sound, light, temperature, humidity, electricity, and the like) into electrical signals uniformly, and then processes and measures the electrical signals to obtain digital signals and convert the digital signals into physical signal units.
In the field of sensor measurement, most physical signals are very weak in electrical signals converted by sensors, such as micro-current signals of uA level. At present, the conventional uA level micro-current signal measurement mode generally converts micro-current into voltage through a precision sampling resistor, amplifies the voltage through an instrument operational amplifier, obtains a digital signal through analog-digital conversion to obtain specific micro-current, and then maps the specific physical signal intensity.
Although the current value can be obtained by the existing measuring method with high accuracy, the complexity of a measuring circuit and the measuring cost are high.
Disclosure of Invention
In view of the above problems, the present application provides a micro-current measuring method, apparatus, control element and readable storage medium to reduce the complexity of the measuring circuit and the measuring cost.
In a first aspect, an embodiment of the present application provides a micro-current measuring method, which is applied to a micro-current measuring circuit including a charging and discharging element, a charging resistor, a micro-current generating element, and a control element, where a charging and discharging control pin of the control element is connected to one end of the charging resistor, one end of the micro-current generating element, and one end of the charging and discharging element, and the other end of the charging resistor is grounded, and the other end of the charging resistor and the other end of the micro-current generating element are both used for connecting to a same power source end, where the method includes:
after the charging and discharging element is controlled to be completely discharged through the charging and discharging control pin, the charging and discharging element is controlled to be charged through the charging and discharging control pin until the voltage of the charging and discharging element reaches a voltage threshold value, the charging duration of the charging and discharging element is recorded, and the charging duration is used as standard duration;
and determining the micro-current generated by the micro-current generating element according to the standard charging time.
The microcurrent measuring method of the embodiment of the application, after the charge and discharge element is controlled by the charge and discharge control pin to be completely discharged, the charge and discharge element is controlled by the charge and discharge control pin to be charged until the voltage of the charge and discharge element reaches the voltage threshold value and records the charging duration of the charge and discharge element, the microcurrent measuring method comprises the following steps:
controlling the charge and discharge control pin to output a low level within a preset time to enable the charge and discharge element to be completely discharged;
after the charge and discharge element is completely discharged, setting the charge and discharge control pin to be in a floating mode so as to charge the charge and discharge element, and starting timing;
acquiring the voltage of the charge and discharge element in real time through the charge and discharge control pin, and judging whether the voltage of the charge and discharge element is greater than or equal to the voltage threshold value;
and when the voltage of the charge and discharge element is greater than or equal to the voltage threshold, stopping timing and determining the charging time length.
The method for measuring micro-current according to the embodiment of the application, wherein the determining of the micro-current generated by the micro-current generating element according to the standard charging time period comprises the following steps: and determining the micro-current corresponding to the standard charging time period from a predetermined time period and a micro-current comparison table.
The method for measuring micro-current according to the embodiment of the application, wherein the determining of the micro-current generated by the micro-current generating element according to the standard charging time period comprises the following steps:
determining the micro-current corresponding to the standard charging time by using the following formula:
Ira=Vth*C/Tu-(VCC–Vth)/R
ira is the micro-current, Vth is the voltage threshold, C is the capacitance value of the charge-discharge element, Tu is the standard charging duration, VCC is the voltage value of the power supply terminal, and R is the resistance value of the charging resistor.
The method for measuring the micro-current further comprises the following steps:
after one charging duration is determined, the charging and discharging control pin is repeatedly executed to control the charging and discharging element to be completely discharged, then the charging and discharging control pin is used for controlling the charging and discharging element to be charged until the voltage of the charging and discharging element reaches the voltage threshold value, and the charging duration of the charging and discharging element is recorded until the charging durations with the preset number are determined;
determining a charging time average value by using the preset number of charging time durations;
and taking the charging time average value as the standard time length.
In the method for measuring micro-current according to the embodiment of the application, the micro-current generating element includes one of a photodiode, a photo-triode, a temperature sensitive resistor and a humidity sensitive resistor.
In a second aspect, the embodiment of the present application further provides a micro-current measuring device, which is applied to a micro-current measuring circuit including a charging and discharging element, a charging resistor, a micro-current generating element and a control element, a charging and discharging control pin of the control element is connected to one end of the charging resistor, one end of the micro-current generating element and one end of the charging and discharging element, the other end of the charging element is grounded, the other end of the charging resistor and the other end of the micro-current generating element are both used for connecting the same power end, and the device includes:
the charging and discharging control module is used for controlling the charging and discharging element to be completely discharged through the charging and discharging control pin, controlling the charging and discharging element to be charged until the voltage of the charging and discharging element reaches a voltage threshold value through the charging and discharging control pin, recording the charging time of the charging and discharging element, and taking the charging time as standard time;
and the micro-current determining module is used for determining the micro-current generated by the micro-current generating element according to the standard charging time length.
In the microcurrent measuring device according to the embodiment of the present application, the charge and discharge control module includes:
the discharging unit is used for controlling the charging and discharging control pin to output a low level within a preset time so as to enable the charging and discharging element to be completely discharged;
the charging unit is used for setting the charging and discharging control pin to be in a floating mode after the charging and discharging element is completely discharged so as to charge the charging and discharging element and start timing;
the judging unit is used for acquiring the voltage of the charge and discharge element in real time through the charge and discharge control pin and judging whether the voltage of the charge and discharge element is greater than or equal to the voltage threshold value or not;
and the determining unit is used for stopping timing and determining the charging time when the voltage of the charging and discharging element is greater than or equal to the voltage threshold.
In a third aspect, an embodiment of the present application further provides a control element, which includes a memory and a processor, where the memory stores a computer program, and the computer program executes the micro-current measuring method according to the embodiment of the present application when running on the processor.
In a fourth aspect, the present application further proposes a readable storage medium, which stores a computer program, which when running on a processor executes the micro-current measuring method further proposed.
The method is applied to a micro-current measuring circuit comprising a charging and discharging element, a charging resistor, a micro-current generating element and a control element, wherein a charging and discharging control pin of the control element is connected with one end of the charging resistor, one end of the micro-current generating element and one end of the charging and discharging element, the other end of the charging and discharging element is grounded, the other end of the charging resistor and the other end of the micro-current generating element are both used for connecting the same power supply end, the method controls the charging and discharging element to be completely discharged through the charging and discharging control pin, then controls the charging and discharging element to be charged until the voltage of the charging and discharging element reaches a voltage threshold value and records the charging duration of the charging and discharging element, and the charging duration is used as standard duration; and determining the micro-current generated by the micro-current generating element according to the standard charging time. The method and the device can effectively reduce the measurement cost of the micro-current and the complexity of the micro-current measurement circuit.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings required to be used in the embodiments will be briefly described below, and it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of the present invention. Like components are numbered similarly in the various figures.
FIG. 1 is a schematic diagram illustrating a micro-current measuring circuit according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart illustrating a micro-current measuring method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating a flow chart for determining a charging duration in a micro-current measuring method according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating another micro-current measuring circuit according to an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating a photoelectric response curve according to an embodiment of the present application;
fig. 6 shows a schematic structural diagram of a micro-current measuring device according to an embodiment of the present application.
Description of the main element symbols:
100-micro current measuring circuit; 110-charge and discharge elements; 120-charging resistance; 130-a micro-current generating element; 140-a control element; 8-a charge-discharge control pin; 1-a power supply terminal; 3-a ground pin; 5-power supply pin; 200-micro current measuring device; 210-a charge and discharge control module; 220-a micro-current determination module; 211-discharge cells; 212-a charging unit; 213-a judgment unit; 214-determination unit.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present invention, are only intended to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to, one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the present invention belong. The terms (such as those defined in commonly used dictionaries) should be interpreted as having a meaning that is consistent with their contextual meaning in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in various embodiments of the present invention.
Example 1
Referring to fig. 1, an embodiment of the present application provides a micro-current measuring circuit 100, where the micro-current measuring circuit 100 includes a charging/discharging element 110, a charging resistor 120, a micro-current generating element 130, and a control element 140, a charging/discharging control pin 8 of the control element 140 is connected to one end of the charging resistor 120, one end of the micro-current generating element 130, and one end of the charging/discharging element 110, the other end of the charging/discharging element 110 is grounded, the other end of the charging resistor 120 and the other end of the micro-current generating element 130 are both used for connecting to a same power source terminal 1, a charging source pin 5 of the control element 140 may be connected to the power source terminal 1, and a grounding pin 3 of the control element 140 is grounded.
The power source terminal 1 may output a voltage of 3.3v, the voltage of 3.3v may supply power to the control element 140, so that the control element 140 may operate normally, and the voltage of 3.3v may also charge the charging/discharging element 110 based on the state of the charging/discharging control pin 8.
The charging/discharging element 110 may be an element including a plurality of capacitors connected in parallel or an element including a plurality of capacitors connected in series, as long as the total capacitance of the charging/discharging element 110 is within a predetermined range. In order to ensure the simplicity of the micro-current measuring circuit 100, it is preferable that the charge and discharge element 110 is a capacitor having a capacitance value of 1 uf.
The micro-current generating element 130 may be one of a photodiode, a phototransistor, a temperature sensitive resistor, and a humidity sensitive resistor.
It can be understood that, in the absence of light, the leakage current passing through the photodiode or the phototransistor can be ignored, and along with applying light with a certain intensity to the photodiode or the phototransistor, the photodiode or the phototransistor generates a micro-current of the uA level, and the micro-current increases along with the increase of the light intensity.
It is understood that the Temperature-sensitive resistor includes two types of Positive Temperature Coefficient thermistor (PTC thermistor), whose resistance value increases with an increase in Temperature, and Negative Temperature Coefficient thermistor (NTC thermistor), whose resistance value decreases with an increase in Temperature. In this embodiment, if the micro-current measuring circuit is used to measure the micro-current corresponding to the temperature, it is necessary to ensure that the temperature sensitive resistor is at the maximum resistance value before the temperature measurement, so that the current passing through the temperature sensitive resistor before the temperature measurement can be ignored.
It can be understood that the humidity sensitive resistor is manufactured by utilizing the principle that the humidity sensitive material absorbs moisture in the air to cause the resistance value of the humidity sensitive resistor to change, and the humidity sensitive resistors popular in the industry mainly comprise a lithium chloride humidity sensitive resistor and an organic polymer film humidity sensitive resistor. In this embodiment, if the micro-current measuring circuit is used to measure the micro-current corresponding to the humidity, it is necessary to ensure that the humidity sensitive resistor is at the maximum resistance value before the humidity measurement, so that the current passing through the humidity sensitive resistor before the humidity measurement can be ignored.
Further, referring to fig. 2, based on the micro-current measuring circuit 100, the present embodiment further provides a micro-current measuring method, which includes the following steps:
and S100, after the charging and discharging element is controlled to be completely discharged through the charging and discharging control pin, controlling the charging and discharging element to be charged through the charging and discharging control pin until the voltage of the charging and discharging element reaches a voltage threshold value, recording the charging duration of the charging and discharging element, and taking the charging duration as standard duration.
For example, referring to fig. 3, in step S100, after the charging and discharging control pin controls the charging and discharging element to completely discharge, the charging and discharging control pin controls the charging and discharging element to charge until the voltage of the charging and discharging element reaches the voltage threshold and records the charging duration of the charging and discharging element, which may include the following steps S110 to S140:
step S110, controlling the charge and discharge control pin to output a low level within a predetermined time to completely discharge the charge and discharge element.
It is understood that the charge and discharge control pin 8 outputs a low level (0V), the charge and discharge element 110 is short-circuited and discharged, and the charge and discharge control pin 8 is kept outputting a low level for a predetermined time (for example, 1ms), so that the discharge of the charges stored in the charge and discharge element 110 is completed.
And step S120, after the charge and discharge element is completely discharged, setting the charge and discharge control pin to be in a floating mode so as to charge the charge and discharge element, and starting timing.
It is understood that floating mode (floating) is where the input pins of the logic device are neither tied high nor low.
For example, the charge/discharge control pin is set to the float mode and the variable CNT starts to be counted for one period (for example, 1us count 1 time).
In this embodiment, the discharging of the charge/discharge element 110 and the recording of the charging duration of the charge/discharge element 110 to the voltage threshold are realized by time-sharing multiplexing (different time periods of the same physical connection are used for transmitting different signals) of the charge/discharge control pin 8, that is, when the charge/discharge element 110 is controlled to discharge, the charge/discharge control pin 8 outputs a low level, and when the charge/discharge element 110 is completely discharged, the charge/discharge control pin 8 is set to a floating mode. The complexity of the control process and the complexity of the measurement circuit can be reduced by time-sharing multiplexing of the charge and discharge control pins 8.
Step S130, obtaining the voltage of the charge and discharge element in real time through the charge and discharge control pin, and determining whether the voltage of the charge and discharge element is greater than or equal to the voltage threshold.
And step S140, stopping timing and determining the charging time when the voltage of the charge and discharge element is greater than or equal to the voltage threshold.
It can be understood that, in this embodiment, the control element 140 may be an IO type single chip Microcomputer (MCU) with a timer. And when the input level of the pin 8 of the charge and discharge control pin is judged to be more than or equal to the voltage threshold, stopping counting the variable CNT. The count value of the variable CNT is a charging period of the charge and discharge element 110, which reflects the intensity of the micro-current passing through the micro-current generating element 130.
One way of determining the standard charging time period in this embodiment may be to take one obtained charging time period as the standard charging time period after the above steps S110 to S140 are performed only once.
However, considering that the above steps S110 to S140 are performed only once, if there is a large error in the measurement, an accurate micro-current cannot be obtained, and furthermore, another way to determine the standard charging time period in this embodiment may be to perform the above steps S110 to S140 multiple times, and then use the obtained average value of the charging times of the multiple charging time periods as the standard charging time period. The mean value filtering is carried out on the obtained CNT values, the measurement reliability can be improved, the mode of determining the standard charging time can avoid the influence of the error of one-time measurement on the precision of micro-current measurement, and the accuracy of the micro-current measurement can be effectively improved.
And step S200, determining the micro-current generated by the micro-current generating element according to the standard charging time.
A manner of determining the micro-current in this embodiment may be to determine the micro-current corresponding to the standard charging time period by using the following formula:
Ira=Vth*C/Tu-(VCC–Vth)/R
ira is the micro-current, Vth is the voltage threshold, C is the capacitance value of the charge-discharge element, Tu is the standard charging duration, VCC is the voltage value of the power supply terminal, and R is the resistance value of the charging resistor.
For example, referring to fig. 4, taking the micro-current generating device 130 as a photodiode U2, the charging and discharging device 110 as a capacitor C1, and the charging resistor 120 as a resistor R1 as an example, an anode of the photodiode is connected to one end of the capacitor C1, one end of the resistor R1 and the charging and discharging control pin 8, a cathode of the photodiode is connected to the power source terminal 1 and the other end of the resistor R1, and the other end of the capacitor C1 is grounded.
In any photodiode, as shown in fig. 5, the photoelectric response curve (response curve to infrared light in the wavelength range of 950nm when VR is 5V) has a horizontal axis representing light intensity per unit area and a vertical axis representing leakage current generated at the light intensity.
When the photodiode U2 is not exposed to light, as can be seen from fig. 5, the leakage current Iu generated by the photodiode is extremely small (< 0.02uA), and is negligible. At this time, the capacitor C1 is charged only by the current flowing through the resistor R1, and the charging current Ir is (VCC-Vc)/R, where Vc is the voltage of the capacitor C1 and R is the resistance of the resistor R1.
The high level determination value corresponding to the charge and discharge control pin 8 is Vth, that is, the voltage threshold value, and it is also known that the charge and discharge formula of the capacitor C1 is Vc ═ I × T/C, C is the capacitance value of the capacitor C1, I is the charge current of the capacitor C1 at the time of charging, T is the charge time of the capacitor C1, I is the discharge current of the capacitor C1 at the time of discharging, and T is the discharge time of the capacitor C1.
Further, when the capacitor C1 is charged only by the current flowing through the resistor R1, the relationship between the charging time Tr of the capacitor C1, the capacitance value C of the capacitor C1, the voltage threshold Vth, the voltage value VCC of the power supply terminal, the voltage Vc of the capacitor C1, and the resistance value R of the resistor R1 is: tr ═ Vth × C/((VCC-Vc)/R).
When the photodiode U2 is illuminated, the capacitor C1 is charged by the current flowing through the resistor R1 and the current Ira flowing through the photodiode U2, and at this time, the relationship between the charging time Tu of the capacitor C1 and the capacitance C of the capacitor C1, the voltage threshold Vth, the voltage value VCC of the power supply terminal, the voltage Vc of the capacitor C1, the resistance R of the resistor R1, and the current Ira flowing through the photodiode U2 is: tu ═ Vth ═ C/((VCC-Vc))/R1+ Ira).
Wherein Ira is linearly related to the light intensity of the photodiode U2, and the light intensity of the photodiode U2 is changed, so that the Ira value can be changed and the corresponding Tu value can also be changed.
Therefore, after the capacitor C1 is completely discharged, the current Ira flowing through the photodiode U2, i.e., Ira ═ Vth × C/Tu- (VCC-Vth)/R, can be determined according to the charging time taken for the voltage Vc of the capacitor C1 to charge to the voltage threshold Vth.
It can be understood that, considering that the above formula defaults that when the photodiode U2 is not illuminated, the leakage current Iu generated by the photodiode U2 is very small (< 0.02uA), and is negligible, the above formula can only estimate the current Ira flowing through the photodiode U2, and the obtained current Ira has a certain error.
In order to further improve the measurement accuracy of the current Ira, the present embodiment may determine that Ira is in a linear relationship with Tu based on the above-mentioned Ira ═ Vth × C/Tu- (VCC-Vth)/R, and the larger Tu, the smaller Ira. Further, another way of determining the trickle current of the present embodiment based on the linear relationship may be to determine the trickle current corresponding to the standard charging time period from a predetermined time period and a trickle current look-up table.
For example, a plurality of Tu corresponding to a plurality of Ira are determined in advance through actual measurement, a time length and micro-current comparison table is established based on the plurality of Tu corresponding to the plurality of Ira, and then the unique corresponding Ira can be determined through the acquired Tu table during actual measurement. During actual measurement, the table look-up mode is faster and more accurate.
It should be noted that, in this embodiment, if the micro-current generating element 130 is a photodiode or a phototriode, the illumination intensity of the current environment can be known by determining the current flowing through the photodiode or the phototriode, and the brightness of the light emitting device can be adjusted based on the illumination intensity of the current environment, so that the brightness of the current environment is in a constant interval, for example, backlight adjustment of a mobile phone, automatic brightness adjustment of a lighting table lamp, and the like; if the micro-current generating element 130 is a temperature-sensitive resistor, the temperature of the current environment can be known by determining the current flowing through the temperature-sensitive resistor, and the temperature of the temperature control equipment can be adjusted based on the temperature of the current environment, so that the temperature of the current environment is in a constant interval, for example, the temperature of an air conditioner is used for adjusting the room temperature; if the micro-current generating element 130 is a humidity-sensitive resistor, the current humidity of the current environment can be known by determining the current flowing through the humidity-sensitive resistor, and the humidity of the humidity control device can be adjusted based on the current humidity of the current environment, so that the current humidity of the current environment is in a constant interval, for example, the humidity of a humidity adjusting room of a humidifier.
It should be noted that, the embodiment can measure the micro-current within 2mA, and when the micro-current within 2mA is measured, the measurement error is within 10 uA. In the embodiment, the measurement cost of the micro-current and the complexity of the micro-current measurement circuit are reduced by losing a certain measurement precision, and the method can be widely applied to scenes such as automatic brightness adjustment of the light-emitting device, automatic indoor temperature adjustment of the temperature control device, automatic indoor humidity adjustment of the humidity control device and the like.
Example 2
Referring to fig. 6, another embodiment of the present application provides a micro-current measuring device 200, applied to a micro-current measuring circuit including a charging/discharging element, a charging resistor, a micro-current generating element, and a control element, wherein a charging/discharging control pin of the control element is connected to one end of the charging resistor, one end of the micro-current generating element, and one end of the charging/discharging element, the other end of the charging/discharging element is grounded, and the other end of the charging resistor and the other end of the micro-current generating element are both used for connecting to a same power source terminal, and the micro-current measuring device 200 includes: a charge and discharge control module 210 and a micro-current determination module 220.
The charge and discharge control module 210 is configured to control the charge and discharge element to completely discharge through the charge and discharge control pin, control the charge and discharge element to be charged until the voltage of the charge and discharge element reaches a voltage threshold value through the charge and discharge control pin, and record the charging duration of the charge and discharge element, where the charging duration is used as a standard duration; and a micro-current determining module 220 for determining the micro-current generated by the micro-current generating element according to the standard charging time period.
Further, the charge and discharge control module 210 includes: a discharging unit 211, a charging unit 212, a judging unit 213, and a determining unit 214.
The discharging unit 211 is configured to control the charging and discharging control pin to output a low level within a predetermined time to completely discharge the charging and discharging element; the charging unit 212 is used for setting the charging and discharging control pin to be in a floating mode after the charging and discharging element is completely discharged so as to charge the charging and discharging element and start timing; the judging unit 213 is configured to obtain the voltage of the charge/discharge element in real time through the charge/discharge control pin, and judge whether the voltage of the charge/discharge element is greater than or equal to the voltage threshold; a determining unit 214, configured to stop timing and determine the charging duration when the voltage of the charge/discharge element is greater than or equal to the voltage threshold.
In this embodiment, the micro-current measuring device 200 is used by matching the charge/discharge control module 210 and the micro-current determination module 220 to perform the micro-current measuring method described in the above embodiment, and the implementation and beneficial effects related to the above embodiment are also applicable in this embodiment, and are not described herein again.
Example 3
In a third embodiment of the present application, a control element is proposed, comprising a memory and a processor, the memory storing a computer program, the computer program executing the method for measuring a micro-current according to the above-mentioned embodiment when running on the processor.
Example 4
In a fourth embodiment of the present application, a readable storage medium is provided, which stores a computer program, and the computer program executes the micro-current measuring method according to the embodiment of the present application when the computer program runs on a processor.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solution of the present invention or a part of the technical solution that contributes to the prior art in essence can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention.
Claims (10)
1. A micro-current measuring method is characterized in that the method is applied to a micro-current measuring circuit comprising a charging and discharging element, a charging resistor, a micro-current generating element and a control element, a charging and discharging control pin of the control element is connected with one end of the charging resistor, one end of the micro-current generating element and one end of the charging and discharging element, the other end of the charging and discharging element is grounded, and the other end of the charging resistor and the other end of the micro-current generating element are both used for being connected with the same power supply end, and the method comprises the following steps:
after the charging and discharging element is controlled to be completely discharged through the charging and discharging control pin, the charging and discharging element is controlled to be charged through the charging and discharging control pin until the voltage of the charging and discharging element reaches a voltage threshold value, the charging duration of the charging and discharging element is recorded, and the charging duration is used as standard duration;
and determining the micro-current generated by the micro-current generating element according to the standard charging time.
2. The method for measuring the micro-current according to claim 1, wherein after the charging and discharging control pin controls the charging and discharging element to completely discharge, the charging and discharging control pin controls the charging and discharging element to charge until the voltage of the charging and discharging element reaches a voltage threshold and records the charging duration of the charging and discharging element, and the method comprises the following steps:
controlling the charge and discharge control pin to output a low level within a preset time to enable the charge and discharge element to be completely discharged;
after the charge and discharge element is completely discharged, setting the charge and discharge control pin to be in a floating mode so as to charge the charge and discharge element, and starting timing;
acquiring the voltage of the charge and discharge element in real time through the charge and discharge control pin, and judging whether the voltage of the charge and discharge element is greater than or equal to the voltage threshold value;
and when the voltage of the charge and discharge element is greater than or equal to the voltage threshold, stopping timing and determining the charging time length.
3. The method according to claim 1, wherein the determining the micro-current generated by the micro-current generating element according to the standard charging time period comprises: and determining the micro-current corresponding to the standard charging time period from a predetermined time period and a micro-current comparison table.
4. The method according to claim 1, wherein the determining the micro-current generated by the micro-current generating element according to the standard charging time period comprises:
determining the micro-current corresponding to the standard charging time by using the following formula:
Ira=Vth*C/Tu-(VCC–Vth)/R
ira is the micro-current, Vth is the voltage threshold, C is the capacitance value of the charge-discharge element, Tu is the standard charging duration, VCC is the voltage value of the power supply terminal, and R is the resistance value of the charging resistor.
5. The method of claim 1, further comprising:
after one charging duration is determined, the charging and discharging control pin is repeatedly executed to control the charging and discharging element to be completely discharged, then the charging and discharging control pin is used for controlling the charging and discharging element to be charged until the voltage of the charging and discharging element reaches the voltage threshold value, and the charging duration of the charging and discharging element is recorded until the charging durations with the preset number are determined;
determining a charging time average value by using the preset number of charging time durations;
and taking the charging time average value as the standard time length.
6. The method of claim 1, wherein the micro-current generating element comprises one of a photodiode, a phototransistor, a temperature-sensitive resistor, and a humidity-sensitive resistor.
7. The utility model provides a little current measuring device which characterized in that is applied to the little current measuring circuit including charge and discharge component, charging resistor, little current generation component and control element, control element's charge and discharge control pin is connected the one end of charging resistor, the one end of little current generation component and the one end of charge and discharge component, the other end ground connection of charge and discharge component, the other end of charging resistor and the other end of little current generation component all are used for connecting same power end, the device includes:
the charging and discharging control module is used for controlling the charging and discharging element to be completely discharged through the charging and discharging control pin, controlling the charging and discharging element to be charged until the voltage of the charging and discharging element reaches a voltage threshold value through the charging and discharging control pin, recording the charging time of the charging and discharging element, and taking the charging time as standard time;
and the micro-current determining module is used for determining the micro-current generated by the micro-current generating element according to the standard charging time length.
8. The micro-current measuring device of claim 7, wherein the charge and discharge control module comprises:
the discharging unit is used for controlling the charging and discharging control pin to output a low level within a preset time so as to enable the charging and discharging element to be completely discharged;
the charging unit is used for setting the charging and discharging control pin to be in a floating mode after the charging and discharging element is completely discharged so as to charge the charging and discharging element and start timing;
the judging unit is used for acquiring the voltage of the charge and discharge element in real time through the charge and discharge control pin and judging whether the voltage of the charge and discharge element is greater than or equal to the voltage threshold value or not;
and the determining unit is used for stopping timing and determining the charging time when the voltage of the charging and discharging element is greater than or equal to the voltage threshold.
9. Control element, characterized in that it comprises a memory and a processor, the memory storing a computer program which, when run on the processor, performs the microcurrent measurement method according to any of claims 1 to 6.
10. A readable storage medium, characterized in that it stores a computer program which, when run on a processor, performs the microcurrent measurement method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111299231.3A CN114034904A (en) | 2021-11-04 | 2021-11-04 | Micro-current measuring method, device, control element and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111299231.3A CN114034904A (en) | 2021-11-04 | 2021-11-04 | Micro-current measuring method, device, control element and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114034904A true CN114034904A (en) | 2022-02-11 |
Family
ID=80142978
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111299231.3A Pending CN114034904A (en) | 2021-11-04 | 2021-11-04 | Micro-current measuring method, device, control element and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114034904A (en) |
Citations (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050104559A1 (en) * | 2002-02-20 | 2005-05-19 | Koninklijke Philips Electronics N.V. | Method and circuit arrangement for determining the average current consumption of a battery-operated apparatus |
US20060006883A1 (en) * | 2004-06-25 | 2006-01-12 | Kele Inc. | Sensor or capacitance measuring with a microprocessor |
CN101788609A (en) * | 2010-02-09 | 2010-07-28 | 华为终端有限公司 | Resistance value measuring method and device or capacitance value measuring method and device |
CN102809589A (en) * | 2012-07-25 | 2012-12-05 | 华东师范大学 | Air humidity measurement method with low power consumption |
JP2013205325A (en) * | 2012-03-29 | 2013-10-07 | Asahi Kasei Electronics Co Ltd | Current measuring device |
CN103513106A (en) * | 2012-06-26 | 2014-01-15 | 中兴通讯股份有限公司 | Measuring method, measuring circuit and monitoring apparatus |
CN104390718A (en) * | 2014-10-10 | 2015-03-04 | 记忆科技(深圳)有限公司 | Temperature detection method |
CN105547514A (en) * | 2016-01-25 | 2016-05-04 | 四川长虹电器股份有限公司 | Temperature measurement circuit and method |
CN105698957A (en) * | 2016-03-21 | 2016-06-22 | 四川长虹电器股份有限公司 | Temperature measuring circuit and method |
CN106597063A (en) * | 2017-01-25 | 2017-04-26 | 杭州士兰微电子股份有限公司 | Current detecting circuit and current detecting method |
CN106712457A (en) * | 2015-07-15 | 2017-05-24 | 华润矽威科技(上海)有限公司 | Charging capacitor time division multiplexing circuit and switch constant current source current control method |
CN109085405A (en) * | 2017-06-13 | 2018-12-25 | 中芯国际集成电路制造(上海)有限公司 | A kind of the operating current detection method and circuit of circuit module |
CN109374148A (en) * | 2018-11-26 | 2019-02-22 | 山东航天电子技术研究所 | A kind of temperature measuring device and measurement method |
CN109470747A (en) * | 2018-12-28 | 2019-03-15 | 无锡华润矽科微电子有限公司 | Hygrometer circuit and the corresponding method for realizing moisture measurement |
CN111521854A (en) * | 2020-05-11 | 2020-08-11 | 中国地质大学(北京) | Weak current measuring device |
CN111721997A (en) * | 2020-06-30 | 2020-09-29 | 湖南常德牌水表制造有限公司 | Current detection method, current detection device and water meter |
CN113238088A (en) * | 2021-05-08 | 2021-08-10 | 中国测试技术研究院辐射研究所 | High-precision weak current measuring circuit and method based on charge balance |
CN113382499A (en) * | 2021-05-07 | 2021-09-10 | 浙江阳光照明电器集团股份有限公司 | Light control circuit for light-controlled LED lamp and light-controlled LED lamp circuit |
-
2021
- 2021-11-04 CN CN202111299231.3A patent/CN114034904A/en active Pending
Patent Citations (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050104559A1 (en) * | 2002-02-20 | 2005-05-19 | Koninklijke Philips Electronics N.V. | Method and circuit arrangement for determining the average current consumption of a battery-operated apparatus |
US20060006883A1 (en) * | 2004-06-25 | 2006-01-12 | Kele Inc. | Sensor or capacitance measuring with a microprocessor |
CN101788609A (en) * | 2010-02-09 | 2010-07-28 | 华为终端有限公司 | Resistance value measuring method and device or capacitance value measuring method and device |
JP2013205325A (en) * | 2012-03-29 | 2013-10-07 | Asahi Kasei Electronics Co Ltd | Current measuring device |
CN103513106A (en) * | 2012-06-26 | 2014-01-15 | 中兴通讯股份有限公司 | Measuring method, measuring circuit and monitoring apparatus |
CN102809589A (en) * | 2012-07-25 | 2012-12-05 | 华东师范大学 | Air humidity measurement method with low power consumption |
CN104390718A (en) * | 2014-10-10 | 2015-03-04 | 记忆科技(深圳)有限公司 | Temperature detection method |
CN106712457A (en) * | 2015-07-15 | 2017-05-24 | 华润矽威科技(上海)有限公司 | Charging capacitor time division multiplexing circuit and switch constant current source current control method |
CN105547514A (en) * | 2016-01-25 | 2016-05-04 | 四川长虹电器股份有限公司 | Temperature measurement circuit and method |
CN105698957A (en) * | 2016-03-21 | 2016-06-22 | 四川长虹电器股份有限公司 | Temperature measuring circuit and method |
CN106597063A (en) * | 2017-01-25 | 2017-04-26 | 杭州士兰微电子股份有限公司 | Current detecting circuit and current detecting method |
CN109085405A (en) * | 2017-06-13 | 2018-12-25 | 中芯国际集成电路制造(上海)有限公司 | A kind of the operating current detection method and circuit of circuit module |
CN109374148A (en) * | 2018-11-26 | 2019-02-22 | 山东航天电子技术研究所 | A kind of temperature measuring device and measurement method |
CN109470747A (en) * | 2018-12-28 | 2019-03-15 | 无锡华润矽科微电子有限公司 | Hygrometer circuit and the corresponding method for realizing moisture measurement |
CN111521854A (en) * | 2020-05-11 | 2020-08-11 | 中国地质大学(北京) | Weak current measuring device |
CN111721997A (en) * | 2020-06-30 | 2020-09-29 | 湖南常德牌水表制造有限公司 | Current detection method, current detection device and water meter |
CN113382499A (en) * | 2021-05-07 | 2021-09-10 | 浙江阳光照明电器集团股份有限公司 | Light control circuit for light-controlled LED lamp and light-controlled LED lamp circuit |
CN113238088A (en) * | 2021-05-08 | 2021-08-10 | 中国测试技术研究院辐射研究所 | High-precision weak current measuring circuit and method based on charge balance |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106768459B (en) | A kind of Temperature and Humidity circuit and control method | |
KR20190027609A (en) | Apparatus and method for estimating state of charge for battery and method thereof | |
JPH08201472A (en) | Method for detecting lifetime of led signal lamp | |
CN114376274B (en) | Aerosol generating device, control method thereof, control device and storage medium | |
CN113589045B (en) | Sensitive resistor measuring device and measuring method | |
WO2016101661A1 (en) | Battery capacity calculation system and method | |
US7030630B2 (en) | Moisture sensor with capacitive moisture measuring element and method of determining air humidity | |
CN113740686B (en) | Insulation detection circuit and resistance detection method based on insulation detection circuit | |
CN114034904A (en) | Micro-current measuring method, device, control element and readable storage medium | |
CN111487467A (en) | Method and device for obtaining initial resistance value of heating element | |
CN110133506A (en) | A kind of device and its calculation method using the time for calculating lithium battery residue | |
CN109188095B (en) | Resistance measurement circuit, method and environment parameter measurement device | |
CN106918354B (en) | Sensing system and applicable sensing information determination method | |
EP1070965B1 (en) | Method for measuring an electric voltage and arrangement for implementing the method | |
CN208334596U (en) | Battery monitoring device and battery modules | |
CN208476367U (en) | A kind of controller and temperature-compensating gas meter, flow meter | |
CN109683024B (en) | Neuron bionic circuit and capacitance detection system | |
CN214251308U (en) | Temperature sampling circuit and device | |
JP2621217B2 (en) | Electronic device having battery performance determination system | |
CN111679598B (en) | Method and device for acquiring detection information of sensor | |
SU974275A1 (en) | Gas flow checking device | |
CN216748442U (en) | Novel photovoltaic components and parts timing detects instrument | |
CN219303128U (en) | Combustible gas detection circuit | |
CN109884137B (en) | High-precision miniature blowing alcohol gas detector and detection system thereof | |
JPH0645257U (en) | Battery pack with capacity display function |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |