I intend to use air contaminants sensor TGS 2602. The internal resistance changes if a given gas is detected. It requires an input voltage V_C = 5V
to operate.
According to the specs, the basic measurement circuit is:
simulate this circuit – Schematic created using CircuitLab
The problem I am facing is I want to read the measurements with digital IO pins, specifically I want to use Raspberry Pi for this. I found a simple solution to a similar problem here: Reading Analogue Sensors With One GPIO Pin. Essentially it involves using an RC circuit and measuring time lapsed until "high" voltage occurs on our digital pin.
In this case I would then be inclined to simply switch R_L
with a capacitor but by doing this I would quickly cut off the supply voltage for the sensor (it requires V_C
). I then thought I should maybe add the capacitor in parallel with R_L
. But the R_L
voltage drop is low, so I would never reach the "high" voltage on the capacitor to be able to read it with my digital pin. Should I perhaps use op-amp to drive the V_RL
up? But is it not over-complicating things?
My question is then how should I measure value of R_S
with a digital reader?