Arduino DMX and RGBW Par LED Spotlight

Welcome to the sequel of my first DMX article (https://www.electroschematics.com/an-introduction-to-the-digital-multiplex-protocol/). First, I apologize for the delay in posting this update. Today I will show you how to control an RGBW LED par light via an Arduino DMX setup.

RGBW Par LED Spotlight

I have not worked with a cheap RGBW Par LED Spotlight before. As you can see from the photograph it is cute.

This AC230V mini par (parabolic reflector) light features multiple modes, and it incorporates 12 LEDS (3x Red, 3x Green, 3x Blue, and 3x White). The mini par light can be used stand-alone with the inbuilt user interface and/or the optional remote control. It can also be controlled externally by a DMX master device.

The user interface on the back of the device features four push button switches and a four-digit seven-segment LED display. Next, there’s two DMX connectors for DMX input (male) and DMX output (female).

As explained in my previous write-up of digital multiplexing, the core standard for modern stage and event lighting is DMX, or befittingly, ANSI E1.11 DMX 512-A Digital Multiplex (https://tsp.esta.org/tsp/ documents/docs/ANSI-ESTA_E1-11_2008R2018.pdf). In short, DMX (Aconym for Doriginal MmultipleX) is a serial protocol and physical spec that carries up to 512 one-byte values ​​over each individual cable usually with 5-pin or 3-pin DMX/XLR connectors. Note that the 3-pin XLR cable has been in use for many years, and it’s entirely suitable for use with DMX 512 control gear, since only three of the five pins were actually used in a DMX system.

Arduino DMX

There’s only a single piece of cheap hardware needed to add to an Arduino-compatible design to allow it to handle DMX – just an RS485 transceiver chip. There are many of these around us, the common ones being the MAX485 and the SN75176.

Currently, my quick pick is the MAX485 IC. You can use it standalone or go for a MAX485 breakout board/module. Quick Primer https://www.codrey.com/learn/rs-485-arduino-quick-primer/

Travel, in both cases, the hardware setup is the same. In the table below, you can see the connections between a standard XLR-3 connector and the MAX485 chip.

DMX Signal XLR-3 Connector Pin MAX485 Pin
GND 1 5 (GND)
DATA – 2 7 (B)
DATA + 3 6 (A)

Below is the inside view of the standard 3-pin XLR female connector used in my Arduino-DMX experiments.

This is a crude schematic of the MAX485 Arduino-DMX adapter. The input pin (DI) can be connected to any digital/pwm I/O of the Arduino. For example, the default for the quite popular “Conceptinetics” Arduino DMX library is the Tx (1).

Note: This is a non-isolated Arduino-DMX adapter circuitry, so there is no galvanic isolation between the master device and the rest of DMX device(s).

The pin 2 (RE) of MAX485 controls whether the receiver output is active, and pin 3 (DE) does the same job for the driver output. Because the pin 2 is internally inverted, both pins can be wired together and can be controlled by one logic-level signal. If so, when the signal is high (H) the driver output (Tx) is enabled, and the receiver output (Rx) is enabled if the signal is low (L). Below you will find the relevant part of the MAX485 datasheet.

I built a bare minimum MAX485 circuitry for DMX projects, but for the sake of quick progress, I used a MAX485 module out of the box. Its proposed wiring pointer is shown below.

MAX485 MODULE
VCC Arduino 5V
GND Arduino GND & Pin 1 of XLR-3 Female
DI Arduino D1(Tx)
A Pin 3 of XLR-3 Female
B Pin 2 of XLR-3 Female

After you’ve prepared the requisite setup, you need to plug the XLR-3 female connector into the DMX-IN port of the DMX LED spotlight, and then power the DMX LED spotlight up.

Thereafter, set the DMX channel “d001” on the back of the light system thru the menu keys in the user interface. Note that this can be extremely different from device to device. To do this, it’s essential to study the enclosed user instructions of your DMX LED spotlight.

Likewise, often you need to configure the DMX channels properly. To do this, a description of the DMX channels and addresses is included in the leaflet accompanying your DMX lighting system. It describes what the DMX lighting system does when a particular address is called by the control program. Therefore, don’t panic if my example does not work for you. Feel free to use it as a starting point for your project.

To make it clear, in my DMX light under test, CH1 = All light dimmer (0-255) & CH4 = Change colors speed (0-255).

The following is a sample test code for my light fixture, backed by the Conceptinetics Arduino DMX Library (https://sourceforge.net/projects/dmxlibraryforar/).

The piece of code keeps fading and switching my RGBW Par LED Spotlight’s lamps in a beautiful succession starting from white to red-green-blue colors slowly and smoothly. After extensive learning both in terms of the DMX hardware and the software, I was able to get the RGBW Par LED Spotlight to respond when used in conjunction with my quick Arduino Uno + MAX485 Module setup (see the quick test video https://www .youtube.com/watch?v=u7nEbROrCJ8).

[code]

#include

#define DMX_MASTER_CHANNELS 100

#define EN_PIN 2 // Reserved Option!

/* Tx (Pin 1) is the DMX OUTPUT PIN
– Connect Tx to DI of MAX485 */

DMX_Master dmx_master ( DMX_MASTER_CHANNELS,
EN_PIN);

void setup() {


dmx_master.enable ();


dmx_master.setChannelRange ( 1, 25, 127 );

}

void loop()

{


static int dimmer_val;


dmx_master.setChannelValue ( 1, dimmer_val++ );


delay ( 100 );

}

[/code]

And finally, random snaps of the working project:

That’s all for now. Stay tuned here to get more do it yourself DMX projects. Make the sparks fly ✨

Leave a Comment