Apparatus development for detecting the freshness of chicken meat using TCS 3200, PH - 98108, and MOS gas sensors

Meat can be determined as a muscle that has entered a rigour mortis state. Due to its high nutritional content, the quality of chicken meat quickly decreased. The changes in meat colour, pH, and metabolite gas production, especially ammonia and hydrogen sulfide, are the typical indicators for meat degradation. This research aimed to design and build an apparatus to evaluate the freshness of the chicken meat displayed for sale or storage. In the following study, four different sensors, including TCS 3200 colour sensor, Metal Oxide Semiconductor (MOS) gas sensors (MQ 136, MQ 137), and PH - 98108 sensors, were assembled with the aid of a microcontroller and personal computer to become a meat freshness detection apparatus. After being calibrated, the apparatus was then used to evaluate the freshness of the chicken meat sample. The results indicated that the apparatus showed satisfactory performance in detecting the freshness of the chicken meat sample. This apparatus was movable, simple, cheap, easy to operate, and suitable to be used by meat sellers or related institutions. The sensors used were capable of detecting the changes in colour, pH, NH 3 gas, and H 2 S of the sample. The parameters of L*, b*, pH, H 2 S, and NH 3 gas effectively detected the freshness of chicken meat. After 12 hrs of storage, the values of L*, b*, pH, H 2 S, and NH 3 gas of the sample were 50.34, 17.26, 6.59, 134.08 ppm, and 42.34 ppm, respectively.


Introduction
Chicken breast meat contains a lot of protein, a vital macronutrient required by the human body.In Indonesia, the consumption of chicken meat per capita is 5.683 kg/ year, and this consumption increased by about 1.87% in 2018 (Kementan, 2020).This consumption is 12 times higher than beef per capita, 0.469 kg.Even though the consumption of chicken meat in Indonesia is high, the quality of the product is not well maintained.Chicken meat is mainly sold in traditional markets with minimal sanitation facilities and cooling systems.Due to this condition, physical and chemical damage quickly occurs.In addition, microbiological deterioration is also commonly found, leading to foodborne disease (Mead, 2004).
Organoleptic changes, including colour, odour, and pH, indicate the spoilage of chicken meat.The offflavour becomes more intensive as the spoilage of the meat proceeds.Ammonia (NH 3 ) and hydrogen sulfide (H 2 S) are used as spoilage metabolites because the degree of spoilage is related to the increase of those metabolites during storage (Li and Suslick, 2016).Metabolic processes and bacterial activity in utilizing free amino acids take a role in spoiling.Microbes synthesize unwanted compounds during metabolic processes, including biogenic amines, ammonia, CO, hydrogen sulfide, CO 2 , and lactic acid (Shukla et al., 2015;Raudienė et al., 2018).The accumulation of lactic acid from the anaerobic glycolysis process causes the pH to decrease until the ultimate pH is reached.Colour pigment and its concentration generally influence the colour of meat.Time also affects metmyoglobin concentration, which increases with time and oxygen exposure (Hunt and King, 2012).Therefore, the more degraded the chicken meat, the more unpleasant the odour, pH decrease, and discolouration.
Monitoring chicken meat freshness is generally done by manually evaluating the smell, colour, and texture characteristics.Sensory evaluation is fast and easy, but it may lead to misinterpretation if the number and  (Kamruzzaman et al., 2012) but is timeconsuming, requires a complex operation, skilled analyst, nonportable, and is expensive.Another method of evaluation by Near-Infrared Reflectance (NIR) to predict the quality attributes of chicken breast (Pectoralis major) has also been conducted.However, NIR is instrumentally and operationally quite expensive.The non-destructive analysis of the chemometric approach is widely used to classify meat products based on their chemical composition (Kamruzzaman et al., 2015).
Other studies have described the use of chemometric models to predict the process of meat spoilage.Although these two methods are faster than chemical detection, they need pricey equipment.Therefore, it is important to develop practical tools so that butchers or other interested parties in the meat trade can quickly evaluate meat quality.Many sensors such as colour, gases, and acidity are available.Combining these sensors with the Arduino circuit is possible to develop a device that can evaluate chicken meat quality faster, easier, and cheaper.
Therefore, this study aimed to design and create a device that can thoroughly investigate the quality and freshness of chicken meat.

Materials
Materials needed to build the apparatus included a black acrylic board used to make the apparatus chamber, Arduino Uno as the sensor signal reader, Raspberry Pi used as the database storage, and HDMI LCD 7 inches used as the display monitor.The sensors installed were MQ 137, MQ 136, TCS3200, and PH-98108, used to sense NH 3 , H 2 S, colour (Red, Green, Blue), and pH.The other needed devices were Konica Minolta Chroma Meters CR-400, colour papers (Prima), Portable Multi-Gas Detector BH-4S for H 2 S, and Ammonia Gas Detector AR-8500.Fresh chicken meat (Broiler), aged between 25-35 days, was used to test the apparatus.In the following research, chicken meat used was breast part, and this was purchased from the local market in Yogyakarta, Indonesia.

Chemicals and reagents
Distilled water and liquid ammonia were purchased from Progo Mulyo, Indonesia.The pH calibration used buffer solutions with pH 4, pH 7, and pH 9 (Hanna, Indonesia).The HCl-KCl buffer was prepared from 0.2 M KCl (Merck, Germany) and 0.2 M HCl (Merck, Germany) for a pH of 2.2.

Design and mechanism of the apparatus
Colour, gas and pH sensors were assembled and connected to Arduino and Raspberry Pi 3 circuits as the data acquisition system.Two types of sensitive gas sensors, namely MQ 136 and MQ 137, were used to measure ammonia and hydrogen sulfide as metabolites gases during meat decomposition.These sensors were mounted at the top of the chamber.During the test, these sensors were exposed to gaseous metabolites in the closed chamber of the apparatus.The colour sensor of TCS 3200 was placed directly on the chicken meat surface to assess colour changes.This colour sensor was equipped with four Light Emitting Diodes (LED) for the illumination requirement.At the same time, the PH-98108 as the pH sensor was placed perpendicular to the meat sample and slightly penetrated into the sample for measuring the pH value of the sample.The arrangement of the complete apparatus can be seen in Figure 1.
The measurements outputs of colour, gases, and pH were frequencies, resistance ratio, and voltage.The Raspberry Pi 3 was installed with a MySQL database to store the sensor reading data.These data were then exported to CSV form for further processing using Microsoft Excel.A calibration equation is used to convert the measured values to RGB, gas concentration (ppm), and pH values.Therefore, it was necessary to calibrate those sensors with standardized (calibrated) measuring equipment or materials before measuring the meat sample.Calibration was performed to ensure that the data read by the developed apparatus and standard calibrated tools were similar.

Colour sensor calibration
Detection of colour was carried out using the TCS3200 sensor in the apparatus, with the primary colours of the constituents being red, green, and blue (RGB).The colour calibration process was carried out by simultaneously measuring eight different colour papers using the developed apparatus and the calibrated colourimeter of Minolta Cr-400 Chromameter.The output reading from the developed apparatus in

pH calibration
In the following study, calibration of the pH sensor (PH-98108) was done using standard buffer solutions.The sensor reading output of the apparatus was voltage.The standard buffer solutions (Hanna, Indonesia) consisted of HCL-KCL for pH values of 2.2, acetate buffer for pH 4.0, phosphate buffers for pH 7.0 and 9.0.Those prepared buffer solutions were directly measured using the apparatus and gave different voltage outputs for each buffer solution.Therefore, it could directly correlate between sensor reading in voltage and the known measured pH value.These data were then used to compile a calibration graph and find the pH calibration equation.

Gas sensors calibration
The output reading of the gas sensors was the resistance ratio (Rs/Ro).The Rs/Ro ratio is a reference to get the final result with ppm units (Sendari et al., 2019).Rs was the sensor resistances at different NH 3 and H 2 S gases concentrations for MQ137 and MQ 136 sensors, respectively.While Ro was the resistance value of those sensors in clean ambient air.Several NH 3 and H 2 S gas concentrations were prepared in a closed container from 0 -100 ppm.Those gases were then measured using a standard calibrated device of Portable Multi-Gas Detector BH-4S for H 2 S and Ammonia Gas Detector AR8500 for NH 3 , where the measured values were expressed in ppm.At the same time, those gases (NH 3 and H 2 S) were also measured using the developed apparatus, and the measured values were expressed in the Rs/Ro.The measurement data from the standard calibrated device (ppm) and the developed apparatus (Rs/Ro) were then plotted to obtain calibration equations.

Measurement method on chicken meat sample
After completing the calibration process, the apparatus was ready to measure the colour, pH, NH 3 , and H 2 S gases of a sample of chicken meat to determine its freshness.The chicken meat sample was loaded into the apparatus chamber and stored in ambient air of the tropical room condition at 29 -30.5 o C and relative humidity of 75 -85%.Measurement was carried out periodically every hr during 24 hrs of storage.Measurement was done for three different samples of chicken meat (triplicate).The HDMI LCD 7 inch of the apparatus would display the sensor readings representing the colour attributes (R, G, B), NH 3 concentration, H 2 S concentration, and pH of the sample.

Data analysis
The collected data from calibration measurements were analyzed by using regression analysis to determine the calibration equations.While for the chicken meat sample was analyzed by using a graphical and mathematical calculation to determine the changes in the meat quality attributes during storage.

Colour sensor calibration results
As mentioned above, the colour sensor calibration was carried out by comparing the frequency with the colour recorded by chromameter Minolta CR 400 in R, G, and B values. Figure 2 shows the calibration results, the calibration equation, and the R 2 value.There was a linear relationship between those two readings, with the R 2 of R, G, and B being 0.9358, 0.9755, and 0.781, respectively.
Based on the results, B had the lowest R 2 value compared to the others, and this could be due to the blue colour exhibiting the shortest wavelength compared to red and green (Poynton, 2005).The wavelength of the light reflected from the object produces a colour perception that makes the light source influence colour production and perception.Different light sources, such as daylight, fluorescent, and tungsten filament lamps, gave different illuminant types (Hunt and King, 2012).

pH calibration result
Calibration of the pH sensor was performed by using buffer solutions with the known pH values at four levels Figure 3 shows the calibration result of the apparatus.It could be found that there was also a linear relationship between sensor reading and the known pH of the buffer solutions with the R 2 value was 0.9998.Sari et al. (2016) also reported a linear relationship and studied the voltage level of couples buffer pH from five up to seven at room temperature.The same result was also found by Metrohm International Headquarters (1991).When the calibration method used the buffer solution, the accuracy of the conventionally measured pH value would increase significantly at higher ionic trends (Schneider et al., 2004).

Gas sensor calibration result
The two metal oxide semiconductor (MOS) gas sensors of both MQ 136 and MQ 137 used in the apparatus were calibrated based on the resistance ratio Rs/Ro (Qiu and Wang, 2017).This calibration method was based on the previous study that resulted in a logarithmic equation (Prasojo, 2017).MOS gas sensors are widely used in developing detection devices to monitor ammonia, hydrogen sulfide, and other volatile gases in the freshness test of chicken meat (Lee et al., 2010).Another research on chicken spoilage by measuring NH 3 and CH levels using MOS gas sensors was conducted by Edita et al. (2018) and spoiled meat classification using MQ 136, MQ 137, and TGS 2602 gas sensors reported by Kartika et al. (2018).Detection of the type and concentration of adulteration in patchouli oil provides objective and reliable results using MOS gas sensors such as MQ 135 (Sudarmaji et al., 2021).
Figure 4 shows the calibration result for the NH 3 gas sensor of the developed apparatus.MQ 137 sensor had a sensitivity to NH 3 gas (Ephipanias, 2018).When the sensor detects NH₃ gas, the sensor's conductivity increases as the gas concentration increases.As a result, the values of Rs/Ro decreased as the concentrations of NH 3 increased.The ratio Rs/Ro decreased as the NH 3 concentration increased was also reported by Lee et al. (2010).The relationship between sensor reading in Rs/ Ro and log NH 3 concentration was linear, expressed as y = -0.9002x+ 3.18 with an R 2 of 0.9908.This result indicated that the sensor could work properly and might give a good result in the actual application to detect the NH 3 concentration of the chicken meat sample.
Figure 5 shows the calibration results for the H 2 S sensor (MQ 136).The same as in the NH 3 gas sensor, the values of Rs/Ro decreased as the H 2 S concentrations increased.The relationship between the sensor readings expressed as Rs/Ro and the log of H 2 S concentrations formed a linear pattern which could be described as y = -1.3621x+ 4.8843 with R 2 of 0.9746.As the MQ 137 sensor, this sensor could also work properly and might give a good result in the actual application to detect the H 2 S concentration of the chicken meat sample.In another study conducted by Prasojo (2017), the measurement of H 2 S in biogas purification using MQ 136 resulted in a satisfactory performance where the uncertainty value of the sensor was only about 2.77 at a 90% confidence level.

Performance test on colour changes of the chicken meat sample
After being calibrated, the apparatus was then used to measure the changes in colour, pH, NH 3 , and H 2 S gases of the chicken meat sample.As stated above, in the current study, the reported parameter changes of the sample were investigated hrly during storage within 24 hrs at tropical ambient air temperature.There was a tendency for the meat colour sample to change a line with the increasing storage time.The colour changes of the chicken meat sample during storage are shown in Figure 6.(Boronkay, 2013).The initial L* value of the chicken meat sample was 51, which was still in the normal range when referring to previous studies (Smith and Northcutt, 2009).In general, this value tended to decrease during 24 hrs of storage, from 51 to about 43 or decreased 15,7% or 0.653%/hr.As the L* value decreased, the meat tended to become darker, or the brightness of the chicken meat decreased.This phenomenon was probably due to the oxidation process of the colour pigments in the meat (Ponnampalam et al., 2017).Changes in the meat colour due to lipid oxidation would lead to fading or discolouration (Suman and Joseph, 2013).In contrast, Soni et al. (2018) reported that L* values of chicken meat packed in PET boxes stored at refrigeration temperature increased significantly.The increasing L* value could be influenced by the packaging application that protects the sample from oxygen exposure, minimizing the detrimental effect.According to Paião et al. (2013), the L* value was influenced by the pH level where lower pH tended to give a high L* value and higher pH gave a lower L* value.The measured pH in this study increased during storage, explaining the decrease in L* during storage was reliable.The reduction in the L* value during chicken meat storage was also in agreement with the research reported by Zhang et al. (2016) for untreated chicken meat and Kim et al. (2017) for chicken meat at refrigerated storage.Aziz et al. (2020) also reported a significant decrease in the L* value after 72 hrs of storage.
The trend of a* value during storage did not differ from initial to final conditions, but it seemed to increase after 24 hrs of storage.The values were found almost constant, about 6.The phenomenon aligns with previous research for chicken breast meat stored at room temperature, where a* value of the chicken meat was not affected by storage time (Castromán et al., 2013).According to this study, the a* value could not be used to characterize the chicken meat's freshness or quality during storage.Zeola et al. (2002), found that commercial broilers showed pale pink breasts and less reddish, explaining a lower a* value observed in this study.Another study reported that chicken meat under refrigeration storage (4°C) and freezing temperature (-18°C) showed a decrease in the redness value after longterm storage, indicating that the globin might be denatured during storage (Aziz et al., 2020).
For the value of b*, it was observed that this value consistently increased during 24 hrs of storage, especially after the 6 th hr.This value increased about 75% during 24 hrs of storage or 3.125%/hr.This result followed previous studies, where the b* value of chicken breast meat was higher at 24 hrs than at 3 hrs postmortem during 24-hr storage at room temperature (Castromán et al., 2013).Increasing b* value indicated a rise in the chicken meat yellowness.Zhang et al. (2016) reported an increase in yellowness (b*) value for raw chicken meat stored at 4 •C for 15 days.An increase in yellowness (b*) value was also found by Soni et al. (2018) for chicken meat packed in PET boxes during refrigerated storage.From those findings, it could be concluded that colour attributes of L* and b* could describe the change in the freshness of the chicken meat sample during storage.In this study, the colour sensor used in the apparatus could detect the transformation of the chicken meat colour.

Performance test on pH of the chicken meat sample
Figure 7 shows the changes in the pH value of the chicken meat sample during 24 hrs of storage.It could be observed that the initial pH of chicken meat was about 6.5, tended to increase slowly, and at the end of the storage period, the value reached about 7. In the normal condition, the pH before slaughter was around 6.5 (neutral), and then in fresh meat, the pH decreased slightly (Committee, 2015).Some parameters were associated with meat decomposition and microbial growth, such as pH shifting (Boziaris et al., 2011).This study found that the change in the pH of the sample during storage was 5.6% or 0.233%/hr.These pH changes could be detected by the sensor used in the apparatus, which meant that the sensor used was capable of detecting pH changes in the sample, and pH could be used as one of the indicators to evaluate the freshness of  Febrianta et al. (2021) also used pH as a quality indicator during meat storage.They reported a similar pattern where the pH value during storage changed from pH 5.90 at the initial condition to 6.16 after being stored for 12 days in refrigerated condition.An increasing pH value was also experienced by Kuswandi et al. (2014) for chicken cut samples at room temperature and Kim et al. (2017) for chicken breast at refrigerated storage.Increased pH values resulted from TVB-N compounds such as NH 3 accumulation (Farahnaz et al., 2016).Further, Lactic Acid Bacteria (LAB) affected ammonia development, which increased the pH value (Morgado et al., 2018).

Performance test on ammonia and hydrogen sulfide of the chicken meat sample
Figure 8 shows the changes in H 2 S and NH 3 gas concentrations of the chicken meat sample during 24 hrs of storage.It could be observed that the concentration of H 2 S and NH 3 gases increased along with the storage time.The H 2 S concentration changed slowly until 10 hrs of storage.However, it rose significantly after that and increased after 20 hrs of storage (Figure 8a).This phenomenon aligns with the previous research conducted by Li and Suslick (2016), where chicken meat stored at 24 o C starts producing H 2 S compound at a noticeable amount after 24 hrs of storage and continues increasing until 100 hrs of storage.The concentration of H 2 S increased considerably during the initial 12 hrs of storage, then tended to constant from 12 to 21 hrs of storage, and finally increased by more than 300% from 21 to 24 hrs of storage.These captured changes indicated that the sensor used could detect the fluctuation of the H 2 S released from the meat sample.The released H 2 S was found to be relatively high, which could be used as the parameter to detect the freshness of the chicken meat.
The concentration of NH 3 consistently increased during 24 hrs of storage (Figure 8b).This finding follows the earlier study conducted by Farahnaz et al. (2016) that found an increasing concentration of NH 3 gas at all storage temperature variations from 0 o to 15 o C for chicken breast meat.It was observed that NH 3 increased considerably by more than 6,000% during 15 hrs of storage, then raised more than 600% from 15 to 23 hrs of storage, and finally increased more than 100% at the last 1 hr of storage.This phenomenon also indicated that the sensor used was capable of detecting the change in NH 3 released from the meat sample.NH 3 could also be used as an indicator to detect the freshness of the chicken meat.
According to Li and Suslick (2016), the determination of chicken meat freshness level during storage at 24°C using H 2 S, amine, cadaverine, and dimethyl sulfide indicators reported that the chicken meat was in the less fresh category after being stored for 12 hrs and became rotten at 48 hrs of storage.The result also agreed with the findings of Kozacinski et al. (2012) in pre-packed cut chicken meat at refrigerated storage, where the chicken meat spoiled at an ammonia level of 9 mg NH 3 /100 g of sample.According to the study, the values of L*, b*, pH, H 2 S, and NH 3 of the chicken meat for 12 hrs of storage were 50.34, 17.26, 6.59, 134.08 ppm, and 42.34 ppm, respectively.Table 1 the change of those freshness attributes determined every 6 hrs for 24 hrs of storage.

Conclusion
The apparatus for detecting the freshness or quality of chicken meat had been developed and tested with

Figure 1 .
Figure 1.Schematic diagram of the developed apparatus

Figure 3 .
Figure 3. Calibration graph of pH sensor Figure 6.(a) L* values, (b) a* values, (c) b* values of the chicken meat during 24 hrs of storage measured by the device

Figure 7 .
Figure 7. Changes in pH on chicken meat samples stored at room temperature