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.

LED Grid Display project

Status
Not open for further replies.

Peepsalot

Member
I'm planning a project consisting of a PIC controlled 16x16 array of LEDs. The implementation I have in mind displays one row at a time, giving the LEDs a high power(100ma) pulse at 1/16th duty cycle.

This is my first PIC project, and the part that I'm unclear on is what components are needed to convert logic signal to significant power signals.

I'm thinking I will need 32 "switches" basically, that will be powered by shift register outputs, 16 for the rows and 16 for the columns.

I've seen a chip that has 8 darlingtons on it(ULN2803A 8-Darlington array 50V 500 mA 18-DIP), could that be a decent choice? Or a bunch of SCR's? Or could I use singular transistors to handle this, or solid state relays or what? The more I look into my options, the more confused I become. I'm more of a programming guy, trying to learn this EE stuff.
 
Peepsalot said:
I've seen a chip that has 8 darlingtons on it(ULN2803A 8-Darlington array 50V 500 mA 18-DIP), could that be a decent choice? Or a bunch of SCR's? Or could I use singular transistors to handle this, or solid state relays or what? The more I look into my options, the more confused I become. I'm more of a programming guy, trying to learn this EE stuff.
u could use the ic or single transistor -do remember the maximum current capacity. also have a search on multiplexed display.
 
Well, i found this schematic linked from a thread on this forum:
http://www.armory.com/~spcecdt/electronics/LED_matrix/LED_matrix_schem.gif

Looks like basically darlingtons, but half of them are pnp and half are npn. Is it still called a Darlington if it is PNP, and is there a similar chip? The pnp end would need to handle current spikes up to 1.6A (16x100ma) though, at 1/16th duty cycle.

How do circuit designers do all this component selection? Do you pore over thousands of data sheets until you find the right component or what? Is there a cheat sheet anywhere of commonly used components that are good for general purpose, so I'm not looking into every transistor under the sun? I go on mouser or digikey and the selection is overwhelming.
 
Well, they aren't descrete darlingtons. The link shows they are 2n3906 and 2n2222 transistors setup in a darlington array. These are cheap popular small signal transistors.

I'm not all that great at this, but with this type of low frequency digital switching, I think all you are really worried about is the power handling. I think the ULN darlington chips would be a good choice.
 
Ok, I'm still a bit lost. I can't use the exact schematic of 2n2222 and 2n3906 because they are not rated for enough power. I have figured out what LEDs I will be using, and I know their power ratings, so I'm now going to try for a little more power than originally planned: pulsing 160ma to each LED. That means the power switching for the rows will have to handle 160ma continous, and the columns will have to handle 2560ma pulsed at 1/16 duty cycle (or vice versa, however i wire rows/columns). Not all the spec sheets specify exactly, but it doesn't seem that power handling rises perfectly with the inverse of the duty cycle. For example, correct me if I'm wrong, but I think 1/16th duty cycle doesn't necessarily mean you can pulse 16x current in most cases. It seems hard to find a switching device that will handle peak 2560ma, and at a reasonably low cost.

I was reading up last night on power switching and it seems mosfets are very well suited for my application. I like that they supposedly have very little voltage drop when switched fully on, as opposed to darlingtons which as I understand they generally drop almost 3 volts or so? With a small votage drop I think it could also help simplify my circuit as I might be able to run the PIC and display off the same 5v power supply. It seems they generally do not come cheap for the power levels I need.

Total cost of this circuit is a big issue, I want to keep it as low as possible. I might be wanting to make multiple of these if the project turns out well. I'd like to get whatever cheapest components are capable of handling the load. The second driving factor in my design is to keep the overall circuit complexity and number of components as low as possible, to make things easier on myself when putting everything together.
 
Peepsalot said:
How do circuit designers do all this component selection? Do you pore over thousands of data sheets until you find the right component or what? Is there a cheat sheet anywhere of commonly used components that are good for general purpose, so I'm not looking into every transistor under the sun? I go on mouser or digikey and the selection is overwhelming.

I use Digikey because they have a pretty good parametric search engine. I narrow down my specs to things like max voltage and max current and then do a basic search for transistor or mosfet. Once the appropriate menu comes up, I put in my specific criteria and start whittling down the options. Eventually you get to a page or two of options which can usually be made even smaller by excluding the ones that are very expensive (unless you are looking for that) or sold in large quantity only. I then skim through the datasheets of the ones that look promising.
 
For larger switching I usually use TIP power darlingtons. They are about 50 cents on mouser.com.

The datasheet gives info on the current each type can switch. The blurb at the top references the PNP equivelants.

**broken link removed**

They might be overkill for your needs, though.
 
How do I know what the voltage drop from collector to emitter is? I don't think I see it on there, but I don't understand a lot of those values anyways.

Also, looks like TO-92 and TO-220 are very popular transistor packages, is there a commonly found package size that is inbetween those two? I'm starting to actually recognize all these crazy letter and numbers, hah.
 
Are you going to be making a printed circuit board for this project? If you are, that opens up a number of options for surface mount mosfets.

Here is one that may work for you:
https://www.fairchildsemi.com/pf/FD/FDN359AN.html

This particular mosfet handles 30V and 2.7A while using a logic level gate. A logic level gate means you can drive it directly from your microcontroller because it doesn't require a 10+ volt gate-source voltage to turn completely on. For instance, this mosfet has an RDS (resistance when turned on) of 0.06 ohms with a gate voltage of 4.5V. That means you will only be dropping about 0.16V when running at your maximum current of 2.6A. If you read the datasheet, you will see that for pulsed current, this mosfet can handle a lot more than 2.6A if the duty cycle is right.

It comes in a SOT-23 package which is small so you can use a lot of them in a tight area. They are also readily available on Digikey.
 
Peepsalot said:
How do I know what the voltage drop from collector to emitter is? I don't think I see it on there, but I don't understand a lot of those values anyways.

It varies a great deal, depending on the exact conditions, darlingtons have an exceptionally high voltage drop, due to being two transistors. Using a pair of discrete trransistors you can make a FAR better performing darlington.
 
phalanx said:
Are you going to be making a printed circuit board for this project? If you are, that opens up a number of options for surface mount mosfets.

Here is one that may work for you:
https://www.fairchildsemi.com/pf/FD/FDN359AN.html

This particular mosfet handles 30V and 2.7A while using a logic level gate. A logic level gate means you can drive it directly from your microcontroller because it doesn't require a 10+ volt gate-source voltage to turn completely on. For instance, this mosfet has an RDS (resistance when turned on) of 0.06 ohms with a gate voltage of 4.5V. That means you will only be dropping about 0.16V when running at your maximum current of 2.6A. If you read the datasheet, you will see that for pulsed current, this mosfet can handle a lot more than 2.6A if the duty cycle is right.

It comes in a SOT-23 package which is small so you can use a lot of them in a tight area. They are also readily available on Digikey.
I think I will eventually make a PCB, but I was planning on testing this with a solderless breadboard first, in case my design needs any changes. So I guess the prototype couldn't use surface mounts like this, or is there some trick that allows you to do such things? Also, I've never tried to solder a surface mount.
 
Nigel Goodwin said:
Peepsalot said:
How do I know what the voltage drop from collector to emitter is? I don't think I see it on there, but I don't understand a lot of those values anyways.

It varies a great deal, depending on the exact conditions, darlingtons have an exceptionally high voltage drop, due to being two transistors. Using a pair of discrete trransistors you can make a FAR better performing darlington.
I've read this about the voltage drop being high for Darlingtons, and I believe you when you say it, but I don't understand why. It seems like the voltage drop would just be whatever it is across the second transistor only. I guess I still don't understand how transistors work. I'll just call them "little voodoo boxes" from now on. :lol:
 
Peepsalot said:
I've read this about the voltage drop being high for Darlingtons, and I believe you when you say it, but I don't understand why. It seems like the voltage drop would just be whatever it is across the second transistor only. I guess I still don't understand how transistors work. I'll just call them "little voodoo boxes" from now on. :lol:

Conventional darlingtons have the collectors joined together, so the collector has to be high enough to not only provide enough voltage for the Vbe drop of the output transistor (0.7V or so) but also the Vce drop of the first transistor, plus be high enough to pump enough current into the output transistor base to try and turn it hard ON.

If you split the collectors, and feed the first transistor collector from a higher voltage, via a current limiting resistor, you can over come these problems (but it's not a three pin darlington any more!).

Also, by making the darlington from mixed NPN and PNP you can create a 'better' darlington, named a 'Sziklai' after it's inventor.
 
So, is it possible to just make this powering circuit with only n-channel mosfets? It seems like it would be, but I'm pretty bad at this.

Man, I gotta order some parts and start testing some circuits before I go nuts.

I just had an idea to add a D latch and a counter chip and I think I can make this grid have just a 2 pin interface, clock and data. :shock: The logic design is fun, but the power switching is killing me.

Speaking of power, does someone have good suggestions for a power supply for all this? Would it be possible/recommendable to run the display and PIC off the same supply? I would prefer just one power supply circuit for simplicity sake. BTW, I want it to run from AC outlet power.

I just realized most of the discussion in this thread has nothing to do with PICs, probably should have posted it in another section. Sorry.
 
Peepsalot said:
So, is it possible to just make this powering circuit with only n-channel mosfets? It seems like it would be, but I'm pretty bad at this.

It's possible, but it's much better (and simpler) to use both P and N versions.
 
Perhaps a IC from TI's TPIC series would be of use...(perhaps not :shrug:) There are some that have integrated (sorta) 595's with 2803's and such. I remember seeing one with a I2C interface (if that's an option for you)... Goto TI's website and search for TPIC...

Rick
 
why not try the 2803 ... they've dirt cheap and available in big DIP package, for your breadboard.

despite all the negative posts about mass produced darlingtons, the 2803 is the chip to use for a lot of LED matrix applications.

to make things easier on you, Micrel has combined the 2803 with a serial shift register, so it would save space and complexity on your pcb / breadboard:

**broken link removed**

alternately, you could check out Maxim's line of SPI and I2C led drivers, some of them can handle decent amounts of power.
 
Well, like I mentioned before, it doesn't look like the 2803 can handle the load for 16LEDs at once. Also, I think I need a PNP version in addition to the 2803, and I don't know what chip that would be.

I'm still trying to grasp why both PNP and NPN devices are needed. It all confuses the crap out of me. I can never remember which one is an emitter, collector, cathode, anode, this one inverts the output, this one can only output high, pull up, pull down, open collector, agh.
 
you need two uln2803, 8 + 8 = 16 ... each port can sink 500ma, you could have a row of 16 luxeon i's and the 2803 could handle it.

the reason you need pnp and npn is pnp for the high side, and npn for the low side.

npn would sink your cathode (row or column?) and the pnp would source for the other side

lets say the array is cathode column (most common) ... so you have your two uln2803's controlled by shift registers, sinking current for your columns... now you need 16 PNP darlingtons or PChan mosfets to source current, one for each row. the row sources need to be beefy enough to handle 16 columns, so if its a common 20ma matrix, you need to source at most (16*20) 320ma per row... might be able to get away with a non darlington there or I would use a small mosfet

you shift out whatever data you have to your columns, and then you turn one one row at a time (scanning), then reset the columns, and repeat

actually with that setup, you might not need the 2803's, since the most a single column will sink at one instant will be 20ma - most shift registers handle can sink 50 to 70ma per port
 
i'm going to try to pulse 160mA (10mA average over time per LED), so yeah the rows will need to handle 160ma continous, and the columns will need to handle maximum pulses of 2560mA at 1/16th duty cycle.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top