Environmental protection detection of remaining battery