Detecting a gas

In order to show a simple ADC usage (with a little help of a PWM source), we will see how we can detect a dangerous gas using an analogue sensor that is shown here:

Detecting a gas


The devices can be purchased at or by surfing the Internet.

We can get the datasheet of each GAS sensor at

This sensor acts as a variable resistor according to the gas concentration, so they can be easily read with a normal ADC. Looking carefully at the datasheet of the gas sensor, we can see exactly how this sensors varies its internal resistance according to the gas ...

Get GNU/Linux Rapid Embedded Programming now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.