1. Field of the Invention
The present invention relates to a liquid level detecting apparatus, and more particularly to a self-calibration method for a photoelectric liquid level switch and an apparatus using the same.
2. Description of Related Art
A photoelectric liquid level switch is widely used in industries, such as petrochemical industry, food industry, animal feed industry, steel industry, cement industry, etc., which are all industries that demand huge storage of raw materials. The photoelectric liquid level switch is mounted on a wall of a container and is electrically connected to a control system. The control system monitors a present liquid storage of the container by using the photoelectric liquid level switch.
A conventional photoelectric liquid level switch has a light emitter and an optical sensor. The light emitter emits a light beam toward the liquid stored in the container. The light beam is then reflected by the liquid and the optical sensor detects the reflected light beam. The photoelectric liquid level switch converts an intensity of the reflected light beam to a measurement value. The photoelectric liquid level switch is preset with a default threshold value. The control system compares the measurement value with the default threshold value to determine liquid level of the liquid.
For example, with reference to
However, an intensity of the light beam emitted from the light emitter, a sensitivity of the optical sensor, and the default threshold value are all fixed and are only applicable for a certain kind of liquid, or liquid with stable characteristics, or a clear liquid. One default threshold value is applicable for only one liquid. As a result, the conventional photoelectric liquid level switch cannot detect the liquid level of unknown liquid or turbid liquid.
An objective of the invention is to provide a self-calibration apparatus for a photoelectric liquid level switch. The apparatus of the invention has a variable threshold value. The threshold value changes with different kinds of liquids, such that the apparatus of the invention can detect the liquid level for various kinds of liquids.
The self-calibration apparatus of the invention comprises:
a light emitting module generating a light beam;
a light sensing module receiving a reflection of the light beam and correspondingly generating a detection signal; and
a control module electrically connected to the light emitting module and the light sensing module to control an intensity of the light beam and to control a sensitivity of the light sensing module, having a self-calibration unit and storing a default threshold value; wherein
the self-calibration unit acquires a first value standing for a first liquid level status and a second value standing for a second liquid level status;
when the default threshold value is beyond a range between the first value and the second value, the self-calibration unit replaces the default threshold value with a new threshold value in the range between the first value and the second value.
Another objective of the invention is to provide a self-calibration method for a photoelectric liquid level switch. The method comprises the steps of:
acquiring a first value standing for a first liquid level status, wherein the first value is a ratio of a first light emitting intensity to a first light receiving intensity;
acquiring a second value standing for a second liquid level status, wherein the second value is a ratio of a second light emitting intensity to a second light receiving intensity;
determining whether a default threshold value is in a range between the first value and the second value;
calculating a new threshold value in the range when the default threshold value is beyond the range; and
replacing the default threshold value with the new threshold value.
The control module controls or adjusts the intensity of the light beam emitted from the light emitting module and the sensitivity of the light sensing module to detect the liquid level of the liquid stored in a container. The control module acquires the values of the first liquid level status and the second liquid level status. The self-calibration unit then calculates a new threshold value and automatically replaces the default threshold value with the new threshold value. Hence, the apparatus of the invention can use a correct threshold value to detect the liquid level for any liquid.
With reference to
The control module 10 comprises a self-calibration unit 11 and stores a default threshold value 12. The default threshold value 12 is variable. The self-calibration unit 11 is used to replace the default threshold value 12 with a new threshold value according to the liquid stored in the container.
The light emitting module 20 is electronically connected to the control module 10. With reference to
The light sensing module 30 is electronically connected to the control module 10 and comprises a light receiver 31 and a sensitivity adjustor 32. The light receiver 31 is electronically connected to the sensitivity adjustor 32 in series and is connected to a DC power supply (Vcc) through the sensitivity adjustor 32. The light receiver 31 of the light sensing module 30 detects a reflection of the light beam and generates a detection signal according to an intensity of the reflection. The control module 10 controls the sensitivity adjustor 32 to control a sensitivity of the light receiver 31 to control or adjust the detection signal of the light sensing module 30. The light receiver 31 can be a phototransistor or a photo resistor (cds). With reference to
With reference to
The self-calibration unit 11 acquires a first value standing for a first liquid level status (STEP 101). The first liquid level status can stand for an empty elevation. The first value is a ratio of the intensity of the light beam generated from the light emitting unit 21 to the intensity of the reflection received by the light receiver 31.
When the container is filled with liquid, the self-calibration unit 11 acquires a second value standing for a second liquid level status (STEP 102). The second liquid level status can stand for a full elevation. The second value is a ratio of the intensity of the light beam generated from the light emitting unit 21 to the intensity of the reflection received by the light receiver 31.
Interchangeably, the first liquid level status can stand for a full elevation and the second liquid level status stands for an empty elevation.
The self-calibration unit 11 determines whether the default threshold value 12 is in a range between the first value and the second value (STEP 103).
When the default threshold value 12 is in the range between the first value and the second value, the self-calibration unit 11 keeps the default threshold value 12 (STEP 104).
When the default threshold value 12 is beyond the range between the first value and the second value, the self-calibration unit 11 calculates a new threshold value and replaces the default threshold value 12 with the new threshold value (STEP 105). The new threshold value is in the range between the first value and the second value. For example, the new threshold value can be an average value of the first value and the second value.
The self-calibration unit 11 calculates the new threshold value in the range between the first value and the second value according to the liquid stored in the container. For example, with reference to
With reference to FIGS. 6 and 7A-7C, a second embodiment of the invention is disclosed. The control module 10 outputs a PWM (pulse width modulation) signal to adjust the intensity of the light beam of the light emitting unit 21. The light emitting unit 21 can be directly connected to the control module 10, such that the control module 10 can directly control the light beam of the light emitting unit 21. With reference to
With reference to FIGS. 8 and 9A-9C, a third embodiment of the invention is disclosed. A first adjustable aperture 50 is disposed in the light emitting module 20 in a light path of the light emitting unit 21 and the light receiver 31. A second adjustable aperture 50′ is disposed in the light sensing module 30 in the light path of the light emitting unit 21 and the light receiver 31. The control module 10 can respectively adjust the adjustable apertures 50, 50′ to change the intensity of the light beam of the light emitting unit 21 and to change the intensity of the reflection received by the light receiver 31.