Battery voltage sampling principle