OK, this idea was sparked rom my recent project, the blinking an led with a pot one... I was think about how to improve my accuracy. I got the idea of a little thing where you plug in a pot, and a 4 digit 7 segment display tells you the number value the pot is at... so instead of the standard 0 - 1023, you can get a more accurate number, for example maybe 27 - 957.

Is this possibe?

how would 27 - 957 be more accurate?

i mean all pots have different min and max values... so if you fund those values, and use them instead of the standard, you will ahve a more accurate sweep field...

ahh, i see. well actually that sounds like something thatd be pretty easy to do, and could be pretty usefull. another thing to watch out for is that the resistance could also change depending on temperature.

that is verry true, but i figure you would be metering it in the same place it is going to be at... so the temp would be fairly constant(+ or - 1-2 deg)

by "little thing" i meant a little circut... and i have seen people find the correct numbers, and it makes thier project WAY more acccurate... like in scaling... it feads 0 - 1023, but in map it only scales your sweep range....

Your question/idea makes little sense, but maybe I just don't understand what you are trying to say.

i mean all pots have different min and max values...

All pots have a minimum resistance of 0 ohms, and some different ohm value for 100% turned to full on. The Arduino analog input pin doesn't read ohms, but voltage. So any pot wired as a voltage divider will output 0vdc to 5vdc, regardless of it's max ohm value. So you end up with a converted digital value of between 0 and 1023. You can't have any more accuracy inside your program more accurate then that raw count step rate.

But again, maybe I'm just not understanding your idea.

Lefty

i think he is trying to account for defects. if a potentiometer has a shaft thats slightly off or maybe a messed up track, its range might become limited, and if you scale that there is still a section of the range that is never used. by finding the values that the pot can give you can get a better idea of its position by scaling that range instead.

i think he is trying to account for defects. if a potentiometer has a shaft thats slightly off or maybe a messed up track, its range might become limited, and if you scale that there is still a section of the range that is never used. by finding the values that the pot can give you can get a better idea of its position by scaling that range instead.

and he hits it right on the target... thats basically it... and i feel that i am being called stupid, :'( because i know exactally how a potentiometer works... the arduino always reads 0 - 1023 i know... what im sating is that you can tell it to SCALE only your avalible range

You can use the map function for a more better define value. I used it to map 1023 to 255 on my spirograph project and read the analog value and used that to see what value was best at what pwm ( 0 - 255 ) for different effects.

and he hits it right on the target... thats basically it... and i feel that i am being called stupid, because i know exactally how a potentiometer works... the arduino always reads 0 - 1023 i know... what im sating is that you can tell it to SCALE only your avalible range

Nobody called you stupid. It's just that you used the words "improve my accuracy" and I don't think we agree on what accuracy means. The map function allows you to scale the 0-1023 to any range you want (larger or smaller in counts), but that does not increase the underlining accuracy or resolution capablities of the raw 0-1023 range.

Lefty

The map function allows you to scale the 0-1023 to any range you want

that is half on the idea... it can scale any numbers, not jus 0 - 1023... i couls scale 300 - 500 if i wanted to... and if i find those correct numbers for my pot, it will scale only the range of my potentiometer, thus giving me a more accutate scale... liek if my pot is at 1/4, it might not nescicarely be reading 206... 1/4 on one pot might be 230, and it might be 200 on another... do you get what im saying?

ur missing the point... is i scale it to only the pot val's, then i would have a more accurate conversion... now can somebody actually help ne instead of ardue with me... basically i need to read a pot and display the value on a 4 digit 7 segment display...

Here are the links to control 4-digit 7-segment display

ur missing the point... is i scale it to only the pot val's, then i would have a more accurate conversion

I have tried to follow this thread but this last quote has me stumped - does anyone understand it?

Is it a log potentiometer, and you're trying to linearise it?

i think he's just trying to get rid of the unusable portion of a potentiometers value. if a potentiometer cant go below a certain voltage(defect), then what good does it do to start at 0 if you do any calculations with it.

So, an offset, not a scale?

Why not just chuck away the broken pot?

Please correct me if I am wrong, but I feel this is what he is trying to say: You have a poti and its rotation is 0%-100% (0-1023), BUT your only using 25% of that rotation your only getting ~255 ADC points.

What he seems to be getting at is that since you are only using 25% of the poti's rotation, to get higher "accuracy" of that 25%, to have a "little thingy" that takes that 25% of poti rotation, and scales it with finer points to the 0-1023. In essence taking the 25% rotation of the poti and making it the NEW 0-1024 ADC value.

I believe this is what he is getting at. So it's a scale-er of some sort. :)

EDIT: So if the above is correct... and as an example, he has a poti and only 25% of that rotation is being used. Lets just take for example that his poti outputs, due to its use in his application, 2V -> 3.25V (Roughly 255ADC points, or 1.25V of change). His "little thingy" would take that 2V-3.25V of change and output 0-5V based on only 1.25V of change. In essence breaking that 1.25V of change into finer segments for the ADC of the arduino to use.

In that case, and assuming you’re only using the first 25% of the travel of the pot, you’d need to reduce Vref to 25% of the supply voltage to get the full 10 bit resolution.

What I’ve done in the past is “chop off” the extremes of the pot where they tend to get less linear, drop or rise in resistance suddenly, or seem flaky (jump up and down rather than progress in the intended direction). And of course do a little “smoothing” in software - by taking many samples and average.

So, when you do an analog read, do a sum of 4 of them and then divide result by 4, if the value less than say 100, call it 100 and don’t offer any more resolution in that direction. And if it’s greater than 900 call it 900. Your pot can now effectively provide more reliable values but in a more limited sweep range.