Author Topic: Logarithmic pot  (Read 3602 times)

0 Members and 1 Guest are viewing this topic.

Offline akisTopic starter

  • Frequent Contributor
  • **
  • Posts: 981
  • Country: gb
Logarithmic pot
« on: January 05, 2020, 07:39:28 pm »
Is there a way to use a simple, passive circuit, with very few parts, to turn a linear, or a badly made "log" pot, into an audio pot? From some charts I have seen it seems we are looking for something like the below:

Code: [Select]
potentiometer position	experimental log scale
0 0
1 0.2
2 0.6
3 2
4 5
5 10
6 20
7 33
8 54
9 80
10 100

 

Offline Prehistoricman

  • Regular Contributor
  • *
  • Posts: 216
  • Country: gb
Re: Logarithmic pot
« Reply #1 on: January 05, 2020, 08:25:49 pm »
You can add a resistor from the tap to either end of the pot to affect the curve. See pics.
The graph shows the behaviour of a pot with a resistor 10% of its value to ground. X is the pot setting, Y is the tap output.
 
The following users thanked this post: mcovington

Online Whales

  • Super Contributor
  • ***
  • Posts: 2122
  • Country: au
    • Halestrom
Re: Logarithmic pot
« Reply #2 on: January 05, 2020, 09:15:53 pm »
+1 for "10%" recomendation.  I have read suggestions of 50% elsewhere, but some analysis I did a while back showed 10% was a better fit.

IIRC: this gives you about 20dB of db-linear audio range (used as an attenuator, although I think I was also putting a resistor above?).  The last few degrees at the far edges of the pot will be distorted and give you a lot more than this.
« Last Edit: January 05, 2020, 09:18:23 pm by Whales »
 

Offline Prehistoricman

  • Regular Contributor
  • *
  • Posts: 216
  • Country: gb
Re: Logarithmic pot
« Reply #3 on: January 05, 2020, 10:09:04 pm »
+1 for "10%" recomendation.  I have read suggestions of 50% elsewhere, but some analysis I did a while back showed 10% was a better fit.

IIRC: this gives you about 20dB of db-linear audio range (used as an attenuator, although I think I was also putting a resistor above?).  The last few degrees at the far edges of the pot will be distorted and give you a lot more than this.
Resistor above would make an anti-log taper.

And yes, you're right about the edge distortion. Here's a quick excel plot of a real log taper against this hack.
But a real log pot will probably contain two linear sections of different resistivity to roughly approximate the ideal log taper (source: internet, no validation has been done).
« Last Edit: January 05, 2020, 10:10:47 pm by Prehistoricman »
 

Offline basinstreetdesign

  • Frequent Contributor
  • **
  • Posts: 466
  • Country: ca
Re: Logarithmic pot
« Reply #4 on: January 05, 2020, 10:22:02 pm »
Yes I've done a least-squares fit between the ideal exponential curve and what you get from a fixed resistor in parallel with a linear pot as Prehistoricman says.  The optimum value (least error) is at resistor = 11.6% of pot.  This assumes that there is no other load and the source impedance is zero.  It looks like this:

STAND BACK!  I'm going to try SCIENCE!
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9321
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Logarithmic pot
« Reply #5 on: January 05, 2020, 11:18:46 pm »
But a real log pot will probably contain two linear sections of different resistivity to roughly approximate the ideal log taper (source: internet, no validation has been done).
A real log potentiometer has the resistive material deposited in such a way as to make it a true log. The more common way of using two sections is a "fake log".
https://sound-au.com/pots.htm#taper

It's also possible to cascade two potentiometer sections to get a log behavior:
https://sound-au.com/project01.htm#s3
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline akisTopic starter

  • Frequent Contributor
  • **
  • Posts: 981
  • Country: gb
Re: Logarithmic pot
« Reply #6 on: January 06, 2020, 10:17:35 am »
I have found the power function the one most closely tracking the experimental audio scale as in the chart below. Both the "pot hack" and the exponential curves are too far away, and audibly, "it has all happened" before we even reach 5, with very little change afterwards.

The range 0-4 is critical and it has to be very, very slow, as the chart would indicate.



 

Offline ormaaj

  • Contributor
  • Posts: 20
  • Country: us
Re: Logarithmic pot
« Reply #7 on: January 06, 2020, 02:00:28 pm »
I guess everyone probabally knows about using a BJT for this... but for completeness... http://falstad.com/circuit/e-logconvert.html . I used a similar circuit that worked well enough for linearizing the input to a '4046 VCO with a linear pot.

If precision is needed then I dunno. An OTA-based solution might perform ok. Maybe I'll try to get that to work.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: Logarithmic pot
« Reply #8 on: January 06, 2020, 02:42:52 pm »
You can add a resistor from the tap to either end of the pot to affect the curve. See pics.
The graph shows the behaviour of a pot with a resistor 10% of its value to ground. X is the pot setting, Y is the tap output.

I've used that almost exclusively to implement analog volume pots for audio circuits for ages. It can be made close enough to a log behavior for this purpose, and has an additional benefit IMO when using mechanical pots: it adds a current path from the wiper to ground, which limits a lot electrostatic buildup that can lead to scratching noise when the pot is rotated. Very effective in practice IME.
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 9003
  • Country: us
  • Retired, now restoring antique test equipment
Re: Logarithmic pot
« Reply #9 on: January 06, 2020, 04:09:56 pm »
Another advantage of using a resistor-loaded linear-taper pot is when you have multiple controls and want them to track each other closely, trading off absolute log accuracy.  A good linear pot will be more reproducible from unit to unit than most log pots.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: Logarithmic pot
« Reply #10 on: January 06, 2020, 04:20:27 pm »
Another advantage of using a resistor-loaded linear-taper pot is when you have multiple controls and want them to track each other closely, trading off absolute log accuracy.  A good linear pot will be more reproducible from unit to unit than most log pots.

Yup. In a lot of applications (especially audio), exact log is not critical anyway. And if you think a typical "log" pot will match a log function better than the above, you could be in for some surprise as well... unless you buy very expensive shit.

Audio applications in which it could be a bit more problematic is the typical large linear pots (not in the sense of linear vs. log, but in the sense of linear vs. rotative) used on studio mixing consoles, as accuracy for a given position could be a bit more important there. But that said, even on analog consoles, it's not uncommon to see linear pots controlling VCAs with a log transfer function anyway... so...

In any case, it answers the OP's question fairly well, and is actually used in real products and is not just a thing for hackers.
 

Offline akisTopic starter

  • Frequent Contributor
  • **
  • Posts: 981
  • Country: gb
Re: Logarithmic pot
« Reply #11 on: January 10, 2020, 10:32:51 am »
Can't shunt to ground with passive guitar pickups, the pots need to have many hundreds of KOhms. Typical passive pickups pots are 500K. If you shunt this with say a 100K resistor, you'd be dropping the value seen by the pickup to <100K, and then you'll lose the high end.

While the standard audio guitar pots are "OK" for the volume control, they are wholly inadequate for the tone control circuitry, as I recently found out. On the tone control it all happens between 0 and 4, with the range between 5-10 being inconsequential. That is where adherence to the true power function would provide a more gradual tone response.
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Logarithmic pot
« Reply #12 on: January 10, 2020, 05:34:58 pm »
For volume controls the Baxandall volume control circuit is reasonable if you can tolerate an active device to do the buffering and the tendency of the law to fall to bits at the very low end. Uses a linear pot too, which is helpful.

Regards, Dan.

 
The following users thanked this post: ormaaj


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf