This article gives you an overview of how to design a battery level indicator. You can use this circuit to check car battery or inverter.