Hi, I'm wondering if there's an easy way to control audio volume with Arduino? I see people are using digital potentiometers made for this purpose (I guess),and i found 2 type of digital potentiometers(control via i2c and the another using button only, but can someone tell me which one to use, a schematic and a arduino scetch? Would be great!
I suppose I should use the signal coming from my phone/laptop before it goes in to the amplifyer.and i wish the cheapest BOM
You should use a motorized potentiometer. You can buy them, or dyi one up using a hobby servo and the correct pot for your "old Amp".
and i found 2 type of digital potentiometers(control via i2c and the another using button only, but can someone tell me which one to use
There are digital pots with "up/down" inputs and those can work with up/down buttons and you don't necessarily need a microcontroller. And, those are the easiest to program if you want to control it with the Arduino. (It's as simple as blinking an "up" LED and a "down" LED.)
The downside to up/down digital pots is that you can't directly program a specific volume... You can't send a "go to 50%" command... They are made to be adjusted un & down by-ear. If you want to hit exactly 50% you have to make sure you always start at zero and keep track of where you are (not that hard, actually) or you have to count-down several times to make sure you're at zero and then count-up to 50%.*
but can someone tell me which one to use, a schematic and a arduino scetch? Would be great!
You can't expect someone to do the design & programming for you. You might find a similar project somewhere on the Internet but this is a do-it-yourself forum.
I suppose I should use the signal coming from my phone/laptop before it goes in to the amplifier
Yes. You need to control the line-level** signal. You can't run a speaker-signal through a pot. Of course, you have to turn-up the computer volume and the amp volume.
- X-10 light dimmers work like that ... When you send a dim command they go off before coming back up to the target dim-level.
** You can use a headphone-output as line-in to an amplifier. But, you can't plug headphones into a line-output because the headphone impedance is too low.