Difference between revisions of "VIPCO LED display"

From Hackerspace ACKspace
Jump to: navigation, search
(whoops, I always forget the 'noinclude' tags)
(removed from featured list until the next project update)
Line 1: Line 1:
<noinclude>{{featured}}</noinclude>
 
 
{{Project
 
{{Project
 
|State=Active
 
|State=Active

Revision as of 18:46, 30 October 2015

Project: VIPCO LED display
Featured:
State Active
Members Xopr, Da Syntax
GitHub No GitHub project defined. Add your project here.
Description
Picture
No project picture! Fill in form Picture or Upload a jpeg here


synopsis

VIPCO LED display, euro coin as size reference, complete with self-projection

Got a hold of two VIPCO displays (120x32 red pixels).

used ICs

  • Driven by HD64180RP6 CPU (datasheet)
  • ULN2003A (High-Voltage, High-Current Darlington Transistor Arrays, datasheet), both used as horizontal and vertical driver
  • CD4514BE (CMOS 4-Bit Latch/4-16 Line Decoder,s datasheet), row select
  • HCF4094A (8-stage shift and store bus register with 3-stage outputs, datasheet), 6 per panel, 5 panels per display

pinout and protocol

test pinout used with the Arduino code

While the PCB segments are designed to first shift in data for the top 16 leds (24 wide) and then the bottom 16, at least the display without serial connector is modified to use 2 bits per clock (top and bottom half).

back side (top right)
----------+
    VCC oo|data2
    VCC oo|VCC
  clock oo|D
 strobe oo|C
  data1 oo|B
inhibit oo|A
    GND oo|GND
    GND oo|GND
          |

Where:

  • VCC is roughly 7.8v without load
  • data1 is top 16 LEDs shift register
  • data2 is bottom 16 LEDs shift register
  • A+B+C+D is row select
  • inhibit is the row 'strobe'

notes

  • the main controller board uses a HD64180RP6 and is controlled by RS232 and probably RS485
  • 16 TIP107 (8A darlington) transistors drive the 32 lines per two lines (1 and 17, 2 and 18, etc..)
  • one TIP107 seems worn out/broken (number 16)
  • a couple of leds have worn out and might need replacement
  • strobe seems to be latch, inhibit seems to act as strobe
  • the transistors seem to be on a separable voltage rail (tested on 5V@1A and 7.5V@2.2A)
  • the shift register shifts from the right, but the pinout per HCF4094A is reversed per 8 columns (as seen in the video) like this:
8 9 10 11 12 13 14 15 0 7 1 2 3 4 5 6 7

done

This Arduino code is used to test the display. By default it displays (fake) random noise. Connect to the Arduino serial port at 9600 baud and type the letter all, random or bar to change the display.

I (xopr) have cheated on the Arduino controller because you need a clock above 250kHz for the display to draw smoothly; this demo writes two bits every 128 cycles and the columns are reused every row, so you'll see bars pushed in. The noise generator shifts in between 0 and 2 columns (of 2 random bits)

VIPCO.ino

Click here to view the source code
/*
back side (top right)
----------+
    VCC oo|data2
    VCC oo|VCC
  clock oo|D
 strobe oo|C
  data1 oo|B
inhibit oo|A
    GND oo|GND
    GND oo|GND
*/

#define CLOCK 2
#define STROBE 3
#define DATA1 4
#define INHIBIT 5

#define DATA2 6
#define D 7
#define C 8
#define B 9
#define A 10

#define WIDTH 120

//#define DELAY delay(1);
#define DELAY __asm__("nop\n\t");

char mode = 'r';
byte a = 0;
byte b = 0;

void setup()
{
    pinMode( DATA1, OUTPUT );
    pinMode( DATA2, OUTPUT );
    pinMode( CLOCK, OUTPUT );
    pinMode( STROBE, OUTPUT );

    pinMode( A, OUTPUT );
    pinMode( B, OUTPUT );
    pinMode( C, OUTPUT );
    pinMode( D, OUTPUT );
    pinMode( INHIBIT, OUTPUT );

    // Inhibit is active low
    // but we're enabling the display immediately
    //digitalWrite( INHIBIT, HIGH );

    Serial.begin( 9600 );
    Serial.println( "Initialized." );
    Serial.println( "a: all leds on" );
    Serial.println( "r: random" );
    Serial.println( "b: bars" );
}

void loop()
{
    // handle serial data
    if ( Serial.available( ) )
    {
        // Update mode and read the rest as integer
        mode = Serial.read( );
        uint16_t nVal = Serial.parseInt( );
        switch ( mode )
        {
            case 'a':
                // All leds on
                for ( byte n = 0; n < WIDTH; n++ )
                    shiftBits( 3 );
                strobe();
                break;

            case 'r':
                // Nothing to initialize
                break;

            case 'b':
                // Nothing to initialize
                break;
        }
    }

    switch ( mode )
    {
        case 'a':
            // Display all rows (with the same data)
            for ( byte n = 0; n < 16; n++ )
                selectRow( n );
            break;

        case 'r':
            // For each row, shift in 0-3 columns with the two leds being random as well
            for ( byte n = 0; n < 16; n++ )
            {
                for ( byte n = random( 4 ); n > 0; n-- )
                {
                    shiftBits( random( 3 ) );
                }
                strobe();
                selectRow( n );
                delay( 1 );
            }
            break;

        case 'b':
            // If a = 0, reset it so that we insert a column every 128 cycles.
            // the column pattern is off, off, on
            if ( !a )
            {
                a = 128;
                b++;

                if ( b > 2 )
                {
                    b = 0;
                    shiftBits( 3 );
                }
                else
                {
                    shiftBits( 0 );
                }
                strobe();
            }

            a--;

            // Display all rows (with the same data)
            for ( byte n = 0; n < 16; n++ )
            {
                selectRow( n );
            }
            break;
    }
}

void shiftBits( byte _nBits )
{
    digitalWrite( DATA1, (_nBits & 1) ? HIGH : LOW );
    digitalWrite( DATA2, (_nBits & 2) ? HIGH : LOW );

    DELAY;
    digitalWrite( CLOCK, HIGH );
    DELAY;
    digitalWrite( CLOCK, LOW );
}

void strobe()
{
    // Actually, this is more like 'latch'
    DELAY;
    digitalWrite( STROBE, HIGH );
    DELAY;
    digitalWrite( STROBE, LOW );
}

void selectRow( byte _nRow )
{
    digitalWrite( A, ( _nRow & 1 ) ? HIGH : LOW );
    digitalWrite( B, ( _nRow & 2 ) ? HIGH : LOW );
    digitalWrite( C, ( _nRow & 4 ) ? HIGH : LOW );
    digitalWrite( D, ( _nRow & 8 ) ? HIGH : LOW );
}

plan

Since we have three LED displays which all work differently (this one, the PAL0123 and DE-DP14116), we might want to write a display base class and build on top of that.

todo

  • test the second display on failures and do an inventory of the components we need
  • resolder or replace weak LEDs
  • order and replace faulty transistors
  • check if we can drive it with an ESP:
    CD4515B high level is 2.75Vmin and 3.5Vtyp @ 5Vcc and 5.5Vmin and 7Vtyp @ 10Vcc
    HCF4094B high level is 3.5Vmin @ 5Vcc and 7Vmin @ 10Vcc
    there is, however, a special driver board between the main board and the display which might be useful