I have a current project that has an array of LEDs (over 200). They're arranged in a matrix in rows and columns. It's all controlled by a Nano.
They are connected thus,
The Row Select and Column Select go to Arduino pins. My question is with regard to turning off the top transistor, When the Arduino pin is high or tristated then (assuming protection diodes) will effectively be at 5V and keep the transistor on. Does anyone have experience of this? Will putting a 7V zener in series with R1 fix it. Any other suggestions?
The obvious way to fix it is to use an NPN but that upsets the logic - both outputs high rather than one high, one low. As this is for education I want to keep the logic (what I consider) logical. I know I could add a second NPN to the Row transistor but that adds two more transistors and my board is already a little cramped.
Thanks,
Whoops, forgot (above only - not in my schematic) the current limiting resistor in series with the LEDs.
"digital transistor" or " Pre-Biased Transistor" These save board space.
Here are two in one package.
I have used these for getting from the micro to the 12V for the top side transistor. PNP & NPN
I eventually bit the bullet and added the inverting bits so that Row select has to be low and col select high. Thus,
Fitting a couple of additional SOT 23-3s wasn't too difficult.
I know doing it in software would be trivial but explaining an LED matrix is much easier when you have a high and a low.
I think the base of Q3 should be pulled up to 12v with a resistor (47k) so that it doesn't float when Q1 is off.
Also, might need to pull down the gates of Q1 and Q2 as they may float at boot up (port changes to tri-state at boot-up?)
I don't really see why you need Q2. You could drive Q4 from the Arduino output via resistor.
A resistor to ground from the base would be a good idea, but it's probably not necessary. When the Arduino is running, and the row select output is low, that will pull the base down anyhow. During start up, there will only be, at most, a tiny leakage current through the LEDs if there is no pull-down resistor.
I like that. An elegant solution, that can still be explained as a simple LED matrix. Levels still reversed - high on row select to turn on the ground connection but still a valid matrix explanation doable.
To assure a quick and clean turn-off, Q3 needs a resistor from the base to the emitter. If Q2 goes back to being a bipolar part, it also will need one.
To eliminate Q1, add a 7.5 V zener diode in series with R2, and drive the zener with the Col Select signal.
To assure a quick and clean turn-off, Q3 needs a resistor from the base to the emitter. If Q2 goes back to being a bipolar part, it also will need one.
Q3 yes, Q2 no - Q2 base would be taken low by the I/O pin and feed resistor (in the case of a bipolar) - in fact if left floating it would be much more troublesome with an FET.