is there a part this does this as i describe - Page 1
Forum section: electronics / beginners

author: ste hughes
author_rank: Newbie
timestamp: May 30, 2010, 09:27:57 pm
content: hi guysi am building a project - its my first ever real micro controller project if you can call it that (going to use a stand alone arduino) but to you pro's it may be crap - to me its epici need a part like a pot where i can twist it and get a value read on my analogue pinsexcept i can't use a pot as they are not stable enough (that may be the wrong word)what i mean is if for example the value at 1 point on the pot to the arduino is 800 if you then turn the pot 1000 times one end to the other and come back to this 1 point the value may not be 800 againthis sort of buggers everything up so can anyone suggest a alternative line i can look at to overcome this as i am stuckit needs to be cheap/easy (i am poor/thick) and not too bulkyor are there pots out there that do not suffer this (i was using cheap parts...)any help appropriatedi love you long time

author: djsb
author_rank: Super Contributor
timestamp: May 30, 2010, 09:41:52 pm
content: Hi,Maybe you need something like thesehttp://www.bourns.com/pdfs/bourns_prec_pot_short_form.pdfThe challenge is finding parts that are inexpensive.David

author: Unknown
author_rank: Unknown
timestamp: May 30, 2010, 09:45:31 pm
content: A precision pot (eg. cermet) will behave better, but will be more expensive.Maybe a rotary encoder would work? They're usually relative devices, but you can count pulses pretty accurately. If you really need a resolution of 800+ steps per rotation, that will be expensive, but you can use multiple turns if you give the user some form of feedback (like an ipod). They can be pretty small and cheap if you don't need good durability or resolution.Depending on the required resolution, maybe you could just implement a margin in software? Eg. an integer division by 10, so anything from 800 to 809 will be correct, and you'd still have 100 steps or so.

author: ste hughes
author_rank: Newbie
timestamp: May 30, 2010, 10:07:51 pm
content: bourns do a pot that looks spot on for £20 - and its just a straight replacement for the one i have nowwill check out cermet nowalso ive done a quick look at rotary encoders and for what i need i think they are possibly just abit over me at the momentthanks though guysany more ideas please shout them out

author: Chris_R
author_rank: Contributor
timestamp: June 01, 2010, 02:42:17 am
content: What are you using the pot for? Do you really need it to measure (presumably) 1024 levels?I guess that in your code you are checking forCode:if (adcResult == 800) {do some stuff;}If you only need say 10 values around the pot then you can check a range insteadCode:if ((adcResult>=800) && (adcResult<900)) {more stuff;}Of course this may not be what you're looking for at all! If you explain why you want this accuracy then people may be able to offer more help. Remember, changing code is cheaper than changing components.

author: Unknown
author_rank: Unknown
timestamp: June 01, 2010, 03:02:58 am
content: Or just divide the adc result by 100 (integer division), which was the third solution that I offered

author: kc1980
author_rank: Regular Contributor
timestamp: June 01, 2010, 07:48:12 pm
content: Rotary encoders are not that hard to work with. I just bought a very very nice one on ebay for $35. Just feed it a supply voltage and it outputs quadrature pulses. Set up the micro so that the pulses trigger a hardware interrupt that increments or decrements a position variable.