One of the most successful fuel cells is the hydrogen-oxygen fuel cell.
Principle: Chemical energy of hydrogen fuel is directly converted into electrical energy. It uses the reaction of hydrogen with oxygen to form water.
Construction: The fuel cell consists of two porous carbon electrodes. Hydrogen gas is passed through the anode and oxygen gas is passed through the cathode. An aqueous solution of sodium hydroxide is used as the electrolyte. Catalysts like finely divided platinum or palladium are incorporated into the electrodes to increase the rate of electrode reactions.
Working and reaction: Hydrogen and oxygen are bubbled through the porous carbon electrodes into the concentrated aqueous sodium hydroxide solution. Oxidation of $H_2$ occurs at the anode and reduction of $O_2$ occurs at the cathode.
Cathode reaction: $O_{2(g)} + 2H_2O_{(l)} + 4e^- \rightarrow 4OH^-_{(aq)}$
Anode reaction: $2H_{2(g)} + 4OH^-_{(aq)} \rightarrow 4H_2O_{(l)} + 4e^-$
Overall cell reaction: $2H_{2(g)} + O_{2(g)} \rightarrow 2H_2O_{(l)}$
Thus,water is produced by the direct reaction of $H_2$ and $O_2$,converting chemical energy directly into electrical energy.