battery precharge detection