Using a single potentiometer for 2 different things

Hello all.
Ive been planning on using a potentiometer in my project to adjust a signal from an mp3 module to a PAM8304 chip. i had also wanted to use the same pot to control a menu by reading the value with an arduino. Now ive just realised that in order to use the pot as a 'scroll wheel' i need to provide a steady voltage to it, but that would interfere with the signal. a workaround is required.
Ive included a schematic of my current thoughts for how to possibly accomplish this. If any of you would be so kind as to critique it id be very grateful.
Also currently this setup requires 2 arduino pins. one to provide the steady 5v to the potentiometer and one to switch the transistor to isolate the amplifier module. these pins are always opposite states to one another. Is there any way i could use a single pin for this?
Many thanks,
Danny

I cannot see a schematic.

I cannot see a schematic.

i forgot to upload it first time round, try refreshing?

Inline OP's pic. See this image guide.

Inline OP's pic. See this image guide.

Thanks for that, will do it next time round for sure.

for selecting menus I have used a digital encoder

it gves a QEI output which indicates direction and number of steps
http://tutorial.cytron.com.my/2012/01/17/quadrature-encoder/

Ok so the diode stopped it from working, something im sure most of you knew without experimenting(im still learning). The reason for it being there was so that when i put D10 high it doesnt damage the mp3 module. I tried forgetting about that for the time being and simply using my pn2222a transistor to separate the potentiometer output from the PAM input with emitter connected to the pot. it worked inasmuch as it allowed the signal through but but whenever i activated it it would cause the speaker to pop, sometimes in a strange perpetual cycle. you could see this was using a lot of current as the arduino light dimmed. Can transistors be used this way or am missing something? Anyone have a better solution? Thanks.

for selecting menus I have used a digital encoder
http://cpc.farnell.com/search?st=rotary%20encoder
http://uk.rs-online.com/web/p/rotary-encoders/2523915/

it gves a QEI output which indicates direction and number of steps
http://tutorial.cytron.com.my/2012/01/17/quadrature-encoder/

Thanks Horace i'll look into this but ideally i wanted to be able to use a single analog potentiometer for both tasks.

There is something called an [u]analog switch[/u] which is something like a relay... That is, it's a electronically-controlled switch, except it's not electrically isolated like a relay. So, it would be possible to switch a pot between two different circuits. You'd need at least one more analog switch to disconnect the pot from the audio when you're using the menu (uou may not want to blast the audio at full-volume when you're adjusting the menu).

It's also possible to combine the AC audio with the DC control, and then isolate/filter them with capacitors (and probably you'll need at least one additional resistor). But, you'd be adjusting both at once... You can turn-off the menu in software but the amp would still be connected to the MP3 player through the pot.

However... "Philosophically", this does not make sense to me... The problem is, a pot has "mechanical memory"... If you use the pot to adjust the menu, then you switch back to using it as a volume control, your volume setting is now changed from where you left it. Then you change the volume, and when you switch-back to the menu now the menu setting now changed from where you left it.

A rotary encoder doesn't have any mechanical memory, you're just reading the changes, so it's theoretically (or "philosophically") better as a multi-purpose control. However, a rotary controller is NOT a drop-in replacement for an analog volume control.

Thank you DVDdoug. you've spoken a lot of sense. These analog switches look very interesting. Its strange how they seem to be quite elusive being as they sound like such a useful component. its a lot easier to get ones head around a relay thatn a transistor so something which could emulate it sounds fantastic. ive looked on ebay and there are very few listings for them though. any idea why?

as for you philosophical point you are quite right. i was planning on using a potentiometer which is limited in its mechanical bounds and so would make it unsuitable for both applications.

I think i may just have to have a think about another solution. Thanks very much fo r the help and i shall look into those analog switches!

you could use a digital encoder with a QEI output to select menu items and also to drive a digital potentiometer to control the analogue

digital encoders I used have a switch (you press the dial) which you could use to switch bewteen menus and analogue control