Part 1: Idea, Materials and Schematics
Part 2: Contruction, Code and Installation
First we remove the XLR ports from the DMX Shield. This will be necessary in order to route the DMX signals through the relay and also to the outside XLR connectors.
We need to change the jumpers by new ones to reduce the height of the shield, this way so we can fit the protoshield on top. Alternatively you can remove them completely if its going to be in a fixed installation but I always like to keep the projects as versatile as possible.
Now we will calculate the circuit that needs to power the relay:
Each relay consumes ~40mA @ 5VDC. This is the maximum amperage that one arduino PIN can deliver (Arduino specs: http://www.arduino.cc/en/Main/ArduinoBoardUno) so to be safe we will be operating the relay with a transistor.
As per transistor I usually use the common 2N4401. Here the schematic:
After measuring the hole consumption of the circuit we get 170mA ~ 200mA. So we will find a power supply that can deliver at test 300mA @ 5V.
We solder the relay and the transistor that will operate following the schematic.
Some pictures of the assembly
A few problems where found when using the example code of conceptinectics so I modified slightly the code to work with my set-up. Code and library can be found in github.
A bug has been found where device is not able to receive DMX data when listening to addresses above 510.
Bypassed the dmx signal from the unique hazer and input it in the arduino. Since the input / output of the unique are tight together in a single board just bypassed the signal going to the main board. this way the external function of the hazer is kept intact. The signal going to the internal controller of the hazer is feeded to arduino and then processed.
The rest of the circuitry of the hazer is kept intact so no further hacking other than the reading of dmx signals is done.
At a first try I tried to run the arduino and shield from the power supply of the unique hazer (right before the power regulator) but it turns out that has a pretty tight current limiter that prevents the circuit from running extra power. There is a PTC C890 limiting the current and it will shut down when more power than the strictly necessary is being drawn.
I opted for including a complete independent power supply that will attach to 220V directly from the inside. This way we also keep all circuitry completely separate as well.
Further documentation on Arduino DMX controller:
Aternative DMX shield with isolation
useful info http://www.celestialaudio.com/dmx_led/index.html