Monday 13 June 2016

mosfet - Driving LED strip from microcontroller


I want to drive a strip of LEDs from a microcontroller using PWM to control the brightness. The strip I have takes about 1.5A at 12V. I'm only familiar with purely low power digital electronics so wanted to check if these assumptions are correct and get any advice :-



  • If I use an NPN transistor to drive this, the transistor when turned on will drop about 0.7v so will dissipate over 1Watt when turned on.

  • This would require a reasonably chunky transistor and a heat sink which I want to avoid if possible.


  • So I'd be better using a mosfet that has much lower resistance so I might be able to get away with a smaller one and perhaps no heatsink?





  • However looking at the spec of the various MOSFETs I can buy it looks like any that can pass this amount of current require considerably more than 3.3v I can get from my microcontroller to turn on fully.



  • So am I best to have a small NPN transistor switching 12v to the input of a mosfet to control the actual LED strip? (Sorry I can't draw a diagram on this computer but can add one later if needed)


Are my assumptions correct, and does anyone have any advice or a better way? I'd also be interested in recommendations for suitable parts although that's not my main question.


(Edit: I looked for other posts that answered this and didn't find anything that was quite what I wanted, if someone has a link to a duplicate then please post it and I'll happily close the question).



Answer



For 1.5 A at 12 Volts, switched by 3.3 Volts, here is a MOSFET solution that would work well. The MOSFET suggested here is an IRLML2502 available from eBay and other sites for as little as $2.35 for 10 with free shipping.


schematic


simulate this circuit – Schematic created using CircuitLab



The IRLML2502 has a maximum on-resistance of 0.08 Ohms at 2.5 Volts gate voltage, and less as the gate voltage gets closer to 3.3 Volts. It can withstand 20 Volts Drain to Source, so it will work well with a 12 Volt supply. Drain-Source current rating is greater than 3 Amperes, providing over 100% margin of safety.


At 0.08 Ohms and 1.5 Amperes, the MOSFET will dissipate 180 milliWatt when fully on. Even allowing for the switching edges of the PWM, dissipation will not exceed 250 mW or so, hence no heat sink is required for this application.


Regarding the assumptions:



  • NPN transistor drop and dissipation are correct, give or take a bit due to Vce of specific transistors

  • Chunky transistor (BJT), not really, but a TO-220 size would be typical, and yes, a heat sink would be required

  • Yes, see suggested MOSFET above

  • Not correct, there are several low-cost MOSFETs that turn on solidly well below 3.3 Volts, and can easily pass 1.5 Amperes

  • No, with an NPN BJT there is always a balancing act around base current etc. MOSFETs being voltage driven devices, work with less fuss



Some of your assumptions are correct. This answer provides one better way, and I am sure there are others.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...