A designer’s guide to smart battery applications