battery sensor now intelligently determines threshold values