Close

Measure the potentiometer's position with Arduino

Yann Guidon / YGDESYann Guidon / YGDES wrote 06/25/2021 at 15:23 • 2 min read • Like

I happen to have a low-value pot whose position I should measure. It has a total resistance of 100 ohm: under 5V, that would draw 50mA ! That's ridiculous. Using a bridge would not be practical either because I need to read the position with the Arduino's ADC pin(s). I want to decrease the current by at least 10 folds yet preserve the 10-bit resolution and range.

Then I had the idea to combine the pot with a classic differential amplifier, but not where it is usually plugged.

It took a while to find the "right" version because resistor values matter. It's a matter of balance as well :-) I have chosen 2K2  (and one multiple) so the overall current draw is 1/10th of 50mA but the values can be tuned (but check the output range). The biggest issue though was that the base bias has a significant influence (must be tuned so the output swing is maximised but current does not increase too much) and under certain conditions the swing "plateaus" in the middle position...

In the end, the circuit has 6 resistors of identical value and 4 identical NPN, that provide about 5V of peak-to-peak swing between the two outputs, which then go to an individual ADC pin (some integration and subtraction will do the rest of the magic). https://tinyurl.com/yeuvbcxq is where you can play at home !

Update

I built the circuit with 3K resistors and the output swing is within 2% of the simulation, or the tolerance of the parts and lab equipment. Good job :-)

Like

Discussions