DMX Examples

A collection DMX-512 control examples

Home
DMX/sACN Intro
TouchDesigner DMX settings
Arduino:
  Arduino DMX
  Arduino sACN
JavaScript WebSerial:
  WebSerial DMX

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. It can work with other RS-485 transceiver chips in the same family from Maxim as well.

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. This same diagram works for other Maxim RS-485 chips, including the MAX481, MAX483, MAX485, MAX487, or MAX1487, which share the same pin configuration. For more on the connector, see below in the text.

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:

Figure 2. Pin connections for 3-pin DMX cables.

Figure 2. Pin diagram for 3-pin DMX connectors. Facing the male connector, and counting clockwise from left, the pins are: ground, DMX 1 Data-, DMX 2 Data+. Image from mediarealm.com.au

Figure 3. Pin connections for 5-pin DMX cables.

Figure 3. Pin diagram for 5-pin DMX connectors. Facing the male connector, and counting clockwise from left, the pins are: ground, DMX 1 Data-, DMS 2 Data+, DMX 2 Data-, DMX 2 Data+. Image from mediarealm.com.au

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.