{'fraction_non_alphanumeric': 0.03487322556822844, 'fraction_numerical': 0.01616476573397883, 'mean_word_length': 4.848368522072937, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Low-cost imaging spectrophotometer system for absorbance measurement

The spectrophotometer system is widely used for testing the concentration of chemical elements in a liquid because it is sensitive and non-destructive. However, modern spectroscopic systems are expensive, and they have complex instrumentation. This study was to develop a low-cost imaging spectrophotometer system, consisting of a halogen lamp as the visible light source, CMOS camera as the detector, and monochromatic filters with a wavelength outputs of 645.53 nm (red), 510.04 nm (green), 488.24 nm (blue), and 475.02 nm (violet). In this research, we tested 3 types of sugar solutions (i.e. glucose, fructose, and sucrose) with varied concentrations (0%, 10 %, 20 %, 30 %, and 40% respectively). Sample images were captured using the camera to produce 8-bit digital images. The intensity of light transmission after passing through the sugar solution sample was measured based on the grey values in the sample images. Differences in sugar concentrations can be observed by measuring absorbance. Absorbance measuring showed that increase of absorbance is directly related to an increase of sugar solution concentration. Maximum absorbance for all types of sugar is obtained through the use of violet light (475.02 nm). In addition, there is a linear relationship between sugar concentration and absorbance, where the coefficient of determination (R2) is 0.99. The slope difference of the linear absorbance graph between the three types of sugar samples shows differences in radiation absorption characteristics.


Introduction
In the present day, spectrophotometry is known as a good method for quantitative measurement in physics and chemistry [1]. Spectrophotometry is a technique that utilizes the interaction of electromagnetic waves in visible regions with atoms or molecules to obtain the spectrum used as the sampling characteristic information [2]. The obstacle now is that laboratory research still has problems due to limited financial resources [3]. One of the financial obstacles in research is the expense of standard sample analysis tools which limits which school laboratories can buy it.
For this reason, there is a desire to design simple low-cost spectrophotometer instruments that provide reliable qualitative and quantitative chemical information. Portable spectrophotometers have been widely developed and described in various studies [4][5][6][7][8][9][10][11][12]. Advances in optical, microcontroller, electronic, and imaging technologies can provide technical characteristics and specifications comparable to the commercial instruments currently in use. Some researchers have used light emitting diode (LED) and flashlights as radiation sources [4]. Others used dispersive elements using compact disc (CD) [5], digital video disc (DVD) [6], commercial diffraction gratings [7] and prisms.
Detectors used include a webcam [8], LDR [9], a digital camera [10,11], and a smartphone camera [12]. The use of the camera as a detector produces data in the form of digital images that describe the value of the intensity distribution of light expressed in the greyscale. Digital image data can be easily stored, manipulated, and displayed on the computer. The use of a standard digital camera combined with image analysis can also be used as a rapid, cheap, portable, and non-destructive color spectrum analyzer [11].
Research in this article will develop a low-cost imaging spectrometer system using a halogen lamp as a light source, a filter as the wavelength selector, a monochrome CMOS camera as a detector, and a control using a microcontroller. The analysis used image analysis to find out the absorbance information of the molecule related to the change of the concentration of the solution.
The sample solutions were glucose, sucrose, and fructose sugar. Sugar is an important organic compound due to its chemical properties and physiological functions. In the medical field, analysis of sugar concentrations in body fluids is essential for the diagnosis of disease and biological processes [13] . . In the field of food and beverage industries, a method of measuring the sugar concentration contained in food or beverage it is also needed [14,15]. Spectrophotometers use ultraviolet and visible light. Visible light is part of the spectrum of electromagnetic radiation. If the material is exposed to electromagnetic radiation or photons, radiation can be absorbed, transmitted, reflected, scattered, or subjected to fluorescence [16]. The radiation source used is visible light with a wavelength range of 400 -750 nm [16]. In spectrophotometry, one thing which can be measured is transmittance (T). Transmittance is the ratio of the intensity of light transmitted (It) after interacting with matter to the intensity of incident light (I0) [16]. The relation between T, It, and I0 is shown as Eq. 1.
The molecular absorption is characterized by absorbance (A). Absorbance can be measured from transmittance according to Lambert-Beer Law (Eq. 2 and 3).
If monochromatic light passes through a solution of concentration (C) with the length of the optical path (L), then the absorbance can be determined by Eq. 4. The absorption characteristics of matter can be expressed in the absorptivity constant (a): = (4)

Samples and Reagents
The samples used were 3 types of sugar solutions, namely glucose, sucrose, and fructose. Each type of sugar was made in concentrations of 0%, 10%, 20%, 30%, and 40%. The concentration of sugar solution was expressed in a percent of mass fraction, which was the ratio of mass between the sugar and the solution. Then each sugar solution sample was given 2 drops of Fehling reagents solution, and then burned in the test tube for 2 minutes until it formed a brick-red precipitate. This reaction indicates the presence of reducing sugars (monosaccharide and disaccharide).

Wavelength Filter Output Measurement
The wavelength of filter output was measured using a standard spectrometer at the Atomic Physics Laboratory, Physics Department, Universitas Gadjah Mada. The results obtained were in the spectrum of transmitted wavelengths. The wavelength of filter output was measured based on the value of the wavelength when there was a peak intensity and the error was the value of FWHM (full width at half maximum) of the spectrum band produced.

Spectrophotometer Design and Experimental Scheme
The visible light spectrometer system was designed to have dimensions of 42 cmP x 28 cmL x 12 cmT. The spectrometer was arranged in a closed suitcase and covered with a box made of PVC material so that the system was light-proof. The core component of the system consisted of a refractor, a polychromatic light source using a 35 W halogen lamp, a collimator slit for parallel light, a monochromator filter (red, green, blue, and violet), a holder sample, and an 8-bit monochrome CMOS camera as a detector. For a voltage source, the system used a power supply with an input voltage of 220 V and an output voltage of 12 V. In addition, the intensity of the source light could be set using a rotary switch.

Figure 1. Spectrophotometer Design and Experimental Scheme
A polychromatic beam originating from the halogen lamp passed through the collimator slit to form a parallel beam, and then passed through the filter so that it became a monochromatic beam. The monochromatic beam passed through the sample, and the transmission beam was recorded using a camera so that the data was obtained in the form of images. These images were then processed to obtain the value of the transmission light intensity that was used to determine the absorbance. The experimental scheme can be seen in Fig. 1. The area in the red box represents the ROI that will be measured in terms of its greyscale.

Image Acquisition and Absorbance Measurement
The image was taken in the form of 8-bit digital images of the light interaction with the sample sugar solution. The image was captured using Video Grabber software. The captured image was a dark image (D) (beam source off), gain image (G) (source on and without sample), and object image (O) (source on and with sample). Each image was captured in 32 frames and then averaged. After getting the image, the next step was to do image processing using Image-J.
We measured the greyscale of the Region of Interest (ROI) to get the value of the transmission light intensity. D gave dark or background intensity when the source was off (ID), G gave the intensity of the incoming light (I0) and O gave the intensity of the transmitted light after it passed through the object (It). For more details, we can see Fig. 2. Absorbance was measured from the information ID, I0, and It obtained

Wavelength of Filter Output
The wavelength (λ) of the filter output was measured using a commercial spectrometer at the Atomic Physical Laboratory, Universitas Gadjah Mada. The wavelength was measured by observing the peak on the intensity distribution of the wavelength which is shown in Fig. 3. Fig. 4 shows that the filter used is a band pass filter. The use of band pass filters that can select a certain wavelength meets the criteria for use on a spectrometer system [17]. Filter-based spectrometers use the principle of absorption or interference to pass the selected wavelength range. When the beam passes through the filter, some of its spectral components are blocked through the absorption or interference process, while the desired spectral element is transmitted [18].
Obtaining wavelength and bandwidth values required Gaussian graph fitting. The result of the fitting for measurement of wavelength and bandwidth is shown in Table. 1. The bandwidth value varies with the largest value being 33.26 nm found in the red filter. When observed from the bandwidth values, the filter used is an absorption filter with effective bandwidth ranging from 30 nm to 250 nm [2]. The absorption filter is cheaper and widely used for the selection of visible light wavelength bands. In addition, this filter also has the advantage of greater thermal stability.

Absorbance of Sugar
The absorbance shows the absorption that occurs due to the interaction between the photon radiation and the sugar molecule. The absorbance of sugar is shown in Table 2. Absorbance data for all types of sugar solution samples showed that the highest absorption occurred in the violet wavelength (475.02 nm). Physically, this shows that the energy of photons that interact with many sugar samples is the energy of radiation in the violet wavelength range. The effective wavelength to see the sugar concentration in liquid is also in the area of violet light (about 420 nm) [16]. The energy transition occurring for molecules with highly sensitive C-H, O-H, and N-H chemical bonds was detected by wavelengths in the UV-violet range [14]. Sugar molecules of glucose, sucrose, and fructose have chemical bonds C-H, O-H, C-C, and C-O [14].
After it was known that the highest absorbance of sugar solution occurs in light with the wavelength of the violet area, this information was further analyzed by looking at the linearity trend of absorbance to the concentration increase on each sample of different sugar solution. Theoretically absorbance is linear to concentration (Eq. 4). The slope analysis on the linear graph (Fig. 4) shows the characteristic of each sugar sample [19].   Fig. 4 shows a fairly good linearity (R² = 0.99) for all types of sugar solution samples. Based on he linear graphs, the equation relationship between absorbance with concentrations, Aglucose = 0.169C + 0.036, Afructose = 0.074C + 0.036, Asucrose = 0.149C + 0.036, can be obtained. From these analyses, it is seen that the absorbance slope for glucose is highest, followed by sucrose, and the lowest is fructose [19,20]. Theoretically, we know A = aLC so that if the length of the optical path (L) is constant (in this study it is set 1 cm), then the slope shows the value of the absorptivity constant (a) which is the characteristic of the sample solution. These absorptivity constants are the distinguishing characteristics of molecular absorption from the glucose, fructose, and sucrose samples.