I'm attempting to take 3 boards that have a pushbutton switch on them and use an Arduino every to toggle them all at the same time. The switch is in the top center of the pic and I labeled the pins 1 through 4.
I'm having a hard time figuring out how to get the Arduino to "act like a switch", mostly because the switch on the board doesn't act as I expect. Pins 1&2, and 3&4 appear to be tied. When I power on the board it appears that 1/2 are ground and 3/4 are 5v. I thought great, I should just be able to connect my Arduino to 1 and have it output HIGH to toggle the switch, but that doesn't work.
Interestingly if I manually connect 3 or 4 to ground that does trigger the switch. But I'm not sure how to get an Arduino to emulate that behavior! Any suggestions would be greatly appreciated.
Both boards are being powered by the same micro USB power supply at the moment, but I could also try powering the board I want to control from the Arduino's 5v pin if it matters.
Connect the Arduino output to 3/4 and pulse it low. For safety, insert a small signal diode (1N4148 for example) between the output and the external board. Put the cathode of the diode toward the Arduino.
You may have damaged the output pin you experimented with. For this reason use a different output for the new attempt.
Thank you so much, that was an amazing (and prompt) reply. As you can probably tell I'm new to this and hadn't heard of a pull UP switch. The provided diagram and along with the proper terminology have been enormously useful to helping me find more info and understand it.
In cases such as this, using a relay, wiring the relay contacts in parallel with the switch (thereby placing a switch in parallel with another switch), dispenses with many "issues".
runaway_pancake, can you expand upon "issues"? If it matters, the existing switch will be functionally removed (inaccessible inside another case). I've used mechanical relays for 110v AC situations, but when I started looking for low-voltage relays the conversations quickly got into mosfets, transistors, and other things that are still over my head. Do you have a good recommendation for a 5v controlling 5v relay?
The schematic is poorly drawn. The button is not a pull-up or pull-down, the resistors are.
The button on your device is probably wired as are S2 or S3 in the above drawing. It doesn't matter which. It is normal for a PCB mounted button to have four legs to give it mechanical stability.
So, pins 1&2 are ground and pins 3&4 are connected to a pin on U2. You verified this by grounding pin 3 or 4, and the switch should toggle. (The shields on the HDMI connectors are a convenient ground).
Connect ground from your Arduino to pin 1 or 2 (or the HDMI connector shield), and a data pin from the Arduino to pin 3 or 4. When you drive the Arduino pin low (0), the switch should toggle. You can't damage a 5V Arduino input pin by putting 5V directly to it, but to be safe I would put a resistor (1K to 10K- the value is not important) between the Arduino data pin and the button.
So, in your code, output a zero to the data pin for a tenth of a second to simulate a manual button press.