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 R_{L} and R_{S} 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 R_{S} (air) = R_{0} * 19.

If we combine these two facts we can express R_{0} as a relation of R_{S} (air) and the value of R_{S} (air) can be deduced by reading the voltage of the sensor and using the voltage divider formula.

R_{S} (air) / 19 = R_{0} in my case R_{S} (air) = 78kΩ. => R_{0} = 4105Ω

When we have R_{0} we can make a table to relate resistance (R_{S}) to ppm by reading the scaling factor of R_{S}/R_{0} from the graph for different gas concentrations.

Rs in air = 78000 | Ro = 4105,26315789474 | |

ppm | Scaling factor | Rs = Ro * Scaling factor |

0 | 19 | 78000 |

10 | 15 | 61578,947368421 |

10 | 10 | 41052,6315789474 |

20 | 9 | 36947,3684210526 |

20 | 7 | 28736,8421052632 |

30 | 6 | 24631,5789473684 |

30 | 5,7 | 23400 |

40 | 4,7 | 19294,7368421053 |

50 | 4 | 16421,0526315789 |

60 | 3,5 | 14368,4210526316 |

70 | 3,2 | 13136,8421052632 |

80 | 3 | 12315,7894736842 |

90 | 2,7 | 11084,2105263158 |

100 | 2,5 | 10263,1578947368 |

150 | 2 | 8210,5263157895 |

200 | 1,6 | 6568,4210526316 |

300 | 1,2 | 4926,3157894737 |

400 | 0,9 | 3694,7368421053 |

500 | 0,75 | 3078,9473684211 |

600 | 0,67 | 2750,5263157895 |

700 | 0,58 | 2381,052631579 |

800 | 0,52 | 2134,7368421053 |

900 | 0,47 | 1929,4736842105 |

1000 | 0,4 | 1642,1052631579 |

2000 | 0,2 | 821,0526315789 |

3000 | 0,15 | 615,7894736842 |

4000 | 0,1 | 410,5263157895 |

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 R_{0} from R_{S} (air)” every time we start the sensor then perhaps we will also compensate for temperature and humidity, this is something further experimenting will tell.

## Kommentera