Go Down

Topic: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 (Read 43787 times) previous topic - next topic

dc42


Seems to be a logic level part
http://www.irf.com/product-info/datasheets/data/irf9540n.pdf


No, it is most definitely not a logic level part. Rds(on) is quoted at Vgs=10V only. It might just work @ 1.28A, it depends on whether the part you get has a higher or lower than normal gate threshold voltage, whether the 5V supply is a little higher or lower than normal, and on the temperature. Bad choice for this project.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

I see... too bad :(
Regardless, the previous line of thought regarding the calculation of the current limiting resistors for the LEDs has opened my eyes to an important fact: no matter what component here, the current passing through it will greatly vary (from 0.02A to 1.28A), which means that its voltage drop may also significantly vary. That means that if only a few LEDs are lit up, they will be brighter compared to the case when most of them are lit up. That's not good. In a LED cube all LEDs should have the same brightness. Inevitably, the question that comes to mind is: why are we trying to use 8 MOSFETS to switch the cathodes instead of using 64 simple transistors to switch the anodes? Wouldn't that be more simple and more cheap? Sure, they would take up more space, but we could use ICs like the ULN2803, which groups them by 8. Or am I wrong?

Thanks,
Andras
Andras
http://iqjar.com

dc42


no matter what component here, the current passing through it will greatly vary (from 0.02A to 1.28A), which means that its voltage drop may also significantly vary


The key is to use a mosfet with low Rds(on). The voltage drop across the mosfet will then be so low that it will be insignificant compared with the voltage drop across the series resistor. For example:

NDP6020P: Rds(on) = 0.05 ohm max @ Vgs = 4.5V, hence voltage drop @ 1.28A = 0.064V

AO3401: Rds(on) = 0.06 ohm max @ Vgs = 4.5V, hence voltage drop @ 1.28A = 0.077V

In both cases, the voltage drop is tiny compared with the voltage drop across the series resistors (between 1V and 3V depending on the voltage drop of your LEDs), so you needn't worry about the brightness decreasing due to mosfet resistance as you turn on more LEDs.

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

I understand. Well then, it seems that I've got two choices: buy some NDP6020P or accept that I need to use SMDs :)
Andras
http://iqjar.com

CrossRoads

http://www.fairchildsemi.com/ds/ND/NDB6020P.pdf

The voltages I used earlier were just something to show the calculations needed.
Glad it led to a discussion of the datasheet so you have a better idea if what to look for.
I have not seen arrays of P-channel MOSFETs.
Only a PNP part like this
http://www.digikey.com/product-detail/en/MIC5822YN/576-2400-ND/1031176
You'd have to break out the anodes into groups so the part is not over driven.

There are several kinds, search digikey.com for
PMIC - MOSFET, Bridge Drivers - Internal Switch
and sort by package type, # of channels/chip.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Hippynerd



Seems to be a logic level part
http://www.irf.com/product-info/datasheets/data/irf9540n.pdf


No, it is most definitely not a logic level part. Rds(on) is quoted at Vgs=10V only. It might just work @ 1.28A, it depends on whether the part you get has a higher or lower than normal gate threshold voltage, whether the 5V supply is a little higher or lower than normal, and on the temperature. Bad choice for this project.


heh, well, I guess I have 10 of them I wont be able to use. I wish someone had posted something like that in my thread a few weeks ago when I asked. nobody posted anything one way or another, so i looked around at parts that I could order, and those seemed like the right option, but I guess I should get some of the ones you posted earlier.

If I do some 12v stuff (like putting LEDs on cars), would the be good for that?
https://sites.google.com/site/rgbledcubes

dc42


If I do some 12v stuff (like putting LEDs on cars), would the be good for that?


Yes, if you give them 10V or 12V gate drive. With 5V gate drive they will probably be OK for switching up to about 1A.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Hippynerd

Based on what i've read around here, it sounded like the RDS was the key issue when picking a mosfet, that and one big enough to handle the current. which was the criteria I used when looking for mosfets. Its like LED drivers, there are an overwhelming amount of options, and precious little information about why one would be good or bad for something.

So, what factors do you need to know to pick the right mosfet?

RDS, VGS? ??? ???
Are there any good websites that might help learn, and or pick out a good part? How about one for LED drivers, that sure would be nice!
https://sites.google.com/site/rgbledcubes

dc42

First, determine the maximum value of Rds(on) that you can accept. This is typically determined by the maximum current you will be switching, and the power dissipation in the mosfet that you can accept. Unless the current is very high, then you will normally want to design for no heatsink. In this case I suggest limiting the power dissipation to 1W for a TO-220 mosfet, or 0.5W for one in a smaller package (but check the datasheet in case it is lower). Use lower values if ventilation will be poor, e.g. in a sealed box. Since the static power dissipation is I ^ 2 * R, you have Rmax = Pmax/I^2.

Now look for mosfets which have Rds(on) no higher than that value, specified at the gate-source voltage (Vgs) you will be using or lower, and the maximum current you will be using or higher. Also the drain-source (Vds) rating needs to be high enough for your application.

When using mosfets for low speed switching applications, that's usually all there is to it. In this particular example, there is an additional consideration that Rds(on) should be low enough such that the voltage drop across the mosfet does not cause the brightness of the LEDs to decrease significantly as more LEDs are turned on.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Hippynerd

Thanks for that explanation, its a bit difficult to understand, since I have no idea of how much I can accept of several factors. It would be nice to have a table of applications, and specific parts with specific details that were easily compared to other parts. Watt/package size is a nice relationship, that seems easy enough to factor.

Lets use 20 mA x 64 LED as an example. Assuming its running on 5v, using constant current driver to sink, (that sounds like the direction he is heading), it should use up to 1.28A. With this design, he is only doing 12.5% duty cycle. How do we apply the math to figure out what specific specifications to look for, and ranges maybe? It seems like a simple table would be easy enough to make.
https://sites.google.com/site/rgbledcubes

dc42


Lets use 20 mA x 64 LED as an example. Assuming its running on 5v, using constant current driver to sink, (that sounds like the direction he is heading), it should use up to 1.28A. With this design, he is only doing 12.5% duty cycle. How do we apply the math to figure out what specific specifications to look for, and ranges maybe? It seems like a simple table would be easy enough to make.


Let's look at power dissipation first. If we assume that the software works so that the 1/8 duty cycle won't be exceeded, and we go for 0.5W maximum power dissipation in the mosfet, then the dissipation while the mosfet is conducting can be up to 8 * 0.5W = 4W. So we need Rds(on) <= 4/(1.28 * 1.28) = 2.4 ohms.

However, the voltage drop would then be 2.4 * 1.28 = 3.1V, and we certainly can't tolerate that in a LED driver running from a 5V supply as there wouldn't be enough voltage left to drive the LEDs and series resistors. So in this case, maximum Rds(on) is determined by maximum allowable voltage drop. If we were not concerned about the LEDs getting dimmer as more are turned on, we might allow 0.5V, allowing Rds(on) of up to about 0.4 ohms.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

CrossRoads

I search for MOSFETs like this at digikey.com:

x-channel mosfet (P or N)
in stock
Fets-single
logic level
thru hole (for prototyping anyway)
sort by price (click on unit price)

scroll down past the 1,000 qty min buy parts to  the 1-lot, looking for a low Rds part,
which usually puts me at the start of the TO220 type parts.
Then I check to make sure the gate capacitance isn't ridiculous.

Right now, that search puts me at these two parts
p-channel - small list of parts, just 12 choices
http://www.digikey.com/product-detail/en/NDP6020P/NDP6020P-ND/1055922

n-channel, 18 pages of parts
after the price sort, right on the first page
http://www.digikey.com/product-detail/en/NTD5867NL-1G/NTD5867NL-1GOS-ND/2401422
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Very nice explanation dc42! Now I understand why I need the MOSFETS that I need.
I bought the NDP620Ps from Farnell in the end: http://ro.farnell.com/jsp/search/productdetail.jsp?sku=1017724

In the datahsheet we can see this:
"Features
-24 A, -20 V. RDS(ON) = 0.05 W @ VGS= -4.5 V.
                  RDS(ON) = 0.07W @ VGS= -2.7 V.
                  RDS(ON) = 0.075 W @ VGS= -2.5 V."

I hope that's good news. What confuses me is that you used Ohms for the unit of Rds(on) and the datahseet uses Watts. But I guess V=I*R and W=I*V, so W = V/R*V = R. W=R ?!
Andras
http://iqjar.com

CrossRoads

Data sheet says 0.05 ohm, right on page 1.
http://www.fairchildsemi.com/ds/ND/NDP6020P.pdf
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

dc42

When I look at the datasheet, the characters that you describe as W are Greek omega-characters.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up