Heavy metal contamination in water sources poses a serious risk to both human health and the environment, particularly at low concentrations where early detection is critical. Simultaneously, the need for sustainable energy has fueled interest in multifunctional materials that can serve both as energy harvesters and environmental sensors. In this study, we engineered cellulose nanofibril (CNF) films processed under three distinct fibrillation pressures, followed by drying under controlled pressing conditions, to investigate the influence of structural parameters—such as porosity and fibril network density—on dual performance as triboelectric nanogenerators (TENGs) and heavy metal detectors. Characterization techniques, including fiber quality analysis (FQA), scanning electron microscopy (SEM), and surface profilometry, revealed that CNF films prepared at intermediate pressure conditions exhibited a highly interconnected fibril network with optimal surface roughness. These films demonstrated superior electrical output when integrated into TENG devices, with an open-circuit voltage of 200 V, enabling the conversion of mechanical energy into electricity sufficient to power low-energy electronic devices.
In addition, these CNF-based TENGs were highly responsive to the presence of heavy metal ions—including Fe³⁺, Zn²⁺, and Cu²⁺—in aqueous environments. Upon exposure, distinctive variations in electrical output were observed, corresponding to specific ion types. The system exhibited high sensitivity even at trace levels, indicating strong electrostatic interactions between the metal ions and the CNF film surface. This behavior was leveraged to develop a self-powered environmental sensor capable of detecting heavy metal pollution in real-time. The resulting CNF-TENG system offers a green, low-cost platform for environmental monitoring and energy harvesting, with promising applications in water quality surveillance, wearable electronics, and decentralized sensing infrastructure in resource-limited settings.