BATTERY DETECTION