Batteries have been central to the rise of electric vehicles (EVs) but are also critical to wind and solar power because of the intermittent nature of these energy sources.