Perovskite battery electrolysis water to produce hydrogen