Electrical – Audio Taper to Linear Potentiometer

audiobeaglebone blackpotentiometer

I'm trying to linearize the output of an audio tapered potentiometer. Right now, I'm using ADC on a Beaglebone to read the value of a 250k potentiometer with 3.3V. I get a value between 0 and 1, but it is scaled such that the rate of change of the potentiometer's value increases dramatically as the knob is turned to the right – it looks something like an exponential curve.

I was wondering how I could convert the value of the audio tapered potentiometer to that resembling a linear one. Can I just do something with logarithms?

Best Answer

The best answer is to use a linear pot in the first place.

Yes, you can correct the logarithmic nature of the audio taper pot to get linear pot position. However, you will lose resolution at the low end since the output voltage varies slowly with pot position there compared to the high end.

You will have to experiment to determine the compression range of the audio taper pot you have. The easiest way to linearize it in firmware is to use a lookup table. Linearly interpolating within one of 32 segments should be good enough. This will approximate the exponential pot function as a 32-segment piecewise-linear function. In practise, you can probably get away with fewer points than that. Maybe just outright measure 8 points, put them into a table, then linearly interpolate between those.