What display options do I have for direct USB/PC drive?

I am looking to drive an LCD, OLED, or e-ink display from a mini-PC (Intel NUC) running Linux Mint. I am building a headless music server and would like to show some machine status information (not sure exactly what yet - this is much a play-project as it is a practical need).

I have been browsing the displays category of the Pimoroni shop, and note that a lot of products descriptions are written from an Arduino or Pi perspective. So I have been doing some research to see what I would need for my less-popular requirement.

So to start with, I think I need an I2C breakout. I note also that an SPI version of this is also available. I assume these protocols are similar, other than SPI is faster. I donā€™t have a need for animations or fast refresh speeds.

I note that a number of these devices normally use MicroPython, but I assume I donā€™t need to touch that in my case. I should think I just need to send USB commands based on some sort of datasheet, and thus in theory any programming language would be fine. Is that correct?

I also note that some display products require soldering - the I2C/SPI lines are a PCB edge connector, and I fear my ancient soldering skills are not up to the task. So I would rather just use snap plugs (I think these are four-line).

Possible products

Here are the products I have found - I think these all have the four-line socket, and thus the SPI/I2C cable would be sufficient. Would these all work with the breakout adaptor?

LCD (I2C? - itā€™s not clear how to drive this):

https://shop.pimoroni.com/products/tufty-2040?variant=40036924391507

OLED (I2C):

https://shop.pimoroni.com/products/adafruit-featherwing-oled-128x64-oled-add-on-for-feather-stemma-qt-qwiic

Epaper (I2C):

https://shop.pimoroni.com/products/badger-2040?variant=39752959885395

I found a bunch of others, but they only seemed to have I2C/SPI edge connectors, and thus would need soldering. I know a ā€œgardenā€ hat is available, but I think that would only work with a Pi/Pico.

I did some ferreting about on this forum, but my search-fu didnae come up with much. Linkies and hints most welcome šŸ†

Update

I forgot to mention Iā€™d like a few buttons too. I did think of getting one of those 3-key keyboards, but integrating it onto the display seems sensible, if the button status can be read over the USB interface.

You canā€™t connect an i2c or SPI display directly to USB, not without some form of Micro Controller in the mix. Need a bit more info on how you plan on doing what you want.
This is what I did on my Pi 400.
My Pi 400 CPU info display - Discussion / Projects - Pimoroni Buccaneers

1 Like

USB serial maybe?
Adafruit USB + Serial LCD Backpack Add-On with Cable (pimoroni.com)

Thanks for the note. I will try to further expand on my intent for the project.

Iā€™d like to run some code on a standard PC, and connect it to a display of some kind, without involving an intermediate Pi or Arduino. I would expect to have some graphics primitives, or perhaps just pixel-by-pixel addressing, which runs in a high-level language on the PC (e.g. Python or PHP). There may be a code library involved, or perhaps one can just poke stuff at /dev/mydevice.

I would expect that these commands would be converted to I2C or SPI as appropriate by an interface board. The I2C breakout board I linked to says this [my emphasis]:

What can the MCP2221 chip do? This chip ā€¦ is similar to a USB to serial converter chips but adds a GPIO and I2C interface as well. The analog/digital GPIO pins can act as 10-bit analog inputs (ADC) and thereā€™s even a 5-bit DAC output. The I2C interface is great for talking to OLEDs, sensors, PWM drivers, its the most popular interface for small devices. You can use the GPIO to do things like flash LEDs, read switches or buttons, and more. The MCP2221A breakout is like adding a little swiss army knife for serial protocols to your computer!

Is that not exactly what I want? :=) I accept that I may have misunderstood what this device is for.

That looks like it would work, but requires soldering the LCD to the serial backpack - so it is unfortunately out for me.

Ah, OK, Iā€™m with you now. I saw the link but didnā€™t click on it based on the description. I just assumed you meant an i2c display, my bad. I actually saw that as an option when I did a quick search. Just wanted more info etc before recommending something.
Looks like it uses Circuit python, to program it. And your still looking at some soldering to add a display though?
Overview | CircuitPython Libraries on any Computer with MCP2221 | Adafruit Learning System

1 Like

Well, I should think the protocol coming out of the breakout board would indeed be I2C (there is also a similar board for SPI). And yes, it is my intention to use the I2C channel on a display.

Lovely! Never tried it, happy to give that a go.

I guess that is what I am wanting to pin down. This e-ink device from my original post takes I2C input, via a STEMMA / QT plug. Thus, it seems to me I could use this cable to go from the I2C adaptor to the display. What have I missed? :=)

Aha, this looks good! Research I should have found when writing the top post šŸ™ƒ (Iā€™ve set the link to skip to the relevant part):

The Badger qwicc connector isnā€™t for driving itā€™s display, itā€™s for adding i2c devices. Anyway it looks like you are sorting it out.

Ah, thanks - so on the Badger thatā€™s an output, not an input. Good to know.

Another vid on the same lines:

I donā€™t think it mentions what character display to use, but I think this would work:

Iā€™ll carry on digging to see if I can find a colour option. Thanks for your advice.

Just to add to the research in this thread, I noticed that colour displays seem to need an SPI connection, presumably because it is a faster protocol. However I found one exception, which runs on I2C:

Just to elaborate on a post I made earlier, i2c is bidirectional and can drive an i2c capable display. You just canā€™t drive the Badgers onboard built in display via itā€™s i2c QWICC connector.
Iā€™m thinking you will need a Circuit Python Library for that last display, assuming your going to use it with that Adafruit USB GPIO breakout board.

1 Like

Yeah, that makes sense - thanks for the heads up. I canā€™t see any I2C or SPI direct-drive e-ink options in the shop as it happens. Thatā€™s not a bother though, Iā€™m happy with standard LCD.

Fair enough! It would be interesting to see how the library works at a low-level - at some point it is just going to be reading and writing bits-n-bytes from the USB interface. Iā€™ve not used Python before, but am happy to start there. I wonder though whether one could create a wrapper library for other languages - should be a nice avenue for experimentation.

If you use WIFI instead of over USB it opens up the options on what screen you can use. You could then use a Badger W etc.

1 Like

Not a bad shout, thanks. My server is an Intel NUC and the Wi-Fi device inside those arenā€™t generally great - the aerial is probably going to be rather small. It probably doesnā€™t help that I have thick walls in my house, and that the device sits in a semi-enclosed metal case! The connection keeps dropping, which is rather a pain on a headless set-up. Thus part of my use-case is to display network health and to have a button to manually reconnect (though I am also playing about with a cron job to automatically rejoin the WLAN).

So any device that needs Wi-Fi is probably going to run into the same problems, as it will sit in the same case. But I should think that Bluetooth might also be worth thinking about - that would go from the NUC to the display driver directly, over a distance of perhaps 100mm, and it would have clear line-of-sight.

Yeah, there are always pros and cons. And Blue Tooth is a bit sketchy on the Pico / RP240 front.
At some point I have plans to delve into an MQTT setup to get weather info from a weather station that is at present, still a work in progress.

Just a quick heads-up for anyone looking to pair the USB-I2C adaptor with the I2C LCD display above - I still think they are wire-protocol compatible, but the plug on the adaptor wonā€™t work with the cable supplied with the LCD display. The display uses ā€œSTEMMA QT / Sparkfun Qwiicā€ and the adaptor uses ā€œGroveā€.

Iā€™ve sent a mild grumble to Pimoroni, since Iā€™d argue the picking & packing team might have paused an obviously incompatible order, so the right cable could have been added. Iā€™ve asked Support for confirmation on the correct one.

I have successfully used the MCP2221 to connect I2C-devices to a pc. If you need SPI (gives you some more choices regarding displays), you can use a pico for that. See this guide: Overview | CircuitPython Libraries on any Computer with Raspberry Pi Pico | Adafruit Learning System

The nice thing with both MCP2221 and pico is, that your (python) program runs on your NUC, and the MCP2221A/Pico is transparent for the program.

Regarding your display: itā€™s not only the cable, it is the driver which will cause you trouble. I am not aware of any driver for an I2C-connected ST7789V2.

I am not aware of any driver for an I2C-connected ST7789V2.

Oh dear, thanks @bablokb - I think I will have to temper my enthusiasm, as well as my temper! I have ordered the pieces I mentioned, having done some exhaustive research. The text on the MCP2221 is very clear that it can drive I2C devices. I was fully expecting the I2C adaptor to be transparent to the display as well - the display can either understand I2C or it canā€™t.

From the product page for the display:

The internal integration of ESP32-PICO control core (built-in firmware, display development is more convenient), support through I2C (addr: 0x3E) communication interface for control and firmware upgrades.

I guess it depends what ā€œcontrolā€ means here - I though that (obviously) meant drawing items on the display.

I donā€™t have any patience for soldering or breadboards, so the Pico option is probably out for me, unfortunately. The Pico does look like it has something like a Grove connector, but since the text doesnā€™t mention ā€œGroveā€ by name, I assume I am in error.

I would not be averse to writing some code to do low-level control with the products I mention, though I have no driver-writing experience. I expect I need to send the commands that the display needs, not the adaptor board. Isnā€™t it just a question of assembling a bitmap in memory and then multiplexing it to the device via pin high and pin low commands? I am not launching a spaceship here {grin}.

I found this driver for the same display in an M5Stick. It seems to run via USB, and does not need an intermediate SPI adapter - I think the stick has one built in.

And I found the display low-level protocol, including serial driver stuff. Strap in folks, itā€™s a 300 page PDF {eek}.

I think you are confusing many things. One thing is the M5stick, which seems to be based on the ESP32-PICO. The Github-link is a driver written in C for this microcontroller using SPI to drive the display.

I was talking about the Raspberry Pi Pico as an USB-I2C/SPI bridge between your NUC and your display. Something totally different. The program on the NUC would encapsulate I2C commands (think of a randomly looking bytes) into USB-HID commands. The pico/mcp2221a would back-translate this to I2C and send it to the attached device. The bridge will send whatever is coming, so it is transparent. But your NUC-program must create the I2C commands, i.e. it must have a driver which translates ā€œset pixel (70,42) to redā€ into the I2C commands the display understands.

1 Like