Problem with Shift Registers. Just works two

Hi everyone. My problem is that I have 5 seven segment display to arduino using shift registers (74HC595), but only works OK 2.
Double checked electronics and changed the IC's.

Now I have the last two registers removed from board, same problem. I'm using this library from Github
This is the code I'm running:

#include <ShiftRegister595.h>

#define PIN_DS 11
#define PIN_SHCP 12
#define PIN_STCP 8

ShiftRegister595 shiftRegister4(PIN_DS, PIN_SHCP, PIN_STCP);

void setup()
{
  shiftRegister4.setup(3);// setup register library
  Serial.begin(9600);
  Serial.println(shiftRegister4.getNumberOfRegisters());
Serial.println(shiftRegister4.getNumberOfRegisterPins());
}

void loop()
{
for(unsigned int i = 0;i<24;i++){
   shiftRegister4.clear();
shiftRegister4.setPin(i, HIGH);
 shiftRegister4.write();
  delay(300);
}

}

But only working first two displays.

Any one have a clue? I'm really blocked now.

Thank you very much.

Post your wiring.

http://postimg.org/image/coba7oduf/

A fast drawing. I'm using big seven segment display, common cathode so is drived by the UDN2981. All shifters daisy chained.

Need digit supply Gnd connected to Arduino Gnd.
Need UDN2981 Gnd connected to Arduino Gnd.
Need 0.1uF cap from '595 VCC to Gnd.
I have no idea what that library does.
Generally need an array to map the outputs into the digit you want displayed:
byte fontArray[] = {
0b00111111, // 0
0b0000110, // 1 etc. with 1 = segment on, and
// bit 0 = 0, 1 = b, 2 = c, 3 = d, 4 = e, 5 = f, 6 = g, 7 = DP
};

then you would shift the data out
shiftout(dataPin, clockPin, MSBFIRST, fontArray[number_to_display);

or use SPI.transfer as the speedy option:
digitalWrite(csPin, LOW);
SPI.transfer(fontArray[number_to_display);
digitalWrite(csPin, HIGH);
with 10 as csPin connected to RCK, 13 connected to SRCLK, 11 to SerData in.

Thank you for your answers.
Digit supply GND and UDN2981 GND are alredy connected to arduino GND. I don't have the capacitator in the circuit, wish thats the problem. I'll try as soon as stores opens here in Spain.

I have a question about the array. All 595's first output (Q0) is not connected, thats because I'm not using DP. So for setting up the array, for example, what binary to light up the number 3 in digit 2? I don't get how the binary part works.

Thanks again

Array is set up:
7, 6,5,4,3,2,1,0
DP,G,F,E,D,C,B,A

A
F B
G
E C
D DP

Data moves from Q0 to Q7

0b00111111, // 0
0b00000110, // 1
0b01011011, // 2
0b01001111, // 3

draw them out, easier to visualize