SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By thebillplease
#172388
Hello,

Thank you in advance for your help. I am looking to build a small device that contains a dial that performs two functions. 1. turns device on/off by turning dial 2. can be used to select certain options such as music genres. Ideally, this device would be no thicker the .5cm.

I have looked at potentiometers with spst switches, but could only find pots that were several centimeters thick. I have also looked at rotary encoders, but have not been able to find one that can be used as both an on/off switch and as a selector.

Any help is greatly appreciated.

Regards,
bill
#172453
One solution would be to use a rotary encoder with a built in push switch (i.e. twist to activate the encoder, push for momentary connection) such as this EN12-HS11AF25 (digikey.com, 987-1194-ND). You would then need to build a circuit that uses the momentary connection to switch power. I don't have the power-switch circuit to hand, but I've seen discussions here and on other forums.

- Chip
By thebillplease
#172455
Hi Chip,

Thank you so much for you response and resources! I checked out the part and video on eevblog, incredible find! Definitely helpful, thank you! Would you happen to know if there are any rotary encoders with a switch that is not push but rather twist? I was trying to make it so the user only had to turn the dial to turn it on/off instead of pressing it.

Thanks again.

Regards,
bill
By notexactly
#172490
thebillplease wrote:Would you happen to know if there are any rotary encoders with a switch that is not push but rather twist? I was trying to make it so the user only had to turn the dial to turn it on/off instead of pressing it.
I don't think those exist. The point of rotary encoders (why they're used instead of pots) is that they can rotate infinitely far in both directions. I'm pretty sure there are pots with a detent at the low end, but I don't know if that detented position actuates a separate switch or just corresponds to a specific analog position of the pot (which would be difficult to use for power switching). Also, as you said, it may be difficult to find a thin enough pot. If you do, I suggest putting a protrusion or notch on the knob and using that to actuate a separate switch.
#172501
Those pots with switches at the low end used to be everywhere in transistor radios and the like. They had a switch mounted on the back and were the thickness you were looking for.

You could fake it with an absolute rotary encoder with detent. Tie the common to the battery. The "all open" position is off, and diode-or the data bits thru schottky diodes to provide power if any bit is closed. Alternatively, have your micro go into a low-power sleep mode, waking up say once per second, to read the encoder.

/mike
By Mee_n_Mac
#172515
n1ist wrote: Alternatively, have your micro go into a low-power sleep mode, waking up say once per second, to read the encoder.
I was thinking similarly but have the encoder go into external interrupt lines and have a wake-on-interrupt enabled.
By thebillplease
#172532
Thank you Mee_n_Mac and mike for your replies. I thought about using an interrupt, but am currently using that pin for a rf12b transceiver.

@Mike, how would I wire the common to the battery so that I could still switch it on/off?

Thanks again for your help with this.

Regards, bill
By shakilabanu
#172562
n1ist wrote:Those pots with switches at the low end used to be everywhere in transistor radios and the like. They had a switch mounted on the back and were the thickness you were looking for.

/mike
I thought of those too...but are those still available. A while back I was looking for them and couldn't find them anywhere.