0

I have a HDMI Switch module which switches Input signals. It has a 4 pin push button to switch inputs. (front photo - back photo)

I want to modify the button in order to control it with an Arduino. (push via Arduino command) What should i do in order to achieve this ?

I am newbie in Arduino so please excuse my mistakes.

Thanks

2

Although it looks like 4 pins it's actually 2. You can see that they are connected together in pairs. This is identical to any other tactile switch of the kind used in many Arduino demos and examples.

All you need is some way of connecting the left pair of pins to the right pair of pins (in the underside image). The right pair are ground (you can tell because they are connected to the ground plane - the large copper area), so the input the left pair of pins are connected to must be active-low with a pullup resistor. That makes things simple enough.

If you can share the grounds between the switch circuit and the Arduino then it's possible to do it with just wires. However care must be taken:

Chances are this is a 3.3V based system (there's very few 5V systems around these days - the Arduino is pretty old technology from that perspective), so just setting an output HIGH or LOW and connecting it directly could damage the switch. Instead you need to emulate an open drain output. That means instead of setting a pin to OUTPUT and toggling it between HIGH and LOW to press the button you actually have to toggle the mode of the pin - that is, toggling between INPUT and OUTPUT + LOW.

For instance:

void press() {
    digitalWrite(BUTTON_PIN, LOW);
    pinMode(BUTTON_PIN, OUTPUT);
}

void release() {
    pinMode(BUTTON_PIN, INPUT);
}

You can, if you so choose, turn any GPIO pin into a real open drain output by using it to switch a transistor which in turn switches the button:

schematic

simulate this circuit – Schematic created using CircuitLab

Now it's just output a HIGH to turn the transistor ON and short the button, or LOW to turn the transistor OFF.

If you can't / don't want to share the grounds, then you can replace the transistor with an opto-isolator:

schematic

simulate this circuit

That is by far the safest option since it completely isolates (galvanic isolation) the Arduino and the switch box.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.