Custom control interface for an old (late 90's DMX/Smpte lighting controller)

Hi all,

I have been presented with an issue at a venue I look after. The venue in question has an "Alcorn McBride LightCue" dmx playback unit that is linked to their front of house event automation system.

I have taken on the task of building a controller with a simple front end that triggers 16 individual cues within the light cue controller.

The Alcorn McBride LightCue controller has a 'close-contact' feature that will allow triggering of any one of the internal 16 cues by the way of matrixing the unit's 4 close contact inputs.

I have designed a box with 20 buttons on the front and a 16x2 LED screen.
buttons 1-16 is quite simply a "cue select" button, of which the screen will show "Cue 1 - Audience Lights", etc. To execute a cue, the light cue controller then looks for a close contact on 2 of it's pins, again, over the parallel port. In total, 8 x relays are needed.

The Manual for the unit is here: http://www.alcorn.com/library/manuals/man_lcue.pdf

Essentially, I have some Arduino knowledge but I have been going around in circles all day. I have an Arduino Mega earmarked for this based on the amount of I/O available.

I have assumed (no matrixing on the switches to keep it simple) that the 20 momentary push switches will be take up 20 pins, 8 pins for the relays and once the switch system is working, I will use the 74HC595 to multiplex the LED's in the switches (illuminated switches). FYI, the 20 switches are 1-16 cue select, 17 -play cue, 18 - loop cue, 19 - pause cue, 20, stop cue.

As it stands, I assume that I will want a sketch that, in its loop, will look for button presses and then trigger a procedure.

Assuming I am on the right track, if button 1 (call it Lighting Cue 1) is pressed, I would want this to happen:

1: Arduino is waiting for button push...."READY for CUE" on the screen
2: Button 1 (LX cue 1) is pushed (relays latch in the box (that are connected to other pins on the arduino) thus shorting pins that refer to cue 1 on the light cue controller).
3: Arduino screen reports "Cue 1 selected"
4: "Play" button pushed (cue 1 LX relays still latched. Play button then latches the "Play" relay (which shorts the relevant pins on the light cue controller).
5: After a second or so, the Arduino reverts back to it's loop, waiting for the next button push.

Note: I would like the led in the relevant button to light up when it's pushed.

I know this is quite a project but I am keen to learn how to do it.
If all falls to pieces I will pay a programmer to do it!

Any input would be most appreciated!

For your amusement, below is what I knocked up today..that is useless!

int buttonPLAY = A5;     // Play 
int buttonPAUSE= 23;     // Pause
int buttonLOOP = 24;     // Loop
int buttonSTOP = 25;     // Stop
int button1 = 12;     // Cue 1
int button2 = 27;     // Cue 2
int button3 = 28;     // Cue 3
int button4 = 29;     // Cue 4
int button5 = 30;     // the number of the pushbutton pin
int button6 = 31;     // the number of the pushbutton pin
int button7 = 32;     // the number of the pushbutton pin
int button8 = 33;     // the number of the pushbutton pin
int button9 = 34;     // the number of the pushbutton pin
int button10 = 35;     // the number of the pushbutton pin
int button11 = 36;     // the number of the pushbutton pin
int button12 = 37;     // the number of the pushbutton pin
int button13 = 38;     // the number of the pushbutton pin
int button14 = 39;     // the number of the pushbutton pin
int button15 = 40;     // the number of the pushbutton pin
int button16 = 41;     // the number of the pushbutton pin
int RelayPLAY =  5;   
int RelayPAUSE =  43;
int RelayLOOP =  44;
int RelaySTOP =  45;
int Relay1 =  46; //PLAY RELAY
int Relay2 =  47; //PAUSE RELAY
int Relay3 =  48; //LOOP RELAY
int Relay4 =  49; //STOP RELAY
int Relay5 =  18;
int Relay6 =  19;
int Relay7 =  20;
int Relay8 =  21;
int led1 = 3;
int led2 = 4;

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  Serial.begin(9600);
  pinMode(RelayPLAY, OUTPUT);  //relays as outputs
  pinMode(RelayPAUSE, OUTPUT);
  pinMode(RelayLOOP, OUTPUT);
  pinMode(RelaySTOP, OUTPUT);
  pinMode(Relay5, OUTPUT);
  pinMode(Relay6, OUTPUT);
  pinMode(Relay7, OUTPUT);
  pinMode(Relay8, OUTPUT);
  pinMode(buttonPLAY, INPUT);  //Button as inputs
  pinMode(buttonPAUSE, INPUT);
  pinMode(buttonLOOP, INPUT); 
  pinMode(buttonSTOP, INPUT);
  pinMode(button1, INPUT);
  pinMode(button2, INPUT);
  pinMode(button3, INPUT); 
  pinMode(button4, INPUT);
  pinMode(button5, INPUT);
  pinMode(button6, INPUT);
  pinMode(button7, INPUT);
  pinMode(button8, INPUT);
  pinMode(button9, INPUT);
  pinMode(button10, INPUT);
  pinMode(button11, INPUT);
  pinMode(button12, INPUT);
  pinMode(button13, INPUT);
  pinMode(button14, INPUT);
  pinMode(button15, INPUT);
  pinMode(button16, INPUT);
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(RelayPLAY, LOW);
  pinMode(buttonPLAY, LOW);
}

void loop(){
digitalWrite(led2, HIGH);//test LED
  buttonState = digitalRead(button1); 
  if (buttonState == HIGH) 
    CUE1(); //go to CUE1 Function
    /***/
   buttonState = analogRead(buttonPLAY);
  if (buttonState == HIGH) 
    PLAY();} //go to PLAY function
/**************************************************/

void PLAY(){
  buttonState = digitalRead(buttonPLAY);
  if (buttonState == LOW); {
  digitalWrite(RelayPLAY, HIGH);}
  Serial.println("Playing...");}
  
  /************************************************/
  void CUE1(){
    buttonState = analogRead(button1);
  if (buttonState == HIGH) {
    digitalWrite(led1, HIGH);
    Serial.println("CUE 1 - Playing");}
  else {
    loop;}}

I really appreciate your thoughts/input on this.

Thanks
Duncan

Hi Duncan

Looks like you're on the right track - or one of them as there's always many ways to go about most things. The choice of a mega will certainly give you enough IO pins to do the job, if you're going to direct connect them all without using any multiplexing. Your idea with the relays looks to be perfectly sound too from what it says on p15 of that manual.

To somewhat simplify your code can I suggest you look into arrays such that you could define an array for the switchPins, and one for the corresponding LEDs and one for the strings to output to the display. This would allow you to reuse your code by looping through from 0-15 to check the switches, if that particular one is pressed then using the same index to the LED array will light up the correct LED and you've then got an easy way of writing the Cue text to the LCD. Hope this makes sense.

To illustrate

// something like this
const int CueSwitch[16] = {
  12,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41};
const int LEDpin[16] = {
  3,4,13,50,43,44,45,47,5,6,46,51,48,8,7,9};
char *CueMessage[16] = { 
  "Audience Lights", 
  "Other lights", 
  "Xmas lights", 
  "Lights4", 
  "Lights5", 
  "Lights6", 
  "Lights7",
  "Lights8",
  "Lights9",
  "Lights10",
  "Lights11",
  "Lights12",
  "Lights13",
  "Lights14",
  "Lights15",
  "Lights16" };


void setup() {
  for(int i = 0; i<16; i++) {
    pinMode(CueSwitch[i], INPUT_PULLUP);
    pinMode(LEDpin[i],OUTPUT);
    // test each LED in sequence on startup
    digitalWrite(LEDpin[i], HIGH);
    delay(300);
    digitalWrite(LEDpin[i], LOW);
  }
}

void loop(){
  for(int i=0;i<16;i++} {
    // do your stuff
  }  // end of for loop
} // end of loop()

In the "do your stuff" loop that would be reading the state of CueSwitch[ i ] and if it's pressed lighting up LEDpin[ i ] and outputting CueMessage[ i ] to the display then doing the relay actions. If it's not pressed turn off LEDpin[ i ]. Make sure you look up debouncing switches if you're not familiar with that.

Using the arrays like this allows some flexibility to swap IO pins about if needs be - see the LEDpin array that I jumbled on purpose as an example.

Hope this helps. All the best with your project!
Geoff