SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Davie
#59562
Hi all,

Just discovered this site today and thought the tutorial about your first embedded board was great. In fact I intend to take that breadboard design and expand it to meet an idea I've had recently.

The idea is to mount a dial on the wall that will sent a certain output via the RS232 port based on what's selected. My question is what's the best way to read the value of where the dial is pointing? I've discovered the Membrane Potentiometer which I guess I could try and build something around, but It's not really the dial/knob I had in mind. Plus I guess I'd have to build in some sort of a/d converter to read the voltage/resistance.

Any thoughts?

Cheers

Davie 8)
By Davie
#59566
searching the forums, I've found a few pointers, but these seem to be movement based, but I'm looking for absolute positioning. The knob should point to A,B,C,D,E,F,G etc.
By theatrus
#59567
Do you want detents (aka clicks) for for position? Or is a continuously variable type ok?

If you don't care about the device maintaining its position after powering down and back up, a rotary encoder will work well. You could indicate current position via LEDs. If you must have absolute positions, then you're looking for a multi pole switch. Harder to find in large number of positions.
By Davie
#59568
I think I'll need the mulitpole type as there will be names on the dial/knob that need to be selected - so saving state is a must.

Thanks for the pointer!

D.
User avatar
By bigglez
#59569
Davie wrote:I think I'll need the mulitpole type as there will be names on the dial/knob that need to be selected - so saving state is a must..
There was a time when rotary mechanical switches
were common (used in radios for channel or band
selection, for example).

The basic switch is still available, here is an example.

A contemporary alternative is the rotary encoder,
which pulses when rotated. These pulses can be
decoded to determine direction.

For your project using a rotary encoder would also
require an indicator to show the current position
and a memory to return to the last position if
the power is cycled.

The electronics to make the later would actually
be lower cost than a high quality mechanical
switch as described earlier.
User avatar
By leon_heller
#59574
A pot could be used, with an ADC.

Leon
By riden
#59592
leon_heller wrote:A pot could be used, with an ADC.
Leon
That was what I was thinking too. If you don't need the click (detent), this could be a good and simple solution requiring a single input pin on the micro controller. From experience, rotary switches are easily broken if handled too roughly by the user. A variable resistor is cheaper and more easily replaced.
By busonerd
#59637
If custom mechanical bits are possible, there's no reason you can't put something on the pot shaft that generates the detents.

Cheers,

--David Carne
User avatar
By bigglez
#59645
busonerd wrote:If custom mechanical bits are possible, there's no reason you can't put something on the pot shaft that generates the detents.
A lot of volume control analog pots have shaft
detents (clicks). I can only imagine this is to give them the
same feel as a step attenuator. AnotherAudiophool quirk...
By theatrus
#59648
Hmm, I haven't encountered any pots with detents, though I will say I haven't seen everything. Most clicking volume knobs end up being rotary encoders, with the volume control being done by a digital potentiometer (which can be made to much tighter tolerances and noise than analog pots for much less money).
User avatar
By bigglez
#59650
theatrus wrote:Hmm, I haven't encountered any pots with detents
This one?
By lyndon
#59757
If the dial won't move when power is off, you can use a rotary encoder connected to a small (8-pin?) MCU with EEPROM and save state when the position is stable for 1 second. Since it's being used by hand, you're not likely to exceed the EEPROM max cycle time. Alternately, you can build a power-down detect circuit or use an MCU with brownout detection and only save the position when power is going down.

If you have a very small number of setpoints, you can also use a rotary BCD switch. I have only used the PCB mount "screwdriver trimmer" type, but have also seen them as panel mount devices. However, it will most likely also be more expensive than the encoder+mcu solution.
By The_Todd
#59791
You might consider tearing apart an old alarm clock or "boombox" of sorts laying around which has the physical knob you want. It likely already has the potentiometer attached to it along with who knows what else you might find.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]