Tuesday, January 4, 2022

DR-14830 LED Sign Modification to Arduino Interface

This summer I had purchased a LED sign.  On a closer observation I discovered that I cannot read the model number.  The sign contains two LED circuitboards with "DR-14830" on them.  Since I have been modifing LED signs to work with the Arduino for over 12 years now, this sign was another challenge for me to figure out.  It uses 74LS164 shift registers with ULN2003 drivers for the columns.  The rows are selected by a 74LS164 then a 74LS138 then a ULN2003 then TIP122 power transistors.  The power transistors go to the anodes of the LED arrays.  The row selecting 74LS164 was in the chain of shift registers so I removed it to make the software simpler to write.  

This is a picture of the back panel, as you can see the model number is not readable.

This is a wider view of the back.  It used to have two power sources of 9 VAC that were rectified and regulated to 9VDC for the TIP122 power transistors and 5 VDC for the logic IC's.  I changed it to run off a 5VDC at 10 amps switching power supply instead.


The 74LS138 pins 1, 2, 3 need to be jumpered to the unused 4 pins of the interconnecting jack. Pins 4 and 5 need to be connected to ground and pin 6 goes to 5 volts via another jumper wire.  Also you can see how I changed the power input to be only 5 VDC in this picture.


Before using the 4 unused pins cut the two wire runs that are running to them.  Pin 1 (and 5) is ground so skip that pin and use pins 2, 3, 4 to be connected to pins 1, 2, 3 of the 74LS138.  Existing Pin 7 is data and Pin 8 is clock.


I removed U7 and U8 as they were a phase locked loop (NE556) and a 74LS164 shift register for the 74138 address pins.  Then I cut a run (that was going to the 74LS138) and added the jumper wire in the picture to connect the buffered data to the first 74164 shift register instead of the now removed 74LS164 row selecting shift register.

After a couple hours of troubleshooting the sign started working.  I will eventually upload the software once I get it fine tuned.


Here is the code:

// 60x7 LED Sign driver
// Uses Some direct port writes
// 1/4/2022 by Bob Davis

//#define A   A0  74138 pin1
//#define B   A1  74138 pin2
//#define C   A2  74138 pin3
#define DAT 7 // 74LS164 Data 
#define CLK 8 // 74LS164 Clock 
#define ROW_PORT   PORTC  // Port the 74138 rows are connected to

String text1="ARDUINO UNO ";

// This font from http://sunge.awardspace.com/glcd-sd/node4.html
byte font[][7] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ascii 32
0x00,0x00,0xfa,0x00,0x00,0x00,0x00, // !
0x00,0xe0,0x00,0xe0,0x00,0x00,0x00, // "
0x28,0xfe,0x28,0xfe,0x28,0x00,0x00, // #
0x00,0x34,0xfe,0x58,0x00,0x00,0x00, // $
0xc4,0xc8,0x10,0x26,0x46,0x00,0x00, // %
0x6c,0x92,0xaa,0x44,0x0a,0x00,0x00, // &
0x00,0xa0,0xc0,0x00,0x00,0x00,0x00, // '
0x00,0x38,0x44,0x82,0x00,0x00,0x00, // (
0x00,0x82,0x44,0x38,0x00,0x00,0x00, // )
0x10,0x54,0x38,0x54,0x10,0x00,0x00, // *
0x10,0x10,0x7c,0x10,0x10,0x00,0x00, // +
0x00,0x0a,0x0c,0x00,0x00,0x00,0x00, // ,
0x10,0x10,0x10,0x10,0x10,0x00,0x00, // -
0x00,0x06,0x06,0x00,0x00,0x00,0x00, // .
0x04,0x08,0x10,0x20,0x40,0x00,0x00, // /
0x7c,0x8a,0x92,0xa2,0x7c,0x00,0x00, // 0
0x00,0x42,0xfe,0x02,0x00,0x00,0x00, // 1
0x42,0x86,0x8a,0x92,0x62,0x00,0x00, // 2
0x84,0x82,0xa2,0xd2,0x8c,0x00,0x00, // 3
0x18,0x28,0x48,0xfe,0x08,0x00,0x00, // 4
0xe4,0xa2,0xa2,0xa2,0x9c,0x00,0x00, // 5
0x3c,0x52,0x92,0x92,0x0c,0x00,0x00, // 6
0x80,0x8e,0x90,0xa0,0xc0,0x00,0x00, // 7
0x6c,0x92,0x92,0x92,0x6c,0x00,0x00, // 8
0x60,0x92,0x92,0x94,0x78,0x00,0x00, // 9
0x00,0x6c,0x6c,0x00,0x00,0x00,0x00, // :
0x00,0x6a,0x6c,0x00,0x00,0x00,0x00, // ;
0x00,0x10,0x28,0x44,0x82,0x00,0x00, // <
0x28,0x28,0x28,0x28,0x28,0x00,0x00, // =
0x82,0x44,0x28,0x10,0x00,0x00,0x00, // >
0x40,0x80,0x8a,0x90,0x60,0x00,0x00, // ?
0x4c,0x92,0x9e,0x82,0x7c,0x00,0x00, // @
0x7e,0x90,0x90,0x90,0x7e,0x00,0x00, // A
0xfe,0x92,0x92,0x92,0x6c,0x00,0x00, // B
0x7c,0x82,0x82,0x82,0x44,0x00,0x00, // C
0xfe,0x82,0x82,0x82,0x7c,0x00,0x00, // D
0xfe,0x92,0x92,0x92,0x82,0x00,0x00, // E
0xfe,0x90,0x90,0x80,0x80,0x00,0x00, // F
0x7c,0x82,0x82,0x8a,0x4c,0x00,0x00, // G
0xfe,0x10,0x10,0x10,0xfe,0x00,0x00, // H
0x00,0x82,0xfe,0x82,0x00,0x00,0x00, // I
0x04,0x02,0x82,0xfc,0x80,0x00,0x00, // J
0xfe,0x10,0x28,0x44,0x82,0x00,0x00, // K
0xfe,0x02,0x02,0x02,0x02,0x00,0x00, // L
0xfe,0x40,0x20,0x40,0xfe,0x00,0x00, // M
0xfe,0x20,0x10,0x08,0xfe,0x00,0x00, // N
0x7c,0x82,0x82,0x82,0x7c,0x00,0x00, // O
0xfe,0x90,0x90,0x90,0x60,0x00,0x00, // P
0x7c,0x82,0x8a,0x84,0x7a,0x00,0x00, // Q
0xfe,0x90,0x98,0x94,0x62,0x00,0x00, // R
0x62,0x92,0x92,0x92,0x8c,0x00,0x00, // S
0x80,0x80,0xfe,0x80,0x80,0x00,0x00, // T
0xfc,0x02,0x02,0x02,0xfc,0x00,0x00, // U
0xf8,0x04,0x02,0x04,0xf8,0x00,0x00, // V
0xfe,0x04,0x18,0x04,0xfe,0x00,0x00, // W
0xc6,0x28,0x10,0x28,0xc6,0x00,0x00, // X
0xc0,0x20,0x1e,0x20,0xc0,0x00,0x00, // Y
0x86,0x8a,0x92,0xa2,0xc2,0x00,0x00,  // Z
};

void setup() {
  pinMode (DAT,OUTPUT);
  pinMode (CLK,OUTPUT);
  pinMode (A0,OUTPUT);
  pinMode (A1,OUTPUT);
  pinMode (A2,OUTPUT);
  Serial.begin(9600);    // opens serial port, data rate 9600 bps
}
     
void loop() {
    if (Serial.available() > 0) {
      text1=Serial.readString();
      }
    Serial.print(text1);
    for (int r=0; r<7; r++){         // Select the Row
      for (int ch=10; ch>-1; ch--){  // select the character
        for (int c=5; c>-1; c--){    // select the column within character
          PORTC=7;                   // Turn display off while shifting
          digitalWrite(DAT, LOW);    // Check of data high or low
            if ((font[text1[ch]-32][c] >> r+1) & 0x01==1) digitalWrite(DAT, HIGH);
          digitalWrite(CLK, HIGH); 
          digitalWrite(CLK, LOW);  // Toggle clock
        }
      }
      PORTC=(r);       // row is done so display it
      delay(1);        // increase to troubleshoot    
    }
  }

This is a picture of the complete sign running.  I am sorry it is out of focus as the LED's are so bright that it overloads the camera.


To daisy chain the sign modules together you will need to extend the 74LS138 address pins to the next assembly.  I added a 4 pin connector to do that but the pins are wired backwards in the picture.  I made a custom cable to reverse the order of pins back to their correct order.



No comments:

Post a Comment