HDMI2C

A gizmo for controlling HDMI monitors over Wi-Fi


HDMI2C enables control of HDMI monitors over a network, using the I2C interface present in HDMI connections, known as DDC1.

Why?

In short, because the menus and controls on monitors tend to suck and get pretty irritating if you want to do the same few things regularly (switch inputs, adjust brightness, etc). Doubly so if you have two monitors, because almost all the time you want to do the same thing to both simultaneously. I also wanted to be able to potentially integrate control into a wider home automation system, or at least have the flexibilty to control things from a separate bit of software or hardware, so network connectivity was a must.

Hardware

Hardware Git Repo

Half of the point of this project was to finish my first PCB design. I used KiCad. It’s great. The board itself is pretty simple. It has:

  • An ESP32 Wi-Fi MCU
  • Two HDMI connectors, each with
    • The I2C bus connected to the ESP32 via level shifters (HDMI uses 5V logic, the ESP32 uses 3.3V)
    • the 5V HDMI bus powered by a regulator switchable by the ESP32 (which is typically how monitors detect presence of a source device, and allows us to simulate unplugging the source if we need)
  • A USB-C receptacle for power and programming the ESP32, connected to a USB serial converter
  • A reset button, and two general buttons

I got some boards made along with a solder stencil, and reflow soldered them at home with a hotplate. To my incredulity, they worked first time.

A computer-rendered image of a green printed circuit board. It has two HDMI connectors, a USB-C connector, a silvery MCU on a castellated module and a sprinkling of resistors, transisitors and other components
A render of the HDMI2C PCB

Firmware

This is definitely the less polished side of the project - the current status is little more than a proof of concept written in Micropython. That said it works pretty reliably and was in use daily. It supports control via HTTP/JSON, but MQTT should be easy to add.

Alternatives and Obsolescence

It’s possible to interact with the DDC bus from software running on a regular computer. I’ve had a random Windows utility working, but perhaps unsurprisingly Linux based stuff is the most reliable - each monitor is made available as a /dev/i2c-n device, and there are various GUI and command line tools (such as ddcutil) that can do exactly the same thing as this project, without requiring the custom hardware.

Probably the neatest approach is using an embedded computer such as the ubiquitous Raspberry Pi 4, which got the necessary Linux kernel support to speak DDC on its dual HDMI ports around the time I started this project. In fact, I did exactly that.