Difference between revisions of "VIPCO LED display"

From Hackerspace ACKspace
Jump to: navigation, search
(added arduino test code and updated todo)
m (Rewrote (PoC) using Adafruit GFX for fancy features)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Project
 
{{Project
 +
|Featured=No
 
|State=Active
 
|State=Active
 
|Members=Xopr, Da Syntax
 
|Members=Xopr, Da Syntax
 +
|GitHub=VIPCO
 +
|Picture=VIPCO LED display.jpg
 
}}
 
}}
 
 
=== synopsis ===
 
=== synopsis ===
[[File:VIPCO LED display.jpg|thumb|335px|VIPCO LED display, euro coin as size reference, complete with self-projection]]
 
 
Got a hold of two VIPCO displays (120x32 red pixels).
 
Got a hold of two VIPCO displays (120x32 red pixels).
 +
{{#Widget:Html5media|url={{filepath:VIPCO.mp4}}}}
 
{{#widget:YouTube|id=JSjKT0aKni4}}
 
{{#widget:YouTube|id=JSjKT0aKni4}}
  
Line 16: Line 18:
  
 
=== pinout and protocol ===
 
=== pinout and protocol ===
 +
[[File:VIPCO test pinout.jpg|thumb|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).
 
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).
 
<pre>
 
<pre>
Line 34: Line 37:
 
* data1 is top 16 LEDs shift register
 
* data1 is top 16 LEDs shift register
 
* data2 is bottom 16 LEDs shift register
 
* data2 is bottom 16 LEDs shift register
 +
* clock shifts data on rising edge (maximum clockspeed is 2.5MHz, 400nS)
 +
* strobe high transfers data from shift register to storage register (which makes it visible: 'latch')
 
* A+B+C+D is row select
 
* A+B+C+D is row select
* inhibit is the row 'strobe'
+
* {{~|inhibit}} is the row 'strobe'
 +
 
 +
In short:
 +
:when <code>strobe</code> is low, the current shift register can be displayed by having <code>A</code> <code>B</code> <code>C</code> and <code>D</code> pick the right line and pulling <code>inhibit</code> low.
 +
:The next line now can be shifted in by using <code>data1</code>, <code>data2</code> and <code>clock</code>
  
 
=== notes ===
 
=== notes ===
Line 46: Line 55:
 
* the shift register shifts from the right, but the pinout per HCF4094A is reversed per 8 columns (as seen in the video) like this:
 
* the shift register shifts from the right, but the pinout per HCF4094A is reversed per 8 columns (as seen in the video) like this:
 
{| class="wikitable"
 
{| class="wikitable"
|8||9||10||11||12||13||14||15||0||7||1||2||3||4||5||6||7
+
|16||17||18||19||20||21||22||23||8||9||10||11||12||13||14||15||0||1||2||3||4||5||6||7
 
|}
 
|}
  
Line 55: Line 64:
 
I ([[User:Xopr|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)
 
I ([[User:Xopr|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 ====
 
<pre>
 
/*
 
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 );
 
}
 
</pre>
 
 
=== plan ===
 
=== 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.
 
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 ===
 
=== todo ===
* test the second display on failures and do an inventory of the components we need
+
* test the displays on failures and do an inventory of the components we need.  Currently, display 1 had a loose transistor and about 22 weak/broken leds at 7.5V@2.6A (increases to 35 when dropping to 5V@1.15A)
 +
** Panel 1 (right, controller at the bottom):
 +
**: >8 ^ 14 ~
 +
** Panel 2:
 +
**: <1 v3 x
 +
**: <2 v9 x
 +
**: <5 v10 ~
 +
**: <7 ^14 ~
 +
**: >5 ^5 x
 +
**: >4 ^15 x
 +
**: >1 ^12 ~
 +
**: >2 v1 ~
 +
**: >3 v3 ~
 +
** Panel 4:
 +
**: <3 v6 ~
 +
**: <2 v6 ~
 +
**: <10 v4 ~
 +
**: <13 v6 ~~
 +
**: <14 v5 ~x
 +
** Panel 5:
 +
**: <1 v8 ~
 +
**: >12 v14 ~~
 +
**: >1 v5 x
 +
**: >1 ^5 x
 +
**: >1 ^13 ~~
 +
**: >1 ^14 x
 
* resolder or replace weak LEDs
 
* resolder or replace weak LEDs
 
* order and replace faulty transistors
 
* order and replace faulty transistors
 
* check if we can drive it with an [[ESP]]:
 
* check if we can drive it with an [[ESP]]:
 +
*: IO is 5V tolerant <ref>https://www.ba0sh1.com/blog/2016/08/03/is-esp8266-io-really-5v-tolerant/</ref>
 +
*: GPIO15 high on boot means SDIO bootmode
 +
*: Set multiple GPIOs by using <code>GPO</code><ref>https://www.esp8266.com/viewtopic.php?f=13&t=9407</ref>
 +
*: Maximum I/O speed is 3.81Mbps (262.5ns)<ref>http://nerdralph.blogspot.de/2015/04/a-4mbps-shiftout-for-esp8266arduino.html</ref> or 16Mbit for SPI<ref>https://github.com/MetalPhreak/ESP8266_SPI_Driver</ref>
 +
*: GPIO16 is on a separate register
 
*: CD4515B high level is 2.75V<sub>min</sub> and 3.5V<sub>typ</sub> @ 5V<sub>cc</sub> and 5.5V<sub>min</sub> and 7V<sub>typ</sub> @ 10V<sub>cc</sub>
 
*: CD4515B high level is 2.75V<sub>min</sub> and 3.5V<sub>typ</sub> @ 5V<sub>cc</sub> and 5.5V<sub>min</sub> and 7V<sub>typ</sub> @ 10V<sub>cc</sub>
 
*: HCF4094B high level is 3.5V<sub>min</sub> @ 5V<sub>cc</sub> and 7V<sub>min</sub> @ 10V<sub>cc</sub>
 
*: HCF4094B high level is 3.5V<sub>min</sub> @ 5V<sub>cc</sub> and 7V<sub>min</sub> @ 10V<sub>cc</sub>
*: there is, however, a special driver board between the main board and the display which might be useful
+
*: there is, a special driver board between the main board and the display which might be useful
 +
*: Pull-up and the use of a [[CD4050]] seems to work (except for pin 15)
 +
* right angle socket connector ordered (almost due, though)
 +
* some new code has been written that blits a complete piece of RAM (not yet uploaded): there was a lot of noise, so plan is to build a clip-on board
 +
<references/>
  
 +
Location: One in the [[Location::stACKspace]] and one at [[Location::User:xopr|xopr's]]
 
[[Category:Displays]][[Category:LEDs]][[Category:Arduino]]
 
[[Category:Displays]][[Category:LEDs]][[Category:Arduino]]

Latest revision as of 22:18, 15 May 2020

Project: VIPCO LED display
Featured: No
State Active
Members Xopr, Da Syntax
GitHub VIPCO
Description
Picture
VIPCO LED display.jpg

synopsis

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
  • clock shifts data on rising edge (maximum clockspeed is 2.5MHz, 400nS)
  • strobe high transfers data from shift register to storage register (which makes it visible: 'latch')
  • A+B+C+D is row select
  • inhibit is the row 'strobe'

In short:

when strobe is low, the current shift register can be displayed by having A B C and D pick the right line and pulling inhibit low.
The next line now can be shifted in by using data1, data2 and clock

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:
16 17 18 19 20 21 22 23 8 9 10 11 12 13 14 15 0 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)

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 displays on failures and do an inventory of the components we need. Currently, display 1 had a loose transistor and about 22 weak/broken leds at 7.5V@2.6A (increases to 35 when dropping to 5V@1.15A)
    • Panel 1 (right, controller at the bottom):
      >8 ^ 14 ~
    • Panel 2:
      <1 v3 x
      <2 v9 x
      <5 v10 ~
      <7 ^14 ~
      >5 ^5 x
      >4 ^15 x
      >1 ^12 ~
      >2 v1 ~
      >3 v3 ~
    • Panel 4:
      <3 v6 ~
      <2 v6 ~
      <10 v4 ~
      <13 v6 ~~
      <14 v5 ~x
    • Panel 5:
      <1 v8 ~
      >12 v14 ~~
      >1 v5 x
      >1 ^5 x
      >1 ^13 ~~
      >1 ^14 x
  • resolder or replace weak LEDs
  • order and replace faulty transistors
  • check if we can drive it with an ESP:
    IO is 5V tolerant [1]
    GPIO15 high on boot means SDIO bootmode
    Set multiple GPIOs by using GPO[2]
    Maximum I/O speed is 3.81Mbps (262.5ns)[3] or 16Mbit for SPI[4]
    GPIO16 is on a separate register
    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, a special driver board between the main board and the display which might be useful
    Pull-up and the use of a CD4050 seems to work (except for pin 15)
  • right angle socket connector ordered (almost due, though)
  • some new code has been written that blits a complete piece of RAM (not yet uploaded): there was a lot of noise, so plan is to build a clip-on board

Location: One in the stACKspace and one at xopr's