Logarithmic potentiometer with a specific curve? - Page 1
Forum section: electronics / beginners

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 05, 2025, 08:39:12 pm
content: I have some old machinery that used a continuously variable speed control, via a handwheel. I modified the machine to instead use a 10k potentiometer behind the handwheel, connected to a VFD that controls the motor speed.This works well, except for the fact that (because of the way the mechanical variable speed worked) the divisions on the handwheel are not linear. As such, the lowest and highest speeds are correct, but for everything else in between the machine runs faster than the value on the handwheel.The blue line on the graph below shows the (theoretical) resistance in Ohms (0 to 10,000) vs degrees of rotation of the linear pot. I've calculated that what I actually need is the orange line on the graph.A bit of searching tells me that log taper potentiometers exist; though they're often not a perfect log curve (https://eepower.com/resistor-guide/resistor-types/potentiometer-taper/#).Are there suitable log pots available, or is there a way I could make one?

author: TimFox
author_rank: Super Contributor
timestamp: March 05, 2025, 08:44:23 pm
content: With Excel or similar, calculate the curve of voltage vs rotation (potentiometer mode) with different values of an extra resistor connected from the wiper to the CCW end of the pot. The voltage (not the resistance) will still go end to end, but droop from the linear curve in the middle.

author: MarkF
author_rank: Super Contributor
timestamp: March 05, 2025, 08:46:58 pm
content: I know nothing of VFD.However, is it possible you can program in a response speed shape into the VFD instead of modifying a potentiometer? You might only be able to set the ends and the middle points.There are both linear and logarithmic pots. Otherwise you need some external components (like resistors between the wiper and endpoints). Don't know if you can manage the response you want.

author: bson
author_rank: Unknown
timestamp: March 05, 2025, 08:51:00 pm
content: Instead of "desired resistance" you probably want to plot voltage against % wiper position.

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 05, 2025, 09:22:34 pm
content: Quote from: TimFox on March 05, 2025, 08:44:23 pmIn my searching I saw a reference to that (adding a fixed resistor). I assume there's a formula to calculate the resulting resistance, for a given added resistance?Quote from: MarkF on March 05, 2025, 08:46:58 pmUnfortunately there's no option on that VFD model for anything more complex than programming the desired min and max motor frequency, and (within a limited range of options) the value of the external potentiometer being used.

author: coppercone2
author_rank: Super Contributor
timestamp: March 05, 2025, 09:30:48 pm
content: Hmm well I am thinking about how you could do itYou would need to introduce a wedge taper into a potentiometer. This means, you can use a laser or possibly a grinding tool to make the correct shape in the carbonthe problem might be that you run out of area for the brushes to make contact with the potentiometer resistor material.Possibilities I can see is making smaller moving contacts (that can ride a finer line, with a decrease in current carrying ability) or maybe physically moving them so they contact a lower point.

author: wasedadoc
author_rank: Super Contributor
timestamp: March 05, 2025, 09:41:43 pm
content: Log pots are readily available. Audio volume controls are almost always that law.

author: edavid
author_rank: Super Contributor
timestamp: March 05, 2025, 10:05:32 pm
content: I would put an Arduino or other microcontroller between the pot and the VFD. Then you can make the dial marks match exactly (using a lookup table and interpolation).

author: TimFox
author_rank: Super Contributor
timestamp: March 05, 2025, 11:11:45 pm
content: Quote from: WhichEndToHoldTheIron? on March 05, 2025, 09:22:34 pmWith the added resistor, you cannot obtain the resistance function (rheostat mode) you want.Your circuit should be capable of modification to accept a voltage control.Commercial log pots used for audio are also used for voltage control (potentiometer mode).If you must use a rotating analog rheostat, you can 24 position (or so) rotary switches without clicky detents and connect appropriate discrete resistors to get your exact curve of resistance.Otherwise, use your normal rheostat and replace the dial with one you calculate yourself.

author: CaptDon
author_rank: Super Contributor
timestamp: March 06, 2025, 01:50:04 am
content: Looks more like a parabolic curve. Probably not obtainable at any reasonable cost.

author: coppercone2
author_rank: Super Contributor
timestamp: March 06, 2025, 01:58:52 am
content: Why cant you use a laser trimmer. It should work very well because its black.Making a little bronze brush should not be too hard either I think, if the original wiper is too big.

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 06, 2025, 08:38:13 am
content: Quote from: edavid on March 05, 2025, 10:05:32 pmI'm a software/firmware guy; so that was my first thought - but it feels like overkill if a simpler (hardware) solution could be found.Quote from: TimFox on March 05, 2025, 11:11:45 pmI had considered making a multi-position rotary control with appropriate resistors, as something like 24 positions could be enough precision for this machine. My worry was that stepping from one position to another might not be clean. Are there designs that guarantee you'll switch perfectly from one resistance to another without interruption (or bridging two positions at once)?I'd like to try to keep the original dial as the more of the machine I can keep original the easier it would be for others to make the same modification (as changing from the mechanical speed control to using a VFD is actually quite common for this machine).

author: kripton2035
author_rank: Super Contributor
timestamp: March 06, 2025, 10:38:58 am
content: try to add a 10K resistor in parallel to your 10K potentiometerthe result is very close to a parabolic response.

author: Zero999
author_rank: Super Contributor
timestamp: March 06, 2025, 11:11:15 am
content: Quote from: WhichEndToHoldTheIron? on March 06, 2025, 08:38:13 amYou need a make-before-break rotary switch.This one isn't cheap, but high quality.https://www.hificollective.co.uk/components/elma-1-pole-24-way-switch-04-1133-20-pcb.html

author: BeBuLamar
author_rank: Super Contributor
timestamp: March 06, 2025, 12:50:19 pm
content: It would be a rather expensive solution but you can use a small PLC with 0-10VDC input and 0-10VDC output. Program the PLC to have the output as a function of the input and you can have the curve you want.

author: Ian.M
author_rank: Super Contributor
timestamp: March 06, 2025, 02:09:34 pm
content: Machine a cam to drive a linear pot (via a rack and pinion) and you can implement whatever 'pot law' curve you like.However, I'm with edavid. This is a job for a MCU. First check if your VFD can accept PWM for speed control input. If so, its a lot easier as level shifting a PWM is simpler than geerating a well filtered 0-10V control voltage. My preference would be to use a Digispark ATINY85 board (clone) as that give you an Arduino compatible 5V MCU with 10 bit ADC inputs and 8 bit PWM output, + an on-board 5V regulator so you can power it from the VFD's 10V potentiometer supply output. Feed a 10K linear pot from the board's 5V, wiper to an ADC input, and drive a 2N7000 MOSFET, source to 0V from a PWM output with a 10K pullup to +10V on its drain and odds are that's good enough for your VFD if it can take PWM input. Note the MOSFET inverts the PWM so 100% duty cycle becomes 0% out and visa versa. Then its just a matter of writing a sketch to implement the mapping you graphed. On the off-chance you actually need 0-10V, use a RRIO OPAMP suitable for 10V supply configured as a non-inverting x2 amplifier, and low pass filter the PWM with two RC stages to feed its +in.

author: TimFox
author_rank: Super Contributor
timestamp: March 06, 2025, 02:15:16 pm
content: Quote from: kripton2035 on March 06, 2025, 10:38:58 amAs I wrote, that works for a potentiometer (voltage divider), but he wants a rheostat (two terminal resistor).

author: Zero999
author_rank: Super Contributor
timestamp: March 06, 2025, 02:51:52 pm
content: Add a digital potentiometer to the output of a microcontroller and you can have whatever response curve you like.https://www.mouser.co.uk/datasheet/2/268/20005304A-347268.pdf

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 06, 2025, 02:54:36 pm
content: Quote from: TimFox on March 06, 2025, 02:15:16 pmI may have caused confusion due to my ignorance of the difference between a potentiometer and a rheostat; but I'm reasonably certain that I want a potentiometer.Certainly the device I'm using at the moment is sold as a three terminal potentiometer (with a max power rating of just 0.5W). So maybe adding a resistor would do the job?

author: Ian.M
author_rank: Super Contributor
timestamp: March 06, 2025, 02:55:09 pm
content: 'Real' VFDs almost invariably have a 0-10V speed control input capability, with a 10V supply for three terminal potentiometers etc. capable of typically 10mA (to support using a 1K pot). If it uses a simple two terminal variable resistor its most probably a cheap far east DC motor controller, not a VFD.Of course if a single resistor can give a 'close enough' match to your desired curve, it would be stupid not to do that. However I suspect getting 'close enough' may be difficult. See attached sim results.

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 06, 2025, 02:58:30 pm
content: Quote from: Ian.M on March 06, 2025, 02:09:34 pmI had looked into making variable radius gears to produce the desired curve between the handwheel and pot, but it was proving tricky. A cam with a linear pot could be a simpler solution though.I'll check the VFD manual to see if it'll take a PWM input. As noted previously, I'd rather avoid the complication of an MCU, but it would certainly be the best way to get exactly the right curve.

author: TimFox
author_rank: Super Contributor
timestamp: March 06, 2025, 03:08:21 pm
content: Quote from: WhichEndToHoldTheIron? on March 06, 2025, 02:54:36 pmDoes the controller have only two terminals for an external variable resistor (rheostat)?As a practical matter, almost all variable resistors are built as three-terminal potentiometers; they can be connected as a two-terminal device, either by connecting the wiper to one end or not connecting one end.It’s much easier to work with a control voltage from a three-terminal voltage divider (pot).

author: Ian.M
author_rank: Super Contributor
timestamp: March 06, 2025, 03:13:16 pm
content: The absolutely *horrible* way to do it without a MCU would be to use a LM3915 bargraph IC, a bunch of optocouplers, and a dual gang potentiometer to switch in different curve modifying resistors in ten bands across the pot's control range. If you want a 50 year old non-MCU, non-mechanical solution, go for it, but beware, your family and friends will probably make an appointment to get you fitted for a white jacket of the sort that straps your arms behind your back!

author: Terry Bites
author_rank: Super Contributor
timestamp: March 06, 2025, 03:26:34 pm
content: Use Excel trendline function to get best exponential/ log fit of your curve. Then...See this pagewww.qsl.net/om3cph/sw/pot.html#intro

author: CaptDon
author_rank: Super Contributor
timestamp: March 06, 2025, 03:56:24 pm
content: Kripton, If the bottom end of a 10K pot is at ground (return) and the high side driven from a low impedance source a 10K resistor 'In Parallel' with the pot (Do you mean all the way across?) does nothing. Did you want that 10K resistor from the low side or high side to the wiper? Not sure that would be near parabolic either?

author: MrAl
author_rank: Super Contributor
timestamp: March 06, 2025, 04:03:26 pm
content: Quote from: WhichEndToHoldTheIron? on March 05, 2025, 08:39:12 pmHello there,Here is a rather simple technique that approximates the desired curve.It starts using a 'regular' "log taper" potentiometer and has one parallel resistor from the wiper to one end of the pot. This type of log pot is sort of standard with 50 percent of the wiper travel providing about 10 percent of the total resistance of the pot. That means if the pot is 10k, the resistance at 50 percent of full rotation would be about 1k. This curve is modified however to produce something similar to your graph.The main idea is we have to raise the 50 percent rotation value to reach more like 30 percent of full resistance. In my example I will use 32 percent because that is approximately where your curve crosses y=R at 50 percent of travel.The equations come from this general equation:R=((81^x-1)*A*B)/(80*B+81^x*A-A)and here A is the original value of the "log" pot and B is the parallel resistance needed to obtain the approximate desired curve. We want to solve for those two values so we form two equations.The first equation is with x=1 and R=10k, and the second equation is with R=3.2k (32 percent of full value) and x=0.5 (50 percent of full travel).That just means substituting R=10 and x=1 for the first equation, and R=3.2 and x=0.5 for the second equation.Doing that and solving for A and B we get:A=720000/17B=144000/11which in float values are:A=42352.94117647059B=13090.90909090909which round to:A=42353 OhmsB=13091 OhmsNote that the value for A is hard to get because it would take a pot with a very unusual value which may be hard or impossible to get.Rounding up to some nearest value like 50k, we then can solve the general equation again with A=50 and R=10 (values in kOhms) and we solve for B and get:B=12.5kThat gives us the two required resistances:A=50kB=12.5kand the curve is shown in the attachment. Note it is not exact and has a slight aberration at the upper end.One of the ways these curves were tapered in the distant past was to use break point diodes. This requires knowing more about the circuit however such as the range of voltages that would be encountered. The idea is that when the voltage reaches a certain point or points, the diodes start to conduct and thus reduces the total resistance. This can work with DC or AC, but since the diodes are somewhat temperature sensitive the operating environment could have an effect on the overall operation.One of the modern ways to do this would be to use a digital pot with a rotary encoder that works with a counter and a ROM chip. The ROM chip contains the translational data to convert from a linear characteristic to just about any other characteristic although in small discrete steps.

author: kripton2035
author_rank: Super Contributor
timestamp: March 06, 2025, 04:48:18 pm
content: Quote from: Terry Bites on March 06, 2025, 03:26:34 pmthis link explains all very well. I proposed a same value resistor but it seems a 1/3 value is better.this can handle high voltages too, instead digital potentiometers.

author: BeBuLamar
author_rank: Super Contributor
timestamp: March 06, 2025, 07:55:48 pm
content: One problem though that you can't find a potentiometer that can be turn 360 degrees. You can have one that turns 3 or 10 turns or only 3/4 turn but I don't know of one that can turn 1 turn. I do use some that can turn 1 turn but it doesn't have ends. It turns past the end.

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 06, 2025, 08:06:19 pm
content: Quote from: Terry Bites on March 06, 2025, 03:26:34 pmThat's very useful (as has been the other posts on calculating the curves).I've used the formulas from the above (for case A) to calculate the resistance curve, vs the current linear pot, and the ideal desired curve.The horizontal axis is the pot angle (expressed from 0..1). The vertical axis is the q ratio.I tried a number of different values for k (the ratio between the pot and the added resistor) and while a lower number better matches the 50% position on the pot, a k of 0.5 (blue line) looks like about the best "fit" to the desired curve (in grey).I double checked the current wiring on the VFD & pot (it's been a few years since I originally put it together), and looked in the VFD manual (images below).I currently have the specified 10k pot wired to VI and ACM, and I'm using a 5V line from the VFD, so have the PD070 option set to 1 (0-5V).As I need a 10k pot, a k of 0.5 means (I think) that I'd need a 30k Ohm pot with a 15k Ohm resistor (10k = 1 / (1/30k + 1/15k))

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 06, 2025, 08:15:00 pm
content: Quote from: BeBuLamar on March 06, 2025, 07:55:48 pmOn this machine you don't actually turn the portion of the handwheel with the numbers directly; there's an inner wheel with a handle (multiple turns of the handle are required to change from the very lowest to the highest speed). As there's already a complex set of gears managing this ratio I just added some gears to map the relevant wheel turns to the potentiometer in use. In fact, the current pot I'm using is a 3 turn (1080 degrees); but I felt it would be easier to discuss here as if everything were 0 to 360 degrees.(just for extra "fun" the numbers on the handwheel cover a range of about 325 degrees!)

author: BeBuLamar
author_rank: Super Contributor
timestamp: March 06, 2025, 08:28:18 pm
content: I believe the voltage between the ground and the wiper determine the speed of the motor. Can you give me the equation of the function voltage vs wheel position?

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 06, 2025, 09:37:24 pm
content: Quote from: BeBuLamar on March 06, 2025, 08:28:18 pmNot sure if this is the answer to the question you're asking; but the formula is approximately:y = x1.6(assuming both the wheel position (x) and motor speed (y) are expressed as ranging from 0 to 1)In the graph below, the empirical ideal curve (taken from measurements on the machine itself) is blue, and the orange line is the above formula:

author: BeBuLamar
author_rank: Super Contributor
timestamp: March 06, 2025, 10:01:51 pm
content: How much this old machine is worth? If I were you I would use the PLC. I used to work with old production machines often and a lot of times spending a couple of thousands dollars on the machine is well worth.

author: coppercone2
author_rank: Super Contributor
timestamp: March 06, 2025, 10:30:04 pm
content: Check out chapter 5, he shows the different curveshttp://lesliegreen.byethost3.com/seekrets/seekPDF.pdf?i=1And also the bourns potentiometer handbook on adjustabiltiy has some basic informationhttps://www.bourns.com/pdfs/onlinepotentiometerhandbook.pdf

author: MrAl
author_rank: Super Contributor
timestamp: March 07, 2025, 05:17:40 am
content: Hello again,One thing we have to keep an eye on is the way the curve bends. The desired curve bends down in the center, while some curves will only be able to bend up. it looks like linear pots can only provide a curve that bends upwards, which is not what is needed here I don't think. I have not looked at every possibility of course yet though.Here is another solution which is a little odd but provides a good match, if you care to work with two pots at the same time that are ganged together. One pot is a log taper pot, and the other pot is a linear pot. The total resistance for each is different, and since the ideal solution comes out again to have unusual values, you would have to try values for the pots you can actually purchase. It is probably possible to modify the resistance with external resistors because the difference between a standard pot and the required values for the pots is not really that great. This is really just the tip of the proverbial iceberg though.Note how close the curve matches to the desired curve. We could play around a little more and get it better but at the cost of higher complexity.Note also how the pots are wired, which is also shown in the attachment along with the resulting curve.Do note that the pot shafts are ganged together so that they both rotate at the same angle when rotated, and since they are ganged, they both rotate with one pot knob. There are different ways to gang pots you could look into that. No other resistors are required however unless you want to modify the resistance of standard pots that are widely available.The general solution is also shown and that is used to calculate the ideal values for the two pot resistances.One more little note is the general solution equation is generalized for a regular log pot with a resistance of 10 percent at 50 percent of full travel. There is another equation that is even more general for other types of log pots which may have a different percentage at 50 percent of full travel.Another tiny note is that pots do not usually turn all the way to 360 degrees. The amount of the total rotation here is given as simply 'x' where that would be a fraction of the total travel either linearly (linear motion pot) or angularly (regular pot you turn the shaft to change the resistance).It's interesting how often this kind of question comes up on various forums. Probably at least 20 times in the past 20 years or so.

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 07, 2025, 12:03:35 pm
content: Quote from: BeBuLamar on March 06, 2025, 10:01:51 pmGenerally between 500 and 2000 USD, depending on the condition. It's an old (but well regarded) metal lathe.

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 07, 2025, 12:13:10 pm
content: Last night I had a flick through my copy of the book "507 Mechanical Movements", and spotted something that I think was effectively referenced by others in this thread (i.e. using a slider potentiometer).Turns out the book is now available online (https://507movements.com/) and number 106 (https://507movements.com/mm_106.html) may well be a relatively simple mechanical solution; using a 3D printed cam.If the cam profile ended up too aggressive to be smooth, then a slider pot with a parallel resistor (to get close to the desired curve), would allow for a much gentler cam profile (basically linear, but with just enough curve to correct for the error in the pot+resistor profile).

author: Ian.M
author_rank: Super Contributor
timestamp: March 07, 2025, 03:41:43 pm
content: Slider potentiometers are often troublesome, and always difficult to find in the value and travel you want at a price that doesn't make you scream! I said make the cam drive an ordinary linear (i.e. not log) pot, via a rack and pinion to convert straight-line motion back into rotary motion. The pinion will probably need to be in two parts with a torsion spring between them for anti-backlash.

author: BeBuLamar
author_rank: Super Contributor
timestamp: March 07, 2025, 04:30:52 pm
content: A picture of the wheel would be nice.

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 07, 2025, 05:00:28 pm
content: Quote from: BeBuLamar on March 07, 2025, 04:30:52 pmSure. This is one made up with some 3D printed parts (as the machine was missing the inner dome and knob). Several turns of the inner wheel are required to rotate the outer wheel from 350 to 3000rpm. On this "DIY" version there's a set of 3D printed gears behind the wheel (that interfaces to a potentiometer):This is the parts of a complete version of the wheel; with the gears that translate the inner dome+knob movement to the outer handwheel. The large gear on the right side of the image ultimately interfaces with the mechanical variable speed gearbox (which is the part that's often replaced with a VFD, as they have a tendency to fail - mostly due to lack of correct maintenance):

author: BeBuLamar
author_rank: Super Contributor
timestamp: March 07, 2025, 06:17:39 pm
content: Do they use intermediate speed like 800 for example?

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 07, 2025, 09:36:45 pm
content: Quote from: BeBuLamar on March 07, 2025, 06:17:39 pmIt's infinitely variable; so yes (the mechanical gearbox uses a Kopp Variator)

author: BeBuLamar
author_rank: Super Contributor
timestamp: March 07, 2025, 11:03:50 pm
content: So you removed the variable speed gear box with a VFD? So does the wheel has to change anything or just changing speed?

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 07, 2025, 11:33:31 pm
content: Quote from: BeBuLamar on March 07, 2025, 11:03:50 pmI never had the variable speed gearbox. It's quite common that when getting one of these machines the original gearbox is long gone (either because a previous owner broke it, or removed it and didn't pass it on with the machine).Usually you'll find someone just puts a potentiometer with a simple knob where the original handwheel was. It works, but it's pretty ugly (and IMHO, less user friendly). The handwheel does affect just the speed.

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 18, 2025, 07:52:31 pm
content: I've made some progress over the last few days; though it's mechanical rather than electrical or electronic.By comparing the angular position of the handwheel (for various rpm values) I can calculate what angle would be required on a potentiometer (to achieve that rpm), and make a pair of wheels with variable radii to create that curve:https://gifyu.com/image/bzssXThe handwheel (HW) and potentiometer (Pot) both start at 12 o'clock (0 degrees), and both finish at 325 degrees (albeit obviously in opposite directions). For positions in between, the pot initially rotates more slowly, before then catching up. This would make the motor speed (controlled by the pot position) match the values on the handwheel.Obviously this is just a test; a real solution would need teeth on the gears to allow them to function reliably, and the output rotation would need to be mapped to the actual rotational travel of the pot in use.The min/max ratios of the wheels above are quite extreme. If I can get my head around it, I might try to produce new wheels that would fit the curve for the potentiometer with a parallel resistor; as that is closer to the desired curve, so I assume should result in less extreme variation in the wheel radii.

author: Simmed
author_rank: Frequent Contributor
timestamp: March 18, 2025, 08:00:40 pm
content: hmmm i have seen it before

author: WhichEndToHoldTheIron?
author_rank: Contributor
timestamp: March 18, 2025, 08:03:59 pm
content: Quote from: Simmed on March 18, 2025, 08:00:40 pmNice

author: BeBuLamar
author_rank: Super Contributor
timestamp: March 18, 2025, 10:04:09 pm
content: Quote from: WhichEndToHoldTheIron? on March 18, 2025, 07:52:31 pmI like your solution. It's cool.

author: coppercone2
author_rank: Super Contributor
timestamp: March 18, 2025, 10:37:18 pm
content: how cool would it be if you can get a general over sized potentiometer design that could be laser trimmed for some special function?death to the look up table

author: donlisms
author_rank: Frequent Contributor
timestamp: March 19, 2025, 04:56:17 am
content: You don’t need to drive LED’s with the bar graph chip outputs… right? It’s just current. Maybe there’s a clever way without optocouplers.