View previous topic :: View next topic |
Author |
Message |
Nick Guest
|
varible dial/knob question |
Posted: Tue Aug 24, 2004 8:23 pm |
|
|
I want to have a varible dial, I thinking many a pot attached to an analog pin and read it that way.. What are some other ways?
Nick |
|
|
Yashu
Joined: 08 Oct 2003 Posts: 26
|
Re: varible dial/knob question |
Posted: Tue Aug 24, 2004 8:41 pm |
|
|
Nick wrote: | I want to have a varible dial, I thinking many a pot attached to an analog pin and read it that way.. What are some other ways?
Nick |
quadrature optical encoder |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Wed Aug 25, 2004 9:34 am |
|
|
... or a Hall effect encoder, or a mechanical encoder. |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1909
|
|
Posted: Wed Aug 25, 2004 10:39 am |
|
|
I guess the answer depends on what sort of control & feel you're looking for.
If you want something cheap and can spare two pins of port b (b4 - b7), then a mechanical encoder is the way to go. For example, see: http://ca.digikey.com/scripts/DkSearch/dksus.dll?Detail?Ref=96152&Row=342823&Site=CA
To use something like this, just connect the two outputs directly to two pins on port b, enable the b pullups, and use the interrupt-on-change to detect when the encoder was turned. The drawback? It might not feel very "fine" to the user (i.e. relatively large turn required before something changes).
A pot only requires one analog pin, but it may be noisy. Another thing to consider is that the large "front panel" type of pot you'd need tend to be pricey. They also tend to get dirty with age. I'm reminded of the old car radios that would crackle badly whenever you touched the volume knob. |
|
|
Nick Guest
|
|
Posted: Wed Aug 25, 2004 10:43 am |
|
|
perfect, thanks for that link!
Nick |
|
|
|