Max number/current of PWM outputs from one Arduino MEGA? - LED lighting project

Hi guys, would very much appreciate some advice before moving on and purchasing components.

For an RGB room lighting project I will be driving 5 analog RGB LED strips (12V 6A max load), by using all 15 PWM outputs (5 LED strips x 3 channels) on the MEGA2560. I'm looking to go by most of the instructions online and use TIP120 transistors, 15 of them, along with 2.2K resistors from Arduino to the transistor bases/collectors.

Even with the resistors in place would this still create a current overload from the Arduino, supposing there will be full PWM load on all 15 pins?

I've tried and failed to work it out from the TIP120 Datasheet, which is here: http://www.adafruit.com/datasheets/TIP120.pdf

Has anyone had such problems from pushing all the PWMs like this?

Otherwise I am fairly confident with the rest of the setup, including having a good 12v power supply to power Arduino and LED strips together. (I would guess heatsinking the Arduino's onboard power regulator would be a good idea?)

Are there any other problems I haven't considered that you could foresee with the project?

What's the peak output current per pin and in total across all the pwm pins?

Well I have found this in a tutorial involving the transistor which helps answer the problem:

"Next we check the base current. Again this is indicated in Figure 2, but this time Ic=250 * Ib or our collector current of 1.25 A requires a base current of 5 mA (5 * 250 = 1250), which is well below the maximum of 40 mA the Arduino can put out."

So I take it just 5mA at 5V would be sufficient to trigger the transistor? I have read that the total current sourced from all I/O pins must not exceed 200mA, so that should be comfortably within the limit using the right resistors.

However, would an N-channel Mosfet be a better, more efficient choice than the NP120 for this job? Such as this: http://uk.mouser.com/ProductDetail/STMicroelectronics/STP16NF06L/?qs=RC432zO33OqodrhO5g7gPg==

Does anyone know of a MOSFET that could continuously supply 12v 6A from a 10mA Arduino output (as all PWM pins are outputting 150mA total)?

Does any component with that capability even exist?

MOSFET are voltage controlled devices, not current controlled.
'328Ps 40mA output can drive them no problem. What you need to watch out for is the Gate Capacitance - which looks like a temporary short as the cap charges up. Put a 150 ohm resistor in series to limit current into it, and then a 10K pulldown to Gnd to keep the N-channel MOSFET off when the Arduino goes thru reset and the IO is floating.

Search digikey for an appropriate 12V/6A MOSFET.
My usual method, filtering as I go (and I think digikey has the best filtering for this):
N-channel mosfet
FETS - Single
Instock
Logic Level Gate
through hole or surface mount
sort by cost - browse for a low Rds part with low gate capacitance that can do the voltage/current you want, at an affordable cost.

http://www.digikey.com/product-search/en?FV=fff40015%2Cfff8007d%2C1140050%2Cefc0005&k=n-channel+mosfet&mnonly=0&newproducts=0&ColumnSort=1000011&page=1&stock=1&pbfree=0&rohs=0&quantity=&ptm=0&fid=0&pageSize=25

Doing that, this part pops out on the first page for thru hole parts
http://www.digikey.com/product-detail/en/AOI508/785-1457-5-ND/3603372

If you can’t order from Digikey, try the same sorting methodology in whatever online source you are using.

The part you found looks pretty good also, however:
At 6A, its .07ohm on-resistance means the part will be dissipating P=I^2R = 6A6A*0.07ohm = 2.52W, so you’d want to heatsink it.

A part like I showed, with just .0033 ohm of resistance typical at Vgs of 4.5V will dissipate 66.0033 = 0,1188W, nice & cool, so likely no heat sink required.

Thanks for that advice, that's an ideal way to find them.

So I've tried to work it out from the component's datasheet you provided but the graphs are beyond my comprehension... Would the component be able to supply 12v 6A (continous drain) with a gate input of the Arduino's 5V 10mA (using a 500ohm resistor from each of the 15 PWM pins in order to keep Arduino's total output beneath 200mA)?

Thanks for taking the time to help in advance.

While the on-resistance/heat dissipation is important I am more concerned with the Arduino2650's ability to activate the MOSFETs.

The 15 PWM outputs would have to be limited to 10mA each, right? (As even at 15mA x 15 pins = over Arduino current limit, correct?)

So what I am unsure of is could any MOSFETs achieve a 12v 6A output with such a small voltage on their gate pin? (0.5v... I think?)

Apologies if this is clear as day in the datasheets but I just can't work it out.

The Rds was easy to identify, chart on page 2. Rds(on) Static Drain Source On Resistance, Vgs 4.5V 3.3mohm typical, Ids 20A.

Right above that, Drain Source break down voltage, 30V min.

So the part can handle the voltage/current.

As I said earlier, MOSFETs are voltage controlled, not current controlled. So all the processor has to supply is a little burst of current as the voltage changes levels. Once switched, current drops to almost nothing. Driving 15 of these from PWM pins will not be an issue.

Also, with a Mega, current flow is 800mA, 200mA per Vcc pin. Mega has 4. I have documented this from Atmel previously. Use lower resistors so the MOSFET changes from on to off, and off to on quickly. When it is transition, Rds is higher and can make the MOSFET overheat. 10mA will make that slow. Use 150ohm as I suggested. If you find the parts getting warm even with 150 ohm, then a MOSFET driver will be needed to make it switch fast.

Ah, I think it's finally going in to my thick head! I was presuming that MOSFETs would act like a mechanical relay in drawing a constant amount of current per PWM wave - despite the dozens of graphs... oh well.

Good to know there is more current available on the MEGA also.

One last thing... would it be OK to share the 10K pulldown resistor between all 15 MOSFETs to GND, or would they each need one?

Thanks for your patience, sir!

Each needs one - otherwise when one turns on, they all turn on.

I lied about one last thing, sorry...!

Should I go ahead and buy these FETs? (Seem to be a good deal) Datasheet: http://www.irf.com/product-info/datasheets/data/irlb8743pbf.pdf

Overall, it seems to match the recommendation above with lower V and I capability but still within spec, a good low on-resistance of 3.2m? with heatsink attachment, but there seem to be two obvious detractors -

There is a higher rise time and total gate charge, both are roughly double those of the component you initially specified above, I suppose at such small levels this is not a problem?

Would this be enough to affect the resistor value (150ohms to gate)... or is that a stupid question?

Thanks again, don't know where I'd be without the help.

You can plug 150 ohm & 2010 pf, vs 150 ohm and 5110 pf, into a filter capacitor and see the difference in turn on time.

So you think this choice of FETs should be OK for the project? http://www.irf.com/product-info/datasheets/data/irlb8743pbf.pdf

http://sim.okawa-denshi.jp/en/CRlowkeisan.htm

.69uS vs 1.76uS to from 0 to 90% of Vin

Will affect the PWM frequency you can use, hard to say how much heat will be generated in the transition. I'd think a burst of up to 0.126W would be acceptable tho.