User avatar
sonicmouse
Posts: 8
Joined: Tue Feb 25, 2020 7:14 pm
Contact: Twitter

Control an RS232 HDMI Switch

Tue Feb 25, 2020 7:28 pm

Hello all...

I have a project where I need to be able to programmatically switch between 2 HDMI inputs. I need a "turn-key" solution, not something where I would need to hack an HDMI switch since I am going to need to deploy a large amount of of these devices.

After some research, I found a reasonably priced HDMI switch that can be controlled by an RS232 input.

The GPIO pins are going to be used for other functionality, so I would like to look in to the USB <-> RS232 converter. I have seen these talked about on these forums.

What would be a good RS232 to USB cable/converter I could use to talk to this device? Is it even possible? I need to be able to programmatically control this HDMI switch, not just toggle, but specifically tell it "use HDMI1 or use HDMI2".

Thank you for any insight you can provide.
-andy.
Last edited by sonicmouse on Wed Feb 26, 2020 3:28 pm, edited 1 time in total.

hippy
Posts: 6849
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Control an RS232 HDMI Switch

Tue Feb 25, 2020 9:22 pm

Should work with any USB-to-RS232-9-way-D cable. Prolific, FTDI, CH340 chipsets.

User avatar
sonicmouse
Posts: 8
Joined: Tue Feb 25, 2020 7:14 pm
Contact: Twitter

Re: Control an RS232 HDMI Switch

Wed Feb 26, 2020 1:17 am

To make sure I am on the right track, these should be the options I should be looking at:

https://ftdi-us.shop/products/chipi-x10
https://www.amazon.com/Plugable-Compati ... B00425S1H8
https://www.amazon.com/Sabrent-Converte ... B00IDSM6BW

The Sabrent option is pretty cheap at $9. I obviously would like the cheapest option possible, but what are the drawbacks?

Thanks again for the help, I appreciate your time.

hippy
Posts: 6849
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Control an RS232 HDMI Switch

Wed Feb 26, 2020 10:49 am

Only drawback is if you get a cable with a chip which Linux doesn't have a default driver for. You should be okay with FTDI, Prologic P2303, CH340, no matter how cheap, though you need to be aware of counterfeit chips.

User avatar
sonicmouse
Posts: 8
Joined: Tue Feb 25, 2020 7:14 pm
Contact: Twitter

Re: Control an RS232 HDMI Switch

Wed Feb 26, 2020 2:32 pm

Excellent -- thank you. I have them on order. Again, thank you for your time.

User avatar
B.Goode
Posts: 9570
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Control an RS232 HDMI Switch

Wed Feb 26, 2020 2:45 pm

sonicmouse wrote:
Wed Feb 26, 2020 2:32 pm
Excellent -- thank you. I have them on order. Again, thank you for your time.


It isn't a specific Raspberry Pi issue, but you may have to make up an adaptor cable to match the 15pin connector on the switch box. That is not very common in my experience - hope the switch comes with good documentation showing how to wire it up... All the usb/serial adaptors you listed have the more common 9-pin connection.

User avatar
sonicmouse
Posts: 8
Joined: Tue Feb 25, 2020 7:14 pm
Contact: Twitter

Re: Control an RS232 HDMI Switch

Wed Feb 26, 2020 3:41 pm

The switch listed above shows having a 9 pin female connector:
Image

User avatar
B.Goode
Posts: 9570
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Control an RS232 HDMI Switch

Wed Feb 26, 2020 3:43 pm

Good. No problem then.

But for some reason when I followed that link earlier the image definitely had a 15 pin connector - hence the warning.

I can't recheck now - get prompted for a login instead.

User avatar
sonicmouse
Posts: 8
Joined: Tue Feb 25, 2020 7:14 pm
Contact: Twitter

Re: Control an RS232 HDMI Switch

Wed Feb 26, 2020 3:53 pm

that's really goofy -- I changed the link to be a different site than the previous aliexpress. I was getting that login as well.

Thanks for looking in to that, the more eyes the better

hippy
Posts: 6849
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Control an RS232 HDMI Switch

Wed Feb 26, 2020 5:30 pm

B.Goode wrote:
Wed Feb 26, 2020 3:43 pm
But for some reason when I followed that link earlier the image definitely had a 15 pin connector - hence the warning.
Weird. I can visit the site and not get the login, but it's definitely different to how it was, and well screwed up in my browser, and, yes, some of the graphics show it as a 15-way.

User avatar
sonicmouse
Posts: 8
Joined: Tue Feb 25, 2020 7:14 pm
Contact: Twitter

Re: Control an RS232 HDMI Switch

Wed Feb 26, 2020 5:47 pm

I ordered it, so fingers crossed I get the correct one. I can't find any other RS232-controlled HDMI switches for less than $100 US. I hope this works!

User avatar
sonicmouse
Posts: 8
Joined: Tue Feb 25, 2020 7:14 pm
Contact: Twitter

Re: Control an RS232 HDMI Switch

Fri Feb 28, 2020 10:13 pm

I got all the parts and hooked it up... it works great. All 3 cables work without the need to install any drivers.

I compiled and ran this code and was switching HDMI ports like magic.

The only downside is it takes about 3 seconds for the picture to to catch up. So I switch from 1 to 2, the screen goes black for about 3 seconds and then HDMI2 shows a picture. This is purely because of the switch, nothing to do with the actual cable or PI.

Thank you hippy and b.goode for all the help!

Return to “Advanced users”