DMXx - a programmable DMX Proxy


The Story

At work we do Lecture Recordings with a JVC GM-200E, one of the Cameras we also use at the c3voc. It's an okay camcorder but it really does not shine in low-light conditions and when Zoom is used.

For this reason we decided to buy some Studio Lights to be able to control the Light on our Stage better and so we went ahead and bought a DMX-Studio-Light Kit consisting of 4 Warm/Cold Studio Lights, Rigging Equipment and a simple DMX Controller with 8 Faders.

We knew that what we want was quite simples: 1 Fader per Fixture to control the Brightness and a 5th fader for color temperature. We live in the Year 2018, have incredibly powerful Computers all around us. It sure must be possible to map Faders arbitrarily to channels and maybe also perform some simple calculations, no?

Of course not! What were you thinking?! A 100€+ DMX Controller and it has 12 fixed Banks with 2 Sub-Banks with 8 Channels each and that is ist. Yes, of course is it "programmable" – but programmable does not mean you can put your own programs on it; it merely means that you can save the current constellation and recall it later, time controlled.

But now we have this Controller and it sure has nice faders. So what does the nerdy hacker do? *)

Well, they invent something to overcome the shortcomings of the devices around them.

*) The answer of this question of course depends on the kind of hacker one's dealing with. I sure know some people which would have tried to dump and modify the on-board firmware, and tht probably would have been a nice solution, too.

The Idea

The DMXx is a truely programmable DMX-Proxy which can be plugged in between the simple DMX-Controller and our fixtures. It can be used to do simple channel mappings and calculations, react to external stimuli (Light-Switches, Food-Pedals), do time-dependent things, implement different modes and do all the things, your simple controller is not capable of.

![Eine Hand bediehnt einen DNX-Controller mit 8 Fadern, im Hintergrund sieht man zwei Studio-Scheinwerfer die ihre Helligkeit und Farbtemperatur entsprechend ändern."] ({static}video.jpg "DMXx - DMX-Proxy Prototyp Testlauf")

Mapping Channels

This is probably the simples useful example. It just maps input-Channels 1-4 to the 4th channel of each 16-channel fixture:

uint16_t frameCallback(uint8_t *input, uint8_t *output) {
    output[0*16 + 4] = input[0]; // brightness fixture 0
    output[1*16 + 4] = input[1]; // brightness fixture 1
    output[2*16 + 4] = input[2]; // brightness fixture 2
    output[3*16 + 4] = input[3]; // brightness fixture 3

    return 4*16; // number of channels to transmit = 4 fixtures * 16 channels
}

Simple Calculations

Out Studio-Lights have one channel for the Cold-White LEDs and one for the Warm-White, but we wanted a single warm/col channel, so we extended our mapping to calculate the correct value for warm and cold from fader 6 and write it into the correct outout channel:

uint16_t frameCallback(uint8_t *input, uint8_t *output) {
    output[0*16 + 4] = input[0]; // brightness fixture 0
    output[1*16 + 4] = input[1]; // brightness fixture 1
    output[2*16 + 4] = input[2]; // brightness fixture 2
    output[3*16 + 4] = input[3]; // brightness fixture 3

    uint8_t cold = input[6];
    uint8_t warm = 255 - cold;

    output[0*16 + 0] = cold; // cold fixture 0
    output[0*16 + 1] = warm; // warm fixture 0

    output[1*16 + 0] = cold; // cold fixture 1
    output[1*16 + 1] = warm; // warm fixture 1

    output[2*16 + 0] = cold; // cold fixture 2
    output[2*16 + 1] = warm; // warm fixture 2

    output[3*16 + 0] = cold; // cold fixture 3
    output[3*16 + 1] = warm; // warm fixture 3

    return 4*16; // number of channels to transmit = 4 fixtures * 16 channels
}

Decision Making

The above was all we actually need, but during the Development some more ideas arised. For example it would be extremely simple to configure multiple modes for a fixture and select one based on another faders value:

uint16_t frameCallback(uint8_t *input, uint8_t *output) {
    configureRgbSpots(input, outout);

    bool fast   = input[7] > 85;
    bool strobo = input[7] > 170;
    if(strobo) {
        configureScannersForStrobo(input, outout);
    }
    else if(fast) {
        configureScannersForFastMovement(input, outout);
    }
    else {
        configureScannersForSlowMovement(input, outout);
    }
}

External Stimuli

One of the Ideas tha I found really interesting was the Option to react to exernal stimuli. In its simplest form this would mean that you could connect your existing Light-Switches to the DMX-Proxy and switching them would switch all Fixtures capable of generating white light to maximum brightnes and stop all motion, basicly combining your work- and cleanup-light with your lightshow. I really don't know how practial that is but it sounded interesting to me =)

Thinking further one might connect other sensor-inputs, for example door magnets, so that when someone's entering the door, the moving-heads point towards the door.

I'm sure are more uses out there, of which some might actually be practical ;)

The Protoype

We built us a prototype which basicly is an Arduino Nano, a MAX490 Bi-Directional RS485 driver and some Connectors on a Breadboard in a Box:

![Breadboard with an Arduino Nano, a MAX490 and 3 DMX Xonnectors] ({static}prototype.jpg "Prototyp PCB")

![Black Plastic Case with the 3 DMX Connectors sticking out] ({static}prototype-case.jpg "Prototyp Case")

![Screenshot of the Schematic] ({static}schematic.png "Schematic")

All source (firmware and hardware) can be found on GitHub.

A Product?

I have the feeling, that this might be a common problem in low-to-mid budget lighting setups.

I'm quite sure, professional high-priced DMX-Controllers can do all of this. In the professional league controlling Fixtures from a PC is also probably quite common.

But in the low-to-mid-priced range of rented and bought equipment I've seen lots of simple Controllers used with quite complex Fixtures. In such a scenario I could certainly imagine a piece of programmable logic between your fingers and the lighing fixtures to be quite helpful.

I would certainly be interested in making this a small, niche product. I designed and manufactured PCBs and Cases before, but never for a wider Audience.

I created a Google Form, asking fot all the various Ideas I have on which options and connections such a product might have. I'd be really happy to get your feedback: