## 3 Materials and Methods
### AIoT Hardware Infrastructure for Implementing the Residential PET Recycling Prototype
If the object is recognized as a PET bottle and its weight is within the acceptable range, the motor redirects it to the designated PET recycling compartment;  
Figure 2: PRS: (**a**) lateral cross-section; and (**b**) frontal cross-section. * The non-PET compartment. If the object is classified as non-PET, the motor directs it to a separate compartment for general waste or non-recyclable items. The sorting flap directs the identified object to the appropriate compartment, ensuring the proper segregation of PET and non-PET materials. When a user deposits an item into the collection system, the integrated camera and recognition algorithm assess whether the object is a valid PET bottle. Upon verification, the motor activates, enabling the sorting flap to move precisely to the designated compartment for PET bottles. This swift and accurate redirection ensures that recyclable materials are processed correctly. Conversely, if the item is identified as non-PET, the servo motor is programmed to redirect the item to a separate compartment, designed for non-recyclable materials. This sorting mechanism prevents contamination of the recycling stream, thus maintaining the quality of the collected PET bottles. Figure 2a presents the lateral cross-section of the PRS, providing a detailed view of the system's components from the side. This perspective highlights the arrangement of the 17 HS4401 stepper motor with the HX711 amplifier and the external power supply required, as well as camera 1 for QR code scanning, and the Asus Tinker Board R2. Figure 2b shows the front cross-section of the PRS, offering a direct view of the interface that users interact with. The front view highlights the system's compact design, featuring the PIR sensor for detecting human presence, the QR code scanner (camera 1), LED indicators, camera 2 for object detection, and the input area for depositing objects. The operational procedure of the PRS contains the following steps:  
1. User Detection and Activation of QR Code Camera. When a user approaches the PRS system, the PIR sensor detects their presence. This triggers the activation of camera 1, which is dedicated to scanning the user's QR code;
2. QR Code Reading and User Identification. The system utilizes camera 1 to capture the QR code presented by the user. The unique code is decoded to identify the user based on a pre-existing database of registered codes, linking the specific user to the recycling session. The QR code used within the system does not provide traceability in itself; its functionality is limited to user identification. The QR code contains a unique identifier associated with an existing account in the database. All recycling activities are stored in the database, ensuring traceability by recording each interaction by the user with the system. Thus, traceability is provided at the level of a centralized IT system, rather than within the QR code itself. Future versions could consider integrating distributed technologies, such as blockchain, to increase the transparency of the records;
3. System Ready Notification via LED Indicators. A green LED is activated when the user is successfully identified, signaling the system's readiness for object input. Simultaneously, the red LED is deactivated, indicating that the system is no longer in a restricted state and the user can proceed with the next step;
4. Object Placement in the PRS. The user places an object on the flap of the PRS bin for analysis and sorting;
5. Weight Measurement. Once the object is placed on the flap, a load cell sensor measures the object's weight. This step determines whether the object conforms to the expected weight limits for PET bottles, ensuring the bottle has been emptied of liquid;
6. Object Image Capture and Custom Vision Processing. The system employs camera 2 to capture an image of the object. This image is sent to Microsoft's Azure Custom Vision service to detect the object as either a PET or non-PET item;
7. Object Sorting and Fraud Detection.