# A Portable Optical Sensor for Microplastic Detection: Development and Calibration
## 2 Materials and Methods  
The development of the prototype was focused on the accurate detection of microplastics. Among the prevalent materials, such as acrylonitrile butadiene styrene (ABS), polylactic acid (PLA), and polyethylene terephthalate (PET), PLA was selected due to its accessibility and common use. Sensors and test probes were designed specifically to analyze this material. Testing was conducted in a controlled environment using commercially available microplastics, with PLA serving as the standard for comparison with organic materials. Utilizing a light source, the sensor measured the transmitted intensity in volts. The test quantified optical properties through a process known as \"experimental absorbance\" or \"attenuation\". Rectangular samples measuring 10 \(\times\) 3 cm were meticulously placed on glass slides for analysis. To improve efficiency, a scanning mechanism inspired by a 2-axis Cartesian CNC system (X and Y axes) was implemented. We powered the prototype with a Raspberry Pi 4 and controlled it using two stepper motors with A4988 drivers (Allegro MicroSystems, Manchester, NH, USA). The graphical user interface (GUI) provided two modes: microscopy and LED. The equation for measuring absorbance is given by:  
\[A=-\text{log}\bigg{(}\frac{I_{t}}{I_{0}}\bigg{)} \tag{1}\]  
Equation (1) is the logarithmic absorbance equation, and it calculates absorbance (\(A\)) based on the ratio of transmitted (\(I_{t}\)) to initial (\(I_{0}\)) light intensities. This is where (\(I_{t},I_{0}\)) are the transmitted light intensity, and the incident light intensity, respectively. This equation allows for the determination of the sample's optical attenuation, which serves as a proxy for microplastic detection. In microscopy mode, the system takes images of the samples and uses algorithms to detect microplastics. In LED mode, the user selects a wavelength to irradiate the sample and obtains its attenuation value, which provides an initial indication of microplastics (MPs). The user can then employ the microscopy mode to confirm these findings and, with a more robust probe, ensure accurate detection. A 7-inch screen connected to the Raspberry Pi 4 displays the results, which can also be sent wirelessly to a computer. We covered the mechanism with a black cloth to block noise and improve calibration. This approach reduced interference from ambient light. Additionally, a printed circuit board (PCB) was designed to interconnect all the circuits for sample detection and light emission. This design compacted the prototype and eliminated noise from the DuPont cables. Prior to the initiation of production, rigorous PCB simulations were conducted to identify and rectify any potential issues. Subsequent to this, we proceeded with the assembly of all of the components necessary to construct the final probes. The following sections describe the prototype components, explain their functions, and highlight the design considerations behind their development. This section will focus on polylactic acid (PLA), a prevalent microplastic found in rivers and lakes. It is frequently found in water and soft drink bottles. As a widely used biodegradable bioplastic in many products, PLA is important in environmental studies [6; 23]. Microplastics absorb visible-wavelength light while reflecting very little, unlike organic waste, which mostly reflects visible light and absorbs little. This difference is clear in absorption spectrophotometry (transmittance), their reflective properties, and the reflectance of other components [24; 25; 26; 27]. To match these characteristics, we chose light sources with wavelengths between 360 nm and 960 nm. The specific wavelengths included 370, 385, 395, 405, 456, 470, 525, 570, 590, 605, 625, 636, 840, and 940 nm. We have created a sampling method based on the range and spectrum of microplastics to work with materials that fit the system. The system has been engineered to detect a variety of materials. However, it requires calibration to identify the spectrum of the target material.