Donglegon: USB Hexpansion host

Wouldn't it be nice* to plug any of those amazing hexpansions directly into your phone or laptop, perhaps for development or use outside of the field when you haven't got a badge handy?

Welcome to Donglegon. You can do anything with Donglegon. Well. Almost**.

Status: concept. Board designed and partially assembled, but not started on software.

* Insert hexpansions into your high-value devices at your own risk.
** It probably won't work on iOS, and at least this first iteration does not have the GPIO expander and LED driver so may not run all types of hexpansions, nor those relying on direct connection to ESP32 peripherals.

Status summary

Hardware (v1) Prototypes received, part-assembled. Not tested the 3.3V regulator or hexpansion power switch (waiting on parts).
Firmware Confirmed USB HID device mode works using library example. Not started on custom firmware to interface with GPIO or other peripherals on the hexpansion.
Software Briefly looked at the tildagon web emulator, it should be possible to hook into the simulator fakes to address GPIO pins and I2C devices but will require a lot of work to replicate other ESP32 peripherals

Status updated 13 June 2026

Updates

June, 2026

Photo of a yellow PCB with a USB C connector, an SFP connector, three status LEDs, and a microcontroller on a workbench. In the background is a blurry purple Hexpansion board waiting to be plugged in.

The prototype boards arrived, and I've part-assembled a few of them (waiting for another parts delivery to be able to test the power supply -- currently it needs an external 3.3V source). I only had to configure the D+, D-, and DPU pins in a header file to make the rv003usb HID demo work. This only runs in desktop Chrome though as it uses the WebHID API to transfer data by advertising device capabilities. I've not tried the example for a Serial port yet. But perhaps WebHID means it could be a keyboard, mouse or gamepad? There was a suggestion on IRC that the Keebdexpansion should be converted to a USB keyboard.

Assembly by hand takes almost an hour, making PCBA services very appealing, but I'd need to sell maybe 15 of them to recoup the cost. Or I can provide kits/bare boards for the enthusiasts.

May, 2026

A 3D rendering of a small yellow printed circuit board with a USB socket at the top, an SFP connector in the middle, and many small electronic components mostly on the left side, and connection points labelled GND, SCL, SDA, 3V3, and SWIO on the right.

The quickly thrown-together board borrows heavily from the 2024 badge. For the first prototype I'm keeping it small and sticking to a single hexpansion connector (three would be nice for a future iteration), and skipping the I2C multiplexer, GPIO expander, and ESD protection diodes. I also don't expect to populate the inverter, current limiting switch for hexpansion power, and maybe not even the 3v3 regulator. There are individual jumpers and test pads to bypass these for initial development and testing.

It turns out the 20 pin CH32V003/006 has just enough pins to do I2C, enough GPIOs for one hexpansion connector, detecting and switching hexpansion power, a debug LED, and USB. The firmware will have to present as a low-speed USB serial port or HID (human interface device) in software (there is no USB peripheral on these low-end chips). It should accept commands from the host to read or write to I2C devices on the hexpansion and control the GPIO pins. It will probably lean heavily on rv003usb and its port of TinyUSB, although I've no experience with low level USB interfaces yet and haven't tried this at all. The MCU is very cheap and should just be powerful enough, but if it can't be made to work it may be easier to just add an ESP32 of some kind.

Ultimately I'd love to see this being connected to a simulator for the rest of the badge (perhaps eventually running in WebAssembly in web browsers). I'm sure that could be hacked to talk to an external API for I2C and GPIO interactions. I also imagine some hexpansion developers might like to make a web page that can communicate with their board without emulating the MicroPython app running on the actual badge.