Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Will I be able to turn them off?

Status
Not open for further replies.

Pommie

Well-Known Member
Most Helpful Member
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,
matrix.png

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.

Mike.
 
Last edited:
Add an NPN driving the top transistor, and reverse the logic on those lines - it's trivial to do - just define a suitable word to do it, such as:

#define col_on 1

or

#define col_off 0

You could also use col_high or col_low (or anything you want), in order to make it more apparent for the pupils.

You could also define the same for row_on as well, as it makes it simple to make changes later (altering one define changes all relevant pins).

A resistor base to emitter on Q1 would be a good idea as well.
 
You can use a 10v zener to shut off a PNP high side switch with logic level controls.
 
I eventually bit the bullet and added the inverting bits so that Row select has to be low and col select high. Thus,
LEDs.png

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.

Mike.
 
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.
 
If you don't want to invert the signal, you can use a transistor as a level-translator, see below:
noinvert.jpg
 
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.

Thanks,

Mike.
 
I eventually bit the bullet and added the inverting bits so that Row select has to be low and col select high.
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.

ak
 
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.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top