Line 6 pedal board: Re-using the main board

I decided to take a closer look at the main board from the Line 6.

Since I might be tempted to put a simple display on the pedal board, in addition to a 16 character x 2 lines display, I decided to remove the digits from the (old) main printed circuit board (PCB). But taking a closer look at the integrated circuits (IC) soldered on the board, I decided to investigate a bit to figure if I could salvage other parts. The orange ICs are resistor arrays (4116R-1-391), according to their datasheet. Each one is made of 8 resistors (16 pins), and the value of the resistors is printed on the chip. In this case, 391 means 390 Ohms. Mmmmh! These could be LED segment resistors. Actually, getting the datasheet for the digits (CST535E) reveals the pin correspondence and a value of 390 Ohms should produce a nice bright red light.

Using a 5 Volt supply, I grounded the main board and tested a few pins. On the photo on the left, above, I touched the pins on the top of the orange chips. The led segments lit one by one. I figured I just had to build a little table to program the digits into the Arduino.

Before de-soldering the chips, I decided to trace the PCB paths to their origin. In this case, most of the signal paths led to the ICs on top, identified as SN74HC595N. A quick look for datasheets revealed a series of Shift Registers. These chips can take a series of bits and send them, in parallel, out to the other side. The advantage here is that with 3 pins from the Arduino, you can drive 8 digital outputs. In this case LED digit segments.

Looking at the leftmost on the four 595s, I decided to try a simple sketch on the Arduino to test the logic. Arduino.cc actually has a tutorial with this very chip!

After removing some unneeded parts and hooking up the board to the Arduino

I wrote a quick sketch to test the logic. It worked! I then decided to hookup the 3 color coded wires to the second 74HC595 instead to see if the second digit would turn on. Bingo! So of course, hooking the wires to the third 595 would prove that the 3 digits could be cascaded with the Arduino ShiftOut functionality. It works because the 595 chip has a pin, Q7′, that sends data serially to another chip’s data IN pin. Sending 3 ShiftOut instructions will push the data through the 3 shift registers. At least, this is what I understand.

So the code for the 3 digits is as follows:

/*
Use 3 74HC595 shift registers to display 3 numbers on 
common cathode 7-segments LEDs
This code should work for any digit assembly, but was specifically
used to recuperate the digits of an old Line 6 floor board.
Arduino pin 8 is linked to U2 pin 12, Latch
Arduino pin 12 is linked to U2 pin 11, Clock
Arduino pin 11 is linked to U2 pin 14, Serial data input.
The Line 6 board cascades two more 595s and all wiring was left
unmodified.
*/
int LatchPin = 8;
int ClockPin = 12;
int DataPin = 11;
char m[4];
byte data;
byte dataArray[10];

void setup() {
  pinMode(LatchPin, OUTPUT);
  pinMode(ClockPin, OUTPUT);
  pinMode(DataPin, OUTPUT);
  Serial.begin(9600);
//Define character images in an array
  dataArray[0] = 0x3F; // 0
  dataArray[1] = 0x06; // 1
  dataArray[2] = 0x5B; // 2
  dataArray[3] = 0x4F; // 3
  dataArray[4] = 0x66; // 4
  dataArray[5] = 0x6D; // 5
  dataArray[6] = 0x7C; // 6
  dataArray[7] = 0x07; // 7
  dataArray[8] = 0x7F; // 8
  dataArray[9] = 0x67; // 9

}

void loop()
{
//count to 255 and show that count
  for (int j = 0; j < 256; j++)
  {

  int k = 100;
  int temp = j;
  for (int i = 2; i >= 0; i--)
  {
    m[i] = temp / k;
    temp = temp - (m[i] * k);
    k = k / 10;

  }
  // end
  digitalWrite(LatchPin, LOW);
  shiftOut(DataPin, ClockPin, MSBFIRST, dataArray[m[0]]);
  shiftOut(DataPin, ClockPin, MSBFIRST, dataArray[m[1]]);
  shiftOut(DataPin, ClockPin, MSBFIRST, dataArray[m[2]]);
  digitalWrite(LatchPin, HIGH);
  delay(100);
  }
}

On the main board, there is a fourth 74HC595 chip. Looking at the traces on the PCB, I could guess there was a connection between that fourth chip and the pins going to the LEDs on the pedal board. I then decided to try shifting a fourth time. The connections were made to the fourth (U1) chip instead of U2. It worked! After that, it was a matter of figuring which LED needed which bit turned on and pretty soon, I had the whole series of LEDs flashing… but two. Bummer. Pins 1 and 2 on the board, linked to LED 1 and 2, had no link to the 595.

Looking closely at the PCB traces again, I figured that they were controlled by the decimal point from U2 and U3. Actually, I could see no trace from these two chips to the DP on the display, but I found a trace between U4 and the first digit’s DP. So I guessed that if I turned the first (leftmost) bit on, I could turn on the DP on the first digit, or LED 1 or 2. To turn the leftmost bit on, without changing the rest of the bits, I just had to “OR” 0x80 to the digit’s value. In the code that follows, I do a modulo on the counter and if the result is 1, I turn the bit on. I turn it off otherwise.

/*
Use 3 74HC595 shift registers to display 3 numbers on 
common cathode 7-segments LEDs, and one more 595 to turn a series of
10 LEDs on and off.
This code should work for any digit assembly, but was specifically
used to recuperate the digits of an old Line 6 floor board.
Arduino pin 8 is linked to U1 pin 12, Latch
Arduino pin 12 is linked to U1 pin 11, Clock
Arduino pin 11 is linked to U1 pin 14, Serial data input.
*/
int LatchPin = 8;
int ClockPin = 12;
int DataPin = 11;
char m[4];
byte data;
byte dataArray[10];

void setup() {
  pinMode(LatchPin, OUTPUT);
  pinMode(ClockPin, OUTPUT);
  pinMode(DataPin, OUTPUT);
//  Serial.begin(9600);
//Define character images in an array
  dataArray[0] = 0x3f; // 0
  dataArray[1] = 0x06; // 1
  dataArray[2] = 0x5B; // 2
  dataArray[3] = 0x4F; // 3
  dataArray[4] = 0x66; // 4
  dataArray[5] = 0x6D; // 5
  dataArray[6] = 0x7C; // 6
  dataArray[7] = 0x07; // 7
  dataArray[8] = 0x7F; // 8
  dataArray[9] = 0x67; // 9
}

void loop()
{
//TEST: count to 255 and show that count
  for (int j = 0; j < 256; j++)
  {

  int k = 100;
  int temp = j;
  for (int i = 2; i >= 0; i--)
  {
    m[i] = temp / k;
    temp = temp - (m[i] * k);
    m[i] = m[i];
    k = k / 10;
  }
//just a test for led 1 & 2
//they blink depending on the value of zoo
    int zoo;
    if ((j % 2) == 1)
     zoo = 0x80;
    else
     zoo = 0x00;// 

  digitalWrite(LatchPin, LOW);
  //rightmost digit. Use | (or) with 0x80 to light led 2
  shiftOut(DataPin, ClockPin, MSBFIRST, dataArray[m[0]] | zoo);
  //middle digit. Use | (or) to light led 1
  shiftOut(DataPin, ClockPin, MSBFIRST, dataArray[m[1]] | -zoo-1);
  //lefmost digit. Use | (or) to light decimal point
  shiftOut(DataPin, ClockPin, MSBFIRST, dataArray[m[2]] | zoo);
  //leds 10,8,7 then6,5,4 and 3 as MSB and LSB binaries
  //the leds show the value of "j", so act as a binary counter
  shiftOut(DataPin, ClockPin, MSBFIRST, j);
  digitalWrite(LatchPin, HIGH);
  delay(100);
  }
}

Datasheet for the display: cst535e display datasheet

This entry was posted in Arduino, Pedal board and tagged , . Bookmark the permalink.

2 Responses to Line 6 pedal board: Re-using the main board

  1. marc says:

    hi there i was hoping that you could help with the data sheet for the cst535e as can not find one anywhere lol. all i am looking to do is swap mine for blue 7 segment instead. if you could help with this that would be greatly helpful.

    many thanks

    marc

Leave a Reply

Your email address will not be published. Required fields are marked *