How does the MG811 sensor work? The MG811 is an electrochemical sensor that measures $\ce{CO2}$. I think is something like a redox reaction but i don't understant how it produces $\ce{e-}$ so i can read them and get the $\ce{CO2}$ concentration.

I copy you the reaction that makes the sensor measures

When the sensor exposed to $\ce{CO2}$，the following electrodes reaction occurs：



Cathodic reaction: $\ce{2Li+ + CO2 + 1/2O2 + 2e- -&gt; Li2CO3}$

Anodic reaction：$\ce{2Na+ + 1/2O2 + 2e- -&gt; Na2O}$

Overall chemical reaction：$\ce{Li2CO3 + 2Na+ -&gt; Na2O + 2Li+ + CO2}$ 



The datasheet says that it workings adopting the electrolyte cell Principle and that it's composed by the following cells:



Air，$\ce{Au}$|NASICON|| carbonate|$\ce{Au}$, air，$\ce{CO2}$



I need you to explain me how actually the sensor is working and with which material are made the electrodes.
The link you gave in the question, actually shows the equation of how this sensor works. You don't need to produce any electrons, you just need to measure the voltage.

Try to write the Nernst equation for the above overall reaction and that will show you what is going on.