I have a MPX5010 pressure sensor that outputs a voltage proportional to applied pressure. Output is connected to an amp-op with gain=4 so my output is around 1V when no pressure is applied. That output is feed to the negative pin of a voltage detector. On the positive pin i have a trimpot so i can set a threshold to my detection level around 1,5V: putting some pressure on sensor, it outputs a voltage greater than 1,5V and the voltage comparator goes low. I attached a pullup resistor and a led, so i can see led on when a certain pressure is applied.
This works ok, but after some time, with no pressure applied, the sensor voltage start to drift (atmospheric variation, temperature, i don't know...) and crosses the threshold, so my led is always on.
Is there any way to compensate this drift? Or is there other way to detect a fast change in the sensor output (applied pressure) in opposite to a slow change (drift) ?
Thanks