Abstract
Biofuels have emerged as a promising alternative to conventional fuels, offering improved environmental sustainability. Nevertheless, inadequate control of their physicochemical properties can lead to increased emissions and potential engine damage. Existing methods for regulating these properties depend on costly and sophisticated laboratory equipment, which poses significant challenges for integration into industrial production processes. Three-dimensional printing technology provides a cost-effective alternative to traditional fabrication methods, offering particular benefits for the development of low-cost designs for detecting liquid properties. In this work, we present a sensor system for assessing biofuel solutions. The presented device employs piezoelectric sensors integrated with 3D-printed, liquid-filled cells whose structural design is refined through experimental validation and novel optimization strategies that account for sensitivity, recovery and resolution. This system incorporates discrete electronic circuits and a microcontroller, within which artificial intelligence algorithms are implemented to correlate sensor responses with fluid viscosity and density. The proposed approach achieves calibration and resolution errors as low as 0.99% and 1.48×10-2 mPa·s for viscosity, and 0.0485% and 1.9×10-4 g/mL for density, enabling detection of small compositional variations in biofuels. Additionally, algorithmic methodologies for dimensionality reduction and data treatment are introduced to address temporal drift, enhance sensor lifespan and accelerate data acquisition. The resulting system is compact, precise and applicable to diverse industrial liquids.