Measuring resistance between analog pins

I have 2 sensors which are variable resistors (1-120 ohms), and a ground reference for them. These sensors only provide 1 wire each, the ground is shared.

Gnd -> A5
Sensor 1 -> A4
Sensor 2 -> A3

How can I measure the resistance to ground of sensor 1 and sensor 2? If I just had 1 sensor, I’d be tempted to hook up the 3.3 supply pin & just measure voltage, but that won’t really work in a parallel circuit, and I’m concerned about operating the Photon’s 3.3v supply at nearly a dead short.

Multimeters do this, I’m sure I’m missing some basic electronics concept here - any tips would be greatly appreciated :blush:

The crude method is to use a potential divider, so you would have another resistor from the sensor/photon junction to 3.3V and measure the voltage. You have two sensors on 2 different pins, and you treat them as two separate entities.
However this method is not particularly accurate and although the second resistor would prevent a short to 3V, depending on the value you choose and the resolution you desire it could also waste a fair bit of power.
The traditional circuit for measuring resistances is called a Wheatstone bridge not exactly a new idea as you can see but still in use today.
There are any number of other approaches to this problem many of which would come up with a quick google but at some level there is almost certainly a divider or bridge circuit involved.
If you wanted to get a good book on electronics fundamentals, almost every student is told to go and buy “The Art of Electronics” by Horowitz and Hill, its expensive but worth it (you could probably get the old 2nd edition pretty cheap).

1 Like

Thank you very much for your thorough, thoughtful, educational and polite response. I believe I’ve got enough here to get educated on the right things and be successful!

@warriorofwire, you can also investigate using an HX711 to measure resistance down to milliohms:

1 Like

I am planning to use a 1k resistor from 3.3 per sensor. This should net me around 400 values across the impedance range, which is more than sufficient. 2 of these draw up to 7 milliamps, which is not any concern for the 100mah built in supply. Thanks again for the lessons, it’s very helpful for a software person =)