Transistor Controlled 6x6 LED Matrix

Just a quick question,

I have made a Matrix as below:

Bigger version: http://obr-recording.co.uk/Arduino/BIG.png
Edit: Connections are marked by a small black square on the crossing.

The resistors are not 1k! I just put the schematic into the package for posting here. The Transistor base resistors are 120R connected to Arduino digital IO pins; and all others (in the matrix) are 82R.

The matrix works fine, but I found if i remove 5V from the collectors of the top transistors, i.e. turn off my external PSU, the matrix still runs and is presumably driven from the Arduino.

I assumed the transistor would merely be acting as a switch, switching power to the anodes, and the second set of transistors would be switching ground to the cathodes?

Dean

Yes, current into the Base of the top NPN will flow out of the emitter and power the LEDs. It add to the current coming from the collector.

So is the Arduino protected from the 5V supply?
If i upped it to 25V in another application would I risk causing damage?

So is the Arduino protected from the 5V supply?

Not sure what you mean, the arduino runs from 5V so it is a bit of a waste of time protecting it from 5V or else it wouldn't work.

If i upped it to 25V

If you connected that circuit to 25V it would not work because of the way you have NPN transistors switching the +ve power in an emitter follower configuration. These should be PNP transistors.
Also 120R is way too low to have as a base resistor.

I guess I worded that badly, I meant should I have an equivalent transistor set up to control a different circuit which has a 25V supply would the Arduino be protected from the 25V, but as you say they should be PNPs anyway I guess the question is invalid.
In a circuit running from 25V with PNPs rather than NPNs would the Arduino be protected?

Also 120R is way too low to have as a base resistor.

Is that in the general case, as it is wired at the moment? what would be a more appropriate value?

I would think 120 ohm would be fine.
As is, you have ~0.7V across the cathode transistor Vce, say 1.5V across the diode, and 0.7 across the anode transistor Vbe, plus whatever is developed across the transistors. So the anode transisitor base can't go lower then ~2.9V. (5V from arduino pin - 2.9V at anode transistor base)/120 = 17.5mA.
You could measure the voltage across your resistor, or put your multimeter in mA mode and put it series, and confirm.

Why would you want a 25V supply? You will just dissipate a lot of voltage across the resistors then. 5V is plenty. Take some measurements across your parts, 3.3V might be enough even.

As you've seen, the top transistors are not even needed - you can use the Arduino output to control the current out. Only 1 LED in each column is on at 1 time if you are multiplexing. You need the cathode transistors to sink the current from multiple LEDs being on in a row. Keep the resistor feeding the anode, ditch the resistors on the cathodes.

I am using this board to learn how to multiplex properly on the software side.

I am in the process of building a clock using 7 Segment Nixie tubes. Hence the 25V requirement.

http://www.tube-tester.com/sites/nixie/dat_arch/IV-11_2.pdf

I started off using BCD 7 Seg drivers which was fine, but I would like to be able to control the segments from the code to display patterns etc.
So I decided to learn how to multiplex properly first, but with my end goal in mind which is why I had transistors everywhere.

Dean