Having trouble controlling 3 Row Seven Segment with 4 shift register 74hc595


If anyone could give me some advise or example code that would be great.

I am using a custom 16 digit seven segment with 4 shift register 74hc595 for 3 rows

I am having trouble with the controlling each digits.

Thank you for your help!

You built the PCB before you verified that your circuit would work?

no. I bought it, at online store 3 months ago, the seller does not provide complete data sheets and the libraries. please give me solution.

the PCB have a 5pins to arduino. VCC - R - C - S - Gnd

No clue, and don't want to bother.

|500x281 |500x281

You should contact the vendor. If they do not have any code, perhaps they will have a data sheet or at least a schematic.

Can you see any codes/part numbers on the sides of the digits? Or the transistors?

I should warn you, it looks like it was designed by someone who is not very expert. There are no bypass caps for the chips, for example, and no reservoir caps. These could be added, if you can solder reasonably well.

thanks @PaulRB for ur respon. maybe this is custom part or clone from original modul.

can you give me a sample code for controling a multi seven segment 7 digit?

zifank: can you give me a sample code for controling a multi seven segment 7 digit?

Yes, I could easily give you some example code. But it would be pointless. I know it would not work. Code has to be written to exactly match the hardware. I have never seen your hardware before.

If you can get no help from the seller, you can do some "reverse engineering". Identify the components from their part numbers. Trace the tracks on the PCB. Make your own schematic diagram. From that, you can write some code. We can help with some stages of that process. But you have to start, because you have the hardware in front of you.

Looking closely at the board, this is what I believe I can see and guess. There are 4 chips. It would make sense if they are 74xx595 shift registers as you say. The chip closet to the connector drives 6 transistors which in turn drive the commons for the digits in that column. The other 3 shift registers drive the segments for the digits in the 3 rows, via current limiting resistors. The 4 shift registers must be "daisy-chained", given there are only 5 pins on the connector, including power and ground. I would guess that S=Serial data, C=Clock and R=latch.

The code must perform the multiplexing, sending 3 bytes of segment data and 1 byte to select the digit column, and lighting one column of digits at a time. The most important answers you need to find out, I believe, are the digits common anode or common cathode and are the transistors NPN or PNP (or are they FETs). The part numbers written on the displays and transistors may help answer those questions.

you are the the "rock" master @PaulRB, u bright my day... :)

the digits as common cathode, the transistor is PNP

zifank: the digits as common cathode, the transistor is PNP

Are you sure? How do you know? The transistors appear to be connected to the digit common pins. If the digits are common cathode, I would have expected NPN transistors. For common anode, I would expect PNP.

i test one transistor with multimeter, and the result is PNP, but for the digits i’m not sure.

sorry my bad, the 7 segment is SM4112 and work common anode

And two LEDs per segment. Do you know what colour the LEDs are? I wonder if a 5V supply will be enough.

The color is RED, yes. i used 9volt supply

zifank: i used 9volt supply

Used it for what? You could damage components by applying too high a voltage. What kind of 9V supply did you use and what was the result?

the power is POWER SUPPLY Adapter 9V 1A for arduino. and the result is it's brighter than I use under 9volt, the power is not problem right now, but i still confused to get columns and rows.

this my result and the unfinished codes

int latchPin = 10;
int clockPin = 9;
int dataPin = 8;

// digits from the right
const byte digit[10] =      //seven segment digits in bits
  B10000001,  // 0
  B11110011,  // 1
  B01001001,  // 2
  B01100001,  // 3
  B00110011,  // 4
  B00100101,  // 5
  B00000101,  // 6
  B11110001,  // 7
  B00000001,  // 8  fix
  B00100001,  // 9

void setup()
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);

void loop()
  // step through each digit then increment
  // the counter by one, until nine
  for (int j = 0; j < 10; j++) {
    updateShiftRegister(0, j);

void updateShiftRegister(int col, int num)
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, B00000101);
  shiftOut(dataPin, clockPin, MSBFIRST, digit[num]);
  digitalWrite(latchPin, HIGH);

SevenSegment.ino (888 Bytes)

zifank: the result is it's brighter than I use under 9volt

The only way to supply power to the board is through the connector. The connector supplies power to the 74hc595 chips directly. The maximum voltage of those chips is 6V. By connecting a 9V supply, you may have damaged the chips. If you want my continued help, explain what else you have done that you have not already described. I do not wish to waste my time writing code for a board that is already damaged.

zifank: this may result and the unfinishing code

Please try to speak better English, I did not understand what you just said. Please post any code correctly, according to form guidelines in the sticky post.

this is the seven segment picture with 9volt, sorry, I have not explained that 9 volts I share with lcd and other devices.

P_20180311_030256_1 (1).jpg|524x932