DMX is a digital-network communication standard that offers flexible control options for a wide variety of lighting, including LEDs. Originally developed in the 1980s, DMX has become the go-to choice for stage lighting, upscale venues and complex lighting effects. In DMX512 bus systems RS-485 is used as the physical layer. Our RS422 / RS485 Serial HAT is a fully galvanic isolated serial communication HAT designed for use with the Raspberry Pi and the perfect choice for such kind of applications.
The following instructable will show how to configure the HAT for DMX and what steps are necessary for the software installation under Raspberry Pi OS Bookworm.
Wiring of 5pole XLRThe official XLR plug for DMX/RDM is 5-pins, that is always used in professional systems.You have to connect a male and a female connector as in the picture below.
For semi-professional and hobby equipment there is the 3-pins XLR:
Depending of the position of the RS422/RS485 HAT in the DMX512 bus line you have to switch the terminating resistor ON or OFF. Please switch the resistor to ON position only if the HAT is on one end of the bus line. In all other cases switch the terminating resistor OFF
Configuration of Raspbian operating system:The easiest way is to use the raspi-config tool to enable the UART to the GPIO14/15 pins.
take a fresh Raspberry Pi OS „Bookworm“ image
sudo raspi-config
goto '3 Interface Options'
goto 'I5 Serial Port'
'Would you like a login shell to be accessible over serial?' --> NO
'Would you like the serial port hardware to be enabled?' --> YES
Finish raspi-config
reboot the Raspberry Pi
sudo nano /boot/firmware/config.txt
Add the following lines to the end of this file:
dtoverlay=disable-bt
init_uart_clock=16000000
The value for init_uart_clock may need to be increased for fast systems such as the Pi5.
Now, we deactivate all other services that may use the UART:
sudo systemctl disable serial-getty@ttyAMA0.service
sudo systemctl disable hciuart
Installation of OLA: sudo apt-get install ola
Now we can activate and configure the UART-DMX plugin for OLA:
sudo nano /etc/ola/ola-uartdmx.conf
Please copy the following lines into the file. Delete old contents!
/dev/ttyAMA0-break = 100
/dev/ttyAMA0-malf = 24000
device = /dev/ttyAMA0
enabled = true
Finally, the users olad and pi must be assigned the necessary rights.
sudo adduser olad tty
sudo adduser pi olad
Reboot the Pi!
Use of OLAOLA is now running as a DMX server on the Raspberry Pi. You can access the OLA web interface via the browser of another computer in your network.
To do this, enter the following IP address in the browser:
YourIP:9090/ola.htm
First we have to create a so-called Universe under OLA. To do this, click on the "Add Universe" button.
You can now enter a Universe id e.g. 0 and a name for the Universe e.g. "Test". Then activate the "UART native DMX" port at the bottom.
You can access the new Universe via Universes --> Test:
Click on the "DMX Console" tab. You can now use the sliders to control your DMX device.
Comments