Author Topic: Really struggling with limiting potentiometer range  (Read 3693 times)

0 Members and 1 Guest are viewing this topic.

Offline PentoadTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: gb
Really struggling with limiting potentiometer range
« on: January 25, 2020, 06:00:54 pm »
I am trying to limit the range of a trimmer, R3 so that when the supply voltage is 4.2 and its wiper is closest to R4, or 0%, the output voltage is 1.225v. Additionally, when the supply voltage is 3.81v and the trimmer is set closest to R2, or 100%, the output voltage should be 1.225. I've tried several different calculations and methods but none have given anywhere near the desired results in the simulations. How would I determine what resistors to use for R2 and R4 to give me that 3.81 to 4.2 adjustment range? The 1.225v is the voltage of my reference and when the output of R3 goes even a millivolt above 1.225v, it triggers a comparator and so the current on the output would only be a few nano amps.



 

Online magic

  • Super Contributor
  • ***
  • Posts: 7454
  • Country: pl
Re: Really struggling with limiting potentiometer range
« Reply #1 on: January 25, 2020, 06:25:11 pm »
Pretty simple. You want the output/input ratio to vary between

1.225/3.81 = .3215223097
1.225/4.2 = .2916666666

0.29 is the lower limit and the proportion of the whole divider that goes permanently into R2.
Then 0.32-0.29=0.03 is adjustable and goes into R3.
The rest is R4.

Then all numbers need to be scaled proportionally, for example by 333 times to use a 10Ω potentiometer.
 
The following users thanked this post: Pentoad

Offline PentoadTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: gb
Re: Really struggling with limiting potentiometer range
« Reply #2 on: January 25, 2020, 08:22:29 pm »
I tried your suggestion and it is not working right and I am beginning to think there may be an issue with the simulation program. As you can see, I can get the lower threshold to work well but the higher threshold is needing 56.5 volts to give 1.225.









 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3382
  • Country: gb
Re: Really struggling with limiting potentiometer range
« Reply #3 on: January 25, 2020, 08:58:51 pm »
I tried your suggestion and it is not working right and I am beginning to think there may be an issue with the simulation program. As you can see, I can get the lower threshold to work well but the higher threshold is needing 56.5 volts to give 1.225.

The resistor values are correct, so I share your thoughts about the simulator.  I notice you have the pot set to 99.9% for the case that works correctly; is there a reason for not setting 100%?  i.e. does the simulator have problems with 100% and if so does it also have issues with 0%?
 

Offline PentoadTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: gb
Re: Really struggling with limiting potentiometer range
« Reply #4 on: January 25, 2020, 10:47:52 pm »
The simulator doesn't allow 100%, it only allows you to get as close as possible to 100. 0% works fine so I think I will submit a bug report to them.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7454
  • Country: pl
Re: Really struggling with limiting potentiometer range
« Reply #5 on: January 25, 2020, 10:58:49 pm »
But 0 doesn't work fine, you get wrong results. The question is, what happens if you try 0.01 instead of 0 ;)
 
The following users thanked this post: Pentoad

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Really struggling with limiting potentiometer range
« Reply #6 on: January 26, 2020, 01:19:55 am »
Try this simulator, I've had good luck with it: https://www.falstad.com/circuit/

Or just wire it up on a breadboard and try it out in the real world if you aren't sure of your math. You can even use pots for all three for testing purposes, then you can tweak all the values as much as you want.
 

Offline PentoadTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: gb
Re: Really struggling with limiting potentiometer range
« Reply #7 on: January 26, 2020, 11:37:03 am »
I have done more tests and have found that the Easyeda simulator is bug ridden to the point of being useless. For example, just look at this. Will try the falstad simulator. 0.01 resulted in the circuit simulating properly and the values calculated were correct.



« Last Edit: January 26, 2020, 11:48:02 am by Pentoad »
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7454
  • Country: pl
Re: Really struggling with limiting potentiometer range
« Reply #8 on: January 26, 2020, 11:51:06 am »
Download LTspice already ::)
 
The following users thanked this post: Refrigerator, Wimberleytech

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15799
  • Country: fr
Re: Really struggling with limiting potentiometer range
« Reply #9 on: January 26, 2020, 04:10:30 pm »
You don't need a simulator for that. (But Easyeda sucks anyway. Online tools are for the birds.  ;D )

Just put it in equations:

4.2*R4/(R2+R3+R4) = 1.225
3.81*(R3+R4)/(R2+R3+R4) = 1.225

Solving this yields:

R2 = 2068*R4/889
R3 = 13*R4/127

If you want R3 to be the fixed value from which to derive the two others (which makes sense as you'll have a lot less choice for pot. values):

R4 = 127*R3/13
R2 = 2068*R3/91

(Then of course you'll have to select the closest values that exist in a given E series.)
 
The following users thanked this post: Pentoad

Offline Vovk_Z

  • Super Contributor
  • ***
  • Posts: 1478
  • Country: ua
Re: Really struggling with limiting potentiometer range
« Reply #10 on: January 26, 2020, 04:21:02 pm »
There is may be something wrong with voltmeter XMM2 input impedance.
 

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: Really struggling with limiting potentiometer range
« Reply #11 on: January 26, 2020, 04:31:25 pm »
The problem is, your simulator is taking "1M" as one milliohm.
I don't know if it's misinterpreting "500R".
Try putting straight numbers on everything.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20363
  • Country: gb
  • 0999
Re: Really struggling with limiting potentiometer range
« Reply #12 on: January 26, 2020, 04:58:01 pm »
SPICE doesn't like zero Ohm resistors, which is why I imagine it causes problems. It also somewhat mirrors reality, since the potentiometer will always have a tiny wiper resistance.

As mentioned above, there's no need to simulate this, just work it out. In reality, you'll probably require some out of range operation, due to component tolerances. Potentiometers typically have a very poor tolerance of 10% or worse. One way round this is to connect another, much lower value 1% tolerance resistor in parallel with the potentiometer, but it will result in extra power draw.
 

Offline Nerull

  • Frequent Contributor
  • **
  • Posts: 694
Re: Really struggling with limiting potentiometer range
« Reply #13 on: January 26, 2020, 06:18:59 pm »
SPICE also isn't case sensitive, you'll have the same M/m problem in LTSpice. SPICE requires a 5M resistor to be written as 5MEG.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15799
  • Country: fr
Re: Really struggling with limiting potentiometer range
« Reply #14 on: January 26, 2020, 06:34:09 pm »
SPICE also isn't case sensitive, you'll have the same M/m problem in LTSpice. SPICE requires a 5M resistor to be written as 5MEG.

Indeed. :D
 

Offline bson

  • Supporter
  • ****
  • Posts: 2497
  • Country: us
Re: Really struggling with limiting potentiometer range
« Reply #15 on: January 27, 2020, 07:34:43 pm »
SPICE also isn't case sensitive, you'll have the same M/m problem in LTSpice. SPICE requires a 5M resistor to be written as 5MEG.
That's the because the punch cards it was designed run off of didn't have mixed case.  ::)
 

Offline PentoadTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: gb
Re: Really struggling with limiting potentiometer range
« Reply #16 on: March 10, 2020, 08:05:17 pm »
You don't need a simulator for that. (But Easyeda sucks anyway. Online tools are for the birds.  ;D )

Just put it in equations:

4.2*R4/(R2+R3+R4) = 1.225
3.81*(R3+R4)/(R2+R3+R4) = 1.225

Solving this yields:

R2 = 2068*R4/889
R3 = 13*R4/127

If you want R3 to be the fixed value from which to derive the two others (which makes sense as you'll have a lot less choice for pot. values):

R4 = 127*R3/13
R2 = 2068*R3/91

(Then of course you'll have to select the closest values that exist in a given E series.)

Hello all, been away from the project for a long time due to other stuff coming up. I am still really struggling with the maths here, for example, I have no idea where 2068 is coming from. Is there a for dummies way this can be explained or a resistor calculator I could use? Sorry for being so dense.
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1195
  • Country: ca
    • VE7XEN Blog
Re: Really struggling with limiting potentiometer range
« Reply #17 on: March 10, 2020, 08:47:28 pm »
Wolfram Alpha can solve the system of equations for you, if you've forgotten your high school algebra ;). Where this is coming from is rearranging one of the equations for R3 (put all R3s on LHS) and the other for R2, and then substituting them into each other and simplifying, so they both become dependent only on R4. Once you do that you will arrive at the equations SiliconWizard gives.

If you want to solve this with WolframAlpha, you enter it like this:
Quote
4.2*R_4/(R_2+R_3+R_4) = 1.225, 3.81*(R_3+R_4)/(R_2+R_3+R_4) = 1.225 for R_3

It can also solve for the resistor values too if you add that constraint:
Quote
4.2*R_4/(R_2+R_3+R_4) = 1.225, 3.81*(R_3+R_4)/(R_2+R_3+R_4) = 1.225, R_3 = 100000
73 de VE7XEN
He/Him
 
The following users thanked this post: Pentoad

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20363
  • Country: gb
  • 0999
Re: Really struggling with limiting potentiometer range
« Reply #18 on: March 10, 2020, 08:52:40 pm »
I would start by working out the voltage across the potentiometer, then the current and determine the other resistor values from that.


Vupper = 3.81V
Vlower = 1.225V
VR2 = Vupper-Vlower = 3.81-1.225 = 2.585

IR2 = V/R = 2.585/500 = 0.00517 = 5.17*10-3A = 5.17mA
IR1 = IR2 = IR3 as they're all in series.

VR1 = V1- Vupper = 4.2-3.81 = 0.39V
R1 = V/I = 0.39/5.17*10-3 = 75.435R

VR3 = Vlower = 1.225V
R3 = 1.225/5.17*10-3 = 236.943R

I would set R1 and R3 to lower values, to account for component tolerances, especially the potentiometer which probably has a tolerance of 10% or worse. I'd go for 220R for R1 and 68R for R3. Another thing you could do is connect a 100R 1% tolerance resistor in parallel with the potentiometer and recalculate all of the other values. The 1% resistor will reduce the overall tolerance of the potentiometer.
« Last Edit: March 12, 2020, 02:41:40 pm by Zero999 »
 
The following users thanked this post: Pentoad

Offline PentoadTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: gb
Re: Really struggling with limiting potentiometer range
« Reply #19 on: March 10, 2020, 10:00:06 pm »
Wolfram Alpha can solve the system of equations for you, if you've forgotten your high school algebra ;). Where this is coming from is rearranging one of the equations for R3 (put all R3s on LHS) and the other for R2, and then substituting them into each other and simplifying, so they both become dependent only on R4. Once you do that you will arrive at the equations SiliconWizard gives.

If you want to solve this with WolframAlpha, you enter it like this:
Quote
4.2*R_4/(R_2+R_3+R_4) = 1.225, 3.81*(R_3+R_4)/(R_2+R_3+R_4) = 1.225 for R_3

It can also solve for the resistor values too if you add that constraint:
Quote
4.2*R_4/(R_2+R_3+R_4) = 1.225, 3.81*(R_3+R_4)/(R_2+R_3+R_4) = 1.225, R_3 = 100000

Thanks! Wolfram done the trick!
 

Offline ArthurDent

  • Super Contributor
  • ***
  • Posts: 1193
  • Country: us
Re: Really struggling with limiting potentiometer range
« Reply #20 on: March 10, 2020, 10:00:55 pm »
Try using 11,362 ohms for the upper resistor.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf