Author Topic: Appropriate transistor to PWM a strand of "fairy light" LEDs in parallel  (Read 1430 times)

0 Members and 1 Guest are viewing this topic.

Offline qrohlfTopic starter

  • Newbie
  • Posts: 4
  • Country: us
TL;DR: I'm looking for a "goldilocks" transistor that will switch a constant load of up to 1500mA at 2.7v


Hi folks, apologies for the very basic question. I'm designing a replacement driver circuit for some 33' fairy light strands.

My design goals are

1. I would like the lights to be dimmable
2. I would like the lights to be powered off a microUSB port, so I can use any old microUSB cable as an "extension cable"
3. I would like to be able to control the lights with my phone
4. I would like to have enough current headroom so as to be able to swap out the 33' light strands for a 50' light strand, should the need arise

So, from that, we're working with the following assumptions

- source voltage will be 5V (because USB)
- the microcontroller I'll be using for PWM dimming will be an ESP8266, which has a nice BLE stack for the phone control and an easy-to use sleep mode to minimize power consumption when in "off" mode.

The strands themselves are harvested from a commercially available Chinese part (https://www.amazon.com/gp/product/B01KL9KVCQ/) sourced via Amazon. The stock driver board runs them at ~700mA, with a 2.7V drop across the LEDs. I plan to use an appropriate 1/2W current-limiting resistor to drive these LEDs from a 5V source at the appropriate current & voltage.

This is, obviously, a pretty simple circuit. GPIO pin, transistor, resistor, done. The bit where I need help is part selection for my transistor. Since I'd like to build in at least 2x headroom for current in order to be able to drive a longer LED strand, I need a transistor that can switch a constant load of ~1400mA at 2.7v.

In the past, I've always used the plain-old PN2222 for this kind of thing, however it's only good up to around 500mA based on the datasheet. It seems like the next step in terms of "standard hobbyist parts" is something like a TIP120 Darlington transistor, but they seem massively overkill for this project (I definitely do not need 5A at 60v!).

Any recommendations for an appropriate part for this application? Preferably something available in both a thru-hole package for prototyping, and a SMD package for final assembly (SOT-23 would be ideal).
 

Offline qrohlfTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: Appropriate transistor to PWM a strand of "fairy light" LEDs in parallel
« Reply #1 on: October 23, 2019, 02:39:02 pm »
Also: I know I could just sift through Mouser's gigantic catalog until I found something with a datasheet matching my needs, but in the past when I've done this, I usually end up speccing "non-standard" parts that are subject to weird gaps in availability and just generally aren't what a more experienced engineer would use for the application. Hence why I'm asking the experts 😛.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Appropriate transistor to PWM a strand of "fairy light" LEDs in parallel
« Reply #2 on: October 23, 2019, 03:46:25 pm »
A logic level mosfet, IRL540, IRLZ44 or something like that ?
.  That took much longer than I thought it would.
 

Offline qrohlfTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: Appropriate transistor to PWM a strand of "fairy light" LEDs in parallel
« Reply #3 on: October 23, 2019, 05:12:52 pm »
Aren't those rated for almost 50W? Seems like overkill, since the max power I need for this application would be 4W?
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1612
  • Country: gb
Re: Appropriate transistor to PWM a strand of "fairy light" LEDs in parallel
« Reply #4 on: October 23, 2019, 05:29:07 pm »
The ESP8266 doesn't have bluetooth. Its bigger brother the ESP32 does have bluetooth low energy, although apparently it's hit and miss with development with Arduino.

I would instinctively recommend a MOSFET for this, but you would have to have an idea of the switching frequency, and  gate drive voltage to help you determine some specs so you can search. 
- The ESP32 is 3.3V so if you're driving the MOSFET direct, remember that this lower gate drive will affect the on resistance (most Ron specs are at 5V or 12V). 
- The PWM frequency determines the gate drive requirements, which could be as simple as direct from the ESP32 GPIO via a low value resistor, to totem-pole bipolar transistor drive, to a dedicated driver IC.
- The maximum voltage.  If they really are in parallel, then the voltage will of course be very low.  Lower Vds generally allows for a lower on resistance = less conduction losses = less heat = smaller footprint.

I would recommend running some visual tests to determine the PWM frequency - even though 500Hz sounds reasonable, if the lights are the only source of light in the dark, at low duty cycles, one can see flicker if they move their eyes or head which can be annoying.  1kHz is quite high, and I've found in some instances one needs it to be higher.   Test yourself to see what you can see, but even at 3kHz that isn't particularly fast for low-gate-charge MOSFET's.

I have used LTspice to simulate MOSFET's at various switching frequencies, gate drive, different loads etc... but that relies on accurate models (which can be vary quite a bit).  Some rough specs that should help you narrow things down:
"Logic Level" just means they will have a "reasonable" Ron at low gate drive voltages, like 3.3 - 5V.  Doesn't really mean anything about the application.
Vds 20-40V.  No need to go higher, and you can't really find ones lower. Higher Vds generally means higher Ron and higher gate charge.
Ron ~50mOhm. or 0.05 Ohm @ Vgs 3.3V.  At 1400mA, thats 100mW loss when on (for PWM they won't be on 100% of the time).
Gate charge <9nC.  The ESP32 has limit drive capability on the GPIO, but I would say good enough for a 5nC MOSFET.
 

Offline qrohlfTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: Appropriate transistor to PWM a strand of "fairy light" LEDs in parallel
« Reply #5 on: October 23, 2019, 05:48:10 pm »
Thanks for the detailed response, you're right that I'll want an ESP32. Not sure why I thought I could get away with an 8266.

I was planning on using a 3kHz or greater PWM frequency based on the recommendations in IEEE 1789 (http://www.bio-licht.org/02_resources/info_ieee_2015_standards-1789.pdf, in case anyone is curios). Since the ESP32 can handle it, seems like a reasonable thing to do!

I'll do some scoping of MOSFETs.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Appropriate transistor to PWM a strand of "fairy light" LEDs in parallel
« Reply #6 on: October 23, 2019, 06:15:12 pm »
Whether a high PWM frequency is reasonable is tightly coupled to the gate drive.  Imagine the turn-on voltage drop across the MOSFET.  It will always look like a trapezoid and the area under the leading and trailing triangles is where the MOSFET is generating a lot of heat.  The device is in a transition region, neither fully off nor fully on.  With sloppy gate drive and high frequency, the MOSFET spends a higher percentage of time in the heating transition region.

With a fast gate drive, there is less heating.  In an ideal design, we could pump AMPS of gate current to get the intrinsic capacitors charged in closer to zero time.  A uC pin can't do this.  So, we have to slow down the PWM to avoid having the device in this transition region for a high percentage of time.  Since it is pretty easy to play with the frequency, try various values and see if the MOSFET shows signs of excessive heat.

https://www.vishay.com/docs/68214/turnonprocess.pdf
« Last Edit: October 23, 2019, 06:32:20 pm by rstofer »
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Appropriate transistor to PWM a strand of "fairy light" LEDs in parallel
« Reply #7 on: October 23, 2019, 07:28:58 pm »
I've got a small cool-white desk lamp that square waves at 2.3kHz, I can often notice the 2.3kHz on edges that move, but for warm-white fairy lights I think 2.3kHz should be more than fast enough.

Only having 3.3V for a >1.5A mosfet reduces the choices quite a bit. :)
.  That took much longer than I thought it would.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf