The device uses bacteria to degrade organic matter and produce electricity, which is then used to split water using electrolysis to produce hydrogen.