Modding a log pot to linear pot ?

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!
Post Reply
marcn
Common Wiggler
Posts: 134
Joined: Sat Mar 10, 2012 8:56 am

Modding a log pot to linear pot ?

Post by marcn »

Well I did a classic mistake and ordered a bunch of 100k log pots stead of linear pots :doh:

After a bit of research I just put a 100k between lugs 1-3 so I got it down to 50k (which is still fine for my project) and the log curve is also a tad more linear now but well, not exactly perfect.
Was just wondering if anyone has done a similar thing and how it worked out in their project or if there's a better procedure to do this ?
(searched the almighty net and nothing found about log to linear)


ps. since I'm new around here gotta say great stuff in the diy section, much respect to what you people build and the fact that it's shared for everyone to see.
User avatar
sduck
experimental use of gravity
Posts: 14674
Joined: Wed Feb 18, 2009 6:03 pm
Location: Vortepexaion, TN, USA

Post by sduck »

I think you can mod linear to log, but not vice versa (edit - see Daverj's post - it seems you CAN get pretty close!). I also have a ton of unloved log pots here...
Last edited by sduck on Sat Mar 31, 2012 10:45 am, edited 1 time in total.
User avatar
CLee
Super Deluxe Wiggler
Posts: 1911
Joined: Mon Apr 05, 2010 6:49 pm
Location: Chicago
Contact:

Post by CLee »

I think you can bend a linear pot to a somewhat exponential response, so if you did that to a log pot you should get close to something linear.

Google "the secret life of pots". You'll find a whole section on bending response curves.

We all have some pile of unloved pots don't we... Mine are the 1K that were supposed to be 100K
User avatar
keninverse
Super Deluxe Wiggler
Posts: 1015
Joined: Mon Jul 26, 2010 4:12 pm
Location: mission control htx

Post by keninverse »

CLee wrote: Google "the secret life of pots". You'll find a whole section on bending response curves.
I was just going to suggest this. R.G.'s article is pretty comprehensive. He even show how to tear apart a pot and sand down the element to adjust taper.
User avatar
daverj
Vintage Video Wiggler
Posts: 8491
Joined: Fri Jun 19, 2009 11:09 am

Post by daverj »

I just did a quick spreadsheet calculation.

Image

The red line is a linear pot. The blue line is an audio taper (log) pot.

The yellow line is what you get with a 100k linear pot that has a 10K resistor from the center wiper to ground (counterclockwise pin).

The green line is what you get with a 100K audio taper pot with a 12K from the center wiper to the top pin (clockwise pin).

This is a crude calculation, but certainly worth trying with the real parts. Not a perfect conversion to linear, but a lot closer than using the audio taper pot in a place that calls for a linear one.

If you use this as a voltage source (outer pins to power rails and/or ground) the extra resistor just draws a little extra power. But if you try to use it as an attenuator the input is going to see a load that varies from about 10.7K to 100K (in parallel with whatever load the pot wiper is connected to). So not so ideal as a linear attenuator, but not too bad as a linear voltage source.
marcn
Common Wiggler
Posts: 134
Joined: Sat Mar 10, 2012 8:56 am

Post by marcn »

Thanks for your replies guys.

To Lee and Ken, excellent site, I've been over it earlier but read rather quickly as it explains quite a lot about pots but as far as I've seen it doesn't mention changing log to linear (might have missed it though).

To Dave, yes, that's what I've sortta been trying, found another thread around where there were tons of more spreadsheet calculations and that got me thinking I might get it somehow close to linear.
Now I'm not really good at the mathematical part of this so I didn't figure out what values get you to where but I've tried a few things and it seems the closest to linear works with the 100k between the 2 outer lugs (1 and 3).

I think another addition is that i use Alpha pots and I guess it's the 'cheaper' log version with the 'fake' log curve, so the more you bring down the total resistance as with the 12k, the more pronounced the 'rectified' curve is going to be, at least that's what my DMM shows comparing the 100k with the 12k version.

Anyways, I'll try a few more things and will report how it worked out in the build if I consider it relevant for others who want to get rid of their unused log pot stash. :rastanana:
User avatar
pugix
Super Deluxe Wiggler
Posts: 4607
Joined: Sat Oct 31, 2009 7:23 am
Location: Asheville, NC
Contact:

Post by pugix »

Why not sell them and buy linear pots?
Richard
https://www.pugix.com

"I confess that I'm scarcely using it, because I've got too many modules." -- ferran
User avatar
daverj
Vintage Video Wiggler
Posts: 8491
Joined: Fri Jun 19, 2009 11:09 am

Post by daverj »

Here's how the 12k would be connected to do the green line in my chart above:

Image

The "clockwise" end is the pin that the center wiper connects to when you turn the pot shaft clockwise.

And you can't measure the linearity of this type method with just an ohm meter. You need to feed a voltage into the first one or a signal into the second one and see how the voltage changes or the amplitude changes.
User avatar
daverj
Vintage Video Wiggler
Posts: 8491
Joined: Fri Jun 19, 2009 11:09 am

Post by daverj »

marcn wrote: I've tried a few things and it seems the closest to linear works with the 100k between the 2 outer lugs (1 and 3).
How are you testing the linearity? If you are doing it with an ohm meter you are getting a false idea of the results. Placing a resistor on the outer leads of a pot won't change the linearity at all if you use the pot as a voltage source (power or ground to the outer pins) or as an attenuator for a signal from a low impedance source, such as a module or op amp output.
marcn
Common Wiggler
Posts: 134
Joined: Sat Mar 10, 2012 8:56 am

Post by marcn »

Thanks Dave, didn't know there was a difference to the curve when reading ohms or testing with voltage.
I'll give that a try.
User avatar
daverj
Vintage Video Wiggler
Posts: 8491
Joined: Fri Jun 19, 2009 11:09 am

Post by daverj »

When reading with ohms you're only reading between two terminals. But all 3 terminals are involved when adjusting a voltage or signal level. If you are trying to make a variable resistor rather than a variable voltage source or attenuator, then you could measure it with an ohm meter.
User avatar
JJ
Veteran Wiggler
Posts: 631
Joined: Sat May 08, 2010 10:46 am
Location: Turku, Finland, EU

Post by JJ »

Umm...

How does one calculate this? :despair:

I have a 1MΩ lin pot that I would prefer turning into a log...

(Buchlidian Voltage Control Processor Glide function comes in a bit too steep with a lin pot, only thing I had in stock (9mm pot) )

Do I just multiply with 10 and go with a 100k resistor?
User avatar
daverj
Vintage Video Wiggler
Posts: 8491
Joined: Fri Jun 19, 2009 11:09 am

Post by daverj »

For turning linear into log, turn on Java in your browser and head over to:

http://www.mindspring.com/~clist/PotGraph.html
User avatar
JJ
Veteran Wiggler
Posts: 631
Joined: Sat May 08, 2010 10:46 am
Location: Turku, Finland, EU

Post by JJ »

daverj wrote:For turning linear into log, turn on Java in your browser and head over to:

http://www.mindspring.com/~clist/PotGraph.html
Thank you! :tu:
User avatar
Navs
Super Deluxe Wiggler
Posts: 4668
Joined: Fri Sep 18, 2009 3:49 am
Location: Berlin, Germany

Post by Navs »

Kerbump :zombie:

Is there an online or downloadable app to plot the change from audio taper to something more linear other than PotGraph?

I have an A50K I'd like to linearize. Going on the above examples, I tried a 5k6 which seems to do the trick. Is there a ratio/ formula I should be using e.g. to get Dave's green plot?

Also, Dave, you mention the additional resistor will consume more power (used as voltage source connected between +12V & GND). Can I calculate how much or is it negligible? It's in a commercial module I'd like to modify.

Ta!
User avatar
daverj
Vintage Video Wiggler
Posts: 8491
Joined: Fri Jun 19, 2009 11:09 am

Post by daverj »

I just did a quick search for the spreadsheet I made that day, but didn't find it. I probably didn't save it. Just made it to create the chart and then dumped the spreadsheet.

I can tell you the steps I probably used to create such a spreadsheet.

- make two cells to hold the pot value and the fixed resistance value

- make a column of cells to show the percentage of resistance on the pot from wiper to the bottom, in even amounts of rotation. For this one it looks like I used 0%, 10%, 20% ~ 100% rotation. I probably used a spreadsheet log function of some sort with values of 0.1 through 0.9 and filled in the first and last manually with zero and 100. You could also pull values directly off of the chart supplied by a pot manufacturer for audio taper, which in reality isn't true log. It's typically more likely 3 or 4 linear segments tied together to simulate a generally log curve.

- make a column of calculations that use the pot value and the column of percentages to calculate the resistance of the pot from the wiper to the bottom of the pot at those rotations. Make a second column with the reverse percentages to calculate the resistance from the wiper to the top of the pot.

- make a column of calculations combining the calculated wiper-to-top of pot column with the fixed resistor in parallel

- make a calculated column combining the wiper-to-bottom calculation column and the resistor in parallel to the wiper-to-top column, to create a voltage between zero and one at those rotations.

- make a column with the ideal linear voltages at those same rotations

- make a chart showing the ideal vs the calculated values.

- plug in various values for the fixed resistor and regenerate the plot until the lines are similar

As for the extra current used by the fixed resistor, that's simply ohms law. If the pot is between zero and +12v then the fixed resistor will, in the worst case, have 12v across it. So 12/resistance = current. It will draw less current as the pot is turned up, since the voltage across the resistor is less. A 5k6 is 12/5600 = 2.14ma (nothing to worry about)
User avatar
Navs
Super Deluxe Wiggler
Posts: 4668
Joined: Fri Sep 18, 2009 3:49 am
Location: Berlin, Germany

Post by Navs »

Thanks, Dave!

I will try your method as it would be useful for situations where you need to know before dismantling something.

Before reading your reply, I took the module apart and clipped the resistor in place to take readings with a DMM - the result was similar to the green line in your plot.

Unfortunately, it also raised other questions i.e. linearizing the pot might not be the solution, but I guess that's why we experiment.
User avatar
qfactor
Super Deluxe Wiggler
Posts: 1482
Joined: Wed Sep 12, 2012 10:33 am
Location: S'pore

Post by qfactor »

JJ wrote:Umm...

How does one calculate this? :despair:

I have a 1MΩ lin pot that I would prefer turning into a log...

(Buchlidian Voltage Control Processor Glide function comes in a bit too steep with a lin pot, only thing I had in stock (9mm pot) )

Do I just multiply with 10 and go with a 100k resistor?
Did you ever find out what the value of the resistor was to make your 1Mohm pots from linear to log?
Seems the Potgraph is no longer there :help:
"The 'clockwise' end is the pin that the center wiper connects to when you turn the pot shaft clockwise." - daverj
nigel
Ultra Wiggler
Posts: 872
Joined: Wed Jan 16, 2013 6:49 am
Location: Melbourne, Australia

Post by nigel »

qfactor wrote:Did you ever find out what the value of the resistor was to make your 1Mohm pots from linear to log?
100k will do the job. It's all about the proportion, not the absolute value. You always need a resistor 1/10 of the pot value. (Or 12/100 for log to linear, although 1/10 is probably close enough there too.)
User avatar
qfactor
Super Deluxe Wiggler
Posts: 1482
Joined: Wed Sep 12, 2012 10:33 am
Location: S'pore

Post by qfactor »

nigel wrote:
qfactor wrote:Did you ever find out what the value of the resistor was to make your 1Mohm pots from linear to log?
100k will do the job. It's all about the proportion, not the absolute value. You always need a resistor 1/10 of the pot value. (Or 12/100 for log to linear, although 1/10 is probably close enough there too.)
Ok, cool! Though what if the pot on the PCB I have in question does not connect to Ground in all its 3 legs? Would it still be alright to solder the wiper leg to the CCW leg? I measured for continuity on all 3 legs to Gnd and none of them are connected to Gnd. :hmm:
Thanks!
"The 'clockwise' end is the pin that the center wiper connects to when you turn the pot shaft clockwise." - daverj
User avatar
clorax hurd
Notorious Frog Licker
Posts: 234
Joined: Wed Mar 09, 2011 8:34 am
Location: Novy Svet

Post by clorax hurd »

Nice trick Daverj. Just one important thing I didn't notice in this thread: pots are sometimes used in voltage divider configuration (when ratio between resistances matters) and sometimes they are used as "variable resistor" (wiper shorted to one of the pins) in which case it's not the ratio between resistances what matters, but the resistance alone and doing this trick doesn't seem to help in that case (if i didn't make a mistake in my excel sheet and/or thinking)
Post Reply

Return to “Music Tech DIY”