Development of a sensor for early fault detection in high-performance batteries