Hello everybody.
At the moment I have 8 buttons which when pressed just output +5v from 8 different pins. Those outputs each then go to a potentiometer for attenuation and mixed to one output. I would like to replace these 8 pots with 1 pot/encoder and store different values that can be recalled back by the buttons.
So if I press a button turn the pot/encoder it saves a value to that button stage. I press a diferent button turn the pot/encoder store a different value to that 2nd button stage. Etc. I would then like to save these values to be recalled after power cycles. Which is not a concern at the moment.
At the moment I just wanted to know which is better to use, A pot or a rotary encoder and if there is anything I should be wary of or any suggestions how I should implement this project.
Thank you all for your time in advance.
A pot is both cheaper and easier to read. The pot has its limits, a rotary encoder has none.
Either would work. The only difference would be that using a pot, you would be saving an analog value, and with the encoder, a digital value. I would think that the digital encoder would be more repeatable.
I think that pushing a button, then turning the pot/encoder to a new value is backwards unless you also have an "Enter" button. (Some encoders have a built-in push switch for just this reason).
Thanks for your replies.
I thought using a pot without a button would just read the value the pot was currently at and not be able to save. How would I tell the MCU to save that value to that stage?
dionnaki:
Thanks for your replies.
I thought using a pot without a button would just read the value the pot was currently at and not be able to save. How would I tell the MCU to save that value to that stage?
By storing the position value in EEPROM.
dionnaki:
Thanks for your replies.
I thought using a pot without a button would just read the value the pot was currently at and not be able to save. How would I tell the MCU to save that value to that stage?
Add a separate button to Your project.
Keep it simple is a good rule. Simple devices will be easier to put to work.