RaspberryPi RP2040-based USB DMX dongle: Project status

286 views
Skip to first unread message

Jannis Achstetter

unread,
Nov 29, 2021, 4:50:16 PM11/29/21
to open-lighting
Hi group,

I just wanted to share the current progress/state of the USB-DMX-dongle
that I presented first in February
(https://groups.google.com/g/open-lighting/c/zLR86ElhXmw).

Of course it is far from complete and there are a lot of TODOs in the
code (91 according to grep) but I would say that it's stable, useable
and I'd call this state v1.0.0.

The changes are a complete re-write. The code was switched to C++ and
split up to proper classes.


Current features:

- Status LEDs (8 WS2812 LEDs), dimmable in case they are too bright

- Web interface (dongle enumerates as an NCM network adapter and hosts
its own web server for configuration and status)

- Logging via USB serial interface or accessible via web server (logs
are buffered to some extent)

- Detects connected IO boards and their type (connector and port
direction). However, currently treats all boards as 4 outputs

- Configurations are stored on one of the IO Boards or the main board
and managed on the WebUI

- Optional wireless module is detected and used for wireless DMX
(currently TX and RX is implemented, Mesh is still missing). I've
successfully transferred four DMX universes on one radio channel without
noticeable latency. The protocol for the wireless data exchange uses
"sparse" transfers (I guess ArtNet calls them "partial") and data
compression using the snappy algorithm.

- Main method to get DMX data from the host PC to the board is either
ArtNet or sACN (the board speaks both). A "native USB protocol" is
designed and integrated into the dongle (the same protocol as used for
the wireless DMX, including data compression) but no PC software has yet
been adapted to use it.
Main advantages of "network"-based protocols:
* Super-easy hotplugging: Dongle starts processing data from host in
less than one second after plugging in. libusb-based dongles and
hotplugging (also in the sense of disconnecting and reconnecting the
dongle while it's running) is quite some effort
* Easy to debug using tools such as Wireshark
* Already supported by a great number of lighting control software
* The dongle has 24 internal buffers that can be patched pretty
flexibly. In this version, it's simply hardcoded:
* buffer -> local output for the fist 16 buffers +
* buffer -> wireless for the first 4 buffers +
* wireless -> buffer (4 universes incoming go to buffers 4 to 7 =
outputs 0-3 on second IO board). So it can be used as a standalone
Wireless -> DMX receiver without host PC.

Screenshots of web interface can be provided. However, everything
required to test it is a Raspberry Pi Pico board, one microUSB-Cable and
the firmware file :). Load the firmware onto the board, reboot it. It
will/should show up as a network card (works on Linux, macOS and Windows
hosts) and assign an IPv4-address to your machine. Then, open a web
browser and enter the dongle's IP there. The IP is 169.254.X.1
(link-local addressing) and can be found out using dmesg on Linux or
hovering over the "USB" icon in the task bar on Windows. Mac users
should be able to see the IP in the network settings but since I don't
own a Mac I didn't test that much.

I planned to run a first "real" show with that interface (maybe even
with wireless ;) in December, however Corona spoiled that one (show
cancelled).

Current, re-written firmware source code is at:
https://github.com/kripton/rp2040-dongle/tree/rewrite
Hardware schematics and PCB layouts are in this branch:
https://github.com/kripton/rp2040-dongle/tree/kripton-hardware


Next plans are:
- To merge it all together into a "main" branch and cleanup the
non-required branches
- To get wireless mesh working to be able to extend the range via nodes
"in the middle", forwarding the messages to the leafs
- and of course DMX receiving and after that RDM.


All the best and stay healthy!
Jannis
Reply all
Reply to author
Forward
0 new messages