Solution color detection system and detection method

By designing a solution color detection system in the chemical industry, using optical fiber light guides and color sensors to collect RGB data, the timeliness and reliability of manual inspections are solved, and the automated detection of solution color and the automatic control of chemical production are realized, which is improved. Safety and efficiency of production.

CN109916829BActive Publication Date: 2024-11-08QUZHOU HUAYOU COBALT NEW MATERIAL CO LTD +1
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN201910218417.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-03-21
Publication Date
2024-11-08
Estimated Expiration
2039-03-21

AI Technical Summary

Technical Problem

In the chemical field, solution color detection relies on manual inspection, which makes it difficult to ensure the timeliness and reliability of inspections, and lacks an automated control system.

Method used

Design a solution color detection system, including a white light source, a single-core optical fiber, a probe, a color sensor and a microcontroller, enter the measured solution through the optical fiber light guide, collect RGB data, and perform signal processing and compensation through the microcontroller to achieve automatic detection.

Benefits of technology

It realizes automatic detection of solution color and accurate and reliable automatic control, improving the safety and efficiency of chemical production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109916829B_ABST
    Figure CN109916829B_ABST
Patent Text Reader

Abstract

The present invention discloses a solution color detection system and a detection method. The solution color detection system of the present invention comprises a white light source, a first optical fiber, a second optical fiber, a probe, a color sensor and a single chip microcomputer, wherein the color sensor is controlled by the single chip microcomputer; one end of the first optical fiber is arranged close to the white light source, so that the white light generated by the white light source enters the first optical fiber; the other end of the first optical fiber is connected to one end of the second optical fiber by a probe, and the other end of the second optical fiber is connected to the color sensor, so as to guide the light to the color sensor; the end located on the same side of the first optical fiber and the second optical fiber is placed in the probe; the color sensor collects RGB channel data of the color of the solution to be tested, and outputs a square wave to the single chip microcomputer. The present invention realizes automatic detection of the solution color, thereby participating in automatic control; and performs calculation compensation through the built-in software of the single chip microcomputer, so that the obtained color is more accurate and reliable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of automatic color detection, and relates to the color detection of a solution, in particular to a solution color detection system and a detection method. Background Art

[0002] Nowadays, automatic control technology has become an important part of industrial production. Although color recognition machines are widely used in many places, they are still a blank in the chemical industry. Many chemical processes, such as extraction, are extremely sensitive to color. The organic solvent and water obtained after extraction and stratification enter the next process separately. If the color changes slightly, the feed needs to be adjusted.

[0003] At present, manual inspection is widely used to observe the color of the liquid, but the problems caused by manual inspection are:

[0004] (1) Timeliness of inspection cannot be guaranteed (night shift employees may fail to conduct inspection in a timely manner due to their poor mental state, which may lead to production accidents);

[0005] (2) Inspection reliability cannot be guaranteed (everyone has different sensitivity to color, and it is difficult for workers to quantify the colors they see);

[0006] Therefore, there is an urgent need for a system that can replace manual observation of solution color to participate in the automated control in the chemical industry. Summary of the invention

[0007] The technical problem to be solved by the present invention is to overcome the defects of the above-mentioned prior art and provide a solution color detection system to achieve the purpose of automatically detecting the solution color, thereby participating in the automation control in the chemical industry.

[0008] To achieve the above object, the technical solution adopted by the present invention is: a solution color detection system, which includes a white light source, a first optical fiber, a second optical fiber, a probe, a color sensor and a single-chip microcomputer, and the color sensor is controlled by the single-chip microcomputer;

[0009] One end of the first optical fiber is arranged close to the white light source so that the white light generated by the white light source enters the first optical fiber; the other end of the first optical fiber is connected to one end of the second optical fiber by a probe, and the other end of the second optical fiber is connected to the color sensor, so as to guide the light to the color sensor;

[0010] The end portion located on the same side of the first optical fiber and the second optical fiber is placed in the probe, so that the first optical fiber in the probe forms an angle β with the second optical fiber; a radial through hole is opened in the middle of the probe, and light transmission holes for the first optical fiber and the second optical fiber are opened on the inner wall of the radial through hole, and the light emitted from the first optical fiber is reflected by the measured solution entering the radial through hole and then enters the second optical fiber;

[0011] The color sensor collects RGB channel data of the color of the solution to be tested, and outputs square waves to a single-chip microcomputer, which is connected to a host computer; the signal frequency of the square wave is proportional to the light intensity of the RGB channel data.

[0012] As a supplement to the above detection system, a light-transmitting tube is arranged in the radial through hole, and the two end faces of the light-transmitting tube are flush with the two side faces of the probe housing, and an annular positioning groove is arranged on the inner wall of the radial through hole. The inner wall of the radial through hole and the outer wall of the light-transmitting tube are sealed by a sealing ring placed in the annular positioning groove. The first optical fiber and the second optical fiber are against the outer wall of the light-transmitting tube, and the light emitted from the first optical fiber enters the second optical fiber after being reflected by the measured solution entering the light-transmitting tube. When the present invention is used, the probe is immersed in the measured solution. If the measured solution is a corrosive solution, the materials of the probe and the light-transmitting tube can be corrosion-resistant materials, such as polytetrafluoroethylene.

[0013] As a supplement to the above detection system, there are two sealing rings, and the light transmission holes of the first optical fiber and the second optical fiber are located between the two sealing rings to prevent the solution to be tested from entering the light transmission holes.

[0014] As a supplement to the above detection system, the white light source is placed in a light shield, and the first optical fiber is fixedly connected to the light shield; the white light source and the light shield are installed on one inner wall of a base cavity, and the color sensor is installed on the other inner wall of the base cavity. The light shield is used to prevent external light from entering the first optical fiber.

[0015] As a supplement to the above detection system, the white light source is driven by a constant current drive circuit, the single-chip microcomputer, the constant current drive circuit, the single-chip microcomputer power supply circuit and the communication chip used for the single-chip microcomputer to communicate with the host computer are placed on an integrated circuit board, the single-chip microcomputer power supply circuit is used to power the single-chip microcomputer, and the integrated circuit board is installed in the inner cavity of the base. The constant current drive circuit ensures the stability of the light source when in use.

[0016] As a supplement to the above detection system, the top of the base is open, and the bottom is connected to a guide tube communicating with its inner cavity, and the first optical fiber and the second optical fiber are guided to the probe through the guide tube.

[0017] As a supplement to the above detection system, two arc tubes are symmetrically arranged outside the guide tube near the probe. The first optical fiber and the second optical fiber enter the arc tube from the guide tube, pass through the arc tube and connect to the probe; one end of the arc tube is positioned on the guide tube, and the other end is positioned on the probe. The arc tube can effectively ensure that the angle formed by the first optical fiber and the second optical fiber remains unchanged.

[0018] As a supplement to the above detection system, the angle β is 85-95 degrees. The angle is adjusted within this range so that the light emitted by the first optical fiber enters the second optical fiber after being reflected by the measured solution, and the measurement result is accurate.

[0019] As a supplement to the above detection system, the white light source is a white light LED light source, which is stable.

[0020] As a supplement to the above detection system, the first optical fiber and the second optical fiber are both single-core optical fibers.

[0021] Another object of the present invention is to provide a detection method using the above solution color detection system, which comprises the steps of:

[0022] 1) The white light source generates white light which is emitted into the solution to be measured after passing through the first optical fiber; after being reflected by the solution to be measured, the light enters the second optical fiber, and then the second optical fiber guides the light to the color sensor;

[0023] 2) On the color sensor, the light guided back by the second optical fiber passes through the red, green and blue filters respectively, and then shines on the light intensity sensor of the color sensor. The light intensity sensors behind the respective filters then convert the light intensity of the red, green and blue light into a 0-10KHz square wave signal respectively;

[0024] 3) After the single chip microcomputer reads the data of each RGB channel of the color sensor, it converts the signal frequency of the square wave into RGB values ​​of 0-255 through the proportional factor;

[0025] 4) The software inside the MCU first converts the RGB value into the ABC value representation method through a mathematical conversion formula; then the ABC value is compensated by the software to best restore the solution color; then the compensated ABC value is converted into the RGB value through a mathematical conversion formula by the software; after obtaining the final RGB value, the host computer stores it in the register of the Modbus RTU;

[0026] 5) Read the RGB value to the host computer through the query command of the Modbus RTU communication protocol.

[0027] As a supplement to the above detection method, the solution color detection system is subjected to white balance calibration before use.

[0028] The present invention first collects the solution color through optical fiber, then calculates and compensates through the built-in software of the single-chip microcomputer, and finally uploads the RGB value of the color to the host computer through 485 communication; the color obtained after correction and compensation is more accurate and reliable.

[0029] The beneficial effects of the present invention are as follows: the present invention realizes automatic detection of solution color, thereby being able to participate in automatic control; and performs calculation compensation through built-in software of a single-chip microcomputer, so that the obtained color is more accurate and reliable. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 This is a structural exploded view of the solution color detection system of Example 1 of the present invention;

[0031] Figure 2 A half-section diagram of the structure of the solution color detection system of Example 1 of the present invention;

[0032] Figure 3 It is a cross-sectional view of the probe portion of the solution color detection system of Example 1 of the present invention;

[0033] Figure 4 for Figure 3 A-A sectional view;

[0034] Figure 5 This is a structural block diagram of an integrated circuit board according to Embodiment 1 of the present invention;

[0035] Figure 6-7 This is a detection flow chart of Example 2 of the present invention.

[0036] In the figure, 1-white light source, 2-first optical fiber, 3-second optical fiber, 4-probe, 5-color sensor, 6-radial through hole, 7-light-transmitting hole, 8-light-transmitting tube, 9-annular positioning groove, 10-sealing ring, 11-light shield, 12-base, 13-guide tube, 14-integrated circuit board, 15-arc tube. DETAILED DESCRIPTION

[0037] The present invention is further described below in conjunction with the embodiments and the accompanying drawings, but the protection scope of the present invention is not limited to the following embodiments. Any modifications and changes made to the present invention within the spirit of the present invention and the protection scope of the claims fall within the protection scope of the present invention.

[0038] Example 1

[0039] This embodiment provides a solution color detection system, such as Figure 1-4As shown, it includes a white light source 1, a first optical fiber 2, a second optical fiber 3, a probe 4, a color sensor 5 and a single-chip microcomputer. The color sensor 5 is controlled by a single-chip microcomputer. The first optical fiber 2 and the second optical fiber 3 are both single-core optical fibers. The white light source 1 is a white light LED light source, driven by a constant current drive circuit. The single-chip microcomputer, the constant current drive circuit, the single-chip microcomputer power supply circuit and the communication chip used for the single-chip microcomputer to communicate with the host computer are placed on an integrated circuit board 14. The single-chip microcomputer power supply circuit is used to power the single-chip microcomputer. The integrated circuit board 14 is installed in the inner cavity of the base 12. The top of the base 12 is open, and the bottom is connected to a guide tube 13 connected to its inner cavity. The first optical fiber 2 and the second optical fiber 3 are guided to the probe 4 through the guide tube 13.

[0040] One end of the first optical fiber 2 is arranged close to the white light source 1, so that the white light generated by the white light source 1 enters the first optical fiber 2; the other end of the first optical fiber 2 is connected to one end of the second optical fiber 3 using a probe 4; the other end of the second optical fiber 3 is connected to the color sensor 5, thereby guiding the light to the color sensor 5.

[0041] The end portion located on the same side of the first optical fiber 2 and the second optical fiber 3 is placed in the probe 4, so that the first optical fiber 2 and the second optical fiber 3 in the probe form an angle β, and the angle is 85-95 degrees; a radial through hole 6 is opened in the middle of the probe 4, and a light-transmitting hole 7 for the first optical fiber and the second optical fiber is opened on the inner wall of the radial through hole 6. The light emitted from the first optical fiber 2 enters the second optical fiber 3 after being reflected by the measured solution entering the radial through hole 6.

[0042] The color sensor 5 collects the RGB channel data of the color of the solution to be tested, and outputs a square wave to the single chip microcomputer, which is connected to the host computer; the signal frequency of the square wave is proportional to the light intensity of the RGB channel data.

[0043] A light-transmitting tube 8 is arranged in the radial through hole 6, and the two end faces of the light-transmitting tube 8 are flush with the two side faces of the housing of the probe 4. An annular positioning groove 9 is arranged on the inner wall of the radial through hole 6. The inner wall of the radial through hole 6 and the outer wall of the light-transmitting tube 8 are sealed by a sealing ring 10 placed in the annular positioning groove 9. The first optical fiber 2 and the second optical fiber 3 are against the outer wall of the light-transmitting tube 8, and the light emitted from the first optical fiber 2 enters the second optical fiber 3 after being reflected by the measured solution entering the light-transmitting tube 8. There are two sealing rings 10, and the light-transmitting holes of the first optical fiber 2 and the second optical fiber 3 are located between the two sealing rings.

[0044] The white light source 1 is placed in the light shield 11, and the first optical fiber 2 is fixedly connected to the light shield 11; the white light source 1 and the light shield 11 are installed on the inner wall of one side of the inner cavity of the base 12, and the color sensor 5 is installed on the inner wall of the other side of the inner cavity of the base 12.

[0045] Two arc tubes 15 are symmetrically arranged outside the guide tube 13 near the probe 4. The first optical fiber 2 and the second optical fiber 3 enter the arc tube 15 from the guide tube 13, and are connected to the probe 4 after passing through the arc tube 15; one end of the arc tube 15 is positioned on the guide tube 13, and the other end is positioned on the probe 4.

[0046] Example 2

[0047] This embodiment provides a method for detecting the solution color using the solution color detection system in embodiment 1. The detection process is as follows: Figure 6-7 As shown, it includes the steps of:

[0048] 1) The white light source generates white light which is emitted into the solution to be measured after passing through the first optical fiber; and the second optical fiber guides the light which has passed through the solution to be measured to the color sensor.

[0049] 2) On the color sensor, the light guided back by the second optical fiber passes through the red, green and blue filters respectively, and then irradiates the light intensity sensor of the color sensor. The light intensity sensors behind each filter then convert the light intensity of the red, green and blue light into a 0-10KHz square wave signal; the signal frequency of the square wave is proportional to the light intensity of each RGB channel.

[0050] 3) After the microcontroller reads the data of each RGB channel of the color sensor, it converts the signal frequency of the square wave into an RGB value of 0-255 through the proportional factor.

[0051] 4) In order to reduce the influence of light intensity on color acquisition, the software inside the microcontroller first converts the RGB value into an ABC value representation method through a mathematical conversion formula; then the ABC value is compensated by the software to best restore the solution color; the compensated ABC value is then converted into an RGB value through a mathematical conversion formula by the software; after obtaining the final RGB value, it is stored in the register of the Modbus RTU.

[0052] 5) Read the RGB value to the host computer through the query command of the Modbus RTU communication protocol.

[0053] Since the sensitivity of the color sensor chip to light is slightly different when it leaves the factory, the solution color detection system needs to be calibrated before use. This step is called white balance calibration. The steps of white balance calibration are as follows: Place the probe in a dark room with clean water. Turn on the power of the detection system and the color sensor starts working; after the light passing through the colorless clean water hits the RGB channels of the color sensor, the color sensor is controlled by the microcontroller and outputs large pulses of the three channels R, G, and B in turn. The microcontroller uses the interrupt principle to obtain the pulse frequencies of the three channels R, G, and B, recorded as Ra, Ga, and Ba, in Hz, and then the microcontroller runs the white balance program to calculate the proportional factors Kr, Kg, and Kb.

[0054] Calculate the scale factor:

[0055] K r =255 / R a

[0056] K g =255 / G a

[0057] K b =255 / B a

[0058] The calculated proportional factors Kr, Kg, and Kb are stored in the EPROM of the microcontroller and can still be saved after power failure.

[0059] The specific steps to calculate the RGB value by using the proportional factor are as follows: Since the MCU does not obtain the direct 0-255 RGB value from the color sensor, but the pulse frequency of each channel, the proportional factor calculated above should be used to convert the pulse frequency into RGB value. Suppose that the pulse frequency of the three channels of R, G, and B is recorded as R when the detection system is working. d , G d , B d , unit: Hz.

[0060] Calculate RGB values:

[0061] Therefore, the corresponding RGB value can be obtained by multiplying the pulse frequency by the scale factor.

[0062] The mathematical conversion formula used for RGB-->ABC is:

[0063] Range R, G, B∈[0,255]

[0064] Ri=R / 255,

[0065] Gi=G / 255,

[0066] Bi=B / 255,

[0067] Cd=max(Ri,Gi,Bi),

[0068] Cx=min(Ri,Gi,Bi),

[0069] △=Cmax-Cmin, (Cmax=max(Ri,Gi,Bi), Cmin=min(Ri,Gi,Bi));

[0070] A (represents the type of color, such as red, yellow, etc.) calculation:

[0071]

[0072] B (representing the depth of the color) calculation:

[0073]

[0074] C (represents the brightness of the color) calculation:

[0075] C=C d

[0076] The specific steps of compensating the ABC value by software to achieve the best solution color are as follows, that is, compensating the ABC value obtained above:

[0077] A"=(A'+A2-A3)Mod 6,

[0078] A', B', C': The uncompensated values ​​calculated by the instrument when collecting RGB-->ABC during normal operation;

[0079] A”, B”, C”: are the values ​​after compensation.

[0080] During the first installation, the instrument collects data using the RGB-->ABC formula to calculate A3, B3, and C3; then similar colors are manually selected on the computer and A2 is calculated using the RGB-->ABC formula.

[0081] B" takes B' as reference. If the color depth is insufficient, it should be increased appropriately. If the depth is too great, it should be reduced appropriately.

[0082] C" takes C' as the reference color. If the brightness is insufficient, it should be increased appropriately. If the brightness is too high, it should be reduced appropriately.

[0083] The conversion formula used for ABC-->RGB is as follows (H value is color hue), that is, the above is converted.

[0084] A1=Amod 1

[0085] F=A-A1

[0086] α=C×(1-B)

[0087] β=C×(1-F×B)

[0088] X = C × (1-(1-F) × B)

[0089]

[0090] The above embodiments have described some details of the present invention, but they should not be understood as limitations of the present invention. Those skilled in the art may change, modify, replace and modify the present invention within the scope of the present invention without departing from the principles and purpose of the present invention.

Claims

1. A solution color detection system, characterized in that: It comprises a white light source (1), a first optical fiber (2), a second optical fiber (3), a probe (4), a color sensor (5) and a single-chip microcomputer, wherein the color sensor (5) is controlled by the single-chip microcomputer; One end of the first optical fiber (2) is arranged close to the white light source (1), so that the white light generated by the white light source (1) enters the first optical fiber (2); the other end of the first optical fiber (2) is connected to one end of the second optical fiber (3) by using a probe (4), and the other end of the second optical fiber (3) is connected to a color sensor (5), so that the light is guided to the color sensor (5); The end portion located on the same side of the first optical fiber (2) and the second optical fiber (3) is placed in a probe (4), so that the first optical fiber (2) and the second optical fiber (3) in the probe form an angle β; a radial through hole (6) is provided in the middle of the probe (4), and light transmission holes (7) for the first optical fiber and the second optical fiber are provided on the inner wall of the radial through hole (6); light emitted from the first optical fiber (2) enters the second optical fiber (3) after being reflected by the solution to be tested in the radial through hole (6); The color sensor (5) collects data of each RGB channel of the color of the solution to be tested, and outputs a square wave to a single chip microcomputer, which is connected to a host computer; the signal frequency of the square wave is proportional to the light intensity of each RGB channel data.

2. The solution color detection system according to claim 1, characterized in that: A light-transmitting tube (8) is arranged in the radial through hole (6), and the two end faces of the light-transmitting tube (8) are flush with the two side faces of the probe (4) housing. An annular positioning groove (9) is arranged on the inner wall of the radial through hole (6). The inner wall of the radial through hole (6) and the outer wall of the light-transmitting tube (8) are sealed by a sealing ring (10) arranged in the annular positioning groove (9). The first optical fiber (2) and the second optical fiber (3) are against the outer wall of the light-transmitting tube (8), and the light emitted from the first optical fiber (2) enters the second optical fiber (3) after being reflected by the measured solution in the light-transmitting tube (8).

3. The solution color detection system according to claim 2, characterized in that: There are two sealing rings (10), and the light transmission holes of the first optical fiber (2) and the second optical fiber (3) are located between the two sealing rings.

4. The solution color detection system according to any one of claims 1 to 3, characterized in that: The white light source (1) is placed in a light shield (11), and the first optical fiber (2) is fixedly connected to the light shield (11); the white light source (1) and the light shield (11) are mounted on an inner wall on one side of an inner cavity of a base (12), and the color sensor (5) is mounted on an inner wall on the other side of the inner cavity of the base (12).

5. The solution color detection system according to claim 4, characterized in that: The white light source (1) is driven by a constant current drive circuit. The single-chip microcomputer, the constant current drive circuit, the single-chip microcomputer power supply circuit and the communication chip used for the single-chip microcomputer to communicate with the host computer are placed on an integrated circuit board (14). The single-chip microcomputer power supply circuit is used to supply power to the single-chip microcomputer. The integrated circuit board (14) is installed in the inner cavity of the base (12).

6. The solution color detection system according to claim 4, characterized in that: The top of the base (12) is open, and the bottom is connected to a guide tube (13) communicating with its inner cavity. The first optical fiber (2) and the second optical fiber (3) are guided to the probe (4) via the guide tube (13).

7. The solution color detection system according to claim 6, characterized in that: Two arc tubes (15) are symmetrically arranged outside the guide tube (13) near the probe (4); the first optical fiber (2) and the second optical fiber (3) enter the arc tubes (15) from the guide tube (13), pass through the arc tubes (15), and are connected to the probe (4); one end of the arc tube (15) is positioned on the guide tube (13), and the other end is positioned on the probe (4).

8. The solution color detection system according to any one of claims 1 to 3, characterized in that: The angle β is 85-95 degrees; the white light source (1) is a white light LED light source; and the first optical fiber (2) and the second optical fiber (3) are both single-core optical fibers.

9. A detection method of a solution color detection system, using the solution color detection system according to any one of claims 1 to 8, characterized in that: Includes steps: 1) The white light source generates white light which is emitted into the solution to be measured after passing through the first optical fiber; after being reflected by the solution to be measured, the light enters the second optical fiber, and then the second optical fiber guides the light to the color sensor; 2) On the color sensor, the light guided back by the second optical fiber passes through the red, green and blue filters respectively, and then shines on the light intensity sensor of the color sensor. The light intensity sensors behind the respective filters then convert the light intensity of the red, green and blue light into a 0-10KHz square wave signal respectively; 3) After the single chip microcomputer reads the data of each RGB channel of the color sensor, it converts the signal frequency of the square wave into RGB values ​​of 0-255 through the proportional factor; 4) The software inside the MCU first converts the RGB value into an ABC value representation method through a mathematical conversion formula; then the ABC value is compensated by the software to restore the color of the solution; then the compensated ABC value is converted into an RGB value through a mathematical conversion formula by the software; after obtaining the final RGB value, the host computer stores it in the register of the Modbus RTU; 5) Read the RGB value to the host computer through the query command of the Modbus RTU communication protocol.

10. The detection method of the solution color detection system according to claim 9, characterized in that: The solution color detection system is subjected to white balance calibration before use.

Citation Information

Patent Citations

  • Portable multipurpose optical fiber colorimeter

    CN102141441A

  • Color identification system and method

    CN103512658A

  • Light pressure sensor for detecting multi-component gas and detection method thereof

    CN103792201A

  • Quantitative analysis method of solution chromogenic reaction and detector thereof

    CN104655572A

  • Traffic sign detection and recognition method based on a self-built neural network

    CN108304785A