You might look into fuel cells which use a form of electrolysis to create electricity.