Playing with DMX
During these times I decided to start playing with DMX. I bought a the Lumeri Wash 7.10. It has RGBW leds, 9 or 16 channels, and a moving head. It uses DMX512. The DMX in DMX512 stands for Digital Multiplex (protocol). Lights like this have a DMX input and output. so they can be chained. A collection of DMX devices is called a universe.
DMX is super simple. It is a serial interface at 250.000 bits per second. The electrical interface is RS-485. The 512 in DMX512 stands for the number of data bytes that can be sent. If a device uses one channel, it can support 512 devices. The above device already uses 9 or 16 channels, so I guess that can quickly become filled.
To steer the UART from the PI requires it to run at this speed of 250kbaud. This is possible with some tricks. See this article on someone creating OLA support. These instructions can be found at different other locations as well.
/boot/config.txt and add this line at the end:
Also adjust the kernel to use serial at boot (see here.
Disable here the boot messages, but not the device itself.
/boot/cmdline.txt remove the console parameter. I don’t know if this is actually necessary, because it already has
plymouth.ignore-serial-consoles. I also didn’t find getty on the serial line and no
/etc/inittab file. None of the processes was using
ttyAMA0 (quick check with
ps). I’ve executed the following anyway:
sudo systemctl disable [email protected]
When reading here it states that GPIO 14/15 is used by the Bluetooth device. It can be disabled. The instructions in
/boot/overlays/README are actually quite clear.
Name: disable-bt Info: Disable onboard Bluetooth on Pi 3B, 3B+, 3A+, 4B and Zero W, restoring UART0/ttyAMA0 over GPIOs 14 & 15. N.B. To disable the systemd service that initialises the modem so it doesn't use the UART, use 'sudo systemctl disable hciuart'. Load: dtoverlay=disable-bt Params: <None>
sudo systemctl disable hciuart sounds like something that should be done then as well.
If we need Bluetooth later on, we might want to use
core_freq_min=500 to prevent core scaling. This is namely the issue. The GPIO pins get the clock from the system bus clock. The latter changes depending on the system load.
I got a DMX interface for the Raspberry PI. You can buy also a case, really neat.
First I’ve been trying QLC+.
When trying OLA, adjust
/dev/ttyAMA0-break = 100 /dev/ttyAMA0-malf = 24000 device = /dev/ttyAMA0 enabled = true
Following the instructions on the site, I tried to set the board to output mode.
gpio utility doesn’t seem to be maintained anymore. THere is
raspi-gpio however. Display the configuration:
Set it like described:
raspi-gpio set 18 op raspi-gpio set 18 dh raspi-gpio set 14 a0 raspi-gpio set 15 a0
The result is:
GPIO 14: level=1 fsel=4 alt=0 func=TXD0 pull=NONE GPIO 15: level=1 fsel=4 alt=0 func=RXD0 pull=UP ... GPIO 18: level=1 fsel=1 func=OUTPUT pull=DOWN
In this post it states that all this is too complicated.
Installing OLA was very simple, just:
sudo apt install ola
Navigate to something like
192.168.86.246:9090 where you change the IP address to that of your PI.
Now I’ll browse forums to make this work….