Appropriate transistor to PWM a strand of "fairy light" LEDs in parallel - Page 1
Forum section: electronics / beginners

author: qrohlf
author_rank: Newbie
timestamp: October 23, 2019, 02:37:35 pm
content: TL;DR: I'm looking for a "goldilocks" transistor that will switch a constant load of up to 1500mA at 2.7vHi folks, apologies for the very basic question. I'm designing a replacement driver circuit for some 33' fairy light strands.My design goals are1. I would like the lights to be dimmable2. 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 phone4. 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 ariseSo, 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).

author: qrohlf
author_rank: Newbie
timestamp: October 23, 2019, 02:39:02 pm
content: 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 😛.

author: StillTrying
author_rank: Super Contributor
timestamp: October 23, 2019, 03:46:25 pm
content: A logic level mosfet, IRL540, IRLZ44 or something like that ?

author: qrohlf
author_rank: Newbie
timestamp: October 23, 2019, 05:12:52 pm
content: Aren't those rated for almost 50W? Seems like overkill, since the max power I need for this application would be 4W?

author: Buriedcode
author_rank: Super Contributor
timestamp: October 23, 2019, 05:29:07 pm
content: 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.

author: qrohlf
author_rank: Newbie
timestamp: October 23, 2019, 05:48:10 pm
content: 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.

author: rstofer
author_rank: Super Contributor
timestamp: October 23, 2019, 06:15:12 pm
content: 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

author: StillTrying
author_rank: Super Contributor
timestamp: October 23, 2019, 07:28:58 pm
content: I've got a small cool-white desk lamp thatsquare wavesat 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.