# How can I use an Arduino to simulate button presses on this PCB

I'm trying to simulate a button press on a PCB - potentially with Arduino and some additional components. I think I'll need to solder wires on either side of the button, connect those to an Arduino setup and toggle power on the wire maybe?

I've connected a multimeter set to 9 volt, and when connecting the leads to either side of the button I get a reading of -0.07. Does that give me an indication of the amount of power I need to pulse to the switch?

I may be approaching this the wrong way. Any guidance on what I need to be looking for is much appreciated.

Edit: When the button is depressed, the voltage goes to 0

• What's the voltage when is pressed? – KarlKarlsom Apr 7 at 1:46
• @KarlKarlsom the voltage goes to 0 when button is depressed – solderdat Apr 7 at 2:42

The switch does not provide power to the circuit it is connected to. It merely connects two points together (or not).

It appears that one side of the switch in question is tied to the ground plane of the board. The switch is therefore connecting its other terminal to ground when it is pressed.

You could simulate this easily with a transistor; for example, a small logic-level N-channel MOSFET would work nicely.

simulate this circuit – Schematic created using CircuitLab

The ground of the Arduino must be connected to the ground of the target PCB, but they don't necessarily need to share any other connections.

• The voltage he measured seems odd to me. If it's a normal tactile switch, that ties to ground when pressed, should it not drop 3.3V/5V (or whatever the digital voltage is) when not pressed? Also if it is pulled down and pulls up when pressed, you would measure the 3.3V/5V – KarlKarlsom Apr 7 at 1:52
• @KarlKarlsom: It's possible that the switch is polled with a relatively low duty cycle (e.g., in order to save power). A multimeter would read this as a relatively low voltage. An oscilloscope would show this. It's also possible that the OP's meter has a relatively low impedance relative to the pullup. – Dave Tweed Apr 7 at 2:10
• -0.07 is close enough to zero, so yes it's a bit odd. But there are many potential explanations. One may be that the button is a normally closed switch. Another is that the button wasn't active when the measurement was taken. – Heath Raftery Apr 7 at 2:10
• @HeathRaftery Yes that's right the -0.07 reading is when the button wasn't active – solderdat Apr 7 at 2:29
• @DaveTweed This is excellent thanks so much, I'll begin here – solderdat Apr 7 at 3:20