DMX-Examples

A collection of DMX512 examples

Home
DMX/sACN Intro Arduino:
Arduino DMX
Arduino sACN

This project is maintained by tigoe

ArduinoDMX

The ArduinoDMX library, originally written to work with the MKR series Arduinos and the MKR485 shield, will also enable you to send DMX-512 out from any Arduino to control DMX fixtures. This library uses the ArduinoRS485 library and an RS485 transceiver chip like Maxim’s MAX485 chip to send DMX data.

Bill of Materials

For reference, The Arduino circuits described here use these breadboard layouts and these microcontroller pin arrangments.

Circuit

If you’re using a MKR series Arduino and a MKR485 shield, you can simply plug the shield into the MKR board, connect an XLR connector to the shield, and you’re ready to go. For other models, you’ll need to connect your Arduino to a MSX485 chip, which will output the RS485 serial protocol on which DMX-512 depends.

Connect your Arduino to a MAX485 chip as shown in Figure 1. The ArduinoRS485 library uses the following pins:

Figure 1. Arduino Nano 33 IoT connected to a MAX485 chip.

Figure 1. Arduino Nano 33 IoT connected to a MAX485 chip. The MAX485 is a DIP package. Its pins, reading in a U-pattern from top left, are RO, RE, DE, DI, GND, A, B, Vcc. The pins are connected as described above.

Note: on the Uno, you will not be able to use the Serial Monitor for debugging messages because the ArduinoRS485 library takes over the hardware serial port. Check this on the Every too

Connect a DMX Connector

Connect a 120-ohm resistor between the MAX485’s A and B output pins, and then connect the pins to the D+ and D- pins of a 3-pin or 5-pin female XLR connector, depending on the type of connector your DMX fixtures need. Connect them following the DMX-512 standard layout. The pins in an XLR connector are arranged in a half circle. When facing the rear of a female XLR connector with the half circle of pins on the bottom, the pin numbers are arranged as follows, from left to right, counterclockwise:

The wiring from the MAX485 to the XLR connector is as follows:

MKR485 Shield Connections to DMX Connector

If you’re using a MKR485 shield, connect the DMX connector as follows:

Examples

Once the circuit is ready, you can use any of the following examples or the library’s examples to get started.