Make HDMI switch smart

I have been teased by my spouse about our HDMI switch that switches the output between TV and projector.
It has a latching button that switch the output. My first Idea was to just mount a servo that pushes the button but it just feels so unreliable even when I just think about it.

Then I thought, since it’s a latching button it can probably be replaced by a relay or something with a wemos. So I opened it up and found a six pin pushbutton.

Images in full size:
https://community-assets.home-assistant.io/original/3X/c/9/c91c04bc7a9fcf40a35cab30889def991c48250c.jpeg

https://community-assets.home-assistant.io/original/3X/d/6/d69d1b49e97eaae6ee8b2f9d03ad1c6244901ab9.jpeg

https://community-assets.home-assistant.io/original/3X/7/1/71c5f331721dd3df236c3514aa62717288ab0d86.jpeg

I’m not good at this so that is why I ask. When I look at the traces of the button it seems the top left and bottom left is just to control the LEDs.
Then two is unused top right and bottom right ?..

Can anyone help me with how to figure out how to switch this thing using wires/relay or have any information about the pushbutton so that I can find out what the pins are?

It’s a DPDT (double pole double throw) switch. Can be replaced with a DPDT relay with one on/off signal to the relay coil.

The centre two pins are separate common, the top and bottom pins on either side their respective NO (normally open) and NC (normally closed) contacts.

images

Both parts of the switch are being used.

Personally I’d use Fibaro Smart Implant for this (assuming you have Z-Wave configured):

  • It has 2 potential free outputs and 2 configurable inputs. Outputs can work as relay, so can be used to emulate pressing the button. All you need in this case is to solder 2 wires (even if your button has 6 pins I doubt all are used) to work in parallel existing button, and connect these to one of SI outputs. Configure SI outputs and ready to go.
  • Alternatively, if you want to go for more sophisticated setup you can desolder button and connect it to one of SI inputs. In this case you can also get notifications if the physical button on your device is pressed. BTW in this case SI can be configured in the way that corresponding output follows input, so your switch would work as previously.
  • Finally, going even further you can configure second input as analog voltmeter and connect it to one of LEDs, so checking voltage you can also verify which HDMI input is currently active.
  • The question is power supply… SI accepts 5~30V DC as supply (if I remember correctly) and power consumption is minimal, so perhaps you can even solder it directly to power terminals on the board, if these can be identified (it looks it is HDMI powered, I do not see on your pictures any power connector). So whole setup could be really hidden in the original box. Otherwise external power supply might be required.

That makes sense.

So pins 1,3 and 5 is for the LEDs.
Pin 4 is the common which seems to have a trace on the back side, then probably there is traces on the front side that leads to the chip. (didn’t look at that. Will look at it again soon when I open it up again).

So really, it’s just 2,4 and 6 that is needed. The LEDs (if they are just for humans) are not needed since My plan is to have the status show up in Home Assistant anyways.
I have never looked at the LEDs, I mean if the TV isn’t working then it’s quite obvious I need to push the button.

I don’t have any Z-wave devices or even a transmitter.
I have not yet found the need for it.
Maybe this could be the need, but so far I believe the regular relay and WeMos is a simpler solution.

But you are correct. I have no need for the button and can desolder it. Also there is no power supply.
And I can happily place this in either the same box or a new larger box. It doesn’t matter.
It’s hidden in the gigant mess behind the TV.

Yep. If you’re sure the other side is only switching the LEDs. In which case an SPDT (single pole double throw) relay will do.

just yesterday i made a unit which controls the same hdmi switch that u have… what i did was just removed the stock switch and took three wire tappings from one side (which are 2multiplexer select inputs and one ground) and connected a relay to it.and it works fine…even these led works…i u want more help i can give pictures

I gave up on the switch and went for a servo instead.
Works fine also and makes a cute sound when it switches the output

oh good for u …but i feel external servo is overdone for the project xD. …i did it with a normal relay… it can also be done without relay…the multiplexer just needs ground for selection… anyways good to have discussion :smiley:

I couldn’t figure out what the switch actually did.
I tested with the continuity meeter and it just didn’t make sense to me.
I agree that it’s not a good method and a relay is a far better solution.

if u look closely to the thip in splitter its a multiplexer …and the switch is connected to the selector pin of multiplexer… whichever pin is pulled down multiplexer selects that and sends hdmi signal to that port.

Hi did you have a pictures of your project? I trying to achieve something similar. Don’t think I have the exact same switch but has dpdt switch

I just did this with an ESP32 and one of those “passive” bi-directional HDMI switches. The setup is incredibly simple and it works like a charm. Built it on a breadboard for now, no fancy components necessary.

The real reason I needed this is pretty mundane: I use this as a “disconnector”. When I switch over from my projector to an empty output on the switch, my PC does no longer detect a monitor and thus activates another monitor to be primary.

I just stumbled over this thread by accident. Should I document this? Is anyone still interested?

1 Like

Hi, yes that would be interesting, I’d like to operate a HDMI swicth in this way. Thanks!

1 Like

Yes, would be interesting to see how you solved it.

I want to do the same thing with a USB switch, used for sharing keyboard & mouse between media player and PC connected to the TV.

1 Like

OK, here goes.

Dislaimer: I have multiple of these switches. On the outside, they look almost identical. Like this:

Be no fool, on the inside they are not. This control circuit only works for this exact model and it is a particularly easy one to automate.

I cannot stress this enough: Make sure you have the exact same PCB before you try this.

HDMI_Switch

TL;DR

  • Desolder the switch. Connect pin 2/5 to ground on your ESP board
  • Connect pin 3/4 to an I/O of your choice to switch between the ports H1 and H2
  • Profit

Now the long version: how do you find this out?

First thing I did was open the case, desolder the switch and look at the PCB:

  • The switch is a common 6 pin push switch. When the switch is latched in the pushed/down position, pins 1 and 2 as well as pins 5 and 6 are connected. When the switch is in the up state, pins 2 and 3 as well as pins 4 and 5 are connected.
  • It becomes immediately evident that pin 2 and 5 are connected to GND. Measuring continuity with a multimeter between these pins and any of the HDMI socket housings confirms this.
  • Interestingly, pin 1 and 6 are only connected to the negative (-) leg of diode D1. This means: if you don’t need the diode (which I didn’t), there is no need to do anything with these pins.
  • This leaves us with pin 3 and 4, which are connected together with a trace on the underside of the PCB. They control the diode D2, since they are connected to its negative (-) leg. Pulling pin 3 and 4 to ground activates the diode. But there is another trace marked in yellow which is connected to the same net. This signal controls the MUX IC. Measuring with a multimeter confirms that the logic level is 3.3V. So this is your target for conecting to your ESP I/O.

Is there more to it?

  • Yes, if you think a little more about this circuit, the diode D2 acts as a pullup when the switch is pushed, making sure the level on pin 3 and 4 is high instead of floating. This also means: we won’t kill our I/O when we hook it up directly to thes pins since any current that could potentially kill our I/O is limited by the diode and its resistor.
  • The MUX IC is the IC9642, a common HDMI / DVI MUX of Chinese origin. As can be seen in the datasheet on page 9, When SEL1 is high (3.3V), then the switch can be operated solely by switching SEL2 between high and low, which is what this circuit does.

The breadboard circuit is so dead simple that I didn’t take a photo of it. Again: connect one of your outputs of the ESP to pin 3/4 and connect your board ground to pin 2/5. Don’t forget this only works with the exact same PCB as in the pictures above. As you can see, I mounted a standard 3 pin header to the PCB instead of the switch so I could easily connect it to the breadboard.

1 Like