Re: Using VREF pins for pots that don't reach ADC=0 or 255
1. Would a lower resistance pot (like 1K-2K) be easier/cheaper to get tighter tolerances?
define tolerance its not a general parameter for pot ratings, resistance should not be relevant
Resistance:
The total resistance of the potentiometer, measured from one terminal to the other
Rated power :
The maximum amount of power the potentiometer can handle without overheating or failing
Resolution :
The accuracy of the potentiometer's resistance changes
Expressed as a percentage of the total resistance
Temperature coefficient :
How the resistance of the potentiometer changes with temperature
Mechanical life:
The expected lifespan of the potentiometer
Usually expressed as the number of cycles it can endure
Taper :
The relationship between the mechanical position and resistance ratio
The most common types are linear and logarithmic
2. Is there a physical work-around for "weak" pots? (hardware trick)
what is a weak pot
3. Would lower resistance pots actually be "better" for ADC? I remember Richard saying a 1K pot could "in theory" have 1 ohm resolution at 10 bits (or something to that effect).
only that acquisition time is lower, a 10k pot could have 10 ohm resolution
in order to have "stable" 10bit result from a 10 bit ADC you would need 16 times over sampling.
This flight simulator really wants a range of 0 to 1023 to be able to use the full range of motion on a control (imagine a choke that's always partially ON, or a flap, not good).
to begin with you would need 16 times over sampling or use a 12 bit adc.
are you using 10 turn pots? i cannot see how 0.25 degree resolution is useful for a 270 degree pot, most humans would be lucky to move it accurately in 2.00 degree increments
It seems to me that trying to fudge the ADC values in software is not the best approach; especially if it can be fixed with 4 resistors.
how is that going to work if the pots are not all identical, i have not encountered a pot that has a wiper that doesn't read 0 ohms to an end terminals at extreme rotation on my multimeter low ohms scale. how badly off are these pots . it would be easier to get better stock
in c i usually use a map function to get desired result range from an expected input range, about 1000 times easier and vastly more flexible than any hardware solution
int16_t map(int16_t x, int16_t in_min, int16_t in_max, int16_t out_min, int16_t out_max)
{
return (long) (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
Last edited by richard; - 28th February 2025 at 22:51.
Warning I'm not a teacher
Bookmarks