To obtain hydrogen in its pure state, it is necessary to extract it from the compounds in which it is combined, mainly water, fossil fuels and organic matter (biomass).
From water: Electrolysis
Through electrolysis, water is broken down to form hydrogen and oxygen. It really is about carrying out the reverse process to the hydrogen combustion reaction (3).
As can be seen, an energy input is needed in this reaction, which will be supplied by electrical energy. The electrolysis mechanism is as follows: in an electrochemical cell there are two electrodes (cathode and anode) joined by a conductive medium made up of H+ ions (protons) dissolved in water. The passage of electric current between cathode and anode causes the water to dissociate, forming hydrogen at the cathode and oxygen at the anode. Later we will see another type of electrochemical cells ("fuel cells") that act just the other way around, consuming hydrogen and oxygen to produce electricity and water.
From fossil fuels
As previously stated, fossil fuels are "carriers of hydrogen", because they contain it in their molecule. To obtain it as hydrogen gas, it would be enough to react them with water using a catalyst to facilitate the reaction. This chemical process is called "steam reforming" and requires energy input because it is an endothermic process, in which hydrogen and carbon monoxide (CO) are obtained as main products.
This energy input can be reduced by introducing oxygen (or air) to the reactor at the same time that the water is fed. In this way, the process becomes a slightly exothermic process -it releases heat- which is called "autothermal reforming". In addition to hydrogen and carbon monoxide, carbon dioxide (CO2) can also be formed by combustion with oxygen. The end result is less hydrogen production, but it is of interest in some cases due to lower energy consumption.
Both in one case and in the other, it is necessary to eliminate the carbon monoxide that has been formed in the reforming stage, in order to obtain hydrogen free of impurities. The so-called "water gas shift reaction" is often used as the first purification stage, in which carbon monoxide reacts with water to form carbon dioxide and hydrogen. Depending on the final application in which the hydrogen is to be used and the level of purity required, a final purification stage will be necessary, for which both chemical (selective oxidation of carbon monoxide) and physical processes can be used. (adsorption separation, cryogenic methods).
Currently, the largest production of hydrogen on an industrial scale is carried out by reforming from natural gas.
Biomass is matter that comes from living beings, both plant (forest residues, agricultural residues, energy crops…), and animals (slurry, viscera…) in which hydrogenated compounds abound. When the treatment of biomass gives rise to the formation of gas, this product is called biogas. Through chemical reforming processes of this gas, such as those mentioned above, hydrogen can be obtained.
Other biomass treatments give rise to obtaining liquid biofuels that can also be used later as more easily transportable fuels for the production of H2: this is the case of bioethanol or biodiesel.
In all cases, together with hydrogen, carbon dioxide is also obtained but, unlike what happens with fossil fuels, this CO2 does not mean an increase in emissions into the atmosphere, since it is part of the ecosystem.