# A Portable Optical Sensor for Microplastic Detection: Development and Calibration
## 2 Materials and Methods
### Detector BP34W
Filters are of great importance in circuit design because they reduce interference from external sources and ensure a clear, undistorted signal. We implemented a passive low-pass filter to mitigate the noise caused by motor vibrations and external interference that affected the output. This filter effectively minimizes the undesired frequencies and preserves signal clarity. We placed the low-pass filter at the front of the amplification stage (Figure 8), which optimizes performance by targeting the noise before the signal enters the amplification process. We chose an RC filter that separates frequencies, allowing certain desired signals to pass. Its simplicity and the RC network's recognition as the simplest form of a low-pass filter make it a good choice. The RC formula is given by Equation (5). \[Fc=\frac{1}{2\pi RC} \tag{5}\]  
Equation (5) is the low-pass filter equation. Figure 8: The figure shows, in section (**A**), the schematic of a low-pass filter and an analog-to-digital converter circuit implemented with an MCP3202 MS and the TLC27L2 BCD operational amplifier for noise reduction and improved signal clarity. Section (**B**) shows the PCB mounted. Utilizing the property of low-pass circuits to filter signals below 100 kHz, we prevent signals above this frequency from reaching the photodiode, effectively cutting very high frequencies that generate noise [40]. Raspberry Pi 4 was used for a graphical user interface (GUI). This interface is key to the system's operation, functioning as a dedicated application for user interaction and prototype management. It is essential to the system's architecture to manage the real-time multiplexing wavelengths and the motors. This configuration improves the user experience and enhances the prototype's mechanical movements. The application's execution on the device enables touchscreen interaction with the detection platform, improving accessibility. The prototype's design, intended for use in professional environments and by laboratory personnel, is supported by the GUI's facilitation of user interaction, as illustrated in Figure 9.  
In order to develop the GUI, the following criteria were used, based on experience with microplastics, the specific needs, and the intended purpose of the prototype. The user interface (UI) design basics are the following:  
* Definition: user interface design focuses on anticipating what users need to do;
* Purpose: UI software bridges the gap between users and the underlying functionality of a system;  
* Usability: a well-designed UI enhances usability, making it easier for users to achieve their goals efficiently;
* Productivity: intuitive interfaces reduce learning curves and increase productivity;
* Aesthetics: a visually appealing UI creates a positive impression and encourages user engagement;
* Consistency: the UI comprises several screens and components to ensure a cohesive experience;
* Accessibility: thoughtful UI design accommodates diverse user needs, including those with disabilities;
* Methods and techniques:  
Figure 9: The figure shows the graphical user interface (GUI) layout on the Raspberry Pi screen. The interface supports user interaction for wavelength multiplexing, motor control, and the display of test results in real-time. * Interaction design: defining how users interact with elements (such as buttons, forms, and menus) and ensuring smooth transitions;
* Visual design: designing the look and feel, including colors, typography, and layout;
* Information architecture: organizing content in a logical manner for easy navigation;
* User research: understanding user needs, preferences, and pain points;
* Prototyping: creating interactive mockups to evaluate and iterate on design concepts;
* User testing: gathering feedback from real users to refine the UI [41; 42]. The complete structure of the developed GUI user interface is shown in Figures 10-12.