A low-cost absorbance measurement device using microcontroller

Objectives: To design a low-cost absorbance measurement device using a microcontroller that can be used for student’s learning. Methods/Statistical analysis: The setup device is designed based upon Beer-Lambert Law with some LEDs through various sample solutions along with LDR at a different range of wavelength and the results are shown on a 16x2 LCD by use of a PIC16F877a microcontroller. The results are also compared with the standard colorimetric method. Findings: The setup device able to measure the absorbance of different colors of sample solutions at a wide range of wavelength (400-700nm) and measured by utilizing different LEDs to the transmitter end and an LDR at the receiver end. The proposed experimental device’s performance was compared with the standard colorimeter for efficiency check. The efficiency of the setup device is near to the colorimeter of more than 95%.Novelty/Applications: For educational purpose, the proposed setup device is well affordable due to low cost (US$10.98) and easy to maintain because of compact size and data acquisition directly through microcontroller.


Introduction
A commercial colorimeter instrument commonly includes interference or absorbance optical filters, prisms or diffraction grids as radiation dispersers. To improve chemical education; it is hard for the personnel to give the device to all the understudies (1) . Henceforth, understudies stand by to run tests for the whole class. To fulfill the understudy's necessities, a survey has been done about the light absorbance devices. For example in (2) a 60-watt bulb is used as a light source and a CD is used as a diffraction lattice to make the monochromatic light that changes a wavelength to measure the color of the sample solution. In this, Compact Disc is used as a versatile screen to obtain a total spectrum containing a slit which acts as a monochromator for producing light of single color. However, it needs a huge area for dispersing the monochromatic light. It isn't reasonable for chemical class and is too bulky for utilizing outside. The outcomes indicate the coefficient of assurance of light absorbance differentiates with the commercial spectrophotometer and the linear regression to calculate the unknown https://www.indjst.org/ concentration of given sample liquid. The viability of the proposed setup device is exhibited through the experiments (3) .
In (4) , for the light source, a Green LED with a suitable emission wavelength was chosen to coordinate the analytics used for the activities and the detection range of the Light-dependent resistor (LDR). The setup box depends upon the batteries and multi-meter. Signal conditioning (5) consists of a programmable gain amplifier (PGA) whose gain is naturally adjusted to its input voltage level to minimize errors that are especially important when solution absorbance is high.
As per (6) , A TCS230 chip from Texas Advanced Optoelectronic Solutions (TAOS) is utilized as the photo-detector and the output wavelength scaling sensor chip is used in the proposed design. The monochromatic light can be replaced with RGB LED 3 watt is used (7) as a light source to control the different wavelength and the microcontroller (8) is used for calculating the light absorbance. In (9) , Utilize a single light source (an LED), a light-dependent resistor (LDR) as a detector, and a simple amplifier/buffer. The single LED light is not sufficient to notice the distinction of each light absorbance and the only OP-amp can't amplify the voltage properly from the detector for observing the light absorbance. When there are various detectors, the calculation gets the information from various detectors and analysis the result from each detector. Therefore, the error will decrease. The calculation is PIC16F877A microcontroller is used generally for controlling the device (10) . The LED intensity is small outside of the 420−660 nm range. By using LEDs with different emission spectra, absorbance values could be measured at wavelengths outside of the 420−660 nm range. (11) The device comprises an optical mechanism, control circuit with a photo detector array. In (12) , the device is developed by utilizing a light-emitting diode (LED), a photodiode detector, LEGO blocks, and a slide-mounted diffraction grating with optical elements (including a lens). In (13) , for circuit placement, two boxes are used where one box is used for Arduino placement while the second box is used for the light source, test tube holder, and photodiode as a detector. Hence, it requires a large area as well as it is costly for students. (14) The significant concern is the cost when planning and executing an ease device for the understudies. (15) The electronics field is an interesting concern among innovation designers. (16) The microcontroller is a fundamental part of automated devices, where it controls and minimizes manual activity.In (17)(18)(19) , utilize Arduino as a microcontroller (µc) which is costly as compared to the PIC microcontroller.
In the present work, a low-cost absorbance measurement device is designed by using a PIC16F877a microcontroller that can be used for student's learning. In this, the intensity of light transmitted through a given solution is placed between the light source (LED) and the detector (LDR) at a different range of wavelengths (400-700nm) and the result will be displayed on 16x2 LCD.

Principle analysis
The setup device works by transmitting a light beam through a sample solution to measure the light intensity of a given solution. The setup device is made with two instruments: a transmitter and a receiver. A transmitter is used for producing light of any wavelength, while the receiver is used for measuring the amount of light that passes through the sample solution and delivers a voltage signal to the display. The intensity of light before passing the solution is denoted by I0, measures the number of photons per second and the light is passed through the blank solution is denoted by I. The other important factors are Absorbance (A) and Transmittance (T). The absorption and transmittance relation is: Here, Transmittance = 1/I 0 I = after passing light intensity via solution I 0 = before passing light intensity via solution

Block diagram/Architecture
The block diagram of the low-cost setup device is shown in [ Figure 1]. It comprises In the setup device, an LED of different wavelengths (Blue, Green, Yellow, Orange, Red, and IR) is used as a transmitter and an LDR is used as a receiver.
https://www.indjst.org/ In this, to get a better result analysis signal conditioning circuit is used by utilizing LM358N OP-AMP. This is further interfaced to the PIC16F877a microcontroller which gives the digital output that is displayed on the 16x2 display unit. The proposed experimental setup device is used to measure the absorbance of the sample. Here, the different colors of solutions are used to illustrate the performance of the proposed setup device. The solutions are refined at the wavelength from 400-700 nm.

Circuit analysis
The circuit configuration of this setup device is illustrated in [ Figure 2]. This configuration shows all the pin connections of components. There are two main parts as Measurement and display part. The first part is the measurement part. It consists of a light source (LED), light detector (LDR), and PIC16F877a Microcontroller. Solutions are having a specific light absorbance coefficient that is followed by Beer's law. For deciding the light source and light detector, it must be known the properties of the color of a solution because each color of solution absorbs each color of light in different value. In this configuration LED is used as a light source and LDR is used as a light detector.
In the present work, PIC16F877a is used to take the input analog signal and give the output digital signal for display. The PIC microcontroller is elaborated with embedded C-language programming. PIC16F877a microcontroller is easy to program (200 nanosecond instruction executions) that consist 10-bit Analog-to-Digital (A/D) converter along with 256 bytes of EEPROM data memory. The PIC16f877a microcontroller consists of five ports; port A, B, C, D, and E. Signal conditioning circuit is connected to port A by utilizing LM358N op-amp. In the setup device, the transmitter is controlled by the different switches that are connected to port C (C 4 and C 5 ) and port D (D 2 , D 3, D 4, and D 5 ). As a transmitter, six LEDs are used which are connected to port C (C 0, C 1, C 2, C 3 ) and port D (D 0, D 1 ), and the 16x2 LCD is connected to port B.
[ Figure 3] illustrates the experimental setup device. In the experimental setup device, when a switch is pressed the corresponding LED will be glow for a defined time. While LED is on, LDR receives the light after absorbance through the given sample solution that is placed between the transmitter (LED) and the receiver (LDR). The output of LDR is given to the ADC pin of the PIC controller. PIC has 10 bit ADC so when the input of ADC changes from 0 to 5v, the ADC value varies from 0-1023. With the help of embedded C language ADC value converted into voltages. Here, the transmitted light is I 0 and the received light after absorption is I. Therefore absorbance is calculated as A=-log (I/I 0 ) and its digital data is displayed on 16x2 LCD.
The second part is the display part that consists of a 16x2 LCD. An LCD (Liquid Crystal Display) is a very basic electronic component that uses liquid crystal to produce a visible image and is very commonly used in various electronic devices and circuits. As long as the switch is pressed respected LED will be ON and real-time absorbance will be displayed. https://www.indjst.org/

Results and Discussion
For reference, solutions are analyzed by the commercial digital colorimeter. Here, five different colors of the solution are used. All solution is prepared by different concentration. The comparison tables and graph of the obtained results from the proposed setup device and the digital colorimeter are shown in [Tables 1, 2, 3, 4 and 5] and [Figures 4,5,6,7 and 8]. In Figure 5, the graph shows that the light absorbance at (595-630nm) can't be absorbed or can be absorbed a little bit. In the setup device, the wavelength at (595-630nm) is mixed with the yellow color so the result shows that the orange solution can't absorb yellow light.   Table 6] shows the cost of the proposed setup device. [ Table 7] illustrates the cost comparison with other devices. Hence, the proposed setup device is a low-cost device as compare to the other device.  (4) 3140 JPY A Low Cost LED Based Spectrometer (6) US$ 20 Design of a Hand-Made Light Absorbance Measurement Device for Chemical Education (7) 3700JPY Color Light Sensor Device for Light Absorbance Measurement Device (10) 3000 JPN A Low-Cost Quantitative Absorption Spectrophotometer (12) US$ 25 Development of a low-cost colorimeter-like for undergraduate classes using microcontroller board and RGB LED (14) US$ 27.20 Portable low-cost open-source wireless spectrophotometer for fast and reliable Measurements (17) € 225 Development of a Low-Cost UV-Vis Spectrophotometer and Its Application for the Detection of Mercuric Ions Assisted by Chemosensors (18) US$ 86 (15,19) used Arduino as a controller Cost will be high

Conclusion
In the Project, the main objective of measuring the absorbance of given sample solutions at a different wavelength is achieved, and its result is displayed on a 16x2 LCD by utilizing a PIC Microcontroller. The proposed setup device was successfully applied to the determination of the absorption value at a different range of wavelengths (400-700 nm). The LDR's resistance is used as a detector can vary from 100 Ω in the sunlight to 10MΩ in darkness. The variation of resistance is converted into a voltage variation and given to the ADC input. Since the PIC16F877A has the 10bit ADC, 4.88mV is the minimum voltage which helps to find the absorbance value at a different wavelength. The results show that the value of absorbance obtained by experimentation matches closely to those obtained with the use of a colorimeter. It illustrates the efficiency of the setup device is near to the colorimeter of more than 95%. Hence, the proposed setup device can be used for educational purposes due to low cost and portable size.