## 2 Materials and Methods  
### MultiSpectroANN Device Setup and Functionality  
The MultiSpectroANN (MSANN) device comprises various components essential for data acquisition and processing. This section details the integration of these components, the data collection methodologies, and the algorithms that drive the operation of the device. Additionally, modifications for portable use are discussed, highlighting the device's adaptability for field applications. Figure 1 displays the designed MSANN device, clearly highlighting the AS7265x multispectral sensor (SparkFun Electronics, Niwot, CO, USA) and the Arduino Nano 33 BLE Sense microcontroller (Arduino, Turin, Italy), and other key components. The figure illustrates the experimental setup in detail. First, milk samples are placed into a lightproof container to prevent external light interference. This container is then positioned in the measurement area where the AS7265x multispectral sensor captures spectral data by recording light reflections at various wavelengths from the milk samples. Subsequently, the data are transmitted to a computer via the Arduino Nano 33 BLE Sense microcontroller. Once transmitted, the data are stored on the computer, where it is processed and analyzed. The figure effectively summarizes these steps, showcasing the system's workflow and data processing procedure. Components of MultiSpectroANN (MSANN):  
MSANN consists of the AS7265x Multispectral Sensor, the Arduino Nano 33 BLE Sense Microcontroller, and a computer. AS7265x Multispectral Sensor: The AS7265x is a system comprising three sensors operating in the mid-infrared spectrum (610-860 nm) that provide an 18-channel multispectral detection solution. It can measure at 18 different wavelengths with 20 nm intervals. Eachsensor communicates via the I2C interface and contains an internal temperature sensor, providing precise and accurate spectral analysis of milk samples. Arduino Nano 33 BLE Sense Microcontroller: The Arduino Nano 33 BLE Sense is a small but powerful microcontroller board, featuring a 64 MHz ARM Cortex-M4 processor (ARM Ltd., Cambridge, UK) with Bluetooth connectivity. It has an extensive set of GPIOs (general purpose input/output) for easy connection with various sensors and modules. It is used to process and analyze the collected spectral data. Computer: The computer used for data collection and analysis is equipped with an AMD Ryzen 5 5600G processor (Advanced Micro Devices, Inc., Santa Clara, CA, USA) and 16 GB RAM. It is capable of running Python and has the necessary specifications for data analysis and training artificial neural network models. MultiSpectroANN (MSANN) Data Collection:  
The data collection process for analyzing milk samples involves two primary stages. Initially, a 20 mL sample of milk is placed into a light-proof container to prevent any external light interference. This container is then positioned within a larger, light-proof box with dimensions of 15 cm\({}^{3}\). Positioned precisely 1 cm above the milk sample, the AS7265x sensor captures the spectral data [20]. Once collected, these data are immediately transferred to a connected computer for further analysis. MultiSpectroANN (MSANN) Data Collection Algorithm:  
The MSANN device operates on the principle of collecting spectral data from a milk sample using the AS7265x Multispectral Sensor. This sensor detects light reflected or passed through the milk at specific wavelengths, allowing for detailed analysis of the sample's spectral properties [6]. Once these data are gathered, it is transferred to the Arduino Nano 33 BLE Sense Microcontroller using the I2C communication protocol, ensuring efficient data transmission [21]. The microcontroller then processes the data, ensuring they are in the correct format and devoid of any noise or anomalies, which is critical for obtaining accurate results [22]. These processed data are then displayed on a serial port screen in real-time, allowing users to instantly observe the spectral characteristics of the milk sample [23].