We previously explained the HSTX high-speed serial transmit interface of the Raspberry Pi RP2350 microcontroller was mostly useful for video outputs and display interfaces since it can only transmit, and not receive data.
But Steve Markgraf found another use case for the HSTX interface – high-speed data acquisition – combining a Raspberry Pi Pico 2 board with the DVI Sock board for Pico and one of those cheap MS2130-based HDMI to USB 3.0 video capture dongles. He managed to stream out up to 75 MB/s of real-time data from an overclocked RP2350 to a host computer with a USB 3.0 port. The Adafruit Feather RP2350 HSTX board should also work, but also not been tested.
Steve’s “hsdaoh-rp2350” data acquisition over HDMI firmware is based on the dvi_out_hstx_encoder example from Raspberry Pi using the HSTX interface for DVI output and code by Shuichi Takano implementing the HDMI data island encoding required to send HDMI info frames.
The main functionality is implemented through the libpicohsdaoh library which reads the data from a ringbuffer and streams it out via the HSTX port to the HDMI capture card. Three example applications can also be found in the apps folder in the GitHub repository for the project:
- counter – Generates a 16-bit counter value using Raspberry Pi RP2350 PIO
- internal_adc – Stream the data from the internal ADC at 3.33 MS/s after some overclocking. But up to 7.9 MS/s can be achieved with additional tricks like using the USB PLL and overvolting beyond VREG_VOLTAGE_MAX,
- external_adc – PIO program that reads the data from a 12-bit ADC connected to GP0-GP11, outputs the ADC clock on GP22, and packs the 12-bit samples to 16-bit words to achieve maximum throughput. It is designed to work with AD9226 ADC boards as shown in the photo below.
The MS2130 can enable data acquisition up to 298.5 MB/s in theory, so the Raspberry Pi Pico 2 is the bottleneck here, and performance can be further improved with inexpensive FPGA boards such as the Sipeed Tang Nano 20K. Steve also builds an SDR using the same principle and some extra hardware capturing data with the open-source fosphor program. You’ll find the firmware source on GitHub for different platforms as well as the High-Speed Data Acquisition over HDMI (hsdaoh) userspace library. More technical details and an explanation of how this all works can be found in the video presentation below.
It looks pretty cool, especially since the hardware is incredibly cheap, with the Raspberry Pi Pico 2 going for $5 and the MS2130 HDMI to USB 3.0 dongle for about $5 on AliExpress (and a bit more on Amazon). That’s enough to get started, but you’ll need some extra hardware to build something useful, and for instance, the AD9226 12-bit ADC module above can be purchased for around $16.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
I love this 🙂 Hardware used to the max! Maybe a VGA to USB capture device could capture 3 channels at once directly without the RPi. Though I think the bandwidth would not necessarily be as high.