Perovskite thin film battery design