One Color Light Absorbance Measurement Device by Fuzzy Theory

In the chemical analysis, a UV-spectrophotometer is used for measuring the light absorbance of solution. This device measures the intensity of light transmitting the solution by a light detector and then calculates the light absorbance by Beer’s law. The light absorbance is utilized for calculating the concentration of solution. However, the UVspectrophotometer is very expensive. To make the experiment in a chemical class, the device must be used by numbers of students. Therefore, the device is not enough for all students in the class. For this reason, we develop a handmade spectrophotometer to support the science faculty. In the present, there are many kinds of measurement devices. Those measurement devices have a detector for measuring the target. However, the same type of the detector doesn’t give the same value of output in some cases. Therefore, the fuzzy theory is used for solving this problem. The fuzzy theory can amplify the linear output of the developed device to the target linear data by many points of output between the target output and the developed device output. The values between each point are averaged by 2 nearly side points. Therefore, the proposed device uses this method for amplifying the light absorbance output of the proposed device to the light absorbance of the commercial spectrophotometer output. The light absorbance after amplifying has coefficient of determination comparing with the light absorbance commercial spectrophotometer more than 0.99XX. It means that this method can be used to amplify the light absorbance for chemical classrooms.


Introduction
In the present, there are not methods to measure the concentration of solution directly.Therefore, to measure the concentration of solution, the measurement must apply other methods and then converts it to the concentration.For example, density of solution [1], light reflection [2] or light absorption [3].
In the analysis chemical room, the chemist uses a UVspectrophotometer to measure the concentration of the solution.The UV-spectrophotometer measures the light absorption of solution by monochromatic light following Beer's law.To create the monochromatic light, the UVspectrophotometer uses a prism or grating to divide the monochromatic light from the visible light.Furthermore, to make the efficient monochromatic light, the measurement requires enough space for diffracting and must be performed in the dark.
The spectrophotometer in [4] combines a CD as diffraction grid and a 60 watt bulb as a light source to create the monochromatic light.However, it needs large area for scattering the monochromatic light.It is not suitable for chemical class and is too bulky for using outside.The low cost spectrophotometer in [5] employs many LEDs as the monochromatic light.The shape of the graph result looks like a commercial spectrophotometer result.However, the result is quite different from the commercial result.The spectrophotometer in [6] uses the coefficient of determination to check the efficiency of the device.Although, the coefficient of determination is near to 1, the light absorbance is too different from the commercial spectrophotometer result.The spectrophotometer in [7] uses the visible light as a light source.When the visible light transmits the solution, the solution absorbs many colors of light in the visible light.This spectrophotometer uses grating to diffract the transmitted light and then measures remained color of transmitted light by photodiode array.However, the photodiode array cannot be bought in general electronic store and it is expensive.The spectrophotometer in [8] utilizes an OP-amp to amplify voltage from a detector.The normal LED brightness is not enough for observing the different of each light absorbance.Therefore, the OP-amp amplifies the voltage from the detector for observing the light absorbance.However, the error increases in proportion of the gain of the OP-amp.The output voltage has too much error at high gain.
In this paper, we try to develop a portable spectrophotometer realizing the output close to a commercial spectrophotometer.The proposed device measures the solution by using white light of the power RGB LED as a light source and color sensor Si diode as a detector.The power LED has high brightness enough for observing the different of the light absorbance.The color sensor has 3 sensors, such as red, blue and green sensors, which responds with each color of light differently.Therefore, it doesn't require the large space or the diffracting the light.Therefore, the proposed device is smaller than the previous spectrophotometer.The experiment uses the best response color sensor as the main detector for amplification.The calculation utilizes the microcontroller PIC16F877A.It can calculate the light absorbance by beer's law and amplify the output to the commercial spectrophotometer output.The amplification by fuzzy theory utilizes the light absorbance between the commercial spectrophotometer and the light absorbance of the proposed device only.In some cases, the efficiency is low, because the match of the color light and the color of light is not best.The amplification increases the low efficiency (coefficient of determination) to more than 99% (0.99XX of the coefficient of determination) compared with the commercial spectrophotometer.

Principle of analysis 2.1 Light absorbance
When the light goes through the solution, the solution absorbs, reflects and scatters the light showing in Fig. 1.The light, which is transmitted or reflected, is the solution color.When the solution is concentrated, the value of transmission of light will decrease.On the other hand, the reflection and scattering will increase.Therefore, the concentration of solution directs variation with the light absorption.The light absorbance (A) is calculated from minus logarithm of the transmittance (T) in (1) [4,6,8].The transmittance in (2) is ration between the incident light intensity (  0 ) and transmitted light intensity (I).The light absorbance is calculated by combining equation ( 1) and ( 2) into (3).

Beer-Lambert Law
Beer-Lambert law or Beer's law, this method explains the relation between the light absorbance and the concentration of solution.The light absorbance directs variation with the concentration of solution (c) and length of solution (l), which light transmits, in equation ( 4) [6,8].The absorbance coefficient (ε) of the color of solution is constant value between the light color and the solution color.

Coefficient of determination
The coefficient of determination shows relation value of the statistic model [9].The equation is shown in equation ( 5

Calibration curve
Calibration curve or standard curve is method determining the concentration of the solution.It is plotted by concentration and another signal shown in fig. 2. Another signal is indirect measurement signal for calculating the concentration.This research is light absorbance.The calibration curve is always linear.

Linear regression
Linear regression is calculated from the calibration curve.It is common linear equation showing in fig. 2. Furthermore, it can expect the dependent variable y or the explanatory variable x.The equation is shown in (6).It uses to calculate the concentration (X) from the light absorbance(Y).

Circuit configuration
The circuit configuration is shown in fig. 3 amplified light absorbance.

Calculation
The calculation of the microcontroller is following fig.4. First, the microcontroller receives the voltage dropped at sensor resistors.Second, the microcontroller converts the voltage 0-5V to digital value 0-1023 (analog to digital).After that, the digital value is multiplied by 0.498 to convert to voltage value.After that, the voltage is calculated the light absorbance.
(a) Light absorbance calculation The light absorbance is calculated by (3).However, the light intensity value is not in the electric circuit.Therefore, the light intensity variable in the equation has to be changed to the voltage [8].Moreover, the measurement of incident light and the transmitted light must have 2 light detectors.Therefore, the measurement method is changed.The incident light measurement is replaced to the light transmitting solvent measurement which their concentration is 0. The device measures the light transmitting the solvent or solution.Therefore, the detector is utilized only 1.Moreover, the voltage of incident light must be changed to the voltage when the light transmits the solvent shown in (7).The   can memorize by pushing   button.This button utilizes the interrupt function.It can be used in every time.Furthermore, to remove the noise, the calculation is decreased by voltage when there are not light falling to the detector (   ).The equation is shown in (8).After calculation of the light absorbance, the original light absorbance of the proposed device is gotten.Next is to amplify the original light absorbance to the commercial spectrophotometer value.

𝐴 = − log
(b) Amplification The amplification increases or decreases the original light absorbance of the proposed device to the light absorbance of the commercial spectrophotometer by fuzzy theory.The equation is shown in (9) [10].The necessary is different between the original data (light absorbance of proposed device) and the reference data (light absorbance of the commercial spectrophotometer) of many points (concentrations).For example, the original data is input; the reference data is target and   is different between original data and reference data of many concentration of solution shown in table 1.Next is to create the membership function.
To calculate the data between each point by linear line, the membership function is triangular fuzzy set shown in fig. 5.Each function has ratio (  ).The highest value is 1 at the peak of function.Therefore, when the point is increased, the ratio of the different at the lower function point will decrease and the ratio of the different at higher function will increase.Therefore, the amplification can amplify the data between each point to linear.The result of the sample data amplification is shown in fig 6.

Experiment 4.1 Experimental setup
The experimental setup prepares the colors (red, green and blue) of solution in many concentrations by the best response wavelength of commercial spectrophotometer.The concentrations are prepared between light absorbance from 0 to 2. Light absorbance of 0 is solvent.The spectrophotometer can measure the light absorbance until 2. After that, those solutions are measured and collected the light absorbance of the proposed device by white light as light source and best response sensor.The light absorbance of the proposed device and light absorbance of the commercial spectrophotometer are entered into the program in the microcontroller for creating the fuzzy function.The first function is a function of the solvent and the last function is the light absorbance of 2. The amplification function amplifies the light absorbance of the proposed device from 0 until the light absorbance of commercial spectrophotometer of 2. If the light absorbance of the proposed device is over that light absorbance, the light absorbance is shown 2 same with the commercial spectrophotometer.
(a) Red solution The red solution is prepared by 490nm of wavelength of the commercial spectrophotometer.There are 9 concentrations.The proposed device uses the blue sensor which has the best response for measurement.The prepared data is shown in table 2. Those data are created the fuzzy function shown in fig. 7.This function amplifies the light absorbance of the proposed device from 0 to 0.726.
(b) Green solution The green solution is prepared by 440nm of wavelength of the commercial spectrophotometer.There are 11 concentrations.The proposed device uses the blue sensor which has the best response for measurement same with the red solution.The prepared data is shown in table 3.Those data are created the fuzzy function shown in fig.8.This function amplifies the light absorbance of the proposed device from 0 to 0.78.
(b) Blue solution The blue solution is prepares by 590 nm of the wavelength of the commercial spectrophotometer.There are 12 concentrations.The proposed device uses the green sensor which has the best response for measurement.The prepared data is shown in table 4. Those data are created the fuzzy function shown in fig.9.This function amplifies the light absorbance of the proposed device from 0 to 0.733.To check the efficiency of the proposed device comparing with the commercial spectrophotometer, the coefficient of determination is utilized.The light absorbance of the commercial spectrophotometer is utilizes as the ideal reference data.Therefore, the coefficient of determination of the commercial spectrophotometer is 1.To replace the commercial spectrophotometer in science faculty, the requirement from professor in the science faculty is the efficiency of the proposed device must more than 99%.It means the coefficient of determination of the proposed device must be more than 0.99xx.
(a) Red solution The result of red solution is shown in table 5.The result is plotted in fig. 10 for comparison.The coefficient of determination of the original light absorbance is 0.9948 and that of the amplified light absorbance is 0.9948.Therefore, in the case of the red solution, the amplification by fuzzy theory is not decrease the efficiency of the system.
(b) Green solution The result of green solution is shown in table 6.The result is plotted in fig.11 for comparison.The coefficient of determination of the original light absorbance is 0.9871.This result shows that the efficiency of original proposed device in green solution case is not enough for chemical education.However, the amplified light absorbance is 0.9974.It shows that the amplification by fuzzy theory increases the efficiency of the system in the case of green solution.
(c) Blue solution The result of blue solution is shown in table 7. The result is plotted in fig.12 for comparison.The coefficient of determination of the original light absorbance is 0.9314.This result shows that the efficiency of original proposed device in green solution case is not enough for chemical education.However, the amplified light absorbance is 0.9996.It shows that in the case of the blue solution, the amplification by fuzzy theory increases the efficiency of the system.

Conclusion
One color light absorbance measurement device by fuzzy theory has been proposed in this research.It can calculate the light absorbance and amplify the light absorbance near the light absorbance of the commercial spectrophotometer.It utilizes the light absorbance of the proposed device and the light absorbance of the commercial spectrophotometer only.All parts in the proposed device are less than 3000 JPY.In this piece, the science faculty can purchase it for all students.
In some cases of the original light absorbance of the proposed device, the coefficient of determination is less than 0.99xx.This result shows that the efficiency of device is not enough for chemical education.When those results pass the amplification function, the coefficient of determination is increased more than 0.99xx.Therefore, when the light absorbance passes the amplification function, the efficiency of the proposed device is not decreased only, but also the efficiency of the proposed device is increased.Moreover, the coefficient of determination of the amplified light absorbance of all results is more than 0.99XX.Therefore, the commercial spectrophotometer can be replaced by the proposed device in the classroom.

Future study
This research develops the light absorbance measurement device, which can amplify the one color of solution only.It cannot amplify the other color in the same amplification.Therefore, this proposed device can measure the one color of solution only.It doesn't have efficiency to measure the other color of solution enough.However, this device uses the white light as a light source.In general, it should use the light color which the solution can absorb best.
From the result of this research, it found that 3 sensors give the different value of each color of solution.Therefore, we are going to use the fuzzy theory 2 dimension membership functions by 2 sensors (red-green, red-blue or green-blue) or 3 dimension membership functions by 3 sensors (red green and blue) for calculating the color of solution.
).It is utilized for checking the relation between the light absorbance and concentration of solution.The range is between [0, 1].The ideal coefficient of determination is 1 shown in fig 2.
. The proposed device consists of the measurement part, calculation part and display.The voltage source is battery 9V.The measurement part consists of the light source and light detector.The light source is power RGB LED.It gives the brightness for measuring the solution.The light detector is RGB color sensor Si photodiode.It has 3 sensors which respond to each color light differently.Therefore, the measurement employs the best response sensor for calculation and easy observation of different of each result.The calculation part is PIC16F877A.It calculates the light absorbance and then amplifies it to the commercial spectrophotometer light absorbance.This microcontroller has to use the 5V source.Therefore, the regulator 7805 is used to convert 9V power source to 5V for microcontroller and display.The display is LCD 16x2 characters.It shows the result of light absorbance of proposed device andPower

Fig. 10 . 4 . 2
Fig. 10.Comparison of red solution output between the commercial spectrophotometer and the proposed device

Fig. 12 .
Fig. 12.Comparison of blue solution output between the commercial spectrophotometer and the proposed device

Table 1 .
Sample data

Table 2 .
Light absorbance of red solution for creating the fuzzy function Fig. 9. Fuzzy function of blue solution.

Table 5 .
Light absorbance output of red solution between

Table 8 .
Comparison of Coefficient of determination