Page 1 of 1
First project - using a dial/knob?
Posted: Fri Nov 21, 2008 1:13 am
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.
Posted: Fri Nov 21, 2008 1:34 am
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.
Posted: Fri Nov 21, 2008 1:39 am
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.
Posted: Fri Nov 21, 2008 2:19 am
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!
Posted: Fri Nov 21, 2008 2:44 am
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.
Posted: Fri Nov 21, 2008 3:54 am
A pot could be used, with an ADC.
Posted: Fri Nov 21, 2008 9:33 am
leon_heller wrote:A pot could be used, with an ADC.
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.
Posted: Fri Nov 21, 2008 2:45 pm
If custom mechanical bits are possible, there's no reason you can't put something on the pot shaft that generates the detents.
Posted: Fri Nov 21, 2008 3:15 pm
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
Posted: Fri Nov 21, 2008 3:31 pm
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).
Posted: Fri Nov 21, 2008 3:37 pm
theatrus wrote:Hmm, I haven't encountered any pots with detents This one?
Posted: Sat Nov 22, 2008 3:17 pm
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.
Posted: Sat Nov 22, 2008 11:54 pm
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.