I would like to replace the microcontroller of an old gamepad with a Arduino/Teensy board. To do this, I need to connect all buttons and the output of the 4 potentiometers of the gamepad's joysticks to the Arduino.
Unfortunately, the potentiometers are not wired as voltage dividers but as variable resistors with a common source/ground pin:
simulate this circuit – Schematic created using CircuitLab
I could just put a constant resistor at the output of every potentiometer and read the voltage at this position, but then the voltage changes nonlinearly. The ADC resolution of the Arduino is not high enough to accurately measure such nonlinear curves.
Is there a way to linearly convert the resistance of the potentiometers into a voltage value to then read? I think it could be possible with pnp transistors as a constant current source, but im not sure how to wire it.