After consulting with the boys and girls at chemicalforums.com about how to produce an ethanol gas with a 300 ppm without having to buy a lot of fancy gear and thus finding out that it was more difficult then I initially thought I have reluctantly decided that I don’t think I will be able to pull it of. There for I have decided to work with what I got. What I got is air and a datasheet.
The data sheet provided by Figaro for the TGS822 only goes down to 50ppm, however the graph looks pretty logarithmic linear to me so I decided to add the 10-50ppm part my self making a bold assumption that it will be logarithmic linear in that interval as well.
From the data sheet we get the relation between RL and RS which is a voltage divider circuit.
From the graph in the data sheet we can also see that the resistance of the sensor in air is RS (air) = R0 * 19.
If we combine these two facts we can express R0 as a relation of RS (air) and the value of RS (air) can be deduced by reading the voltage of the sensor and using the voltage divider formula.
RS (air) / 19 = R0 in my case RS (air) = 78kΩ. => R0 = 4105Ω
When we have R0 we can make a table to relate resistance (RS) to ppm by reading the scaling factor of RS/R0 from the graph for different gas concentrations.
|Rs in air = 78000||Ro = 4105,26315789474|
|ppm||Scaling factor||Rs = Ro * Scaling factor|
The TGS822 sensor is affected by both temperatures and humidity and it should be complemented with a thermistor and hygrometer so that it is possible to compensate for temperature and humidity. I don’t have any thermistor or hygrometer yet but if we use the ”calculate R0 from RS (air)” every time we start the sensor then perhaps we will also compensate for temperature and humidity, this is something further experimenting will tell.