Members | Sign In
All Forums > Hardware and LBE construction
avatar

DMX connection established

posted Jul 11, 2012 01:59:29 by ThomRobertson
Hi, all custom rig builders! I've gotten ahold of this:
http://www.enttec.com/index.php?main_menu=Products&pn=70303&show=description

And I've gotten the Artemis code to use it to control this:
http://www.guitarcenter.com/Chauvet-SLIM-PAR-64-LED-Par-Can-108082017-i1567370.gc

Now, I'm NOT ready to release this update, 'cause we in this thread have previously discussed how we want more out of our custom output solutions than "red for red-alert" lights. What I need is your help figuring out how best to build a customization solution that works for everyone.

Quick DMX primer --
Serial DMX cables connect lights and smoke machines and other devices, in series, to the server. The server sends out messages of 512 bytes (each is 0-255). Each DMX device is set to pay attention to SOME of those 512 values. Each device is different, so the values will mean different things to each one.

This messaging is very fast, and can be sent over and over again. My test code re-sends every 35ms.

So on the one hand, my code can simply send a set of 512 values, over and over again, to any set of DMX devices. On the other hand, everyone will have different devices that they will expect to operate in different ways. So how to build a system that supports everyone?

Well, I COULD implement a LUA machine with hooks for pre-defined artemis events and variables for the 512 values.

OR I could parse an XML file that contains event triggers and resulting control commands.

Or something else.

If it were just me, I'd use XML, and make something like:

<event type="ENEMY_BEAM_HITS_PLAYER">

<!-- flicker the light of the first light box -->
<timeblock mseconds="80">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="80">
<setvalue index="0" value="255" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="255" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="255" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="80">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="80">
<setvalue index="0" value="255" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="255" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="255" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="80">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
</event>



What do YOU think?
Creator of Artemis
page   1 2 next last
24 replies
avatar
Cmdr.Brandr said Jul 11, 2012 12:20:01
AWESOME Thom! I am glad to hear you have that working. For me I tend to lean toward the XML file over the LUA because I am familiar with the XML more so than LUA. Now if you were going to implement LUA for scripting or some other feature then go with that.

Personally, I am so excited about the inclusion of the feature set that I wouldn't care if you wanted to use hieroglyphics, I would just happily go learn ancient Egyptian. LOL.

Thanks for the hard work Thom!
Commander Brandr
Commanding Officer of the ship Calamitous Intent

-------------------------------------------------------
Check our crews adventures at http://nerdneerdowells.com
avatar
Mike_Substelny said Jul 11, 2012 12:53:38
I would be happy to adopt any standardized system that you set up, Thom. My preferred method of acquiring hardware would be pre-bundled kits sold at your website.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
LeeKeiserII said Jul 11, 2012 19:31:51
I’ve only got a few pieces of DMX equipment so far and I haven’t tested any of it yet. From what I can tell, each piece of output equipment has dip-switches to set the starting DMX512 channel for that equipment. Often times, a higher-end device may use 3+ channels to properly control a single device. A moving spot light may use one for brightness, one or more for color and a few more for motion controls. I believe some pieces may use “program codes” and the value you send the channel determines the program-set that the particular piece performs.

The Enttec box you list here (I have one of these) is the method that gets the signal out of the usb port and gets it into the DMX wiring system and is a good choice for getting the DMX signal out of the computer and into the DMX Universe.

I think the XML file gives quite a bit of flexibility and is also should be pretty darn simple to maintain. If the list of trigger events is fairly comprehensive, the XML should be able to define and trigger whatever type of equipment in whatever way necessary. It could be tweaked, tested and changed to fit each bridge’s particular needs with whatever equipment they have.

I started another thread to brainstorm all the possibilities of what could be requested to expand/enhance Artemis with external equipment. If we can dream big enough to encapsulate all the likely enhancements that could be thought up, determining the best method(s) to accomplish their control should be a bit easier...
avatar
Mike_Substelny said Jul 15, 2012 20:21:24
We tested the new DMX controls in battle yesterday in my semi-permanant home bridge. This short Youtube video shows Thom's lights (and his touch-screen based rig) in action. Playing the role of captain is Eric Wethington who many of you know from these forums.

http://www.youtube.com/watch?v=U0DkfbzV7ms

The video was shot during an epic battle in which four full crews fought and won a battle on difficulty ten.
[Last edited Jul 15, 2012 20:24:25]
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
TomWyatt said Jul 17, 2012 13:08:54
LUA! Embed a proper full LUA engine in there and we should be able to ping things out on network ports, serial ports or proper USB
avatar
MarkBell said Jul 17, 2012 13:18:58
Personally, the straightforwardness of an XML file appeals to me a lot. Pretty cut-n-dry in terms of laying everything out over a straightforward interface.

Plus, if you're really hard bent on a microcontroller solution for your FX needs, the DMX protocol is be pretty straightforward to implement. Hell, Microchip has an app note (AN1076) and there are a few Arduino tutorials and a shield for DMX.

Watching the bridge turn blue when the shields were up or yellow when the tractor beam grabbed you was nothing short of amazing, seriously. The shield flicker on a hit, the red alert.... Yeah. Just epic.
avatar
DavidHernly said Jul 18, 2012 16:48:17
Is this available in the current build?
avatar
MarkBell said Jul 18, 2012 16:55:16
Thom
Now, I'm NOT ready to release this update, 'cause we in this thread have previously discussed how we want more out of our custom output solutions than "red for red-alert" lights. What I need is your help figuring out how best to build a customization solution that works for everyone.
avatar
DavidHernly said Jul 18, 2012 17:46:16
Helps if I read the whole thread, don't it! LOL
avatar
Wacko said Jul 18, 2012 18:31:02
XML is now we've been doing it so far, it makes sense to have this be controlled that way too.
avatar
kwadroke said Jul 18, 2012 19:11:39
If it was me adding it I would have it kick off external programs (.bat,.exe, etc) then those can handle whatever protocols to control the hardware. You could pass it the parameters via arguments or write the info to a file that the programs could process. That way you're not limited to DMX or Ardunio or web controlled devices or whatever you want to hook up.
I got my pair of Red Alert lights in yesterday. I'm in the process of figuring out how to hook these up. I've got a Python script to emulate the current web-controlled setup to display a Animated GIF on a monitor. Thought about modifying it to control a Parallel port & a relay. Also in my arsenal is an Arduino Uno and Ethernet Shield. My PowerSwitch tail (which will be in tomorrow) can be controlled from the Arduino.
avatar
MarkBell said Jul 19, 2012 19:17:13
I think DMX + XML gives an overall best-of-both-worlds solution.

For those who want plug-and-play, there are plenty of DMX lights, strobes, dimmer boxes, etc that you can pick up, plug in and go to town. The XML file type is easy to read, quick to edit, and straightforward enough for most people to make their stuff work.

For those who want custom built displays, event triggered fx, microcontroller integration, etc, DMX can be a useful interface since its just an RS-485 protocol. The open USB DMX box Thom linked to above uses the FTDI USB-UART (FD232B) chip with an RS-485 transciever. This can be reduced to one of these, with the onboard EEPROM programmed for DMX512, interfaced however you'd like. This is an arduino based DMX512 device, capable of Tx/Rx DMX512 data to/from USB. This can be used as a downstream DMX slave for a device, the translator from the computer (can send DMX data and act on certain addresses, as necessary), even an input device from a DMX or other attached device (like custom keyboard devices...?).
avatar
GuyColumboWorthy said Jul 19, 2012 19:49:34
Just to chime in here. When we played our maiden voyage, the WEAPONS officer wired all audio into a MIXER. That allowed for additional inputs (we had "bridge ambient sounds, a microphone, and a STAR TREK SOUND BOARD!).

I would think a marriage of the controls to sounds would be even more immerse. Then, I could trigger (missions scripts) not only on screen events, but sound effects and/or lighting effects almost like a concert stage.
Lt. Columbo
Captain, U.S.S. IPA
"The drunkest crew in the fleet"
avatar
Cmdr.Brandr said Jul 19, 2012 21:15:18
OOh...a mixer? I just got one from my dad when he passed away. This could be good!

Thanks for the idea!
Commander Brandr
Commanding Officer of the ship Calamitous Intent

-------------------------------------------------------
Check our crews adventures at http://nerdneerdowells.com
avatar
kwadroke said Jul 20, 2012 00:56:04
With the current system I was able to use my script pyRedAlert and control my new PowerSwitch Tail II using an Arduino. The script has a webserver that emulates the ethernet device that's supported by the game and controls the arduino using USB serial connection. Is an Arduino overkill? Of course, but it's what I already had on hand. Here's a video of it in use: http://www.youtube.com/watch?v=ziBQu00phBQ
This would also be really easy to kick off using programs/batch files instead of hitting a webserver.
[Last edited Jul 20, 2012 00:57:27]
Login below to reply: