Is this a good PWM MOSFET circuit? - Page 1
Forum section: electronics / projects

author: drakejest
author_rank: Regular Contributor
timestamp: June 08, 2021, 08:29:41 pm
content: I would like to dim a 5A led strip, this circuit was suggested to me with the components i have presented. how robust would this circuit be? Is this how good commercial products do it?I would also want to know at 5A load what temperature would the mosfet be sitting at? assuming no heatsink and ambient of 25C. How to calculate the temperature?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 08, 2021, 09:46:39 pm
content: You don't need to use such a large transistor, 45-60A... 5-10A will do. Though you should be at a low enough PWM frequency that this doesn't matter (the main problem is gate charge). It might even be an advantage, it can probably sink enough current to clear a fuse, in the event the LED strip fails shorted (or the connector or cable).The main thing missing is a TVS from source to drain (a SMAJ15A should do), and something to do EMI filtering.EMI filtering is best done by not making a racket in the first place. Probably a larger series gate resistor is desirable, maybe large enough that the emitter follower isn't needed at all. After that, maybe a series 1uH to the load, and a 10nF + 47R from load to GND after that? Don't forget a big bypass cap on 12V, and run the connections through the board so all the return currents come in and out. (Basically, don't run the strip from a separate 12V connection.)You'll want to PWM at a few kHz minimum, to avoid issues with persistence of vision and motion blur. (50-100Hz would be enough for POV, but such a slow rate will still leave dots across your vision when you move your eyes quickly. Probably harder to notice for illumination rather than indication, but going faster is easy and it helps.) Over 10 or 20kHz, I'd start to get worried about switching losses.Or else just go straight to 100-200kHz say, fast switching, and add a PWM filter with clamp diode so it's a buck converter instead.Tim

author: David Hess
author_rank: Super Contributor
timestamp: June 09, 2021, 05:16:23 am
content: It is a great circuit but likely overkill. The PNP transistor can be replaced with a diode. I would use an NPN in place of the level shifter for cost reasons.

author: drakejest
author_rank: Regular Contributor
timestamp: June 10, 2021, 03:26:55 am
content: Seem like i forgot to post my reply before closing the browser, sorry about that.Quote from: T3sl4co1l on June 08, 2021, 09:46:39 pmas for the reason why the overkill mosfet it was mainly because it was cheap it was sittign at top of the searchit has decent Rdson and relativly fast theoretical switch time.Quote from: David Hess on June 09, 2021, 05:16:23 amcost it not that much of an issue since the difference are litterally in cents and this project is not for production. but yes i think i will opt for the same conclusion its makes it more simple since there is only 1 transistor part being used.Quote from: Zero999 on June 09, 2021, 11:03:04 amAbout the diode though, is it purely for cost effective reason ?

author: Zero999
author_rank: Super Contributor
timestamp: June 10, 2021, 07:51:42 am
content: Yes, the diode is cheaper and a little simpler, than a BJT, as it only has two pins.If you want to simplify the design further, as the expense of cost, the transistors can be replaced with a MOSFET driver IC such as the MC34152, MCP1416, LM5112 for example.

author: drakejest
author_rank: Regular Contributor
timestamp: June 10, 2021, 09:22:18 am
content: Quote from: Zero999 on June 10, 2021, 07:51:42 amI am so glad you mentioned mosfet driver ICs, because i did at first want to use them, but it got me confused because for example theMC34152has a rating of 1.5A. why do they need to have high amperage isnt the one doing the heavy lifting is the primary mosfet (DMT3006 in my case) ? do the totem poles need to carry that much current if so how do i compute for how much current on the mosfet driver IC needed?

author: Zero999
author_rank: Super Contributor
timestamp: June 10, 2021, 09:37:32 am
content: Quote from: drakejest on June 10, 2021, 09:22:18 amThe circuit you posted is a discrete MOSFET driver.A MOSFET driver needs to be able to output relatively high currents, for short periods, to rapidly charge/discharge the large gate capacitance of a MOSFET. The current ratings on the data sheets are for short surges, whilst the MOSFET is turning on and off. Once the MOSFET is either on, or off, the gate current is tiny.

author: drakejest
author_rank: Regular Contributor
timestamp: June 10, 2021, 09:46:50 am
content: Quote from: Zero999 on June 10, 2021, 09:37:32 amHow will i know that the current of the mosfet driver is enough ffor a mosfet?

author: Zero999
author_rank: Super Contributor
timestamp: June 10, 2021, 10:14:45 am
content: Quote from: drakejest on June 10, 2021, 09:46:50 amIt depends on the desired switching speed and gate charge of the MOSFET. In order for a MOSFET to turn on, a certain charge needs to flow into the gate terminal. The higher the gate current, the faster it can charge. A large MOSFET, with a large gate charge requirement, will require a much higher gate current to turn on at the same speed, as as smaller MOSFET.https://www.vishay.com/docs/73217/an608a.pdfhttps://www.rohm.com/electronics-basics/transistors/total-gate-charge

author: Siwastaja
author_rank: Super Contributor
timestamp: June 10, 2021, 12:47:16 pm
content: For 12V 5A led strip PWM dimming from 3V3 logic you don't need any gate driver IMHO. Maybe with a 12V 10A strip or 24V 5A strip, I would say differently, but for a 12V 5A load, plenty of 3V3 gate level MOSFETs available with not too much Qg(tot).Pick a MOSFET rated for Vds_max = 25V or 30V and look at the curves to see if it's fully conducting when Vgs=3.0V. Don't oversize, make sure it can handle the dissipation (5A)^2 * Rds_on but not too much more to avoid excess gate capacitance. Add some 47R gate series resistance and drive from the microcontroller IO pin directly. Avoid excessive PWM frequency. 1kHz works well for most cases but if very high intensity LEDs are regularly ran at very low duty cycles in dark environment with people who are sensitive to flicker, consider 2-3 kHz.

author: Peabody
author_rank: Super Contributor
timestamp: June 10, 2021, 02:08:56 pm
content: Why is the PWM frequency for an LED strip so much higher than what's needed for a 7-segment display, which in my experience is no more than 60Hz to prevent flicker? The last 7-segment display I did used multiplexing by segment, with a refresh every 2mS. So each segment LED was on for 2mS once every 14mS, which is 71Hz with a 14% duty cycle, and there was no flicker. Why is 1kHz, or even 2.5kHz, needed for something like this?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 10, 2021, 02:45:19 pm
content: Quote from: Peabody on June 10, 2021, 02:08:56 pmAs I explained earlier -- when looking at it straight on, this is true for most people. But you'll see it flash across your field of vision as you move your eyes.(Is that not a sufficient explanation? Is it believable? Is it just not your experience? Can you imagine others having the experience described?)In any case, these frequencies are an eternity, electrically speaking; might as well go for the higher frequency that's better for POV with movement.Tim

author: Zero999
author_rank: Super Contributor
timestamp: June 10, 2021, 04:09:36 pm
content: Quote from: T3sl4co1l on June 10, 2021, 02:45:19 pmThat's true and if it's used in an environment where there's moving machinary, flickering can generated a scroboscopic effect, giving the illusion a part is either still, or rotating at a much lower speed, when it's really fast, which can be very dangerous. Using as higher frequency as possible reduces the risk. Switching from one frequency to another continiously also helps. This is why machine shops lit by HID lamps, should ideally have several lamps run off a different phase, but the introduction of high frequency ballasts and LED lighting, have made it a non-issue, although it's still good to ballance the loading, but that's off topic.

author: tooki
author_rank: Super Contributor
timestamp: June 10, 2021, 06:08:39 pm
content: Quote from: Peabody on June 10, 2021, 02:08:56 pmIgnoring the fact that I find 60Hz LED displays to be flickery, the answer is that display flicker and lighting flicker are different things, and the latter demands higher frequencies. One study found that test subjects could on average detect flicker up to almost 2kHz, and that the outlier on the high side could detect it at over 4.9kHz! Calculations based on eliminating flicker in the absolute worst-case scenarios resulted in needing 35kHz!! The reason is angular velocity of eye movements, body movement, and in the case of things like PWMed tail lights on cars, the speed of your car and the other car with the PWM tail lights. Search for the “phantom array” effect.I’ve had a couple of discussions about this topic on here, which you might find interesting:https://www.eevblog.com/forum/beginners/cheap-standalone-usb-microcontroller/(note that my initial comments were from before I found the study that calculated 35kHz. That study is included as a PDF later in the thread.)https://www.eevblog.com/forum/projects/pwm-lighting-120hz-to-dc/IMHO, 3kHz is enough to eliminate it for most practical lighting purposes. However, since many power supplies will whine audibly when switched at audio frequencies, I like to go higher. I have in full-time use at home ahomemade dimmerusing 20kHz PWM. (Generated by a dual comparator, one as a relaxation oscillator, the other to generate the PWM signal.)Quote from: Siwastaja on June 10, 2021, 12:47:16 pmTotally agree, other than that 2kHz isn’t enough. That’s flickery to me. (3kHz seems to be the true minimum for me, but for practical reasons I go way higher in practice, as described above.)The PWM waveform from the comparator PWM above goes straight into an IRL540 logic level MOSFET (via a small resistor IIRC), switching a 12V load without even breaking a sweat. I put a heatsink on it, but it doesn’t even get tepid, never mind hot.

author: Zero999
author_rank: Super Contributor
timestamp: June 10, 2021, 07:46:08 pm
content: Quote from: tooki on June 10, 2021, 06:08:39 pmI think the original poster wants to use an MCU, run off 3.3V, rather than a comparator circuit.If you go for a comparator, I would advise using one with a push-pull output, if you don't want to use a MOSFET driver and are driving a reasonably large MOSFET. The pull-up resistor significantly delays the turn-on time. If you must use an open collector comparator, it's advisable to at add an NPN follower + diode, to speed up the rise time.

author: tooki
author_rank: Super Contributor
timestamp: June 10, 2021, 08:46:18 pm
content: I wasn’t suggesting using a comparator, I was only saying that the comparator’s output could drive the MOSFET directly, and so can an MCU (isn’t the point of making a logic level MOSFET that it can run off a simple logic output without a driver?).

author: Benta
author_rank: Super Contributor
timestamp: June 10, 2021, 08:50:42 pm
content: The basic circuit has a fundamental flaw: if the PWM signal disappears (eg, MCU reset), the power MOSFET will turn full on.I'd expect this to be very undesirable.

author: Zero999
author_rank: Super Contributor
timestamp: June 10, 2021, 09:29:52 pm
content: Quote from: tooki on June 10, 2021, 08:46:18 pmIt depends on the comparator, the MOSFET, the PWM frequency and maximum/minimum required duty cycle.Quote from: Benta on June 10, 2021, 08:50:42 pmProbably not a big deal though. If it is, just add a pull-down resistor.

author: Benta
author_rank: Super Contributor
timestamp: June 10, 2021, 10:11:21 pm
content: Quote from: Zero999 on June 10, 2021, 09:29:52 pmWhere? If on the PWM input, that would provoke exactly the situation I described.

author: David Hess
author_rank: Super Contributor
timestamp: June 11, 2021, 04:00:15 am
content: Comparators are sometimes used to drive MOSFET as part of deadtime control but usually have a buffer stage for higher driver current.

author: Zero999
author_rank: Super Contributor
timestamp: June 11, 2021, 07:40:09 am
content: Quote from: Benta on June 10, 2021, 10:11:21 pmYou're right. I should have said pull-up resistor.

author: Siwastaja
author_rank: Super Contributor
timestamp: June 11, 2021, 11:02:31 am
content: Quote from: Peabody on June 10, 2021, 02:08:56 pmThe key words: in your experience.All those flickering piece of crap displays are in existence because their designers happen to be totally unsensitive to any flicker at all and work based on unconfirmed assumptions that ridiculously low PWM frequencies such as "60Hz" or even worse, magical "24Hz" would be somehow acceptable. Or they just don't care.Of course, a super dim 7-segment display you barely see against the environmental (non-flickering) light does not matter. A 5A led strip, on the other hand, is likely used forilluminationand flickering illumination is a catastrophe.Classic fluorescents flicker at 100Hz or 120Hz depending on where you live and yes, I know certainly people who are extremely unhappy with them. (I also know people who absolutely loathe flickering 7-segment multiplexed displays because of the ugliness, even if they wouldn't cause any seizures.) And fluorescents have some afterglow smoothing the flicker, and the conduction angle (duty cycle) is quite large. An intensive LED flickering sharply at low duty cycles is at least an order of magnitude worse, 1kHz may not be nearly enough.Hope this helps. I recommend using the forum search because this has been discussed before, and possibly opening a new thread if more advice is needed.BTW, Siemens is the unit of conductivity; the SI unit for time is seconds, abbreviated s.

author: tooki
author_rank: Super Contributor
timestamp: June 13, 2021, 11:11:26 pm
content: Quote from: Zero999 on June 10, 2021, 09:29:52 pmRight, but again, I wasn't suggesting using a comparator instead of the MCU. I was only concurring that a MOSFET driver is often unnecessary.