Creating a Volume for an Audio Device

So I have an Arduino Mini that I would like to use for this project, and I realize that I asked about this before, but I wasn't very specific on what I was doing.

I have a headphone/speaker amplifier that doesn't have a volume knob, instead it uses volume up and down buttons, so what I would like to do is add one using the Arduino.

The idea would be to have a rotary encoder attached to the Arduino that, when turned clockwise, rapidly shorts and un-shorts the connection to the volume up button, and vise versa for volume down.

My biggest concern is whether the Arduino is capable of shorting two of its pins together on command, and if not, then what another possible way to "push a button" on separate device would be.

My biggest concern is whether the Arduino is capable of shorting two of its pins together on command, and if not, then what another possible way to "push a button" on separate device would be.

When dealing with an unknown circuit the only "safe" solution is relays. A relay is an electrically-isolated, electrically-activated switch. You should be able to find a small low-current relay the can be controlled directly be the Arduino (5V @ 40mA or less).

You shouldn't need to "rapidly" switch... I assume you hold-down the volume controls until the desired volume is achieved.... The relay just needs to remain closed while the knob is being rotated. Or, put push-buttons on the remote-side too.

DVDdoug:
You shouldn’t need to “rapidly” switch… I assume you hold-down the volume controls until the desired volume is achieved… The relay just needs to remain closed while the knob is being rotated. Or, put push-buttons on the remote-side too.

Yeah that was my concern with using relays, the increment for holding the volume isn’t particularly fast, so “pressing the button” each cycle of the encoder is the fastest, but might be a bit much for a relay, I might just go with buttons that are closer to me and using the Arduino as a media controller (play, next track, etc).

Thanks for your help though!

mister_s:
My biggest concern is whether the Arduino is capable of shorting two of its pins together on command, and if not, then what another possible way to "push a button" on separate device would be.

There is no need to short two pins together, but if you did need to, the 74HC4066 is the way to do it - you have to connect its ground to the negative of the appliance (which will almost certainly be negative ground).

Most pushbuttons will have one side connected to the supply rail, generally the negative, in which case to "switch" it, you connect it to an Arduino output (presuming the appliance operates from 5 V or less) which is written LOW and set it to OUTPUT to "press" the button and INPUT to "release" it.

On the off-chance that more than 5 V is involved, just use an NPN transistor with its emitter grounded and its base controlled through a 470 Ohm resistor.

A complicating factor is when all the appliance's buttons are encoded using resistors into a single ADC input.

Paul__B:
There is no need to short two pins together, but if you did need to

I know this is a long time ago, but what do you mean by there is no reason to short the two pins together? What would your method of adjusting this volume be?

I would also just like to add what I discovered, there are three pins used to control the volume. One of which is a ground, and the other two output 3.3v, which is interestingly (perhaps) the same as the Micro Arduino.

When the top one is shorted to the ground pin, volume increases, and when the lower one is shorted volume decreases

Take a look