Replacing buttons on Bluetooth speaker

Im replacing the buttons on a Bluetooth speaker so that it can be controlled by Arduino.
I've been able to work out that a direct short to ground from one of the pads will effectively activate the button.

I've tried using the analog write function and some N channel transistors with some limited success, however, the Bluetooth control is very voltage sensitive and can easily cause the controller to reset or bounce quite a lot.

Does anyone else have some other suggestions to try?

Why?
That would be like pushing the button 500 or 1000 times per second, and not stopping.

Just digitalWrite the gate HIGH, and digitalWrite the gate LOW after a few hundred milliseconds.
Make sure all sources are grounded. A 2N7000 could work.

If you can't share Arduino/speaker grounds, then opto couplers are the preferred solution.
Leo..

1 Like

I wasn't aware of these before, but it seems like something that will work well.

It saves you two things.

It absolves you from figuring out exactly how the buttons are connected.

It avoids introducing ground problems and injection of hum.

1 Like

It's also a very simple circuit, ive ordered a few 4N25's, so just need to add a 75ohm resistor and that's it.

That implies you want to drive the opto LED with it's absolute max current, which is bad.

A 1k resistor in series with the opto LED is more than enough drive current to switch the current of a button with the opto transistor. Make sure the opto transistor is connected with the right polarity.
Leo..

Really? 4N25s are essentially an obsolete part.

What makes them obsolete? they are still readily available.
What would you recommend instead?

Mediocre CTR.

So are a lot of things!

PC817.