Used electric-vehicle batteries for microgrid