Today’s project is a remake of my older DMX master, this time allowing for more user control, with six sliding potentiometers and five scene buttons.
I will start with one Arduino Uno, with one Sparkfun ProtoShield on top. On the ProtoShield I’ve soldered some screw terminals, which will later be used to connect the buttons and the potentiometers. On top of the ProtoShield I’ve placed one Arduino Uno click shield from MikroElektronika, with one RS-485 click board installed in socket #1.
Notice that the screw terminals are not very high, so there’s enough clearance between the top side of the screw terminals and the Arduino Uno Click shield.
Then, I’ve placed five sliding potentiometers and five buttons in the case. As a side note, while the sliding potentiometers allow for a nice and fine control, they are a pain in the well-you-know to install. Cutting the slot for the slider can become a big issue without proper tools.
One can use the regular, rotary type potentiometers with no side effects. Just keep in mind to order linear potentiometers and not the logarithmic ones.

I have also used one XLR panel connector for the DMX cable. Connections are as follows:
- XLR pin 1 – GND
- XLR pin 2 – DATA- (B)
- XRL pin 3 – DATA+ (A)
Both power and programming are done via an USB panel adapter, which has one USB-B on the outside and one USB-A on the inside. Pretty expensive, but does a nice job. From that connector to the Arduino I used a standard USB cable, which stays inside the case.
Some pictures from the assembling process. Note that pins D0, D1 and D6 are used by the RS-485 click board, so the buttons are connected to pins D2-D5 and D7. Potentiometers are connected to pins A0 to A5.
DMX console Arduino code
The code is a variation of the older DMX master, and it still uses the Conceptinetics DMX library. The difference is that now it checks whether the buttons are pressed. If a button is pressed, then the corresponding scene is run. If buttons are not pressed, the values from the potentiometers are mapped to the [0..255] range and sent over the DMX bus.
/* DMX_Master_console.ino - https://electronza.com/arduino-dmx-console ******************************************************************************* This code uses the Conceptinetics DMX library Copyright (c) 2013 W.A. van der Meeren <danny@illogic.nl>. All right reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <Conceptinetics.h> #define DMX_MASTER_CHANNELS 6 // // Pin number to change read or write mode on the shield // #define RXEN_PIN 6 // Configure a DMX master controller, the master controller // will use the RXEN_PIN to control its write operation // on the bus DMX_Master dmx_master ( DMX_MASTER_CHANNELS, RXEN_PIN ); int ch1_pot; int ch2_pot; int ch3_pot; int ch4_pot; int ch5_pot; int ch6_pot; int ch1_dmx; int ch2_dmx; int ch3_dmx; int ch4_dmx; int ch5_dmx; int ch6_dmx; void scene1 (void){ // 10 seconds blue for (int i=0; i<10; i++){ dmx_master.setChannelValue (1, 0); dmx_master.setChannelValue (2, 0); dmx_master.setChannelValue (3, 255); dmx_master.setChannelValue (4, 255); dmx_master.setChannelValue (5, 0); dmx_master.setChannelValue (6, 0); delay(1000); } } void scene2 (void){ // 10 seconds blue for (int i=0; i<5; i++){ dmx_master.setChannelValue (1, 255); dmx_master.setChannelValue (2, 255); dmx_master.setChannelValue (3, 255); dmx_master.setChannelValue (4, 255); dmx_master.setChannelValue (5, 0); dmx_master.setChannelValue (6, 0); delay(1000); } } void scene3 (void){ // 10 seconds blue for (int i=0; i<5; i++){ dmx_master.setChannelValue (1, 255); dmx_master.setChannelValue (2, 0); dmx_master.setChannelValue (3, 255); dmx_master.setChannelValue (4, 255); dmx_master.setChannelValue (5, 0); dmx_master.setChannelValue (6, 0); delay(1000); } } void scene4 (void){ // 10 seconds blue for (int i=0; i<5; i++){ dmx_master.setChannelValue (1, 0); dmx_master.setChannelValue (2, 0); dmx_master.setChannelValue (3, 255); dmx_master.setChannelValue (4, 255); dmx_master.setChannelValue (5, 255); dmx_master.setChannelValue (6, 0); delay(1000); } } void scene5 (void){ // 10 seconds blue for (int i=0; i<5; i++){ dmx_master.setChannelValue (1, 0); dmx_master.setChannelValue (2, 255); dmx_master.setChannelValue (3, 255); dmx_master.setChannelValue (4, 255); dmx_master.setChannelValue (5, 0); dmx_master.setChannelValue (6, 0); delay(1000); } } // the setup routine runs once when you press reset: void setup() { // Enable DMX master interface and start transmitting dmx_master.enable (); // turn off all channels dmx_master.setChannelValue (1, 0); dmx_master.setChannelValue (2, 0); dmx_master.setChannelValue (3, 0); dmx_master.setChannelValue (4, 0); dmx_master.setChannelValue (5, 0); dmx_master.setChannelValue (6, 0); pinMode(2,INPUT_PULLUP); pinMode(3,INPUT_PULLUP); pinMode(4,INPUT_PULLUP); pinMode(5,INPUT_PULLUP); pinMode(7,INPUT_PULLUP); } // the loop routine runs over and over again forever: void loop() { if (digitalRead(2)==0){ scene1(); } if (digitalRead(3)==0){ scene2(); } if (digitalRead(4)==0){ scene3(); } if (digitalRead(5)==0){ scene4(); } if (digitalRead(7)==0){ scene5(); } // read apotentiometer position ch1_pot = analogRead(A0); ch2_pot = analogRead(A1); ch3_pot = analogRead(A2); ch4_pot = analogRead(A3); ch5_pot = analogRead(A4); ch6_pot = analogRead(A5); // compute DMX values ch1_dmx = map(ch1_pot, 0, 1023, 0, 255); ch2_dmx = map(ch2_pot, 0, 1023, 0, 255); ch3_dmx = map(ch3_pot, 0, 1023, 0, 255); ch4_dmx = map(ch4_pot, 0, 1023, 0, 255); ch5_dmx = map(ch5_pot, 0, 1023, 0, 255); ch6_dmx = map(ch6_pot, 0, 1023, 0, 255); // update dmx bus dmx_master.setChannelValue ( 1, ch1_dmx); dmx_master.setChannelValue ( 2, ch2_dmx); dmx_master.setChannelValue ( 3, ch3_dmx); dmx_master.setChannelValue ( 4, ch4_dmx); dmx_master.setChannelValue ( 5, ch5_dmx); dmx_master.setChannelValue ( 6, ch6_dmx); // delay(100); }
This code version doesn’t use interrupts, so one has to wait for a scene to finish before pressing another button. The potentiometers are ignored within a scene.
Also, when the scene comes to an end, the DMX changes to the values of the potentiometers. If desired, a fading routine can be implemented in software.
A few final thoughts
While this is working fine, I already plan for a bigger version. I want to use one Arduino Mega, with 10 potentiometers. The Mega will also allow for more buttons.
A remote control is also possible – there’s a wide range of wireless click boards from MikroElektronika, and even the current version has one free mikroBUS socket. One can trigger different scenes by using motion sensors, buttons, etc. Imagination is the only limit. Have fun!!!
3 Comments
just found your project, just after i started building mine.
Lets just say were 2 different worlds away with arduino’s
great work
I’m looking for a way to simply control a dimmer, so just 1 potentiometer to control the brightnes and than three buttons or even better switches to turn on three different sinus waves for beautiful blinking effects, the device should only address one dmx address, can anyone help?
Dimming is the easy part. Just read the potentiometer (https://www.arduino.cc/en/tutorial/potentiometer), then map the value in the range [0,255] and send the updated value to the DMX channel of your choice.
Playing the effects is a bit more complex. Is it really necessary to do the sinus wave? Or you can simply go with a linear dimming?
If you wish to go with the sinus wave, then you have to build a look-up table (a vector) which contains the values for the dimmer, then update the DMX bus at a delay that depends on the desired speed of the effect. You can put the whole code inside a while loop (https://www.arduino.cc/en/Tutorial/WhileStatementConditional) and run the code for as long the button is pressed.