I’m using particle photon with an analog gas pressure sensor, this gas pressure sensor outputs an analog reading that can be translated to pressure. I’ve connected the sensor’s ground to the photon’s ground and the data to A0 which is set to analog read mode.
The readings are very inconsistent and is constantly changing even though when I connect the same leads to a voltmeter its perfectly stable, however the photon analog reading is changing rapidly around the correct reading.
based on the discussion read in Odd analog readings [SOLVED] I connected a 220 ohm resistor between the GND and A0 and that relatively stabilized the reading, yet if the voltage used with the pressure sensor (it can be powered by anything between 12V -> 24 V) is changed the flapping is back and the reading is useless.
I’d appreciate your help with the following
- why did the resistor stabilize the reading ?
- How can I stabilize it with different voltages? I know that it has to do with the impedance but I’m not quite sure about the relationship or how I can use that information for a permanent fix.
Thanks a lot for your support.