Tuesday, April 9, 2019

Arduino UNO interfaced to a Sunrise Systems 7x96 LED array

I have interfaced an Arduino UNO to a Sunrise Systems 7x96 LED array.  It only needs a 74138 and 7 driver transistors such as TIP127's.  I am also using a 5 volt 5 amp regulated power supply.



Here is the first video testing the interface:


When I try to make the characters 6 bytes wide instead of 8 bytes the sign will flicker because the math takes too long.  I will have to work on another way to do the math.

This is a picture of the Sunrise Systems controller that was removed.

This is a close up of the logic connection the pins are 5 volts, Latch, Data, Clock, and Ground.

I have a collection of the Sunrise System Signs.  The red one on the right is a newer design that has the controller built into the circuit board.  This makes it much harder to control with an Arduino.

This picture shows what the signs say when they arrived.

This is a close up of the interface circuitry.
These next two pictures show the smaller text.  Instead of 96 LED's, the software sees 16 characters and 6 columns per character. 

Here is a video of the improved text with better software.


If you add a MSGEQ7 you can make a large spectrum analyzer like in this video.


This is the schematic of the 74LS138 interface.  The 74138 outputs are low when selected so it has to be inverted back to high by the PNP driver transistors.

Here is the code to make it work with a 74LS138, seven 1K ohm resistors and seven TIP127's

// 7x96 Uno LED Array driver
// Fast Clock Mod-Direct port writes
// 4/4/2019 by Bob Davis

// #define A   A0  74138 pin1
// #define B   A1  74138 pin2
// #define C   A2  74138 pin3
// #define CLK 8 // Port B assignments 
// #define OE  9 // 74138 pins 4 and 5
// #define LAT 10// Latch

#define PIXEL_PORT PORTD  // Port the pixels are connected to
#define PIXEL_DDR  DDRD   // D2-D7
#define ROW_PORT   PORTC  // Port the rows 74138 are connected to
#define ROW_DDR    DDRC   // A0-A5
#define CLK_PORT   PORTB  // Port the Clock/OE/LE are connected to
#define CLK_DDR    DDRB   // D8-D13

char text1[]="ARDUINO UNO WITH           ";
char text2[]="SUNRISE SYSTEMS        ";

// 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() {
  PIXEL_DDR = 0xFF;  // Set all pixel pins to output
  ROW_DDR = 0xFF;    // Set all row pins to output
  CLK_DDR = 0xFF;    // Set all CLK/LE/OE pins to output
}
     
void loop() {
  for (int t=0; t<900; t++){
    // Select the Row
    for (int r=0; r<8; r++){
      // select the character
      for (int ch=0; ch<16; ch++){
        // select the column within character
        for (int c=0; c<6; c++){
          PORTD = 0x00;
          if(t < 400){
            if ((font[text1[ch]-32][c] >> r+1) & 0x01==1) PORTD=0xF0;}
          else {
            if ((font[text2[ch]-32][c] >> r+1) & 0x01==1) PORTD=0xF0;}
          PORTB=5; PORTB=4;  // Toggle clock
        }
      }
      // row is done so display it
      PORTC=r;  // Update row
      PORTB=0;
    }
  }
}

Here is a more complete schematic.
This is what the new control board looks like.  It is rather empty, but it uses a 5 volt 3 amp AC adapter.

It now features BlueTooth so you can program it from your phone.

This picture shows what is inside the new controller.


4 comments:

Unknown said...

Thanks for sharing i will be working on this

Juan said...

Muy interesante, y cual es el circuito de las columnas

Bob Davis said...
This comment has been removed by the author.
Bob Davis said...

Sorry, the columns are driven by IC's that are located on the same board as the LED's. They are 74HC595's.