Liquid level detection device, method, apparatus and storage medium

The liquid level detection device uses capacitive reactance and differential amplification to achieve high accuracy and low cost detection of liquid levels in 3D printing, addressing the limitations of existing methods for non-conductive materials like photosensitive resin.

CN115790775BActive Publication Date: 2024-12-31GUANGZHOU HEIGE ZHIZAO INFORMATION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202211485222.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-24
Publication Date
2024-12-31
Estimated Expiration
2042-11-24

AI Technical Summary

Technical Problem

Existing liquid level detection devices for non-conductive materials like photosensitive resin in 3D printing suffer from high cost, large volume, and low accuracy, and existing laser detection methods are not universal for transparent resins.

Method used

A liquid level detection device using a first excitation circuit to generate a voltage signal based on the liquid level, with a detection circuit to extract signal characteristics and a comparison amplifier to output a voltage signal representing the level, employing capacitive reactance and differential amplification for high accuracy.

Benefits of technology

The device achieves high detection accuracy and low cost with a small footprint, suitable for cost-sensitive 3D printers, and can detect liquid levels in both conductive and non-conductive materials, including transparent resins.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115790775B_ABST
    Figure CN115790775B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a liquid level detection device, method, apparatus and storage medium, which relate to the field of liquid level detection technology. The liquid level detection device includes: a first excitation circuit, which is used to output a first voltage signal according to an input first excitation signal and the current liquid level; a first detection circuit, which is used to extract the peak voltage of the first voltage signal; and a comparison amplifier circuit, which is used to output a second voltage signal according to the peak voltage and a preset reference voltage. Among them, the second voltage signal is used to characterize the height corresponding to the current liquid level. The excitation circuit of the device obtains a voltage signal through detection based on the signal generated by the current liquid level, compares it with the reference voltage, and amplifies it, and then calculates the liquid level height, which occupies a small volume and has high detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of liquid level detection technology, and in particular to liquid level detection equipment, methods, devices and storage media. Background Art

[0002] Traditional liquid level detection devices include hydraulic, float, ultrasonic and other detection devices, which have the problems of large occupied volume, low detection accuracy, or high construction cost. For example, in 3D printing based on UV curing, it is necessary to measure the liquid level of liquid photosensitive resin material. As a non-conductive liquid material, photosensitive resin is no longer applicable to traditional detection methods based on changes in connectivity caused by liquid conductivity. Hydraulic, float, ultrasonic and other detection devices require large occupied volume, low detection accuracy, or high construction cost, and are not suitable for use in cost-sensitive 3D printer equipment. The laser type has the advantage of non-contact, but it cannot detect the liquid level of transparent resin and is not universal.

[0003] Therefore, how to design a liquid level detection device with low cost and high detection accuracy is a technical problem that needs to be solved. Summary of the invention

[0004] The purpose of the present application is to provide a liquid level detection device, method, apparatus and storage medium to solve the technical problems of high cost and low detection accuracy in the prior art.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions.

[0006] In a first aspect, an embodiment of the present application provides a liquid level detection device, comprising:

[0007] A first excitation circuit, configured to output a first voltage signal according to an input first excitation signal and a current liquid level;

[0008] A first detection circuit, used for extracting signal characteristics of the first voltage signal; wherein the signal characteristics include a peak value, a peak-to-peak value and / or a minimum value;

[0009] The comparison amplifier circuit is used to output a second voltage signal according to the signal characteristics and the first preset reference voltage; wherein the second voltage signal is used to characterize the height corresponding to the current liquid level.

[0010] The excitation circuit of the device generates a first voltage signal according to the first excitation signal and the current liquid level, and then obtains the signal characteristics of the first voltage signal through detection, compares it with the reference voltage, and amplifies it to obtain a second voltage signal representing the current liquid level height, and then obtains the liquid level, without the need for hydraulic, float, ultrasonic and other detection devices, with small footprint and low cost. The comparison amplifier circuit can perform differential amplification on the signal, thereby improving the amplification factor and detection accuracy.

[0011] In one embodiment, the first excitation circuit includes a detection capacitor and a voltage-dividing resistor; the detection capacitor is formed according to a probe extending into the container;

[0012] The first end of the detection capacitor is grounded, the second end of the detection capacitor is electrically connected to the input end of the first detection circuit, and is electrically connected to the first end of the voltage-dividing resistor; the second end of the voltage-dividing resistor is used to receive the first excitation signal; or,

[0013] The first end of the voltage-dividing resistor is electrically connected to the first detection circuit and to the second end of the detection capacitor. The second end of the voltage-dividing resistor is grounded. The first end of the detection capacitor is used to receive the first excitation signal.

[0014] In one of the embodiments, the first excitation circuit further includes an excitation voltage follower;

[0015] The output end of the excitation voltage follower is electrically connected to the input end of the first detection circuit, and the input end of the excitation voltage follower is connected to the connection point of the detection capacitor and the voltage-dividing resistor.

[0016] In one embodiment, the first detection circuit includes a detection diode, a peak detection capacitor and a first resistor, the anode of the detection diode is electrically connected to the output end of the first excitation circuit; the first end of the peak detection capacitor is electrically connected to the cathode of the detection diode, the first end of the first resistor and the input end of the comparison amplifier circuit respectively; the second end of the peak detection capacitor and the second end of the first resistor are both grounded.

[0017] In one embodiment, the first detection circuit further includes a detection voltage follower, and the first end of the peak detection capacitor is electrically connected to the input end of the comparison amplifier circuit through the detection voltage follower.

[0018] In one embodiment, the first detection circuit includes a comparator, a first input terminal of the comparator is electrically connected to the first excitation circuit, and a second input terminal is used to access a preset detection reference voltage;

[0019] The comparator is used to output a square wave with a varying duty cycle according to a comparison between the first voltage signal output by the first excitation circuit and a preset detection reference voltage, wherein the duty cycle is proportional to the peak value of the first voltage signal;

[0020] The first detection circuit also includes an active filter circuit or a mean detection circuit, the output end of the comparator is connected to the input end of the active filter circuit or the input end of the mean detection circuit, and the output end of the active filter circuit or the mean detection circuit is electrically connected to the comparison amplifier circuit;

[0021] The active filter circuit or the mean detection circuit is used to obtain the average value of the square wave, and the average value is proportional to the duty cycle of the square wave.

[0022] In one of the embodiments, the liquid level detection device further includes a first reference voltage circuit for providing a first preset reference voltage.

[0023] In one embodiment, the first reference voltage circuit includes a reference voltage follower and a low-pass filter circuit, the output end of the low-pass filter circuit is connected to the input end of the reference voltage follower, and the input end is used to connect to the processing circuit; the output end of the reference voltage follower is electrically connected to the comparison amplifier circuit.

[0024] In one embodiment, there are multiple low-pass filter circuits, the output ends of the multiple low-pass filter circuits connected in series are connected to the input end of the reference voltage follower, and the input ends of the multiple low-pass filter circuits connected in series are used to connect to the processing circuit.

[0025] In one embodiment, the low-pass filter circuit includes a filter resistor and a filter capacitor; the first end of the filter resistor is the input end of the low-pass filter circuit, the second end of the filter resistor is electrically connected to the first end of the filter capacitor, the first end of the filter capacitor is the output end of the low-pass filter circuit, and the second end of the filter capacitor is grounded.

[0026] In one embodiment, the first reference voltage circuit includes a DAC circuit, and the input end of the comparison amplifier circuit is connected to the DAC circuit.

[0027] In one embodiment, the comparison amplifier circuit includes a fourth resistor, a fifth resistor, a sixth resistor, a seventh resistor and an operational amplifier;

[0028] The non-inverting input terminal of the operational amplifier is respectively connected to the first end of the fourth resistor and the first end of the sixth resistor, the inverting input terminal is respectively connected to the first end of the fifth resistor and the first end of the seventh resistor, the output terminal is connected to the second end of the seventh resistor, and is used to connect to the MCU; the second end of the fourth resistor is connected to the first preset reference voltage, the second end of the fifth resistor is connected to the output end of the first detection circuit; the second end of the sixth resistor is grounded.

[0029] In one embodiment, the liquid level detection device further comprises:

[0030] A second excitation circuit is used to output a third voltage signal according to the input second excitation signal and the current liquid level; the input end of the second excitation circuit is connected to the input end of the first excitation circuit;

[0031] A second detection circuit, used for extracting a signal feature of a third voltage signal;

[0032] a second reference voltage circuit;

[0033] A subtraction circuit, wherein a first input end of the subtraction circuit is connected to an output end of the first detection circuit and an output end of the second detection circuit, a second input end is connected to a second reference voltage circuit, and an output end is connected to an input end of a comparison amplifier circuit; the subtraction circuit is used to obtain a signal characteristic of a fourth voltage signal according to a signal characteristic of the first voltage signal, a signal characteristic of the third voltage signal, and a second preset reference voltage provided by the second reference voltage circuit;

[0034] The comparison amplifier circuit is used for outputting a fifth voltage signal according to a signal characteristic of the first voltage signal, a signal characteristic of the fourth voltage signal and a first preset reference voltage.

[0035] In one embodiment, the first excitation circuit includes a first detection capacitor and a first voltage-dividing resistor; the first detection capacitor is formed according to a first probe and a second probe extending into the container; the second probe is used to touch the liquid at a first liquid level;

[0036] The first end of the first detection capacitor is grounded, the second end of the first detection capacitor is electrically connected to the first detection circuit and to the first end of the first voltage-dividing resistor, and the second end of the first voltage-dividing resistor is used to connect the first excitation signal; or the first end of the first voltage-dividing resistor is electrically connected to the first detection circuit and to the second end of the first detection capacitor, the second end of the first voltage-dividing resistor is grounded, and the first end of the first detection capacitor is used to connect the first excitation signal;

[0037] The second excitation circuit includes a second detection capacitor and a second voltage-dividing resistor; the second detection capacitor is formed by the first probe and the third probe; the third probe is used to touch the liquid at the second liquid level; the resistance value of the second voltage-dividing resistor is greater than the resistance value of the first voltage-dividing resistor; the first liquid level is lower than the second liquid level;

[0038] The first end of the second detection capacitor is grounded, the second end of the second detection capacitor is electrically connected to the first detection circuit and to the first end of the second voltage-dividing resistor, and the second end of the second voltage-dividing resistor is used to connect the second excitation signal; or, the first end of the second voltage-dividing resistor is electrically connected to the first detection circuit and to the second end of the second detection capacitor, the second end of the second voltage-dividing resistor is grounded, and the first end of the second detection capacitor is used to connect the second excitation signal.

[0039] In one of the embodiments, the second reference voltage circuit includes a step-down diode and a grounding resistor, the cathode of the step-down diode is grounded through the grounding resistor, the anode of the step-down diode is used to connect to a reference power supply and to output a second preset reference voltage after stepping down the voltage of the reference power supply.

[0040] In a second aspect, an embodiment of the present application further provides a liquid level detection method, which is applied to the liquid level detection device as described above, and the liquid level detection method includes:

[0041] acquiring a second voltage signal;

[0042] When the voltage value corresponding to the second voltage signal falls within the preset interval, confirming that the zero adjustment is successful;

[0043] Reading the current second voltage signal and / or the current temperature signal according to the received liquid reading instruction;

[0044] The current liquid level is obtained according to the current second voltage signal and / or the current temperature signal.

[0045] In a third aspect, an embodiment of the present application further provides a liquid level detection device, which is applied to the liquid level detection device as described above, and the liquid level detection device includes:

[0046] A zeroing unit, used to obtain a second voltage signal, and confirm that the zeroing is successful when a voltage value corresponding to the second voltage signal falls within a preset interval;

[0047] The calculation unit is used to read the current second voltage signal and / or the current temperature signal according to the received liquid reading instruction when zeroing is successful; and obtain the current liquid level according to the current second voltage signal; or, obtain the current liquid level according to the current second voltage signal and the current temperature signal.

[0048] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program or instructions are stored. When the computer program or instructions are executed by a computing device, the liquid level detection method as described above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 A first schematic diagram of a liquid level detection device provided in an embodiment of the present application;

[0051] Figure 2 A second schematic diagram of a liquid level detection device provided in an embodiment of the present application;

[0052] Figure 3 A schematic diagram of a first detection circuit provided in an embodiment of the present application;

[0053] Figure 4 A schematic diagram of a liquid level detection device with high limit detection provided in an embodiment of the present application.

[0054] Description of reference numerals:

[0055] 10-liquid level detection device, 11-first excitation circuit, 12-first detection circuit, 121-active filter circuit or mean detection circuit, 13-comparison amplifier circuit, 14-first reference voltage circuit, 15-second excitation circuit, 16-second detection circuit, 17-second reference voltage circuit, 18-subtraction circuit. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. The described embodiments are part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described in the drawings here can be arranged and designed in various different configurations. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0057] In the description of this application, it should be noted that relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The term "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be directly connected or indirectly connected through an intermediate medium.

[0058] In 3D printing based on UV curing, it is necessary to measure the liquid level of liquid photosensitive resin materials. As a non-conductive liquid material, photosensitive resin is no longer applicable to the traditional detection method based on the change in connectivity caused by liquid conductivity. The hydraulic, float, ultrasonic and other detection devices require a large volume, or have low detection accuracy, or high construction costs, and are not suitable for use in cost-sensitive 3D printer equipment; while the laser type has the advantage of non-contact, but it cannot detect the liquid level of transparent resin and is not universal.

[0059] To overcome the above problems, please refer to Figure 1 The embodiment of the present application provides a liquid level detection device 10, including: a first excitation circuit 11, used to output a first voltage signal according to an input first excitation signal and a current liquid level; a first detection circuit 12, used to extract the signal characteristics of the first voltage signal; the signal characteristics include a peak value, a peak-to-peak value and / or a minimum value; a comparison amplifier circuit 13, used to output a second voltage signal according to the signal characteristics of the first voltage signal and a first preset reference voltage. The second voltage signal is used to characterize the height corresponding to the current liquid level.

[0060] The first excitation signal may be a PWM signal, which acts on the first excitation circuit, which includes an equivalent capacitor composed of probes, and the current liquid level and the frequency of the first excitation signal determine the capacitive reactance of the equivalent capacitor, and further affect the signal characteristics of the first voltage signal.

[0061] It should be noted that the comparison amplifier circuit differentially amplifies the signal characteristics of the first voltage signal and the first preset reference voltage to increase the amplification factor of the resin liquid level. The second voltage signal of the first embodiment is mapped to the current liquid level. Therefore, when the second voltage signal is obtained, the height value of the liquid level can be obtained according to the mapping relationship.

[0062] The embodiment of the present application can obtain a second voltage signal representing the current liquid level height through a first excitation circuit, a first detection circuit and a comparison amplifier circuit, and then obtain the liquid level, without the need for hydraulic, float, ultrasonic and other detection devices, and occupies a small volume. The comparison amplifier circuit can improve the amplification factor and detection accuracy. In summary, the probe-type resin liquid level detection device based on capacitance change proposed in this application has the advantages of small equipment size, high detection accuracy, low construction cost and strong versatility.

[0063] In one embodiment, a contact sensor is used for liquid level detection, and the probe of the contact sensor can be set on the material tray of the 3D printer. The probe is connected to the subsequent first excitation circuit, the first detection circuit, and the comparison amplifier circuit through contacts and contacts. When the material tray needs to be discarded, the probe of the sensor is discarded together. In another embodiment, the first excitation circuit and the first detection circuit can be set on the material tray, and the first reference voltage circuit, the comparison amplifier circuit, the controller and other equipment can be set on the printer body. The first detection circuit and the comparison amplifier circuit can be electrically connected in the form of contacts and contacts. When the material tray needs to be discarded, the probe and the circuit board provided with the first excitation circuit and the first detection circuit can be discarded together with the material tray, thereby avoiding the problem of resin contamination when the resin of the material tray is replaced.

[0064] The first excitation signal input to the first excitation circuit can be a PWM1 waveform with an excitation frequency of f, which is emitted by an output terminal IO1 of the MCU. The detection probe in the excitation circuit is inserted into the resin tray and fixed; although the resin is not conductive, the change in the resin liquid level will affect the medium between the two detection probes (from air to resin, that is, the dielectric constant is changed), thereby changing the equivalent capacitance of the probe; this capacitance change is converted into a DC voltage change through the first excitation circuit and the first detection circuit. The final output signal is the capacitance change caused by the change in the resin liquid level, which is amplified and becomes an analog voltage value that can be sampled by the ADC. The MCU can calculate the current liquid level of the resin based on the sampled digital value.

[0065] It should be noted that the dielectric constant of each resin material is slightly different, and they are affected differently by their own temperature. If more accurate liquid level readings are required, separate experiments can be conducted on each resin material to obtain the proportional coefficient between the ADC value and the liquid level, and a temperature sensor can be added to detect the resin temperature. When calculating the current liquid level, the MCU can take the resin temperature value as an auxiliary parameter for corresponding compensation.

[0066] In one embodiment, the first excitation circuit includes a detection capacitor and a voltage-dividing resistor. The detection capacitor and the voltage-dividing resistor are connected in series to divide the voltage, and the voltage of one of the detection capacitor and the voltage-dividing resistor can be associated with the liquid level information. It can be the voltage of the detection capacitor or the voltage of the voltage-dividing resistor. That is, the following two situations:

[0067] 1) The first end of the detection capacitor is grounded, and the second end of the detection capacitor is electrically connected to the input end of the first detection circuit 12 and to the first end of the voltage-dividing resistor; the second end of the voltage-dividing resistor is used to access the first excitation signal.

[0068] 2) The first end of the voltage-dividing resistor is electrically connected to the first detection circuit 12 and to the second end of the detection capacitor. The second end of the voltage-dividing resistor is grounded. The first end of the detection capacitor is used to access the first excitation signal.

[0069] like Figure 2 As shown, Figure 2 A method of taking the voltage of the detection capacitor is shown, where the probe equivalent capacitance C is the detection capacitor, wherein the first excitation circuit 11 also includes an excitation voltage follower U1A, and the excitation voltage follower U1A is used to avoid the influence of the first detection circuit 12 on the voltage of the detection capacitor. The output end of the excitation voltage follower U1A is electrically connected to the input end of the first detection circuit 12, and the input end of the excitation voltage follower U1A is connected to the connection point of the detection capacitor and the voltage divider resistor.

[0070] For the first detection circuit 12, a diode and a capacitor may be provided to realize detection. Figure 2 The first detection circuit 12 includes a detection diode D1, a peak detection capacitor C1 and a first resistor R1. The detection diode D1 can prevent the charge of the capacitor C1 from flowing back. The anode of the detection diode D1 is the input end of the first detection circuit 12. The first end of the peak detection capacitor C1 is electrically connected to the cathode of the detection diode D1, the first end of the first resistor R1 and the input end of the comparison amplifier circuit 13 respectively. The second end of the peak detection capacitor C1 and the second end of the first resistor R1 are both grounded.

[0071] After the quasi-sine wave output by the first excitation circuit passes through the detection diode D1, when the voltage rises in each cycle, the maximum value of its voltage charges the peak detection capacitor C1. At the voltage falling edge of each cycle, due to the unidirectional conductivity of the detection diode D1, the peak detection capacitor C1 cannot return to the previous stage to discharge, and basically maintains the voltage. The function of the first resistor R1 is that when the peak value given to the peak detection capacitor C1 decreases (due to liquid level changes), C1 can reduce the voltage by discharging to the ground through R1, so that the C1 voltage can follow the peak value of the quasi-sine wave in real time. In one embodiment, the time constant formed by the first resistor R1 and the peak detection capacitor C1 is at the ms level. Otherwise, if the value of R1 is too small, the capacitor has been completely discharged through the resistor at the voltage falling edge of the quasi-sine wave, and the effect of following the peak value cannot be achieved; if the value of R1 is too large, when the liquid level changes and causes the peak value to drop, the capacitor voltage drops too slowly, and the measurement delay is high.

[0072] Figure 2 In the embodiment, the first detection circuit 12 includes a detection voltage follower U1B, and the first end of the peak detection capacitor C1 is electrically connected to the input end of the comparison amplifier circuit 13 through the detection voltage follower, so that the first detection circuit 12 can be better isolated from the signal at its output side.

[0073] Different from Figure 2 The structure of the first detection circuit 12 in the liquid crystal display device 10 can also realize the function of the first detection circuit 12 in the following manner in one example: by comparing the signal output by the first excitation circuit 11 with a preset detection reference voltage, a comparison result is output. Since the first excitation circuit 11 outputs a quasi-sine wave, the comparison result is a square wave, and presents different duty cycles with different outputs of the first excitation circuit 11, and the duty cycle is related to the liquid level. The square wave with the duty cycle can obtain an average value of the square wave through an active filter circuit or a mean detection circuit, and the average value is proportional to the duty cycle of the square wave, that is, the peak value of the quasi-sine wave of the signal output by the first excitation circuit 11 can also be obtained. That is, the first detection circuit 12 can include an active filter circuit or a mean detection circuit.

[0074] In one embodiment, reference may be made to Figure 3 The first detection circuit includes a comparator U1E, a first input end of the comparator U1E is an input end of the first detection circuit 12, and a second input end of the comparator is used to access a preset detection reference voltage V_ref. The comparator is used to output a square wave with a variable duty cycle according to the comparison between the first voltage signal of the first excitation circuit 11 and the preset detection reference voltage, and the duty cycle is proportional to the peak value of the first voltage signal, that is, the peak value of the quasi-sine wave can also be obtained.

[0075] The output end of the comparator is connected to the input end of the active filter circuit or the mean detection circuit 121, and the output end of the active filter circuit or the mean detection circuit 121 is the output end of the first detection circuit 12. The active filter circuit or the mean detection circuit 121 is used to obtain the average value of the square wave, which is proportional to the duty cycle of the square wave. That is, the output voltage is a voltage proportional to the duty cycle of the square wave, which also reflects the liquid level.

[0076] Continue to refer to Figure 2 , the liquid level detection device also includes a first reference voltage circuit 14, which can be used to provide a first preset reference voltage for the comparison amplifier circuit 13. The first reference voltage circuit 14 includes a reference voltage follower U1C and a low-pass filter circuit (including a resistor and a capacitor), and the output end of the low-pass filter circuit is connected to the input end of U1C, and the input end is used to connect to another output end IO2 of the MCU. The output end of U1C is the output end of the first reference voltage circuit 14. Through the above-mentioned first reference voltage circuit, a stable and adjustable first preset reference voltage can be obtained. It should be noted that as long as the first reference voltage circuit can output a stable first preset reference voltage, other types of reference voltage circuits in this field should also be included in the protection scope of this application.

[0077] Figure 2 In the embodiment, there are two low-pass filter circuits, that is, a second-order RC low-pass filter is used to enhance the steep drop characteristics of the filter in the cut-off region, so as to make the output voltage ripple of this stage smaller. Among them, the cut-off frequency of the filter is set below kHz.

[0078] It should be noted that the order can also be freely selected, whether it is first order, second order or higher order.

[0079] As another alternative to obtain the reference voltage, the reference voltage can be obtained using a DAC circuit, that is, the first reference voltage circuit 14 includes a DAC circuit, the input end of the comparison amplifier circuit is connected to the DAC circuit, the DAC circuit is used to convert digital quantities into analog quantities, and can adjust the output voltage according to the input digital value.

[0080] In one embodiment, the comparison amplifier circuit includes a fourth resistor R4, a fifth resistor R5, a sixth resistor R6, a seventh resistor R7 and an operational amplifier U1D;

[0081] The non-inverting input terminal of the operational amplifier is respectively connected to the first end of the fourth resistor and the first end of the sixth resistor, the inverting input terminal is respectively connected to the first end of the fifth resistor and the first end of the seventh resistor, the output terminal is connected to the second end of the seventh resistor and is used to connect to the MCU; the second end of the fourth resistor is connected to the first preset reference voltage, the second end of the fifth resistor is connected to the output end of the first detection circuit; the second end of the sixth resistor is grounded.

[0082] Specifically, the two input terminals of the operational amplifier are electrically connected to the first terminal of the fourth resistor and the first terminal of the fifth resistor respectively, and the second terminal of the fourth resistor and the second terminal of the fifth resistor are the two input terminals of the comparison amplifier circuit;

[0083] The non-inverting input terminal of the operational amplifier is grounded through the sixth resistor, the seventh resistor is connected between the output terminal and the inverting input terminal of the operational amplifier, and the output terminal of the operational amplifier is the output terminal of the comparison amplifier circuit.

[0084] Refer to the following Figure 4 , in order to avoid detection failure at high liquid level, Figure 4 A second excitation circuit 15 for detecting the second liquid level is also provided, and the second excitation circuit 15 is used to output a third voltage signal according to the input second excitation signal and the current liquid level. The input end of the second excitation circuit is connected to the input end of the first excitation circuit. Similarly, a second detector circuit 16 is provided, and the second detector circuit 16 is used to extract the signal characteristics of the third voltage signal, and its circuit structure can be the same as that of the first detector circuit. The signal characteristics include peak value, peak-to-peak value and minimum value. The first input end of the subtraction circuit 18 is connected to the output end of the second detector circuit, the second input end is connected to the second reference voltage circuit, and the output end is connected to the input end of the comparison amplifier circuit; the subtraction circuit is used to obtain the signal characteristics of the fourth voltage signal according to the signal characteristics of the third voltage signal and the second reference voltage provided by the second reference voltage circuit 17; the comparison amplifier circuit 13 is used to output a fifth voltage signal according to the peak voltage of the first voltage signal, the peak voltage of the fourth voltage signal and the first preset reference voltage. Among them, the change rate of the fifth voltage signal with the liquid level when the liquid level is higher than the second liquid level is greater than the change rate of the fifth voltage signal with the liquid level when it is lower than the high limit.

[0085] Specifically, the second reference voltage circuit 17 is used to provide a second preset reference voltage. The subtraction circuit 18 is used to subtract the second preset reference voltage from the superposition value of the signal characteristics of the first voltage signal and the signal characteristics of the third voltage signal, and input the obtained signal to the input end of the comparison amplifier circuit. In a specific embodiment, the required reference voltage can be obtained from the constant power supply voltage through a diode step-down, that is, Figure 4, a second reference voltage circuit 17 is set to include step-down diodes D2, D4 and a grounding resistor R8. The number of step-down diodes can be set as needed. In one example, the number of step-down diodes can be two. The cathode of the step-down diodes D2 and D4 connected in series is grounded through a grounding resistor, and the anode is used to connect the reference power supply, and is used to output a preset reference voltage Vref after stepping down the voltage of the reference power supply. Through the step-down diodes D2 and D4, the voltage drop of the diodes in the first detection circuit and the second detection circuit can be offset. The subtraction circuit 18 can be any subtraction circuit in the art. For example: the subtraction circuit may include an operational amplifier U1E, a resistor R12 and a resistor R13; one end of the resistor R12 is respectively connected to one end of the grounding resistor R8 and the cathode of the step-down diode D4, and the other end is respectively connected to the inverting input end of the operational amplifier U1E and one end of the resistor R13, and the other end of the resistor R13 is connected to the output end of the operational amplifier U1E and the comparison amplifier circuit.

[0086] The second excitation circuit 15 and the first excitation circuit 11 share a probe, as follows.

[0087] The first excitation circuit 11 includes a first detection capacitor C, which is formed by a first probe and a second probe extending into the container. The second probe is used to touch the liquid at a first liquid level, and the first liquid level is lower than the second liquid level. The second liquid level is the upper limit of the material tray.

[0088] The second excitation circuit 15 includes a second detection capacitor C10, which is formed by the first probe and the third probe. The third probe is used to touch the liquid at the high limit (i.e., the second liquid level). In addition, the resistance of the second voltage-dividing resistor R10 in the figure is greater than the resistance of the first voltage-dividing resistor R. Furthermore, the resistance of the second voltage-dividing resistor R10 is different from the resistance of the first voltage-dividing resistor R by an order of magnitude.

[0089] In this way, when the liquid level is low, the change in the liquid level will not cause the capacitance of the second detection capacitor C10 to change, so the liquid level can be detected according to the change in the capacitance of the first detection capacitor C with the liquid level.

[0090] When liquid is added so that the liquid level gradually transitions to above the second liquid level, since the third probe touches the liquid, its capacitance will change significantly, so that the liquid level can be detected based on the change in the capacitance of the second detection capacitor C10 with the liquid level. At this time, even if the first detection capacitor fails, it can detect that the liquid level is too high, so that a warning can be issued to further avoid overflow due to excessive addition of liquid. It should be noted that the number of probes is not limited in the present application, and it can be three probes or multiple probes.

[0091] It should be further explained that, when the inputs of the first excitation circuit and the second excitation circuit are derived from the same interface, the first excitation signal and the second excitation signal can be sent alternately from the same interface. Due to the difference in resistance between the first voltage-dividing resistor and the second voltage-dividing resistor, the paths of the first excitation circuit and the first detection circuit, and the paths of the second excitation circuit and the second detection circuit can function alternately. There is also an order of magnitude difference between the first excitation signal and the second excitation signal. Through the above circuit, liquid level detection and high liquid level warning can be realized simultaneously without adding interfaces.

[0092] Based on the above embodiment, the present application also provides a liquid level detection method, which is applied to the above liquid level detection device. The method includes:

[0093] S1. Obtaining a second voltage signal;

[0094] S2. When the voltage value corresponding to the second voltage signal falls within a preset range, confirming that the zero adjustment is successful;

[0095] S3. Read the current second voltage signal and / or the current temperature signal according to the received liquid reading instruction;

[0096] S4. Obtain the current liquid level according to the current second voltage signal and / or the current temperature signal.

[0097] By adjusting the zero step, the initial second voltage signal can be controlled within an appropriate range, which is conducive to more accurate reflection of subsequent changes in the second voltage signal. The temperature signal can also be added to compensate for the error caused by temperature, thereby avoiding the influence of temperature changes on the measured liquid level.

[0098] The above method can be used for Figure 1 , Figure 2 , Figure 4 The MCU in it. Figure 4 IO1 and IO2 in can output PWM signals. MCU can be a separate 8-bit or 32-bit microprocessor that communicates with the host computer through interfaces such as UART and I2C; MCU can also refer to the CPU of the printer core board, and directly use the PWM1, PWM2 and ADC resources in the CPU to build this system. The overall process is: first initialize the I / O properties, set the PWM1 and PWM2 frequencies and initial duty cycles, complete the ADC and UART configurations, and then execute the receiving host computer instructions in a loop until the power is off and the loop is exited and ended. The host computer may issue a zeroing instruction or a liquid level reading instruction. The MCU can perform zeroing or liquid level reading actions at any time according to the zeroing instruction or liquid level reading instruction.

[0099] The zero adjustment voltage is a second voltage signal obtained by comparing and amplifying the first preset reference voltage and the peak voltage of the first voltage signal, wherein the preset reference voltage can be formed by PWM2. When the system is at zero resin level, the MCU sends a PWM2 waveform with adjustable duty cycle, which passes through the active filter circuit to generate a preset reference voltage for zero adjustment.

[0100] The zero adjustment mechanism greatly reduces the impact of parasitic parameters of active devices in the system and accuracy issues of passive devices such as resistors and capacitors on errors.

[0101] In addition, since the capacitance change caused by the change of resin liquid level is very small, about 0.5pf, the capacitance range of the multimeter can only measure uF-level capacitance, and the general oscilloscope optical probe has an input capacitance of 10pf, and the parasitic parameters are too large. Although the general LCR device can detect the capacitance of the pf level, it is extremely expensive. It can be seen that it is difficult to build a low-cost detection device, and it is necessary to consider simple methods and accurate theoretical calculations. Due to the PWM function of ordinary 8-bit single-chip microcomputers, accurate capture of capacitance changes is achieved. This application can achieve accurate measurement of liquid level using only ordinary 8-bit single-chip microcomputers, which shows the outstanding contribution of this application to reducing costs.

[0102] Figure 2 In the example, the PWM1 of the MCU can be set to output a square wave signal with a duty cycle of 50% as Vin, and the resistor R, the probe equivalent capacitor C and the first-stage operational amplifier U1A form a first-order active low-pass filter. After the square wave signal is expanded by the Fourier series, it can be considered as a composite signal consisting of a DC component, a sine wave component with a base frequency of the square wave signal (also called the excitation frequency) f and its odd harmonics. After the active low-pass filter, the DC component is completely passed, and the high-order harmonics are basically attenuated. The base frequency signal is distributed to the input voltage by the capacitive reactance 1 / jωC of the resistor R and the capacitor C according to the complex voltage division rule. Finally, Vout is a sine-like signal (with a DC component) with an amplitude less than Vin and a frequency of the base frequency f. The change of capacitance will affect the voltage division ratio, and then affect the amplitude of the output voltage.

[0103] The waveform obtained by the first excitation circuit is a quasi-sine wave, and is superimposed with the original DC component of the PWM1 square wave, which is generally half the power supply voltage VCC. The change of capacitance will not affect the size of the DC component, but only the peak-to-peak value of the quasi-sine wave, so it is designed Figure 2 The first detection circuit shown is used to capture the peak value in real time.

[0104] After the quasi-sine wave passes through the diode D1, when the voltage rises in each cycle, the maximum value of its voltage charges the capacitor C1. At the falling edge of the voltage in each cycle, due to the unidirectional conductivity of the diode, the capacitor C1 cannot return to the previous stage to discharge, and basically maintains the voltage. C1 should take a larger capacitance as much as possible to ensure a lower output ripple. The role of the resistor R1 is that when the peak value given to the capacitor C1 decreases (due to the change in liquid level), C1 can reduce the voltage by discharging to the ground through R1, so that the C1 voltage can follow the peak value of the quasi-sine wave in real time. The value of R1 should not be too small, otherwise the capacitor has been completely discharged through the resistor at the falling edge of the quasi-sine wave voltage, and the effect of following the peak value cannot be achieved. The value of R1 should not be too large, otherwise when the liquid level changes and causes the peak value to drop, the capacitor voltage drops too slowly, and the measurement delay is high. Generally, the time constant composed of R1 and C1 can be at the ms level. The second-stage op amp U1B acts as an emitter follower, which can isolate the front and rear loads so that the device parameters of the front and rear stages will not affect each other.

[0105] As mentioned above, the waveform output from the first detection circuit is a DC voltage waveform, which carries a large DC component of the original square wave, while the voltage change caused by the changing capacitance is very small. If the voltage of the first detection circuit is simply amplified, the amplification factor is even less than 2 times due to the limitation of the power supply voltage. Figure 2 As shown, the present invention uses an operational amplifier to build an addition and subtraction amplifier circuit, taking R4=R5, R6=R7, Vpeak is the output voltage of the peak detection, Vref is the output voltage of the active filter circuit, and the final output voltage Vadc is:

[0106]

[0107] As the liquid level rises, the capacitance increases, the capacitive reactance decreases, Vpeak begins to decrease, and the final Vadc begins to increase, and the increase value depends on the change of the liquid level and the setting of the amplification factor. Under this circuit design, the amplification factor can reach more than 20 times, which is much higher than the effect of directly amplifying Vpeak (less than 2 times).

[0108] For PWM2, you can use the experience value obtained during the actual debugging process to set the initial duty cycle, and then adjust it according to the zero adjustment sub-process. The zero adjustment sub-process is as follows:

[0109] Step 1: ADC samples a digital value Vdig, and this sampling is added with digital filtering, taking the average of multiple consecutive sampling values ​​to reduce errors; the current detected voltage value is calculated based on the ADC bit number n and the reference voltage Vr.

[0110]

[0111] Step 2: If Vadc<0.01V, it means that the current duty cycle of PWM2 is too small, and Vref is not enough to exceed the output Vpeak of the peak detection circuit, so the duty cycle needs to be increased; add 1 to the PWM2 duty cycle register and return to Step 1; if Vadc>0.02V, it means that the current duty cycle of PWM2 is too large, and the test result is coupled with a part of the DC component, which affects the judgment of the liquid level. After reducing the PWM2 duty cycle register by 1, return to Step 1; if 0.01V≤Vadc≤0.02V, it is considered that the zero adjustment is successful and enter Step 3.

[0112] Step 3: Send the zero adjustment completion information to the host computer via UART.

[0113] The sub-process of the liquid level reading instruction is:

[0114] Step 1: ADC samples the digital value Vdig once. This sampling is also added with digital filtering. After using formula 3-3 to obtain Vadc, the proportional coefficient Ktype to be used at this time is known according to the current material type given by the host computer. The final liquid level height H is:

[0115] H=KtypeVadc

[0116] Since temperature will affect the measurement, a temperature sensor can be added to test the resin temperature T. Assuming the temperature compensation coefficient of the material is Ktem, the final liquid level height H is:

[0117]

[0118] Step 2: Send the information of liquid level H to the host computer via UART.

[0119] Based on the above liquid level detection method, an embodiment of the present application further provides a liquid level detection device for executing the above liquid level detection method, the device comprising:

[0120] A zeroing unit, used to obtain an initial second voltage signal, and confirm that the zeroing is successful when a voltage value corresponding to the second voltage signal falls within a preset interval;

[0121] The calculation unit is used to read the current second voltage signal and / or the current temperature signal according to the received liquid reading instruction when zeroing is successful, and obtain the current liquid level according to the current second voltage signal; or, obtain the current liquid level according to the current second voltage signal and the current temperature signal.

[0122] Optionally, a temperature compensation unit may be provided in the liquid level detection device to generate a temperature signal according to the ambient temperature.

[0123] Based on the above-mentioned liquid level detection method, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a computing device, the above-mentioned liquid level detection method is implemented.

[0124] In general, the present application proposes a liquid level detection device, a liquid level detection method, a liquid level detection apparatus and a storage medium, which compares the signal generated by detection with a reference voltage and amplifies it to calculate the liquid level height, occupies a small volume and has high detection accuracy.

[0125] The above-described device and system embodiments are merely illustrative, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. A person skilled in the art may understand and implement the present embodiment without creative effort.

[0126] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A liquid level detection device, characterized in that: include: A first excitation circuit, configured to output a first voltage signal according to an input first excitation signal and a current liquid level; A first detection circuit, used for extracting signal characteristics of the first voltage signal; wherein the signal characteristics include a peak value, a peak-to-peak value and / or a minimum value; A comparison amplifier circuit, used for outputting a second voltage signal according to the signal characteristics and a first preset reference voltage; wherein the second voltage signal is used for representing the height corresponding to the current liquid level; The liquid level detection device also includes: A second excitation circuit, configured to output a third voltage signal according to an input second excitation signal and a current liquid level; an input end of the second excitation circuit is connected to an input end of the first excitation circuit; A second detection circuit, used for extracting a signal feature of the third voltage signal; a second reference voltage circuit; a subtraction circuit, the subtraction circuit being used to obtain a signal characteristic of a fourth voltage signal according to a signal characteristic of the first voltage signal, a signal characteristic of the third voltage signal, and a second preset reference voltage provided by the second reference voltage circuit; The comparison amplifier circuit is used to output a fifth voltage signal according to a signal characteristic of the first voltage signal, a signal characteristic of the fourth voltage signal and the first preset reference voltage.

2. The liquid level detection device according to claim 1, characterized in that: The first excitation circuit includes a detection capacitor and a voltage-dividing resistor; the detection capacitor is formed according to a probe extending into the container; The first end of the detection capacitor is grounded, the second end of the detection capacitor is electrically connected to the input end of the first detection circuit, and is electrically connected to the first end of the voltage-dividing resistor; the second end of the voltage-dividing resistor is used to receive the first excitation signal; or, The first end of the voltage-dividing resistor is electrically connected to the first detection circuit and to the second end of the detection capacitor. The second end of the voltage-dividing resistor is grounded. The first end of the detection capacitor is used to receive the first excitation signal.

3. The liquid level detection device according to claim 2, characterized in that: The first excitation circuit also includes an excitation voltage follower; The output end of the excitation voltage follower is electrically connected to the input end of the first detection circuit, and the input end of the excitation voltage follower is connected to the connection point between the detection capacitor and the voltage-dividing resistor.

4. The liquid level detection device according to claim 1, characterized in that: The first detection circuit includes a detection diode, a peak detection capacitor and a first resistor, the anode of the detection diode is electrically connected to the output end of the first excitation circuit; the first end of the peak detection capacitor is electrically connected to the cathode of the detection diode, the first end of the first resistor and the input end of the comparison amplifier circuit respectively; the second end of the peak detection capacitor and the second end of the first resistor are both grounded.

5. The liquid level detection device according to claim 4, characterized in that: The first detection circuit further includes a detection voltage follower, and the first end of the peak detection capacitor is electrically connected to the input end of the comparison amplifier circuit through the detection voltage follower.

6. The liquid level detection device according to claim 1, characterized in that: The first detection circuit comprises a comparator, a first input terminal of the comparator is electrically connected to the first excitation circuit, and a second input terminal is used to access a preset detection reference voltage; The comparator is used to output a square wave with a varying duty cycle according to a comparison between the first voltage signal output by the first excitation circuit and the preset detection reference voltage, wherein the duty cycle is proportional to the peak value of the first voltage signal; The first detection circuit further includes an active filter circuit or a mean detection circuit, the output end of the comparator is connected to the input end of the active filter circuit or the input end of the mean detection circuit, and the output end of the active filter circuit or the mean detection circuit is electrically connected to the comparison amplifier circuit; The active filtering circuit or the mean detection circuit is used to obtain the average value of the square wave, and the average value is proportional to the duty cycle of the square wave.

7. The liquid level detection device according to claim 1, characterized in that: The liquid level detection device also includes a first reference voltage circuit for providing the first preset reference voltage.

8. The liquid level detection device according to claim 7, characterized in that: The first reference voltage circuit includes a reference voltage follower and a low-pass filter circuit, the output end of the low-pass filter circuit is connected to the input end of the reference voltage follower, and the input end is used to connect to the processing circuit; the output end of the reference voltage follower is electrically connected to the comparison amplifier circuit.

9. The liquid level detection device according to claim 8, characterized in that: There are multiple low-pass filter circuits, and the output ends of the multiple low-pass filter circuits connected in series are connected to the input end of the reference voltage follower. The input ends of the multiple low-pass filter circuits connected in series are used to connect to the processing circuit.

10. The liquid level detection device according to claim 8, characterized in that: The low-pass filter circuit includes a filter resistor and a filter capacitor; the first end of the filter resistor is the input end of the low-pass filter circuit, the second end of the filter resistor is electrically connected to the first end of the filter capacitor, the first end of the filter capacitor is the output end of the low-pass filter circuit, and the second end of the filter capacitor is grounded.

11. The liquid level detection device according to claim 7, characterized in that: The first reference voltage circuit includes a DAC circuit, and the input end of the comparison amplifier circuit is connected to the DAC circuit.

12. The liquid level detection device according to claim 1, characterized in that: The comparison amplifier circuit includes a fourth resistor, a fifth resistor, a sixth resistor, a seventh resistor and an operational amplifier; The non-inverting input terminal of the operational amplifier is respectively connected to the first end of the fourth resistor and the first end of the sixth resistor, the inverting input terminal is respectively connected to the first end of the fifth resistor and the first end of the seventh resistor, the output terminal is connected to the second end of the seventh resistor, and is used to connect to the MCU; the second end of the fourth resistor is connected to the first preset reference voltage, the second end of the fifth resistor is connected to the output end of the first detection circuit; the second end of the sixth resistor is grounded.

13. The liquid level detection device according to claim 1, characterized in that: The first input end of the subtraction circuit is connected to the output end of the first detection circuit and the output end of the second detection circuit, the second input end is connected to the second reference voltage circuit, and the output end is connected to the input end of the comparison amplifier circuit.

14. The liquid level detection device according to claim 13, characterized in that: The first excitation circuit includes a first detection capacitor and a first voltage-dividing resistor; the first detection capacitor is formed according to a first probe and a second probe extending into the container; the second probe is used to touch the liquid at a first liquid level; The first end of the first detection capacitor is grounded, the second end of the first detection capacitor is electrically connected to the first detection circuit and to the first end of the first voltage-dividing resistor, and the second end of the first voltage-dividing resistor is used to connect the first excitation signal; or the first end of the first voltage-dividing resistor is electrically connected to the first detection circuit and to the second end of the first detection capacitor, the second end of the first voltage-dividing resistor is grounded, and the first end of the first detection capacitor is used to connect the first excitation signal; The second excitation circuit includes a second detection capacitor and a second voltage-dividing resistor; the second detection capacitor is formed by the first probe and the third probe; the third probe is used to touch the liquid at the second liquid level; the resistance value of the second voltage-dividing resistor is greater than the resistance value of the first voltage-dividing resistor; The first liquid level is lower than the second liquid level; The first end of the second detection capacitor is grounded, the second end of the second detection capacitor is electrically connected to the first detection circuit and to the first end of the second voltage-dividing resistor, and the second end of the second voltage-dividing resistor is used to connect the second excitation signal; or, the first end of the second voltage-dividing resistor is electrically connected to the first detection circuit and to the second end of the second detection capacitor, the second end of the second voltage-dividing resistor is grounded, and the first end of the second detection capacitor is used to connect the second excitation signal.

15. The liquid level detection device according to claim 1, characterized in that: The second reference voltage circuit includes a step-down diode and a grounding resistor. The cathode of the step-down diode is grounded through the grounding resistor. The anode of the step-down diode is used to connect to a reference power supply and to output the second preset reference voltage after stepping down the voltage of the reference power supply.

16. A liquid level detection method, characterized in that: Applied to the liquid level detection device according to any one of claims 1 to 15, the liquid level detection method comprises: Acquiring an initial second voltage signal; When the voltage value corresponding to the second voltage signal falls within a preset interval, it is confirmed that the zero adjustment is successful.

17. The liquid level detection method according to claim 16, further comprising: According to the received liquid reading instruction, the current second voltage signal is read, and the current liquid level is obtained based at least on the current second voltage signal.

18. The liquid level detection method according to claim 16, further comprising: According to the received liquid reading instruction, the current second voltage signal and the current temperature signal are read, and the current liquid level is obtained based at least on the current second voltage signal and the current temperature signal.

19. A liquid level detection device, characterized in that: Applied to the liquid level detection device according to any one of claims 1 to 15, the liquid level detection device comprises: a zeroing unit, configured to obtain a second voltage signal, and confirm that the zeroing is successful when a voltage value corresponding to the second voltage signal falls within a preset interval; The calculation unit is used to read the current second voltage signal and / or the current temperature signal according to the received liquid reading instruction when zeroing is successful; and obtain the current liquid level according to the current second voltage signal; or, obtain the current liquid level according to the current second voltage signal and the current temperature signal.

20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction, and when the computer program or instruction is executed by a computing device, the method according to any one of claims 16 to 18 is implemented.

Citation Information

Patent Citations

  • Capacitive gauge

    CN101287969A

  • Integrated 22KHz envelope detection and frequency band switching circuit

    CN101895707A

  • Ripple detection device

    CN107783062A

  • Automatic water-level detecting and tracking apparatus

    CN203311263U

  • Parameter measuring device of vibrating wire sensor

    CN215374300U