Lighting project - LED strip control with DMX shield

Hi everyone,

I’m currently attempting to make a lighting control box similar to this one.

This is my first ‘real’ project with my Arduino though I’ve done various other bits of scripting and coding in Python on my Raspberry Pi and PC and I’ve done a bunch of getting started tutorials to make LEDs blink etc on the Arduino.

I’m using an LED strip controlled by a LINEARdrive 180d. The LED strip and the driver work fine - I can set it to demo mode or a certain colour light via the buttons on the driver and it all works fine.

I’m using a Conceptinetics CTC-DRA-10-1 DMX shield connected via a 10m DMX cable, and my problem is that it doesn’t seem to work - I can’t seem to get the light to do anything via DMX.

The code I’ve used is as follows:

#include <Conceptinetics.h>

// 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 (100, 2);

void setup() {
  // put your setup code here, to run once:

    dmx_master.enable ();
    dmx_master.setChannelRange (1,100,255);

}

void loop() {
  // put your main code here, to run repeatedly:
  dmx_master.setChannelRange (1,100,255);
  delay ( 1000 );

}

I’ve set the LED driver to DMX mode, with these options: ‘address = 1’, ‘network resolution = 8 bit’, ‘interpolation = colour’.

Things I’ve tried so far:

  • Swapping out the cable - at first I purchased an XLR cable as I didn’t realise there was a difference between XLR and DMX cables
  • Using the TKinter DMXMaster library instead of the Conceptinetics library
  • Setting individual channels as well as all the channels simultaneously
  • Trying different pins for output (I’m still a little unsure which one I should be using…)
  • I’ve checked for a firm connection between the Arduino and the shield

What else is there to try before I swap out the DMX shield? Am I doing anything fundamentally wrong? Is there a simple way to test that the DMX shield isn’t dead?

I’ve attached a couple of pictures for reference.

Thanks!

I've never used DMX so I'm just guessing...

  dmx_master.setChannelRange (1,100,255);

It looks like you are only initializing the channel range. As far as I can tell, you are not sending any actual commands to turn the lights on, off, dim, color, etc.

The documentation for the library is here. The part about the channel setting is as follows:

From your application you can use the following two functions to set channel values to be buffered and transmitted. 
The channel numbering always starts at 1 and the last channel possible is 512 or any lower configured number of channels.

dmx_master.setChannelRange ( begin_channel, end_channel, byte_value );
dmx_master.setChannelValue ( channel, byte_value );

Note on setting channel values, when you are trying to set a channel that is outside the library will simply ignore your action to prevent from writing over memory that doesn't belong to you.

So from what I can understand, the command is the same except one addresses a range and the other addresses a single channel.

I’ve tried setting channel 1, channel 2 etc individually to 255, but it doesn’t seem to do anything.

What I don’t understand is how I would address the individual RGB colours. I can only set a single channel on the driver, but obviously I need to set the values for red, green and blue.

First, just so you know, there is no difference between an 3 pin XLR and a 3 pin DMX cable. It is just labeled differently. Both are a 3 conductor. Even the 5 pin DMX cables only use 3 pins except for some proprietary usage.

Some ideas: Make sure the red wire on your LED driver is coming from pin 3 on the XLR cable and that the white wire is coming from pin 2.

Try writing pin 2 "high" on the arduino, the enable pins on the rs485 chip need to be driven high to be in TX mode. It's not clear if the code is doing this automatically.

What does the "interpolation" setting do? Maybe this is misinterpreting your incoming DMX.

DMX works by sending channel data one at a time in 8 bit segments. Typically to control an RGB signal you would pick a starting address, like 1, which would control Red, the next address would control Green (2), and then blue (3).

Let me know if any of that helps.