Design and Implementation of a Low-Battery Powered IoT-Based Smart Trash Can System with Wireless Alerts

preprint OA: closed
Full text JSON View at publisher

Abstract

Abstract Accurate and persistent time stamping is a fundamental requirement in smart infrastructure and Internet of Things applications, particularly in systems that must tolerate power interruptions and operate under low power duty cycles. This paper presents an ESP32 based smart trash bin designed to monitor lid opening events, record usage behavior, and mitigate odor dispersion in densely populated residential environments such as apartment buildings. The system detects lid state using an infrared obstacle sensor and acquires precise date and time information from a DS3231 real time clock through an I2C interface. Upon lid opening, the time stamp is displayed locally on an LCD mounted on the trash bin and stored in the ESP32 internal flash memory to preserve records across resets or unexpected power loss. Time stamp data are also transmitted through Bluetooth Low Energy and visualized using the nRF Connect mobile application for short range monitoring and validation. When the lid remains open beyond a predefined threshold of five minutes, the system generates a prolonged opening event and transmits an alarm notification through WiFi to the Blynk mobile application to support timely intervention by security personnel or facility management. The hardware is powered by a battery supply and the ESP32 enters deep sleep mode after lid closure to minimize energy consumption while maintaining event driven wake up capability. Experimental results confirm reliable time stamp logging, consistent multi-interface visualization, robust wireless reporting, and effective low power operation, demonstrating the suitability of the proposed system for practical smart residential waste management applications.
Full text 111,603 characters · extracted from preprint-html · click to expand
Design and Implementation of a Low-Battery Powered IoT-Based Smart Trash Can System with Wireless Alerts | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Design and Implementation of a Low-Battery Powered IoT-Based Smart Trash Can System with Wireless Alerts Aamir Bashir Taas, Aneeka Karim, Kamran Bashir Taas, Mai Abuhelwa, and 2 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-8665176/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Accurate and persistent time stamping is a fundamental requirement in smart infrastructure and Internet of Things applications, particularly in systems that must tolerate power interruptions and operate under low power duty cycles. This paper presents an ESP32 based smart trash bin designed to monitor lid opening events, record usage behavior, and mitigate odor dispersion in densely populated residential environments such as apartment buildings. The system detects lid state using an infrared obstacle sensor and acquires precise date and time information from a DS3231 real time clock through an I2C interface. Upon lid opening, the time stamp is displayed locally on an LCD mounted on the trash bin and stored in the ESP32 internal flash memory to preserve records across resets or unexpected power loss. Time stamp data are also transmitted through Bluetooth Low Energy and visualized using the nRF Connect mobile application for short range monitoring and validation. When the lid remains open beyond a predefined threshold of five minutes, the system generates a prolonged opening event and transmits an alarm notification through WiFi to the Blynk mobile application to support timely intervention by security personnel or facility management. The hardware is powered by a battery supply and the ESP32 enters deep sleep mode after lid closure to minimize energy consumption while maintaining event driven wake up capability. Experimental results confirm reliable time stamp logging, consistent multi-interface visualization, robust wireless reporting, and effective low power operation, demonstrating the suitability of the proposed system for practical smart residential waste management applications. Internet of Things (IoT) Smart trash can system ESP32 microcontroller Low-power embedded systems Bluetooth Low Energy (BLE) Wi-Fi alerting Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 1. Introduction Rapid urbanization and the increasing prevalence of apartment-based living have intensified the challenges associated with waste management in residential and public environments, particularly in multi-unit apartment buildings where shared waste infrastructure, space limitations, and building design constrain effective waste sorting and disposal, as reported in recent studies on urban waste management and environmental sustainability[ 1 ],[ 2 ]. In multi-story apartment buildings, where hundreds of residents share common waste disposal facilities, improper usage of trash bins, particularly prolonged lid opening, can lead to rapid odor dispersion from decomposing municipal solid waste, negatively affecting indoor air quality and causing discomfort and nuisance to surrounding residents [ 3 ]. Such situations are frequently the result of human negligence, including distractions such as mobile phone conversations or simply forgetting to close the trash bin lid after disposal in busy residential settings. Consequently, there is a growing need for intelligent waste management solutions that not only monitor usage behavior at shared trash bins but also provide accountability and enforcement mechanisms to support cleaner and healthier apartment environments. The advancement of the Internet of Things has enabled the development of smart systems that integrate sensing, processing, communication, and power management into compact embedded platforms [ 4 ]. Among these platforms, the ESP32 microcontroller has emerged as a popular choice due to its built in Bluetooth Low Energy capability, low power operating modes, integrated WiFi connectivity, and suitability for real time embedded applications [ 5 ]. However, many IoT based monitoring systems continue to face limitations related to accurate timekeeping, reliable event storage, energy efficiency, and scalable alert delivery, particularly under conditions involving power failures or long-term unattended operation [ 6 ]. Accurate time information is essential for event-based monitoring systems where behavioral tracking, traceability, and policy enforcement are required. However, clocks used in microcontroller-based sensor nodes exhibit frequency variation and drift over time due to factors such as temperature differentials, manufacturing limitations, and aging effects, causing each node’s notion of time to deviate unless an external timing reference or synchronization mechanism is employed, thereby limiting the reliability of time stamping in long-term and low-power operation [ 7 ]. To overcome this limitation, external real time clock modules such as the DS3231 provide high accuracy timekeeping with battery backup, ensuring uninterrupted operation even during power loss. When combined with non-volatile flash memory in the ESP32, RTC based systems enable persistent storage of critical event records. This persistent time keeping capability is especially important in battery powered systems that frequently enter low power sleep states [ 8 ]. In the context of smart waste management, recording when a trash bin is opened and how long it remains open is crucial. Prolonged lid opening, particularly beyond several minutes, significantly increases the likelihood of odor spreading into nearby living spaces. In apartment systems, this can disturb a large number of residents simultaneously [ 9 ]. Therefore, implementing a time threshold-based monitoring mechanism is an effective approach to identifying improper usage. Displaying the lid opening time directly on the trash bin increases immediate user awareness, while remote reporting enables supervisory control and intervention. This paper proposes an ESP32 based smart trash bin that monitors lid opening events using an infrared obstacle sensor, records accurate real time information from a DS3231 RTC, and stores the data in flash memory for persistence. The system displays recorded opening time on an LCD attached to the trash bin and wirelessly transmits the same information to a smartphone using Bluetooth Low Energy. The nRF Connect mobile application is employed as the BLE client to receive, visualize, and verify the transmitted time stamp data. To support reliable long-range alerting, prolonged lid opening events exceeding a predefined duration of five minutes are communicated through WiFi to a mobile application, enabling immediate alarm notification for security personnel or facility management. This separation allows BLE to be used for short range data validation, while WiFi is reserved for alarm delivery and user notification. Furthermore, to ensure energy efficient operation and long-term deployment, the system is powered by a battery supply and employs deep sleep operation on the ESP32, waking only in response to lid opening events. This battery powered, event driven design significantly reduces idle power consumption while maintaining continuous monitoring capability. The integration of events triggered sensing, RTC based persistent time stamping, LCD visualization, BLE based validation, WiFi based alarm notification, and low power deep sleep operation makes the proposed system a practical and scalable solution for smart residential waste management and hygiene control applications. 2. Problem Statement and Motivation In densely populated residential environments such as apartment buildings, trash bins are commonly placed in shared hallways or disposal areas. When a trash-bin lid remains open for an extended period, unpleasant odors can spread into surrounding spaces, negatively affecting indoor air quality and causing discomfort to nearby residents [ 9 ]. In practice, prolonged lid opening frequently occurs due to human negligence. Common scenarios include users becoming distracted, such as during phone conversations, or simply forgetting to close the lid after waste disposal. From a system-design perspective, reliable monitoring of trash-bin usage behavior presents several technical challenges. Accurate time-stamping is essential to determine when lid-opening events occur and how long the lid remains open; however, internal microcontroller clocks are prone to drift and lose time information during power interruptions, making them unsuitable for persistent event tracking. In addition, continuous system operation increases power consumption, limiting the feasibility of long-term battery-powered deployment. Furthermore, short-range wireless communication alone is insufficient for dependable alert delivery in large residential buildings where supervisory personnel may not be located near the trash bin. To address these challenges, an intelligent trash-bin monitoring system must integrate accurate time-keeping, persistent data storage, energy-efficient operation, and reliable wireless communication. The proposed smart trash bin achieves this through an event-driven, low-power architecture that combines real-time monitoring, local user feedback, and remote alerting, with specific system objectives and design requirements defined in Section 3 . 3. Objectives and Design Requirements 3.1 Objectives The primary objectives of this work are as follows: Behavioral awareness : Promote responsible trash-bin usage by providing immediate, visible feedback to users through local display of lid-opening time information, thereby discouraging prolonged lid opening. Accurate and persistent event logging : Enable precise recording of lid-opening events by acquiring date and time information from an external real-time clock and storing time-stamp data persistently in non-volatile memory to ensure reliability across power interruptions. Dual-mode remote monitoring and alerting : Support short-range visualization and validation of recorded time-stamp data using Bluetooth Low Energy and a mobile application, while enabling reliable long-range alert notification through WiFi when prolonged lid-opening conditions are detected. Energy-efficient operation : Minimize overall power consumption through battery-powered deployment and event-driven deep-sleep operation of the ESP32 microcontroller, enabling long-term unattended use. 3.2 Functional requirements The system is required to: To achieve the stated objectives, the system is required to provide the following functional capabilities: Detect trash-bin lid OPEN and CLOSED states reliably using an infrared obstacle sensor. Acquire accurate date and time information from a DS3231 real-time clock via an I2C interface. Store formatted time-stamp records and cumulative lid-opening counts in the ESP32 internal flash memory using EEPROM emulation. Display the most recent lid-opening time and the total number of opening events on a local LCD for immediate user awareness. Transmit recorded time-stamp data to a smartphone using Bluetooth Low Energy and support data validation through the nRF Connect mobile application. Detect prolonged lid-opening events exceeding a predefined threshold of five minutes and transmit alarm notifications via WiFi to a mobile application for real-time alerting and intervention 3.3 Non-functional requirements In addition to functional capabilities, the system shall satisfy the following non-functional requirements: Robustness : Ensure reliable operation under unexpected power loss, with persistent storage and recovery of time-stamp data and event records. Low power consumption : Support battery-powered deployment through aggressive power management, including deep-sleep duty cycling of the ESP32 microcontroller. Usability and deployment simplicity : Provide user-friendly visualization through a combination of local LCD display and mobile application interfaces, while maintaining a compact and easily deployable system design. 4. System Architecture and Materials 4.1 Hardware components The proposed smart trash bin system is implemented using an integrated set of sensing, processing, display, storage, power management, and wireless communication hardware modules centered on the ESP32 microcontroller. The ESP32 TTGO T-Display serves as the central control unit and coordinates all core system operations, including lid-state detection, real-time clock (RTC) data acquisition, non-volatile flash memory logging, LCD updates, Bluetooth Low Energy (BLE) communication, Wi-Fi–based alert transmission, and deep-sleep power management [ 10 ]. The overall interaction between system components and data flow is illustrated in Fig. 1 , which presents the complete system-level architecture of the proposed design. Accurate and persistent time-stamping is achieved using the DS3231 real-time clock module, which provides high-precision date and time information via an I2C interface. The DS3231 incorporates a temperature-compensated crystal oscillator and onboard battery backup, enabling reliable timekeeping during power interruptions and ensuring consistent event logging [ 11 ]. Lid-opening and closing events are detected using a 4-pin infrared (IR) obstacle avoidance sensor mounted near the trash-bin lid [ 12 ]. The digital output of the sensor allows the ESP32 to distinguish between OPEN and CLOSED lid states and is also configured as an external wake-up source, enabling immediate system activation from deep-sleep mode upon lid opening. To provide immediate user feedback, a 16×2 I2C-based liquid crystal display (LCD) is mounted on the trash bin and interfaced with the ESP32 via the I2C bus [ 13 ]. The LCD displays the most recent lid-opening time and the cumulative number of opening events, enhancing user awareness and discouraging prolonged lid opening. An LED indicator is additionally connected to provide real-time visual confirmation of lid-detection events during system operation and testing. Short-range wireless monitoring and data validation are supported through Bluetooth Low Energy communication [ 14 ]. The ESP32 operates as a BLE server, advertising a custom service that allows a mobile device running the nRF Connect application to discover, connect, and retrieve stored time-stamp data from internal memory [ 15 ]. This BLE interface is used exclusively for local visualization and validation of recorded events. For long-range alert delivery, the system incorporates a Wi-Fi–based alarm mechanism using the Blynk mobile application [ 16 ]. When the trash-bin lid remains open beyond a predefined threshold of five minutes, the ESP32 classifies the condition as a prolonged-opening event and transmits an alert via Wi-Fi to the Blynk cloud server, which generates a visual alarm notification on the user’s smartphone. Table 1. tabulated record of Device names, key specifications, and functional roles of the hardware components used in the proposed ESP32-based smart trash bin system. Device Quantity Key Specifications Function in the System Reference ESP-32 TTGO T-Display 1 Dual-core 32-bit Xtensa LX6 CPU (up to 240 MHz); operating voltage: 2.2–3.6 V; built-in Bluetooth Low Energy (BLE); onboard flash memory with EEPROM emulation Central control unit of the system; processes IR sensor signals, acquires time from the RTC, stores time-stamp data in internal flash memory, updates the LCD display, manages BLE communication with the mobile device, and controls deep-sleep power management [ 6 ] DS3231 Real-Time Clock (RTC) Module 1 Operating voltage: 2.3–5.5 V; I2C interface; temperature-compensated crystal oscillator; battery backup support Provides accurate and persistent date–time information for lid-opening event time-stamping, even during power interruptions [ 7 ] IR Obstacle Avoidance Sensor (4-pin) 1 Operating voltage: 3–5 V; digital output; detection range: ~2–30 cm; adjustable sensitivity Detects trash-bin lid opening and closing events and generates a digital trigger for the ESP-32; also serves as an external wake-up source from deep-sleep mode [ 8 ] 16×2 I2C Liquid Crystal Display (LCD) 1 16 characters × 2 lines; operating voltage: 5 V; I2C interface (SDA/SCL); onboard contrast-adjustment potentiometer Displays the recorded trash-bin opening time, date, and cumulative number of opening events; simplified wiring via I2C and built-in contrast control improves system compactness and reliability [ 9 ] LED Indicator 1 Forward voltage ≈ 2 V; operating current ≈ 20 mA Provides visual confirmation of lid-open detection status and assists in system testing and debugging [ 19 ] Smartphone with nRF Connect Application 1 Android/iOS device with BLE support; nRF Connect for Mobile Acts as the BLE client to receive, visualize, and monitor time-stamp data and alerts transmitted by the ESP-32 [ 11 ] Trash Bin (Prototype Enclosure) 1 Plastic container with lid-based opening mechanism Physical enclosure for mounting the ESP-32, IR sensor, LCD, and related circuitry, representing the smart trash-bin application environment // Lithium-ion Battery (Li-Po) 1 Rechargeable single-cell lithium-ion battery; nominal voltage 3.7 V; maximum charging voltage 4.2 V; Supplies power to the ESP32 microcontroller and associated peripheral modules, enabling standalone battery powered operation and supporting low power deep sleep functionality for extended deployment [ 13 ] Smartphone with Blynk Mobile Application 1 iOS smartphone with WiFi connectivity; Blynk mobile application installed Receives prolonged lid opening alarm notifications transmitted via WiFi by the ESP32 when the trash bin remains open > 5 minutes. [ 12 ] 4.2 Software components The firmware for the proposed system was developed using the Arduino Integrated Development Environment (IDE) [ 20 ], version 1.8.19, which provides a flexible and widely supported platform for programming the ESP-32 microcontroller. The Arduino framework simplifies peripheral configuration, library integration, and firmware deployment, making it suitable for rapid prototyping and experimental validation. Several software libraries were employed to support system functionality. The Wire.h library was used to establish I2C communication between the ESP-32 and peripheral devices, including the DS3231 RTC module and the 16×2 LCD. Real-time clock functionality was implemented using the RtcDS3231.h library, which provides access to date–time registers, validity checking, and error handling. LCD visualization was handled using the Liquid Crystal_I2C.h library, enabling formatted display of real-time data. Persistent data storage was implemented using the EEPROM.h library, which provides EEPROM emulation within the ESP-32’s onboard flash memory [ 21 ]. This mechanism was used to store formatted time-stamp records, memory address pointers, and the cumulative number of lid-opening events, ensuring that critical data is preserved across power cycles. Bluetooth Low Energy communication was implemented using the ESP-32 BLE software stack, including the BLEDevice.h, BLEServer.h, BLEUtils.h, and BLE2902.h libraries. These libraries configure the ESP-32 as a BLE server and enable the transmission of time-stamp data through custom services and characteristics. On the client side, the nRF Connect for Mobile application was used to scan, connect, and visualize the transmitted data. The operational logic of the system is summarized in Fig. 3 , which illustrates the sequential workflow beginning with lid-state detection, followed by RTC-based time acquisition, flash-memory logging of time-stamp data, and real-time LCD updates. The firmware then disseminates the stored time-stamp information via Bluetooth Low Energy (BLE) to the nRF Connect mobile application for short-range visualization and validation. In parallel, the firmware continuously monitors the lid-open duration, and when the lid remains open beyond a predefined threshold of five minutes, the ESP-32 triggers a prolonged-opening alert and transmits an alarm notification via Wi-Fi to the Blynk mobile application. This software-level separation allows BLE communication to be used exclusively for time-stamp dissemination, while Wi-Fi connectivity enables reliable long-range alarm delivery and user notification. Following lid closure, the system transitions into deep-sleep mode to minimize power consumption, with wake-up events driven by subsequent lid-opening actions. 5. Methods and System Operation The proposed smart trash bin operates using an event driven methodology that integrates lid state detection, accurate time acquisition, persistent data storage, local visualization, wireless communication, and energy efficient operation. System behavior is governed by a state-based control logic that ensures reliable detection of lid opening events while preventing redundant data logging. The event driven operation further integrates battery powered execution, short range Bluetooth Low Energy based data validation, and long-range WiFi based alarm notification to support reliable monitoring and timely intervention. 5.1 Lid-Event Detection and State Logic The system operates using two primary states, OPEN and CLOSED, which are determined by the digital output of an infrared obstacle avoidance sensor mounted near the trash bin lid. Detection of an object corresponding to lid opening triggers a transition from the CLOSED state to the OPEN state, while the absence of an object indicates lid closure and returns the system to the CLOSED state. To prevent repeated logging during a single opening event, a state transition mechanism is implemented in the ESP32 firmware. A time stamp is recorded only when a valid transition from CLOSED to OPEN is detected. This approach ensures that each lid opening event is logged exactly once, regardless of how long the lid remains open, thereby maintaining accurate event counts and eliminating duplicate records. 5.2 RTC Time Acquisition and Formatting Upon detection of a valid lid opening event, the ESP32 acquires the current date and time from the DS3231 real time clock through the I2C interface. The DS3231 provides high precision, temperature compensated time keeping and maintains accurate timing during power interruptions using its onboard battery backup. The acquired time data are formatted into a human readable string using a consistent month day year and hour minute second format. This unified formatting is used across all system interfaces, including local LCD display, serial output, Bluetooth Low Energy transmission, and WiFi based alert reporting, ensuring consistency and clarity across the system. 5.3 Persistent Storage in ESP-32 Flash Memory (EEPROM Emulation) Each validated lid opening event generates a formatted time stamp that is stored in the ESP32 internal flash memory using EEPROM emulation. In parallel, a cumulative counter records the total number of lid opening events. Both the stored time stamps and the event counter are retained across power cycles, enabling reliable recovery of the system state following resets or unexpected power interruptions. Time-stamp data are written sequentially into fixed-length memory blocks, ensuring structured data organization and facilitating straightforward retrieval for verification and analysis. This persistent storage strategy enables long-term monitoring, traceability, and accountability of trash-bin usage behavior. Figure 4 illustrates the Serial Monitor output corresponding to four consecutive lid-opening and closing events, highlighting stored time stamps, memory address progression, and persistence of the opening counter. Table 2 provides a tabulated summary of all recorded lid-opening and closing events, including date and time (month/day/year, hour, minute, and second), as well as the memory addresses before and after each written operation. Table 2. Tabulated record of lid-opening/closing events and associated flash memory address transitions. Sr. No Address before writing in Memory Address before writing in Memory No. of times trash can open Month Day Year Hours Minutes Seconds 1 78 97 113 07 10 2022 14 15 48 2 97 116 114 07 10 2022 14 21 22 3 226 135 115 07 10 2022 14 28 50 4 135 116 116 07 10 2022 14 34 32 5.4 Local LCD Visualization and User Awareness To enhance user awareness and discourage unnecessary or prolonged lid opening, the system provides immediate local feedback through a 16×2 I2C-based liquid crystal display (LCD) mounted directly on the trash bin. The LCD presents a descriptive header, followed by the most recent lid-opening time stamp and the cumulative number of opening events. In addition to Serial Monitor logging, the recorded events are visualized locally on the LCD in real time. Figure 5 shows four representative LCD snapshots corresponding to consecutive trash-can opening events, clearly displaying the time stamps stored and the continuously updated opening counter. This direct visual feedback reinforces transparency by informing users that lid activity is actively monitored and persistently recorded. 5.5 BLE Reporting and Mobile Visualization Using nRF Connect Application In addition to local LCD visualization and serial data logging, the system supports wireless monitoring of trash can lid activity through Bluetooth Low Energy communication implemented on the ESP32 platform. Lid opening time stamps are transmitted wirelessly to a mobile device and visualized in real time using the nRF Connect application, enabling remote inspection without physical access to the trash bin. Figure 6 shows the nRF Connect interface for three consecutive lid opening events, where each event appears as an updated characteristic value displayed as a formatted date and time string in month day year and hour minute second format. These values correspond to the instant at which each lid opening event is detected and validated by the system. Table 3. Tabulated record of consecutive trash-can lid-opening events showing BLE-transmitted date–time stamps as displayed in the nRF Connect mobile application. Sr. No Month Day Year Hours Minutes Seconds 1 07 10 2022 15 53 13 2 07 10 2022 16 03 45 3 07 10 2022 16 11 40 5.6. Simultaneous Multi-Interface Validation and Prolonged-Opening Alert Mechanism A key validation feature of the proposed system is the consistent representation of identical time-stamp data across multiple interfaces, combined with automated prolonged-opening alert generation. For each trash-can lid-opening event, the formatted date and time value is generated by the ESP32 and stored in nonvolatile flash memory. The stored time stamp is subsequently retrieved without modification and disseminated to all validation interfaces. Figure 7 illustrates this multi-interface validation by presenting the same stored lid-opening time stamp as displayed on the Arduino IDE Serial Monitor, the local I2C-based LCD, and the nRF Connect mobile application via Bluetooth Low Energy. The Serial Monitor displays the time stamp read directly from internal memory, confirming correct data storage and retrieval. The LCD provides immediate local visualization of the stored event, while the mobile interface enables wireless BLE-based access to the same data for validation. This validation confirms that the alarm notification is generated using the same stored time-stamp data that are displayed locally and transmitted via BLE, ensuring consistency between validation and alerting pathways. In parallel with time-stamp validation, the system continuously monitors the lid-open duration. When the lid remains open beyond a predefined threshold of five minutes, the ESP32 classifies the condition as a prolonged-opening event and transmits an alert signal via WiFi to the Blynk mobile application. As shown in Fig. 8 , the mobile application generates a clear visual alarm notification indicating that the trash can has remained open beyond the allowable duration, thereby notifying security personnel or facility management. In the proposed architecture, Bluetooth Low Energy is intentionally limited to short-range data validation, while WiFi is used for robust long-range alarm delivery and user notification. This dual-communication strategy ensures both data integrity and timely intervention for odor control and operational management. 5.7 Low-Power Operation and Deep-Sleep Management To minimize overall energy consumption, the system employs a low-power strategy centered on the ESP32 deep-sleep mode. Following a lid-opening event, when the lid transitions from the OPEN state to the CLOSED state, a thirty-second verification delay is initiated to ensure that the lid remains closed. After this confirmation period, the ESP32 enters deep-sleep mode, during which most internal peripherals and processing units are powered down. Wake-up from deep sleep is configured using an external wake-up source connected to the infrared sensor output. Any subsequent lid-opening event produces a logic-level change at the designated GPIO pin, immediately restoring full system operation. This event-driven wake-up mechanism maintains rapid responsiveness while minimizing energy consumption during idle periods. Such low-power operation is particularly important for battery-powered deployment, as it significantly extends operational lifetime without compromising system reliability. 6. Results and Validation Experimental evaluation confirms reliable operation of the proposed smart trash bin system under repeated lid-opening and closing events. The ESP32 consistently recorded time-stamped lid-opening events in internal flash memory, with memory addresses advancing sequentially and the cumulative opening count remaining persistent across system resets and power interruptions. These results verify correct integration of RTC-based time acquisition with nonvolatile data storage. Local visualization through the LCD reliably displayed the most recent lid-opening time along with the cumulative number of opening events. In parallel, Bluetooth Low Energy transmission using the nRF Connect mobile application accurately reflected updated time-stamp data following each opening event. The identical time-stamp values observed across the Serial Monitor, LCD, and BLE-based mobile interface confirm correct synchronization among time acquisition, memory storage, and wireless data dissemination. The WiFi-based prolonged-opening alert mechanism was validated by maintaining the trash-can lid in the open state beyond the five-minute threshold. Upon exceeding this duration, the ESP32 successfully transmitted an alert via WiFi to the mobile application, where a visual alarm notification was generated in real time. This confirms reliable detection of prolonged opening events and correct long-range alarm delivery under battery-powered operation. 7. Discussion The proposed system provides a practical and effective solution for monitoring trash-can usage behavior in shared residential environments. By combining accurate RTC-based time keeping, persistent flash memory logging, local user feedback, and wireless communication, the system directly addresses odor-control challenges associated with prolonged lid opening while promoting user accountability. A key strength of the design lies in the separation of communication roles. Bluetooth Low Energy is used for short-range visualization and validation of time-stamp data due to its low-power characteristics, while WiFi is employed for reliable long-range alarm notification through a mobile application. This hybrid communication strategy enhances scalability and ensures timely intervention without compromising energy efficiency. Despite its effectiveness, the current implementation has limitations. Infrared sensor performance is sensitive to placement and surface reflectivity, which may affect detection accuracy under varying environmental conditions. Long-term data storage is constrained by the finite capacity of internal flash memory, and extended deployments may require external storage solutions. Additionally, WiFi-based alerting introduces dependency on network availability. These limitations can be addressed in future work through improved sensing techniques, expandable storage options, and adaptive communication strategies. 9. Conclusion This work presents an ESP32 based smart trash bin capable of detecting lid opening events, recording accurate DS3231 RTC time stamps, storing data persistently in internal flash memory, and displaying the information locally on an LCD. The same data are transmitted wirelessly via Bluetooth Low Energy and validated using the nRF Connect mobile application. To address odor control and enforcement requirements, a prolonged opening detection mechanism is implemented, which triggers a real time alarm notification through WiFi to a mobile application when the lid remains open beyond a predefined threshold. Deep sleep operation significantly reduces power consumption, enabling reliable battery powered operation and supporting long term unattended deployment. The proposed system demonstrates a low cost, scalable, and practical approach for smart waste management and monitoring applications in shared residential environments. Declarations Competing Interests The authors declare that they have no competing interests relevant to the content of this article. Funding The authors declare that no funds, grants, or other support were received during the preparation of this manuscript. Author Contribution Aamir Bashir Taas and Kamran Bashir Taas contributed to the system design and overall architecture of the smart trash can. Kamran Bashir Taas proposed the initial concept and system idea. Aamir Bashir Taas developed the complete system architecture, implemented the software, performed wireless communication integration, conducted experiments, and collected the data. Aneeka Karim and Mai Abuhelwa contributed to data analysis and validation of the results. Kamran Bashir Taas, Sohail Mumtaz, and Mohammed Almalaysha supervised the research and provided critical review and revisions. All authors reviewed and approved the final manuscript. Acknowledgement AI-based tools were used solely for language and grammar checking. Data Availability All data supporting the findings of this study are available within the article. Additional materials can be provided by the corresponding author upon reasonable request. References Abubakar, I., Rimi, K. M., Maniruzzaman, U. L., Dano, Faez, S., AlShihri, Maher, S., AlShammari, Sayed Mohammed, S., & Ahmed (2022). Wadee Ahmed Ghanem Al-Gehlani, and Tareq I. Alrawaf. Environmental sustainability impacts of solid waste management practices in the global South. International journal of environmental research and public health , 19 , 12717. Bhavna Middha, & Horne, R. (2023). We Can’t Keep Putting Apartment Residents’ Waste in the Too Hard Basket. The Conversation March 1 , https://theconversation.com/we-cant-keep-putting-apartment-residents-waste-in-the-too-hard-basket-200545 Voukkali, I., Papamichael, I., Loizia, P., & Antonis, A. (2024). Zorpas. Urbanization and solid waste production: prospects and challenges. Environmental Science and Pollution Research , 31 (12), 17678–17689. Shafique, K., Khawaja, B. A., Sabir, F., Qazi, S., & Muhammad Mustaqim. (2020). Internet of things (IoT) for next-generation smart systems: A review of current challenges, future trends and prospects for emerging 5G-IoT scenarios. IEEE access , 8 , 23022–23040. Eridani, D., Rochim, A. F., & Faiz Noerdiyan Cesara. (2021). Comparative performance study of ESP-NOW, Wi-Fi, bluetooth protocols based on range, transmission speed, latency, energy usage and barrier resistance. 2021 international seminar on application for technology of information and communication (iSemantic) (pp. 322–328). IEEE. Alaoui, M. L., Tahiri, M., & Belhiah and Soumia Ziti. IoT-Enabled Waste Management in Smart Cities: A Systematic Literature Review. STMicroelectronics, & Geneva (March 2018). *How to Optimize STM32 MCUs Internal RC Oscillator Accuracy*. Application Note AN5067 . STMicroelectronics. https://www.st.com/resource/en/application_note/an5067-how-to-optimize-stm32-mcus-internal-rc-oscillator-accuracy-stmicroelectronics.pdf Mujmule, P., Avhad, V., Joshi, S., Muli, R., & Kshirsagar, K. (2024). Uninterrupted Clock Using GPS, DS3231 RTC & NTP Pool Server. In 2024 International Conference on IoT Based Control Networks and Intelligent Systems (ICICNIS) , pp. 709–714. IEEE. Carey, C., Phelan, W., & Boland, C. (2006). *Organic Waste Management in Apartments*. Environmental RTDI Programme 2000–2006, Final Report (2005-WRM-DS-23-M1). Dublin: Environmental Protection Agency. https://www.epa.ie/publications/research/waste/ERTDI-No71_WEB-final-with-cover.pdf Cameron, N. (2023). ESP32 microcontroller. ESP32 Formats and Communication: Application of Communication Protocols with ESP32 Microcontroller (pp. 1–54). A. Mujmule, P., Avhad, V., Joshi, S., Muli, R., & Kshirsagar, K. (2024). Uninterrupted Clock Using GPS, DS3231 RTC & NTP Pool Server. In 2024 International Conference on IoT Based Control Networks and Intelligent Systems (ICICNIS) , pp. 709–714. IEEE. Krishna, G., Joshi, K., Singh, S., Singh, S., Raghuvanshi, C. S., & Dilip Kumar Jang Bahadur Saini. (2024). and. Obstacle Detection System for Visually Impaired Person Using Internet of Things and Smartphone Module. In International Conference on Computing and Communication Networks , pp. 467–481. Singapore: Springer Nature Singapore. Khan, M., Haris, M., Imran, Ameen Uddin, S., & Ali (2025). I2C Based Real Time-Clock College Bell Automation. Indian Journal of Electronics and Communication Engineering (INDJECE) , 2 (1), 01–07. Tosi, J., Taffoni, F., Santacatterina, M., Sannino, R., & Domenico Formica. (2017). Performance evaluation of bluetooth low energy: A systematic review. Sensors (Basel, Switzerland) , 17 (12), 2898. Eliasz, A. (2024). Zephyr RTOS Application Development Environments and Zephyr Application Building Principles. Zephyr RTOS Embedded C Programming: Using Embedded RTOS POSIX API (pp. 69–122). A. Asry, A., Insan, L., Lutfi, A., Umar, & Ahmad, R. (2024). Monitoring System for Traffic Light Lamp Damage Using Blynk Application Based On Iot Esp32. Jurnal Teknologi Transportasi Dan Logistik , 5 (1), 59–66. Lisboa, Y., Santos, L., Lobato, E., Fonseca, W., & Silva, K. (2025). Iris Rodrigues, and Marcelo Silva. Design and Implementation of a Sustainable IoT Embedded System for Monitoring Temperature and Humidity in Photovoltaic Power Plants in the Amazon. Sustainability 17, no. 6 : 2347. Perdomo-Campos, A., Vega-González, I., Jorge, & Ramírez-Beltrán (2020). ESP32 based low-power and low-cost wireless sensor network. In The conference on Latin America Control Congress , pp. 275–285. Cham: Springer International Publishing. Zare, A., & Tariq Iqbal, M. (2020). Low-cost ESP32, Raspberry Pi, Node-Red, and MQTT protocol-based SCADA system. In 2020 IEEE International IOT, Electronics and Mechatronics Conference (IEMTRONICS) , pp. 1–5. IEEE. Arduino, V. (2015). Store Arduino Arduino Arduino LLC 372 : 372. Sabbatini, M. (2024). Hardening IoT Devices: An Analysis of the ESP32 Microcontroller. Additional Declarations No competing interests reported. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-8665176","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":578593858,"identity":"a0e2f548-b146-47ba-83fe-36acd6946169","order_by":0,"name":"Aamir Bashir Taas","email":"","orcid":"","institution":"Mirpur University of Science and Technology","correspondingAuthor":false,"prefix":"","firstName":"Aamir","middleName":"Bashir","lastName":"Taas","suffix":""},{"id":578593859,"identity":"4b09ccf2-07b7-4942-be15-c04ceb7382d2","order_by":1,"name":"Aneeka Karim","email":"","orcid":"","institution":"Mirpur University of Science and Technology","correspondingAuthor":false,"prefix":"","firstName":"Aneeka","middleName":"","lastName":"Karim","suffix":""},{"id":578593861,"identity":"290534fd-7768-4659-ad49-a676dbbcbebe","order_by":2,"name":"Kamran Bashir Taas","email":"","orcid":"","institution":"University of Missouri","correspondingAuthor":false,"prefix":"","firstName":"Kamran","middleName":"Bashir","lastName":"Taas","suffix":""},{"id":578593862,"identity":"11e05c7a-ed4e-4a8e-b56f-16e2c15555c0","order_by":3,"name":"Mai Abuhelwa","email":"","orcid":"","institution":"University of Missouri","correspondingAuthor":false,"prefix":"","firstName":"Mai","middleName":"","lastName":"Abuhelwa","suffix":""},{"id":578593863,"identity":"6930d7c8-e8d1-4d37-a06e-6867536f6e8d","order_by":4,"name":"Sohail Mumtaz","email":"","orcid":"","institution":"Gachon University","correspondingAuthor":false,"prefix":"","firstName":"Sohail","middleName":"","lastName":"Mumtaz","suffix":""},{"id":578593864,"identity":"a6f7aeb3-e675-4478-9409-56733e7be46b","order_by":5,"name":"Mohammed Almalaysha","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAy0lEQVRIiWNgGAWjYJCCDxUMNgxsELYEECcQ1ME44wxDGulaDiMLENCi2374YcPBHeej+fiPP3zMu8eCgZ89xwCvFrMzaYYNB8/czm2TyDE25nkmwSDZ84aAlgMJ5o8/toG08LBJ8xyQYDC4QciW888/NhxsO5fbxn/8GViLPUEtN3KADms7kNvGkGAGsUWCoJY3hUAtyWC/GM45IMEjceZZAQGHpW8EarHLnd9//OGDNwfq5Pjbkzfg1YIBeEhTPgpGwSgYBaMAKwAAKslLUsnGLiIAAAAASUVORK5CYII=","orcid":"","institution":"University of Missouri","correspondingAuthor":true,"prefix":"","firstName":"Mohammed","middleName":"","lastName":"Almalaysha","suffix":""}],"badges":[],"createdAt":"2026-01-22 04:38:24","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-8665176/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-8665176/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":102189772,"identity":"f1bdca90-7a09-4675-81d0-3881ba784621","added_by":"auto","created_at":"2026-02-09 08:57:22","extension":"jpg","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":452946,"visible":true,"origin":"","legend":"\u003cp\u003eSee image above for figure legend.\u003c/p\u003e","description":"","filename":"Picture1.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8665176/v1/cb924831b90ec627cb89bab7.jpg"},{"id":102189818,"identity":"2260fb36-1379-4212-b9e7-4fc52197fbf9","added_by":"auto","created_at":"2026-02-09 08:57:40","extension":"jpg","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":289312,"visible":true,"origin":"","legend":"\u003cp\u003eSee image above for figure legend.\u003c/p\u003e","description":"","filename":"Picture2.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8665176/v1/ba488aa73f441130528e05b6.jpg"},{"id":102189821,"identity":"5b887388-0011-418a-ba3b-cae0e9f3d7f9","added_by":"auto","created_at":"2026-02-09 08:57:41","extension":"jpg","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":299157,"visible":true,"origin":"","legend":"\u003cp\u003eSee image above for figure legend.\u003c/p\u003e","description":"","filename":"Picture3.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8665176/v1/46cdf9b090cf074801f05377.jpg"},{"id":102189771,"identity":"2c6b9d37-1e01-42fe-accc-9640d610fdad","added_by":"auto","created_at":"2026-02-09 08:57:22","extension":"jpg","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":304660,"visible":true,"origin":"","legend":"\u003cp\u003eSee image above for figure legend.\u003c/p\u003e","description":"","filename":"Picture4.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8665176/v1/33b45de598ecaf8307e31f2e.jpg"},{"id":102296790,"identity":"459a8cd5-3e05-4d6f-a466-dbea3cd2ab9f","added_by":"auto","created_at":"2026-02-10 10:21:45","extension":"jpg","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":404288,"visible":true,"origin":"","legend":"\u003cp\u003eSee image above for figure legend.\u003c/p\u003e","description":"","filename":"Picture5.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8665176/v1/36848871ac1acba6e649d954.jpg"},{"id":102189824,"identity":"7202dfad-d49a-4199-9f50-e04d282a0e3d","added_by":"auto","created_at":"2026-02-09 08:57:43","extension":"jpg","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":265827,"visible":true,"origin":"","legend":"\u003cp\u003eSee image above for figure legend.\u003c/p\u003e","description":"","filename":"Picture6.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8665176/v1/c5bc7807f5519691deb8e362.jpg"},{"id":102189829,"identity":"3359db1a-7bac-483e-b4d6-63020942ca27","added_by":"auto","created_at":"2026-02-09 08:57:49","extension":"jpg","order_by":7,"title":"Figure 7","display":"","copyAsset":false,"role":"figure","size":534149,"visible":true,"origin":"","legend":"\u003cp\u003eSee image above for figure legend.\u003c/p\u003e","description":"","filename":"Picture7.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8665176/v1/80ba55d909df1666b48191ab.jpg"},{"id":102189826,"identity":"990a0530-c546-43b1-8614-07400d35bd4c","added_by":"auto","created_at":"2026-02-09 08:57:45","extension":"jpg","order_by":8,"title":"Figure 8","display":"","copyAsset":false,"role":"figure","size":142943,"visible":true,"origin":"","legend":"\u003cp\u003eSee image above for figure legend.\u003c/p\u003e","description":"","filename":"Picture8.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8665176/v1/f3840af7f219175bfd483d8f.jpg"},{"id":105035051,"identity":"dd858217-a0c3-4cf9-b92a-37bac84043af","added_by":"auto","created_at":"2026-03-20 07:25:22","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":3745490,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-8665176/v1/616434ad-286b-44ff-b6af-ff47b492b32f.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Design and Implementation of a Low-Battery Powered IoT-Based Smart Trash Can System with Wireless Alerts","fulltext":[{"header":"1. Introduction","content":"\u003cp\u003eRapid urbanization and the increasing prevalence of apartment-based living have intensified the challenges associated with waste management in residential and public environments, particularly in multi-unit apartment buildings where shared waste infrastructure, space limitations, and building design constrain effective waste sorting and disposal, as reported in recent studies on urban waste management and environmental sustainability[\u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e1\u003c/span\u003e],[\u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2\u003c/span\u003e]. In multi-story apartment buildings, where hundreds of residents share common waste disposal facilities, improper usage of trash bins, particularly prolonged lid opening, can lead to rapid odor dispersion from decomposing municipal solid waste, negatively affecting indoor air quality and causing discomfort and nuisance to surrounding residents [\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e]. Such situations are frequently the result of human negligence, including distractions such as mobile phone conversations or simply forgetting to close the trash bin lid after disposal in busy residential settings. Consequently, there is a growing need for intelligent waste management solutions that not only monitor usage behavior at shared trash bins but also provide accountability and enforcement mechanisms to support cleaner and healthier apartment environments.\u003c/p\u003e \u003cp\u003eThe advancement of the Internet of Things has enabled the development of smart systems that integrate sensing, processing, communication, and power management into compact embedded platforms [\u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e4\u003c/span\u003e]. Among these platforms, the ESP32 microcontroller has emerged as a popular choice due to its built in Bluetooth Low Energy capability, low power operating modes, integrated WiFi connectivity, and suitability for real time embedded applications [\u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e5\u003c/span\u003e]. However, many IoT based monitoring systems continue to face limitations related to accurate timekeeping, reliable event storage, energy efficiency, and scalable alert delivery, particularly under conditions involving power failures or long-term unattended operation [\u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e6\u003c/span\u003e].\u003c/p\u003e \u003cp\u003eAccurate time information is essential for event-based monitoring systems where behavioral tracking, traceability, and policy enforcement are required. However, clocks used in microcontroller-based sensor nodes exhibit frequency variation and drift over time due to factors such as temperature differentials, manufacturing limitations, and aging effects, causing each node\u0026rsquo;s notion of time to deviate unless an external timing reference or synchronization mechanism is employed, thereby limiting the reliability of time stamping in long-term and low-power operation [\u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e7\u003c/span\u003e]. To overcome this limitation, external real time clock modules such as the DS3231 provide high accuracy timekeeping with battery backup, ensuring uninterrupted operation even during power loss. When combined with non-volatile flash memory in the ESP32, RTC based systems enable persistent storage of critical event records. This persistent time keeping capability is especially important in battery powered systems that frequently enter low power sleep states [\u003cspan citationid=\"CR8\" class=\"CitationRef\"\u003e8\u003c/span\u003e].\u003c/p\u003e \u003cp\u003eIn the context of smart waste management, recording when a trash bin is opened and how long it remains open is crucial. Prolonged lid opening, particularly beyond several minutes, significantly increases the likelihood of odor spreading into nearby living spaces. In apartment systems, this can disturb a large number of residents simultaneously [\u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e9\u003c/span\u003e]. Therefore, implementing a time threshold-based monitoring mechanism is an effective approach to identifying improper usage. Displaying the lid opening time directly on the trash bin increases immediate user awareness, while remote reporting enables supervisory control and intervention.\u003c/p\u003e \u003cp\u003eThis paper proposes an ESP32 based smart trash bin that monitors lid opening events using an infrared obstacle sensor, records accurate real time information from a DS3231 RTC, and stores the data in flash memory for persistence. The system displays recorded opening time on an LCD attached to the trash bin and wirelessly transmits the same information to a smartphone using Bluetooth Low Energy. The nRF Connect mobile application is employed as the BLE client to receive, visualize, and verify the transmitted time stamp data. To support reliable long-range alerting, prolonged lid opening events exceeding a predefined duration of five minutes are communicated through WiFi to a mobile application, enabling immediate alarm notification for security personnel or facility management. This separation allows BLE to be used for short range data validation, while WiFi is reserved for alarm delivery and user notification.\u003c/p\u003e \u003cp\u003eFurthermore, to ensure energy efficient operation and long-term deployment, the system is powered by a battery supply and employs deep sleep operation on the ESP32, waking only in response to lid opening events. This battery powered, event driven design significantly reduces idle power consumption while maintaining continuous monitoring capability. The integration of events triggered sensing, RTC based persistent time stamping, LCD visualization, BLE based validation, WiFi based alarm notification, and low power deep sleep operation makes the proposed system a practical and scalable solution for smart residential waste management and hygiene control applications.\u003c/p\u003e"},{"header":"2. Problem Statement and Motivation","content":"\u003cp\u003eIn densely populated residential environments such as apartment buildings, trash bins are commonly placed in shared hallways or disposal areas. When a trash-bin lid remains open for an extended period, unpleasant odors can spread into surrounding spaces, negatively affecting indoor air quality and causing discomfort to nearby residents [\u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e9\u003c/span\u003e]. In practice, prolonged lid opening frequently occurs due to human negligence. Common scenarios include users becoming distracted, such as during phone conversations, or simply forgetting to close the lid after waste disposal.\u003c/p\u003e \u003cp\u003eFrom a system-design perspective, reliable monitoring of trash-bin usage behavior presents several technical challenges. Accurate time-stamping is essential to determine when lid-opening events occur and how long the lid remains open; however, internal microcontroller clocks are prone to drift and lose time information during power interruptions, making them unsuitable for persistent event tracking. In addition, continuous system operation increases power consumption, limiting the feasibility of long-term battery-powered deployment. Furthermore, short-range wireless communication alone is insufficient for dependable alert delivery in large residential buildings where supervisory personnel may not be located near the trash bin. To address these challenges, an intelligent trash-bin monitoring system must integrate accurate time-keeping, persistent data storage, energy-efficient operation, and reliable wireless communication. The proposed smart trash bin achieves this through an event-driven, low-power architecture that combines real-time monitoring, local user feedback, and remote alerting, with specific system objectives and design requirements defined in Section \u003cspan refid=\"Sec3\" class=\"InternalRef\"\u003e3\u003c/span\u003e.\u003c/p\u003e"},{"header":"3. Objectives and Design Requirements","content":"\u003cdiv id=\"Sec4\" class=\"Section2\"\u003e \u003ch2\u003e3.1 Objectives\u003c/h2\u003e \u003cp\u003eThe primary objectives of this work are as follows:\u003c/p\u003e \u003cp\u003e \u003cul\u003e \u003cli\u003e \u003cp\u003e \u003cb\u003eBehavioral awareness\u003c/b\u003e: Promote responsible trash-bin usage by providing immediate, visible feedback to users through local display of lid-opening time information, thereby discouraging prolonged lid opening.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003e \u003cb\u003eAccurate and persistent event logging\u003c/b\u003e: Enable precise recording of lid-opening events by acquiring date and time information from an external real-time clock and storing time-stamp data persistently in non-volatile memory to ensure reliability across power interruptions.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003e \u003cb\u003eDual-mode remote monitoring and alerting\u003c/b\u003e: Support short-range visualization and validation of recorded time-stamp data using Bluetooth Low Energy and a mobile application, while enabling reliable long-range alert notification through WiFi when prolonged lid-opening conditions are detected.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003e \u003cb\u003eEnergy-efficient operation\u003c/b\u003e: Minimize overall power consumption through battery-powered deployment and event-driven deep-sleep operation of the ESP32 microcontroller, enabling long-term unattended use.\u003c/p\u003e \u003c/li\u003e \u003c/ul\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec5\" class=\"Section2\"\u003e \u003ch2\u003e3.2 Functional requirements\u003c/h2\u003e \u003cp\u003eThe system is required to:\u003c/p\u003e \u003cp\u003e \u003cul\u003e \u003cli\u003e \u003cp\u003eTo achieve the stated objectives, the system is required to provide the following functional capabilities:\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003eDetect trash-bin lid OPEN and CLOSED states reliably using an infrared obstacle sensor.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003eAcquire accurate date and time information from a DS3231 real-time clock via an I2C interface.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003eStore formatted time-stamp records and cumulative lid-opening counts in the ESP32 internal flash memory using EEPROM emulation.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003eDisplay the most recent lid-opening time and the total number of opening events on a local LCD for immediate user awareness.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003eTransmit recorded time-stamp data to a smartphone using Bluetooth Low Energy and support data validation through the nRF Connect mobile application.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003eDetect prolonged lid-opening events exceeding a predefined threshold of five minutes and transmit alarm notifications via WiFi to a mobile application for real-time alerting and intervention\u003c/p\u003e \u003c/li\u003e \u003c/ul\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec6\" class=\"Section2\"\u003e \u003ch2\u003e3.3 Non-functional requirements\u003c/h2\u003e \u003cp\u003eIn addition to functional capabilities, the system shall satisfy the following non-functional requirements:\u003c/p\u003e \u003cp\u003e \u003cul\u003e \u003cli\u003e \u003cp\u003e \u003cb\u003eRobustness\u003c/b\u003e: Ensure reliable operation under unexpected power loss, with persistent storage and recovery of time-stamp data and event records.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003e \u003cb\u003eLow power consumption\u003c/b\u003e: Support battery-powered deployment through aggressive power management, including deep-sleep duty cycling of the ESP32 microcontroller.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003e \u003cb\u003eUsability and deployment simplicity\u003c/b\u003e: Provide user-friendly visualization through a combination of local LCD display and mobile application interfaces, while maintaining a compact and easily deployable system design.\u003c/p\u003e \u003c/li\u003e \u003c/ul\u003e \u003c/p\u003e \u003c/div\u003e"},{"header":"4. System Architecture and Materials","content":"\u003cdiv id=\"Sec8\" class=\"Section2\"\u003e\n \u003ch2\u003e4.1 Hardware components\u003c/h2\u003e\n \u003cp\u003eThe proposed smart trash bin system is implemented using an integrated set of sensing, processing, display, storage, power management, and wireless communication hardware modules centered on the ESP32 microcontroller. The ESP32 TTGO T-Display serves as the central control unit and coordinates all core system operations, including lid-state detection, real-time clock (RTC) data acquisition, non-volatile flash memory logging, LCD updates, Bluetooth Low Energy (BLE) communication, Wi-Fi\u0026ndash;based alert transmission, and deep-sleep power management [\u003cspan class=\"CitationRef\"\u003e10\u003c/span\u003e]. The overall interaction between system components and data flow is illustrated in Fig. \u003cspan class=\"InternalRef\"\u003e1\u003c/span\u003e, which presents the complete system-level architecture of the proposed design.\u003c/p\u003e\n \u003cp\u003eAccurate and persistent time-stamping is achieved using the DS3231 real-time clock module, which provides high-precision date and time information via an I2C interface. The DS3231 incorporates a temperature-compensated crystal oscillator and onboard battery backup, enabling reliable timekeeping during power interruptions and ensuring consistent event logging [\u003cspan class=\"CitationRef\"\u003e11\u003c/span\u003e]. Lid-opening and closing events are detected using a 4-pin infrared (IR) obstacle avoidance sensor mounted near the trash-bin lid [\u003cspan class=\"CitationRef\"\u003e12\u003c/span\u003e]. The digital output of the sensor allows the ESP32 to distinguish between OPEN and CLOSED lid states and is also configured as an external wake-up source, enabling immediate system activation from deep-sleep mode upon lid opening.\u003c/p\u003e\n \u003cp\u003eTo provide immediate user feedback, a 16\u0026times;2 I2C-based liquid crystal display (LCD) is mounted on the trash bin and interfaced with the ESP32 via the I2C bus [\u003cspan class=\"CitationRef\"\u003e13\u003c/span\u003e]. The LCD displays the most recent lid-opening time and the cumulative number of opening events, enhancing user awareness and discouraging prolonged lid opening. An LED indicator is additionally connected to provide real-time visual confirmation of lid-detection events during system operation and testing.\u003c/p\u003e\n \u003cp\u003eShort-range wireless monitoring and data validation are supported through Bluetooth Low Energy communication [\u003cspan class=\"CitationRef\"\u003e14\u003c/span\u003e]. The ESP32 operates as a BLE server, advertising a custom service that allows a mobile device running the nRF Connect application to discover, connect, and retrieve stored time-stamp data from internal memory [\u003cspan class=\"CitationRef\"\u003e15\u003c/span\u003e]. This BLE interface is used exclusively for local visualization and validation of recorded events. For long-range alert delivery, the system incorporates a Wi-Fi\u0026ndash;based alarm mechanism using the Blynk mobile application [\u003cspan class=\"CitationRef\"\u003e16\u003c/span\u003e]. When the trash-bin lid remains open beyond a predefined threshold of five minutes, the ESP32 classifies the condition as a prolonged-opening event and transmits an alert via Wi-Fi to the Blynk cloud server, which generates a visual alarm notification on the user\u0026rsquo;s smartphone.\u003c/p\u003e\n \u003cp\u003e\u003cstrong\u003eTable 1.\u003c/strong\u003e tabulated record of Device names, key specifications, and functional roles of the hardware components used in the proposed ESP32-based smart trash bin system.\u0026nbsp;\u003c/p\u003e\n \u003ctable id=\"Taba\" border=\"1\"\u003e\n \u003cthead\u003e\n \u003ctr\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eDevice\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eQuantity\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eKey Specifications\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eFunction in the System\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eReference\u003c/p\u003e\n \u003c/th\u003e\n \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eESP-32 TTGO T-Display\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDual-core 32-bit Xtensa LX6 CPU (up to 240 MHz); operating voltage: 2.2\u0026ndash;3.6 V; built-in Bluetooth Low Energy (BLE); onboard flash memory with EEPROM emulation\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eCentral control unit of the system; processes IR sensor signals, acquires time from the RTC, stores time-stamp data in internal flash memory, updates the LCD display, manages BLE communication with the mobile device, and controls deep-sleep power management\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e6\u003c/span\u003e]\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDS3231 Real-Time Clock (RTC) Module\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eOperating voltage: 2.3\u0026ndash;5.5 V; I2C interface; temperature-compensated crystal oscillator; battery backup support\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eProvides accurate and persistent date\u0026ndash;time information for lid-opening event time-stamping, even during power interruptions\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e7\u003c/span\u003e]\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eIR Obstacle Avoidance Sensor (4-pin)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eOperating voltage: 3\u0026ndash;5 V; digital output; detection range: ~2\u0026ndash;30 cm; adjustable sensitivity\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDetects trash-bin lid opening and closing events and generates a digital trigger for the ESP-32; also serves as an external wake-up source from deep-sleep mode\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e8\u003c/span\u003e]\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e16\u0026times;2 I2C Liquid Crystal Display (LCD)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e16 characters \u0026times; 2 lines; operating voltage: 5 V; I2C interface (SDA/SCL); onboard contrast-adjustment potentiometer\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDisplays the recorded trash-bin opening time, date, and cumulative number of opening events; simplified wiring via I2C and built-in contrast control improves system compactness and reliability\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e9\u003c/span\u003e]\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eLED Indicator\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eForward voltage\u0026thinsp;\u0026asymp;\u0026thinsp;2 V; operating current\u0026thinsp;\u0026asymp;\u0026thinsp;20 mA\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eProvides visual confirmation of lid-open detection status and assists in system testing and debugging\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e19\u003c/span\u003e]\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eSmartphone with nRF Connect Application\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eAndroid/iOS device with BLE support; nRF Connect for Mobile\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eActs as the BLE client to receive, visualize, and monitor time-stamp data and alerts transmitted by the ESP-32\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e11\u003c/span\u003e]\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eTrash Bin (Prototype Enclosure)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003ePlastic container with lid-based opening mechanism\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u003cbr\u003e\u003c/p\u003e\n \u003cdiv class=\"gridtable\"\u003e\n \u003cdiv align=\"left\" class=\"colspec\"\u003e\u003cbr\u003e\u003c/div\u003e\u0026nbsp;\u003ctable id=\"Tabb\" border=\"1\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003ePhysical enclosure for mounting the ESP-32, IR sensor, LCD, and related circuitry, representing the smart trash-bin application environment\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n \u003c/div\u003e\n \u003cp\u003e\u003cbr\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u003cstrong\u003e//\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eLithium-ion Battery (Li-Po)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eRechargeable single-cell lithium-ion battery; nominal voltage 3.7 V; maximum charging voltage 4.2 V;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eSupplies power to the ESP32 microcontroller and associated peripheral modules, enabling standalone battery powered operation and supporting low power deep sleep functionality for extended deployment\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e13\u003c/span\u003e]\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eSmartphone with Blynk Mobile Application\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eiOS smartphone with WiFi connectivity; Blynk mobile application installed\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eReceives prolonged lid opening alarm notifications transmitted via WiFi by the ESP32 when the trash bin remains open\u0026thinsp;\u0026gt;\u0026thinsp;5 minutes.\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e12\u003c/span\u003e]\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n \u003cp\u003e\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec9\" class=\"Section2\"\u003e\n \u003ch2\u003e4.2 Software components\u003c/h2\u003e\n \u003cp\u003eThe firmware for the proposed system was developed using the Arduino Integrated Development Environment (IDE) [\u003cspan class=\"CitationRef\"\u003e20\u003c/span\u003e], version 1.8.19, which provides a flexible and widely supported platform for programming the ESP-32 microcontroller. The Arduino framework simplifies peripheral configuration, library integration, and firmware deployment, making it suitable for rapid prototyping and experimental validation. Several software libraries were employed to support system functionality. The Wire.h library was used to establish I2C communication between the ESP-32 and peripheral devices, including the DS3231 RTC module and the 16\u0026times;2 LCD. Real-time clock functionality was implemented using the RtcDS3231.h library, which provides access to date\u0026ndash;time registers, validity checking, and error handling. LCD visualization was handled using the Liquid Crystal_I2C.h library, enabling formatted display of real-time data.\u003c/p\u003e\n \u003cp\u003ePersistent data storage was implemented using the EEPROM.h library, which provides EEPROM emulation within the ESP-32\u0026rsquo;s onboard flash memory [\u003cspan class=\"CitationRef\"\u003e21\u003c/span\u003e]. This mechanism was used to store formatted time-stamp records, memory address pointers, and the cumulative number of lid-opening events, ensuring that critical data is preserved across power cycles. Bluetooth Low Energy communication was implemented using the ESP-32 BLE software stack, including the BLEDevice.h, BLEServer.h, BLEUtils.h, and BLE2902.h libraries. These libraries configure the ESP-32 as a BLE server and enable the transmission of time-stamp data through custom services and characteristics. On the client side, the nRF Connect for Mobile application was used to scan, connect, and visualize the transmitted data.\u003c/p\u003e\n \u003cp\u003eThe operational logic of the system is summarized in Fig. \u003cspan class=\"InternalRef\"\u003e3\u003c/span\u003e, which illustrates the sequential workflow beginning with lid-state detection, followed by RTC-based time acquisition, flash-memory logging of time-stamp data, and real-time LCD updates. The firmware then disseminates the stored time-stamp information via Bluetooth Low Energy (BLE) to the nRF Connect mobile application for short-range visualization and validation. In parallel, the firmware continuously monitors the lid-open duration, and when the lid remains open beyond a predefined threshold of five minutes, the ESP-32 triggers a prolonged-opening alert and transmits an alarm notification via Wi-Fi to the Blynk mobile application. This software-level separation allows BLE communication to be used exclusively for time-stamp dissemination, while Wi-Fi connectivity enables reliable long-range alarm delivery and user notification. Following lid closure, the system transitions into deep-sleep mode to minimize power consumption, with wake-up events driven by subsequent lid-opening actions.\u003c/p\u003e\n\u003c/div\u003e"},{"header":"5. Methods and System Operation","content":"\u003cp\u003eThe proposed smart trash bin operates using an event driven methodology that integrates lid state detection, accurate time acquisition, persistent data storage, local visualization, wireless communication, and energy efficient operation. System behavior is governed by a state-based control logic that ensures reliable detection of lid opening events while preventing redundant data logging. The event driven operation further integrates battery powered execution, short range Bluetooth Low Energy based data validation, and long-range WiFi based alarm notification to support reliable monitoring and timely intervention.\u003c/p\u003e\n\u003cdiv id=\"Sec11\" class=\"Section2\"\u003e\n \u003ch2\u003e5.1 Lid-Event Detection and State Logic\u003c/h2\u003e\n \u003cp\u003eThe system operates using two primary states, OPEN and CLOSED, which are determined by the digital output of an infrared obstacle avoidance sensor mounted near the trash bin lid. Detection of an object corresponding to lid opening triggers a transition from the CLOSED state to the OPEN state, while the absence of an object indicates lid closure and returns the system to the CLOSED state. To prevent repeated logging during a single opening event, a state transition mechanism is implemented in the ESP32 firmware. A time stamp is recorded only when a valid transition from CLOSED to OPEN is detected. This approach ensures that each lid opening event is logged exactly once, regardless of how long the lid remains open, thereby maintaining accurate event counts and eliminating duplicate records.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec12\" class=\"Section2\"\u003e\n \u003ch2\u003e5.2 RTC Time Acquisition and Formatting\u003c/h2\u003e\n \u003cp\u003eUpon detection of a valid lid opening event, the ESP32 acquires the current date and time from the DS3231 real time clock through the I2C interface. The DS3231 provides high precision, temperature compensated time keeping and maintains accurate timing during power interruptions using its onboard battery backup. The acquired time data are formatted into a human readable string using a consistent month day year and hour minute second format. This unified formatting is used across all system interfaces, including local LCD display, serial output, Bluetooth Low Energy transmission, and WiFi based alert reporting, ensuring consistency and clarity across the system.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec13\" class=\"Section2\"\u003e\n \u003ch2\u003e5.3 Persistent Storage in ESP-32 Flash Memory (EEPROM Emulation)\u003c/h2\u003e\n \u003cp\u003eEach validated lid opening event generates a formatted time stamp that is stored in the ESP32 internal flash memory using EEPROM emulation. In parallel, a cumulative counter records the total number of lid opening events. Both the stored time stamps and the event counter are retained across power cycles, enabling reliable recovery of the system state following resets or unexpected power interruptions.\u003c/p\u003e\n \u003cp\u003eTime-stamp data are written sequentially into fixed-length memory blocks, ensuring structured data organization and facilitating straightforward retrieval for verification and analysis. This persistent storage strategy enables long-term monitoring, traceability, and accountability of trash-bin usage behavior. Figure \u003cspan class=\"InternalRef\"\u003e4\u003c/span\u003e illustrates the Serial Monitor output corresponding to four consecutive lid-opening and closing events, highlighting stored time stamps, memory address progression, and persistence of the opening counter. \u003cstrong\u003eTable\u0026nbsp;2\u003c/strong\u003e provides a tabulated summary of all recorded lid-opening and closing events, including date and time (month/day/year, hour, minute, and second), as well as the memory addresses before and after each written operation.\u003c/p\u003e\n \u003cdiv class=\"gridtable\"\u003e\n \u003cdiv align=\"char\" class=\"colspec\"\u003e\u003cstrong\u003eTable 2.\u0026nbsp;\u003c/strong\u003eTabulated record of lid-opening/closing events and associated flash memory address transitions.\u003c/div\u003e\u0026nbsp;\u003ctable id=\"Tabc\" border=\"1\"\u003e\n \u003ccolgroup cols=\"10\"\u003e\u003c/colgroup\u003e\n \u003cthead\u003e\n \u003ctr\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eSr. No\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eAddress before writing in Memory\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eAddress before writing in Memory\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eNo. of times trash can open\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eMonth\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eDay\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eYear\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eHours\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eMinutes\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eSeconds\u003c/p\u003e\n \u003c/th\u003e\n \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e78\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e97\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e113\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e07\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e10\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e2022\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e14\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e15\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e48\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e2\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e97\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e116\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e114\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e07\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e10\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e2022\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e14\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e21\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e22\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e3\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e226\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e135\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e115\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e07\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e10\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e2022\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e14\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e28\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e50\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e4\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e135\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e116\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e116\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e07\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e10\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e2022\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e14\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e34\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e32\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n \u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec14\" class=\"Section2\"\u003e\n \u003ch2\u003e5.4 Local LCD Visualization and User Awareness\u003c/h2\u003e\n \u003cp\u003eTo enhance user awareness and discourage unnecessary or prolonged lid opening, the system provides immediate local feedback through a 16\u0026times;2 I2C-based liquid crystal display (LCD) mounted directly on the trash bin. The LCD presents a descriptive header, followed by the most recent lid-opening time stamp and the cumulative number of opening events. In addition to Serial Monitor logging, the recorded events are visualized locally on the LCD in real time. Figure \u003cspan class=\"InternalRef\"\u003e5\u003c/span\u003e shows four representative LCD snapshots corresponding to consecutive trash-can opening events, clearly displaying the time stamps stored and the continuously updated opening counter. This direct visual feedback reinforces transparency by informing users that lid activity is actively monitored and persistently recorded.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec15\" class=\"Section2\"\u003e\n \u003ch2\u003e5.5 BLE Reporting and Mobile Visualization Using nRF Connect Application\u003c/h2\u003e\n \u003cp\u003eIn addition to local LCD visualization and serial data logging, the system supports wireless monitoring of trash can lid activity through Bluetooth Low Energy communication implemented on the ESP32 platform. Lid opening time stamps are transmitted wirelessly to a mobile device and visualized in real time using the nRF Connect application, enabling remote inspection without physical access to the trash bin. Figure \u003cspan class=\"InternalRef\"\u003e6\u003c/span\u003e shows the nRF Connect interface for three consecutive lid opening events, where each event appears as an updated characteristic value displayed as a formatted date and time string in month day year and hour minute second format. These values correspond to the instant at which each lid opening event is detected and validated by the system.\u003c/p\u003e\n \u003cdiv class=\"gridtable\"\u003e\n \u003cdiv align=\"char\" class=\"colspec\"\u003e\u003cstrong\u003eTable 3.\u003c/strong\u003e Tabulated record of consecutive trash-can lid-opening events showing BLE-transmitted date\u0026ndash;time stamps \u0026nbsp;as displayed in the nRF Connect mobile application.\u003c/div\u003e\u0026nbsp;\u003ctable id=\"Tabd\" border=\"1\"\u003e\n \u003ccolgroup cols=\"7\"\u003e\u003c/colgroup\u003e\n \u003cthead\u003e\n \u003ctr\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eSr. No\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eMonth\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eDay\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eYear\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eHours\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eMinutes\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eSeconds\u003c/p\u003e\n \u003c/th\u003e\n \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e07\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e10\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e2022\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e15\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e53\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e13\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e2\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e07\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e10\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e2022\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e16\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e03\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e45\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e3\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e07\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e10\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e2022\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e16\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e11\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e40\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n \u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec16\" class=\"Section2\"\u003e\n \u003ch2\u003e5.6. Simultaneous Multi-Interface Validation and Prolonged-Opening Alert Mechanism\u003c/h2\u003e\n \u003cp\u003eA key validation feature of the proposed system is the consistent representation of identical time-stamp data across multiple interfaces, combined with automated prolonged-opening alert generation. For each trash-can lid-opening event, the formatted date and time value is generated by the ESP32 and stored in nonvolatile flash memory. The stored time stamp is subsequently retrieved without modification and disseminated to all validation interfaces. Figure \u003cspan class=\"InternalRef\"\u003e7\u003c/span\u003e illustrates this multi-interface validation by presenting the same stored lid-opening time stamp as displayed on the Arduino IDE Serial Monitor, the local I2C-based LCD, and the nRF Connect mobile application via Bluetooth Low Energy. The Serial Monitor displays the time stamp read directly from internal memory, confirming correct data storage and retrieval. The LCD provides immediate local visualization of the stored event, while the mobile interface enables wireless BLE-based access to the same data for validation. This validation confirms that the alarm notification is generated using the same stored time-stamp data that are displayed locally and transmitted via BLE, ensuring consistency between validation and alerting pathways.\u003c/p\u003e\n \u003cp\u003eIn parallel with time-stamp validation, the system continuously monitors the lid-open duration. When the lid remains open beyond a predefined threshold of five minutes, the ESP32 classifies the condition as a prolonged-opening event and transmits an alert signal via WiFi to the Blynk mobile application. As shown in Fig. \u003cspan class=\"InternalRef\"\u003e8\u003c/span\u003e, the mobile application generates a clear visual alarm notification indicating that the trash can has remained open beyond the allowable duration, thereby notifying security personnel or facility management. In the proposed architecture, Bluetooth Low Energy is intentionally limited to short-range data validation, while WiFi is used for robust long-range alarm delivery and user notification. This dual-communication strategy ensures both data integrity and timely intervention for odor control and operational management.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec17\" class=\"Section2\"\u003e\n \u003ch2\u003e5.7 Low-Power Operation and Deep-Sleep Management\u003c/h2\u003e\n \u003cp\u003eTo minimize overall energy consumption, the system employs a low-power strategy centered on the ESP32 deep-sleep mode. Following a lid-opening event, when the lid transitions from the OPEN state to the CLOSED state, a thirty-second verification delay is initiated to ensure that the lid remains closed. After this confirmation period, the ESP32 enters deep-sleep mode, during which most internal peripherals and processing units are powered down.\u003c/p\u003e\n \u003cp\u003eWake-up from deep sleep is configured using an external wake-up source connected to the infrared sensor output. Any subsequent lid-opening event produces a logic-level change at the designated GPIO pin, immediately restoring full system operation. This event-driven wake-up mechanism maintains rapid responsiveness while minimizing energy consumption during idle periods. Such low-power operation is particularly important for battery-powered deployment, as it significantly extends operational lifetime without compromising system reliability.\u003c/p\u003e\n\u003c/div\u003e"},{"header":"6. Results and Validation","content":"\u003cp\u003eExperimental evaluation confirms reliable operation of the proposed smart trash bin system under repeated lid-opening and closing events. The ESP32 consistently recorded time-stamped lid-opening events in internal flash memory, with memory addresses advancing sequentially and the cumulative opening count remaining persistent across system resets and power interruptions. These results verify correct integration of RTC-based time acquisition with nonvolatile data storage. Local visualization through the LCD reliably displayed the most recent lid-opening time along with the cumulative number of opening events. In parallel, Bluetooth Low Energy transmission using the nRF Connect mobile application accurately reflected updated time-stamp data following each opening event. The identical time-stamp values observed across the Serial Monitor, LCD, and BLE-based mobile interface confirm correct synchronization among time acquisition, memory storage, and wireless data dissemination.\u003c/p\u003e \u003cp\u003eThe WiFi-based prolonged-opening alert mechanism was validated by maintaining the trash-can lid in the open state beyond the five-minute threshold. Upon exceeding this duration, the ESP32 successfully transmitted an alert via WiFi to the mobile application, where a visual alarm notification was generated in real time. This confirms reliable detection of prolonged opening events and correct long-range alarm delivery under battery-powered operation.\u003c/p\u003e"},{"header":"7. Discussion","content":"\u003cp\u003eThe proposed system provides a practical and effective solution for monitoring trash-can usage behavior in shared residential environments. By combining accurate RTC-based time keeping, persistent flash memory logging, local user feedback, and wireless communication, the system directly addresses odor-control challenges associated with prolonged lid opening while promoting user accountability. A key strength of the design lies in the separation of communication roles. Bluetooth Low Energy is used for short-range visualization and validation of time-stamp data due to its low-power characteristics, while WiFi is employed for reliable long-range alarm notification through a mobile application. This hybrid communication strategy enhances scalability and ensures timely intervention without compromising energy efficiency.\u003c/p\u003e \u003cp\u003eDespite its effectiveness, the current implementation has limitations. Infrared sensor performance is sensitive to placement and surface reflectivity, which may affect detection accuracy under varying environmental conditions. Long-term data storage is constrained by the finite capacity of internal flash memory, and extended deployments may require external storage solutions. Additionally, WiFi-based alerting introduces dependency on network availability. These limitations can be addressed in future work through improved sensing techniques, expandable storage options, and adaptive communication strategies.\u003c/p\u003e"},{"header":"9. Conclusion","content":"\u003cp\u003eThis work presents an ESP32 based smart trash bin capable of detecting lid opening events, recording accurate DS3231 RTC time stamps, storing data persistently in internal flash memory, and displaying the information locally on an LCD. The same data are transmitted wirelessly via Bluetooth Low Energy and validated using the nRF Connect mobile application. To address odor control and enforcement requirements, a prolonged opening detection mechanism is implemented, which triggers a real time alarm notification through WiFi to a mobile application when the lid remains open beyond a predefined threshold. Deep sleep operation significantly reduces power consumption, enabling reliable battery powered operation and supporting long term unattended deployment. The proposed system demonstrates a low cost, scalable, and practical approach for smart waste management and monitoring applications in shared residential environments.\u003c/p\u003e"},{"header":"Declarations","content":"\u003cp\u003e \u003ch2\u003eCompeting Interests\u003c/h2\u003e \u003cp\u003eThe authors declare that they have no competing interests relevant to the content of this article.\u003c/p\u003e \u003c/p\u003e\u003ch2\u003eFunding\u003c/h2\u003e \u003cp\u003eThe authors declare that no funds, grants, or other support were received during the preparation of this manuscript.\u003c/p\u003e\u003ch2\u003eAuthor Contribution\u003c/h2\u003e\u003cp\u003eAamir Bashir Taas and Kamran Bashir Taas contributed to the system design and overall architecture of the smart trash can. Kamran Bashir Taas proposed the initial concept and system idea. Aamir Bashir Taas developed the complete system architecture, implemented the software, performed wireless communication integration, conducted experiments, and collected the data. Aneeka Karim and Mai Abuhelwa contributed to data analysis and validation of the results. Kamran Bashir Taas, Sohail Mumtaz, and Mohammed Almalaysha supervised the research and provided critical review and revisions. All authors reviewed and approved the final manuscript.\u003c/p\u003e\u003ch2\u003eAcknowledgement\u003c/h2\u003e\u003cp\u003eAI-based tools were used solely for language and grammar checking.\u003c/p\u003e\u003ch2\u003eData Availability\u003c/h2\u003e\u003cp\u003eAll data supporting the findings of this study are available within the article. Additional materials can be provided by the corresponding author upon reasonable request.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\u003cli\u003e\u003cspan\u003eAbubakar, I., Rimi, K. M., Maniruzzaman, U. L., Dano, Faez, S., AlShihri, Maher, S., AlShammari, Sayed Mohammed, S., \u0026amp; Ahmed (2022). Wadee Ahmed Ghanem Al-Gehlani, and Tareq I. Alrawaf. Environmental sustainability impacts of solid waste management practices in the global South. \u003cem\u003eInternational journal of environmental research and public health\u003c/em\u003e, \u003cem\u003e19\u003c/em\u003e, 12717.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBhavna Middha, \u0026amp; Horne, R. (2023). We Can\u0026rsquo;t Keep Putting Apartment Residents\u0026rsquo; Waste in the Too Hard Basket. \u003cem\u003eThe Conversation March 1\u003c/em\u003e, \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://theconversation.com/we-cant-keep-putting-apartment-residents-waste-in-the-too-hard-basket-200545\u003c/span\u003e\u003cspan address=\"https://theconversation.com/we-cant-keep-putting-apartment-residents-waste-in-the-too-hard-basket-200545\" targettype=\"URL\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eVoukkali, I., Papamichael, I., Loizia, P., \u0026amp; Antonis, A. (2024). Zorpas. Urbanization and solid waste production: prospects and challenges. \u003cem\u003eEnvironmental Science and Pollution Research\u003c/em\u003e, \u003cem\u003e31\u003c/em\u003e(12), 17678\u0026ndash;17689.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eShafique, K., Khawaja, B. A., Sabir, F., Qazi, S., \u0026amp; Muhammad Mustaqim. (2020). Internet of things (IoT) for next-generation smart systems: A review of current challenges, future trends and prospects for emerging 5G-IoT scenarios. \u003cem\u003eIEEE access\u003c/em\u003e, \u003cem\u003e8\u003c/em\u003e, 23022\u0026ndash;23040.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eEridani, D., Rochim, A. F., \u0026amp; Faiz Noerdiyan Cesara. (2021). Comparative performance study of ESP-NOW, Wi-Fi, bluetooth protocols based on range, transmission speed, latency, energy usage and barrier resistance. \u003cem\u003e2021 international seminar on application for technology of information and communication (iSemantic)\u003c/em\u003e (pp. 322\u0026ndash;328). IEEE.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAlaoui, M. L., Tahiri, M., \u0026amp; Belhiah and Soumia Ziti. IoT-Enabled Waste Management in Smart Cities: A Systematic Literature Review.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSTMicroelectronics, \u0026amp; Geneva (March 2018). \u003cem\u003e*How to Optimize STM32 MCUs Internal RC Oscillator Accuracy*. Application Note AN5067\u003c/em\u003e. STMicroelectronics. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://www.st.com/resource/en/application_note/an5067-how-to-optimize-stm32-mcus-internal-rc-oscillator-accuracy-stmicroelectronics.pdf\u003c/span\u003e\u003cspan address=\"https://www.st.com/resource/en/application_note/an5067-how-to-optimize-stm32-mcus-internal-rc-oscillator-accuracy-stmicroelectronics.pdf\" targettype=\"URL\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eMujmule, P., Avhad, V., Joshi, S., Muli, R., \u0026amp; Kshirsagar, K. (2024). Uninterrupted Clock Using GPS, DS3231 RTC \u0026amp; NTP Pool Server. In \u003cem\u003e2024 International Conference on IoT Based Control Networks and Intelligent Systems (ICICNIS)\u003c/em\u003e, pp. 709\u0026ndash;714. IEEE.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eCarey, C., Phelan, W., \u0026amp; Boland, C. (2006). *Organic Waste Management in Apartments*. Environmental RTDI Programme 2000\u0026ndash;2006, Final Report (2005-WRM-DS-23-M1). Dublin: Environmental Protection Agency. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://www.epa.ie/publications/research/waste/ERTDI-No71_WEB-final-with-cover.pdf\u003c/span\u003e\u003cspan address=\"https://www.epa.ie/publications/research/waste/ERTDI-No71_WEB-final-with-cover.pdf\" targettype=\"URL\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eCameron, N. (2023). ESP32 microcontroller. \u003cem\u003eESP32 Formats and Communication: Application of Communication Protocols with ESP32 Microcontroller\u003c/em\u003e (pp. 1\u0026ndash;54). A.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eMujmule, P., Avhad, V., Joshi, S., Muli, R., \u0026amp; Kshirsagar, K. (2024). Uninterrupted Clock Using GPS, DS3231 RTC \u0026amp; NTP Pool Server. In \u003cem\u003e2024 International Conference on IoT Based Control Networks and Intelligent Systems (ICICNIS)\u003c/em\u003e, pp. 709\u0026ndash;714. IEEE.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eKrishna, G., Joshi, K., Singh, S., Singh, S., Raghuvanshi, C. S., \u0026amp; Dilip Kumar Jang Bahadur Saini. (2024). and. Obstacle Detection System for Visually Impaired Person Using Internet of Things and Smartphone Module. In \u003cem\u003eInternational Conference on Computing and Communication Networks\u003c/em\u003e, pp. 467\u0026ndash;481. Singapore: Springer Nature Singapore.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eKhan, M., Haris, M., Imran, Ameen Uddin, S., \u0026amp; Ali (2025). I2C Based Real Time-Clock College Bell Automation. \u003cem\u003eIndian Journal of Electronics and Communication Engineering (INDJECE)\u003c/em\u003e, \u003cem\u003e2\u003c/em\u003e(1), 01\u0026ndash;07.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eTosi, J., Taffoni, F., Santacatterina, M., Sannino, R., \u0026amp; Domenico Formica. (2017). Performance evaluation of bluetooth low energy: A systematic review. \u003cem\u003eSensors (Basel, Switzerland)\u003c/em\u003e, \u003cem\u003e17\u003c/em\u003e(12), 2898.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eEliasz, A. (2024). Zephyr RTOS Application Development Environments and Zephyr Application Building Principles. \u003cem\u003eZephyr RTOS Embedded C Programming: Using Embedded RTOS POSIX API\u003c/em\u003e (pp. 69\u0026ndash;122). A.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAsry, A., Insan, L., Lutfi, A., Umar, \u0026amp; Ahmad, R. (2024). Monitoring System for Traffic Light Lamp Damage Using Blynk Application Based On Iot Esp32. \u003cem\u003eJurnal Teknologi Transportasi Dan Logistik\u003c/em\u003e, \u003cem\u003e5\u003c/em\u003e(1), 59\u0026ndash;66.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eLisboa, Y., Santos, L., Lobato, E., Fonseca, W., \u0026amp; Silva, K. (2025). Iris Rodrigues, and Marcelo Silva. Design and Implementation of a Sustainable IoT Embedded System for Monitoring Temperature and Humidity in Photovoltaic Power Plants in the Amazon. \u003cem\u003eSustainability\u003c/em\u003e 17, no. 6 : 2347.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003ePerdomo-Campos, A., Vega-Gonz\u0026aacute;lez, I., Jorge, \u0026amp; Ram\u0026iacute;rez-Beltr\u0026aacute;n (2020). ESP32 based low-power and low-cost wireless sensor network. In \u003cem\u003eThe conference on Latin America Control Congress\u003c/em\u003e, pp. 275\u0026ndash;285. Cham: Springer International Publishing.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eZare, A., \u0026amp; Tariq Iqbal, M. (2020). Low-cost ESP32, Raspberry Pi, Node-Red, and MQTT protocol-based SCADA system. In \u003cem\u003e2020 IEEE International IOT, Electronics and Mechatronics Conference (IEMTRONICS)\u003c/em\u003e, pp. 1\u0026ndash;5. IEEE.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eArduino, V. (2015). \u003cem\u003eStore Arduino Arduino Arduino LLC\u003c/em\u003e 372 : 372.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSabbatini, M. (2024). Hardening IoT Devices: An Analysis of the ESP32 Microcontroller.\u003c/span\u003e\u003c/li\u003e\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Internet of Things (IoT), Smart trash can system, ESP32 microcontroller, Low-power embedded systems, Bluetooth Low Energy (BLE), Wi-Fi alerting","lastPublishedDoi":"10.21203/rs.3.rs-8665176/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-8665176/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eAccurate and persistent time stamping is a fundamental requirement in smart infrastructure and Internet of Things applications, particularly in systems that must tolerate power interruptions and operate under low power duty cycles. This paper presents an ESP32 based smart trash bin designed to monitor lid opening events, record usage behavior, and mitigate odor dispersion in densely populated residential environments such as apartment buildings. The system detects lid state using an infrared obstacle sensor and acquires precise date and time information from a DS3231 real time clock through an I2C interface. Upon lid opening, the time stamp is displayed locally on an LCD mounted on the trash bin and stored in the ESP32 internal flash memory to preserve records across resets or unexpected power loss. Time stamp data are also transmitted through Bluetooth Low Energy and visualized using the nRF Connect mobile application for short range monitoring and validation. When the lid remains open beyond a predefined threshold of five minutes, the system generates a prolonged opening event and transmits an alarm notification through WiFi to the Blynk mobile application to support timely intervention by security personnel or facility management. The hardware is powered by a battery supply and the ESP32 enters deep sleep mode after lid closure to minimize energy consumption while maintaining event driven wake up capability. Experimental results confirm reliable time stamp logging, consistent multi-interface visualization, robust wireless reporting, and effective low power operation, demonstrating the suitability of the proposed system for practical smart residential waste management applications.\u003c/p\u003e","manuscriptTitle":"Design and Implementation of a Low-Battery Powered IoT-Based Smart Trash Can System with Wireless Alerts","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-02-09 08:55:36","doi":"10.21203/rs.3.rs-8665176/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"8a3d8a1c-a593-4a6d-b71b-f53e75de2fba","owner":[],"postedDate":"February 9th, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[],"tags":[],"updatedAt":"2026-03-19T02:40:10+00:00","versionOfRecord":[],"versionCreatedAt":"2026-02-09 08:55:36","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-8665176","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-8665176","identity":"rs-8665176","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2026) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00