I'm trying to drive a matrix of 8x8 LED strips on 12 V
I'm having problems with the implementation and I'm not sure if it is the schematic or the implementation.
Can you advise if the following schematic is a functional one?
Circuit looks fine to me. Obviously your "LEDs" are strips including the current limiting resistors. Sounds like the correct FETs, though I haven't checked their specs in detail.
int latchPin = 7; //Pin connected to ST_CP of 1st 74595
int clockPin = 8; //Pin connected to SH_CP of 1st 74595
int dataPin = 9; //Pin connected to DS of 1st 74595
byte col = 1;
byte row = 1;
void setup() {
//set pins to output so you can control the shift register
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
}
void loop() {
if (col == 0) {col =1; row = row << 1;}
if (row == 0) row = 1;
col = col << 1;
// take the latchPin low so the LEDs don't change while you're sending in bits:
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, row);
shiftOut(dataPin, clockPin, MSBFIRST, col);
// shift out the bits:
digitalWrite(latchPin, HIGH);
/********** Send LOW to all Cathode pins of LED matrix **********/
delay(500);
}
My problem is that the leds are lit like there is a short somewhere. Event that the code is supposed to lit one at the time. It lits severals ans some are not 100% lit.
I wanted to be sure that this chematic does not have any design issues.
The 10k pull-down resistors on the N channel FETS must not connect to the gates, they must connect to the output of the 74HC595s. (You are using HC series of course, aren't you?)
I think in a roundabout way, this is what CrossRoads meant.
However, this fault explains more a failure to turn LEDs on than off.
You haven't accidentally connected them as pull-ups instead of pull-downs, have you?
The 10K pulldowns are fine, but with 10K on the gate that voltage only goes to 2.5V.
With 10K on the NPN, only 0.4mA goes into the base.
Nothing to do with speed, but about turning on/off the transistors fully.
That's better. You could lose the 10K pulldowns altogether, they are needed when the signal driving them can be inactive, like an arduino output during reset. With 74HC595 and its OE/ tied low, the gate is always driven high or low, so the pulldown is not needed.