Need Help Making a Displayport Switch Smart

I was looking into making this UGREEN Displayport Switch smart so I can control it through Home Assistant via ESPHome. I’ve seen plenty of people do this (like redphx) but not for a Displayport Switch specifically which seem slightly more complicated.

This is what the board looks like:

I’ve highlighted that the top two pins of the button are connected to ground but the bottom two I can’t figure out what it’s connected to. I’ve tested all the through-holes on the right side. The only thing I’ve gained from testing those are that TX is somehow connected to the LEDs. The rest don’t have any way of switching inputs. I’ve also tested all the labeled pads on the bottom with the button pins but they don’t have continuity with the bottom pins of the button or a way to switch inputs either.

I could just solder wires to the button pins but my soldering is pretty bad and am afraid I’ll mess something up if I try to solder wires to them so was hoping there was an easier way that I don’t know of.

That may be best option

I’m looking at those pins marked GND, RX, TX, 3V3 etc and wondering what they output, especially just when the button is pressed? That 20 pin chip to the right hand side of the board is most likely a UART chip with extra GPIO pins, and could be jumpered to the USB port to be remotely controlled from a UART command, and drive the switcher chip port direct by lifting a pad and adding a jumper or two. Post a clear closeup photo of the USB connector on the top right side, both sides, so that the resistors and connections that are being used can be clearly seen.

It would be so much less frustrating if the picture could include the four large chip numbers in clear readable format. Maybe a zoom in photo for each of the four, plus the switch itself, without the red markings obscuring the circuit traces. Is the reverse side of the PCB devoid of any pads or markings or chips? Post a photo of that too.

Have you traced where the wires from the switch end up to the pins on the chips on the circuit board? You may need a magnifying glass, and a multimeter. I’m guessing only one pair of connectors is actually used, the other as convenient mounting only. You could use the spare pair for input to your ESP chip. The chip to the right of the switch is probably the destination, maybe through a resistor, and an internal latch will probably trigger a circuit trace to the largest chip to switch it. At this stage all chips are unknown, so chip numbers would be nice.

Does plugging it in to a USB port on a Windoze PC invoke an added device in device manager? Is it a UART, or a specific driver? Right click and check the properties. Maybe the associated .inf file may contain clues? Given the claims of universal compatibly, it may not invoke drivers, but worth checking.

I note the following in the user manual: “The switch does not support automatic switching. Manual button press is required.” This seems to hint an automated one exists.

Have you contacted the vendor to ask if it can be automated? It may be just a firmware update.

You may just have to break out the fine tipped soldering iron, hot tip to melt the solder quickly, with very fine unleaded solder, and very fine wire and solder direct to the switch, quickly so not to melt it off the board. Pre-tin your wire so it can stick as soon as the solder melts. Hold the switch with a pair of tweezers to absorb the heat (there goes that third hand!). Only do one joint at a time and allow it to cool down before moving on to the second one. Given there is 3.3v at the pads at the right side of the PCB, I would assume a GPIO from a ESP board could drive it direct without voltage translation, or you could be on the safe side and drive it from a relay board across the button switch to be certain, and also switch the displays on and off at the same time. I’m assuming there isn’t enough room to shoehorn a ESP inside the existing enclosure.

The chips just above the UGREEN board markings or left of the biggest chip may contain the voltage regulators, and it may be able to supply the extra current needed for the ESP chip. Please post a clear picture of those too. You may be able to just pickup the 5V from near the USB C port and drive your ESP board from that.

Note: I looked at the project at GitHub - redphx/esphome-ugreen-hdmi-switcher: Control UGREEN HDMI Switcher/Splitter over WiFi using ESPHome. These wires in this photo are way too fat and will absorb the heat from your soldering iron before it can make a good joint and possibly lift the pads or the pushbutton switch. Something a lot thinner - it only has to carry 3.3volts at a few milliamps.
https://github.com/redphx/esphome-ugreen-hdmi-switcher/raw/main/photos/wiring.jpg

Find some old/broken PCB and practice little bit. GND is exposed on the header pad so it should be easy. Other leg of the button is your only “challenge”.

I get that you’re new and you’re only allowed to post 1 pic per post, but how about a separate post showing a pic of the bottom of the board?
That’s what redphx’s implementation focuses on, and so should you.

Hey, I want to see lots of pics. Many posts is OK… :wink:

I did try to do this but nothing I touched had continuity with any of the pins on any the chips.

Plugging it into a Windows machine doesn’t seem to have anything show up in the Device Manager. Just when I plug it into the USB-C port for display (not the 5V in one) Windows just says I need to plug it into a proper Displayport alt-mode port.

I didn’t contact UGREEN but I imagine their support won’t help. Worth a try I suppose.

Man, being able to only upload one picture per post for new users is a pain but I get it…

Thanks. Doing good so far. Reaching the limits of magnification.
On the underside, is that pad marked HPD about the same location as the switch on the other side? Does it connect to one of the switch pins? Is the QR code sticker covering any pads or solder joints? Check by running your finger over it to feel for any bumps.

Any chance of a closeup of the two chips, one on the bottom left, and the other on the top right?

In the picture of the button switch, there are a yellow and black parts under it. I’m assuming a capacitor and resistor. Does one of the switch pins connect to either end or middle of those?

The HPD pad isn’t around same location. It’s pretty far left of the switch when looking from the top.

Nope.

Can’t feel any pads or bumps under it so I don’t think there is anything.

The bottom two pins of the switch connect to the right side of the capacitor.

Do the other two top pins connect to GND? When the button is pressed, do the top and bottom pins become closed, and released they become open?

On the underside at the right, is the marking IV2 associated with a pad? Is that connected to the pushbutton switch?

Couldn’t get a better picture of the text on the top chip.