Remember, you've got a lot of wires in close proximity. There is going to be capacitive and inductive coupling between them. Didn't you say there was some correlation between taking out the switching delay and the problem getting worse? Transistors can have a lot of gain at low current, and it doesn't take much current to light up an LED enough to see it.There is also the matter of Collector to Base capacitance. So switching the voltage on a transistor Collector with the Base unconnected can cause a short burst of current to flow.You should be able to simply connect a resistor from the Arduino pins to ground. Fairly simple to add.
I'd solder them as close to the transistor as possible, but most important is to have them in there.I'm assuming you have built a test setup, which often means sloppy wiring.That again doesn't help preventing interference.If you have 10K resistors available, you could consider putting 2 of those in series to get 20K and be closer to Mike's value (remember that is based on his extensive experience).If you are asking for help, try to do what what the helping answer is telling you instead of doing something similar but not the same.After your problem has been solved, you could try your alternative to see if that would work as well.
Looking at that circuit, I think it is inevitable that you will get spurious low-intensity illumination when using RGB LEDs. In order to not get any spurious illumination, it is necessary that for any 2 LEDs in the matrix, where the cathode line of one is driven by the same pin as the anode line of the other, the forward voltage at low current plus approximately 1.2V must be less than the supply voltage. If you have two red LEDs connected in this configuration, then it is unlikely that you will have met that condition. Even one red and one green might not meet that condition. This type of problem is mentioned at http://en.wikipedia.org/wiki/Charlieplexing.If this is the cause of the spurious illumination, then I think you should find that when you only light up green and blue LEDs, the only spurious illumination comes from red LEDs; and that lighting up red LEDs causes more spurious illumination.A possible fix (you're not going to like this) would be to add a 1N4148 or similar silicon diode in series with every red LED in the matrix, to increase the effective forward voltage of the red LEDs.
The thing that confuses me is that per column , the common anode and each cathode are completely seperated. The wiki example follows a different logic by taking advantage of the voltage drops. I don't get how a led can illuminate without supplying it's anode with a voltage AND diving it's cathode to ground.
Quote from: Vinter on Aug 20, 2013, 12:07 pmThe thing that confuses me is that per column , the common anode and each cathode are completely seperated. The wiki example follows a different logic by taking advantage of the voltage drops. I don't get how a led can illuminate without supplying it's anode with a voltage AND diving it's cathode to ground. The current path is this:Active high pin -> transistor base -> transistor emitter -> LED and resistor -> floating pin -> transistor base -> transistor emitter -> LED and resistor > active low pin.Total voltage drop = 2 LED drops + 2 emitter-follower transistor drops + resistor drops.It's also possible that capacitive pickup on the wires attached to the output pins is causing the problem, as has already been suggested. The problem with a pulldown resistor to ground is that it will pass current to the cathode lines, causing the LEDs to light up a little. To avoid that, you could try using higher value pulldown resistors (e.g. 100K), or using both pullup and pulldown resistors, e.g. 22K to ground and 27K or 33K to +5V.
Isn't the path output high pin -> transistor base and then collector -> led and resistor -> output LOW pin.
Why would the current go to the high impedance input pins ?
Quote from: Vinter on Aug 20, 2013, 12:20 pmIsn't the path output high pin -> transistor base and then collector -> led and resistor -> output LOW pin.Yes, when I said base->emitter I was meaning that the base current causes an emitter current, most of which which actually comes from the collector. Sorry if I wasn't clear.Quote from: Vinter on Aug 20, 2013, 12:20 pmWhy would the current go to the high impedance input pins ?It doesn't go into the input pins. It goes from the cathode resistor to the base of the transistor that is connected to the same pin.
Doesn't there have to be a ground for the current to flow ?