1
\$\begingroup\$

I'm trying to control some powerful LED strips (about 100 W) with an ESP32 microcontroller.

To reduce cost and complexity, I'm trying to avoid:

  • MOSFET driver
  • separate 10 V power supply

I already have 24 V and 3.3 V on the board.

Could something like that work? I plan to dim the strip using PWM but I think that the PWM frequency should not exceed 5 kHz.

Consider that the IRLZ44N is just an example; I plan to use a MOSFET with VGS = 30 V, IS = 10 A, and Rds(on) = 3 mΩ.

enter image description here

\$\endgroup\$
9
  • \$\begingroup\$ In order to switch the FET quickly, and avoid spending time in the (inefficient) linear region, you need to move the gate charge on and off the gate quickly. That's a lot of current for a short time, which is exactly what a gate driver IC is designed to do. When something already exists as a mature product like that, it's pretty much always more expensive to redesign it yourself than to just buy one. If you want the education, that's fine, but the economic argument just doesn't work here. \$\endgroup\$
    – AaronD
    Aug 19, 2022 at 17:16
  • \$\begingroup\$ For a dedicated power supply just for the FET driver, it doesn't have to be much at all. Average current is still low. A capacitor-stabilized zener is probably more than enough. That plus the driver chip will still likely be less than what you'll spend to make a discrete solution work. \$\endgroup\$
    – AaronD
    Aug 19, 2022 at 17:17
  • \$\begingroup\$ Unfortunately the driver ICs that I found are indeed expensive (more then 1$). Resistors and a BJT are practically free. But I agree that a dedicated 10v supply could be more efficient. Do you have a schematic for such a circuit that I can drive with an ESP32? \$\endgroup\$
    – Suxsem
    Aug 19, 2022 at 17:25
  • 1
    \$\begingroup\$ By the time you build enough prototypes to actually make it work, you'll probably spend more than that in unrecoverable parts. But if you really want to do it anyway, you can look at the internal circuit diagrams in some FET driver datasheets. \$\endgroup\$
    – AaronD
    Aug 19, 2022 at 17:29
  • \$\begingroup\$ Have you actually tried driving the FET directly? 5A isnt that much (100W 24V) \$\endgroup\$
    – Wesley Lee
    Aug 19, 2022 at 18:26

4 Answers 4

5
\$\begingroup\$

First if you have a high power LED strip, it is better to split it into several segments and drive them with phase-shifted PWM signals. This makes the total current draw less choppy, which makes the ripple current lower, which makes your power supply caps happier. It also reduces flicker, and reduces the likelihood of whine at the PWM frequency from ceramic caps and power supply magnetics. And your MOSFETs will have less I2R losses. ESP32 has very nice PWM units that can do this easily.

Next you have to decide about switching speed. For EMI it's best not to switch too fast: with high gate drive current from a proper MOSFET driver it would switch in a couple tens of ns, so your wires will have square wave currents with harmonics in the hundreds of MHz, making a wideband radio jammer.

If you had 5V it would be cheaper to use a 74HCT logic chip as 3V3 to 5V logic level translator, then 5V MOSFETs.

Since you don't, you can either use 3V3 gate drive MOSFETs, driven directly by ESP32, or use a discrete driver.

The first requires the MOSFET to be in stock, which can be a problem.

A 74HCT245 as driver offers 8 channels of 3V3 to 5V translation, combined with a 5V LDO from 24V this will most likely be simpler and cheaper than discrete transistor drivers if you have several channels. Do not use 74HC, when powered from 5V, HC that needs more than 3V3 to reliably register a "1". But HCT's input levels are ideal for 3V3 logic, and it outputs 5V.

Your solution consumes 12mA through the two 1k resistors even when it's off, which is inefficient. Here's a proposal.

enter image description here

Note ESP32 uses a lot of current. If you are not using a switching converter to power your ESP32, a linear regulator from 24V will have huge losses. A DC-DC will be cheaper than the heatsink, not even counting the electricity.

\$\endgroup\$
4
  • \$\begingroup\$ wow VERY useful reply! Don't worry about the 3.3v, I implemented a buck converter in my circuit. The phase shifted pwm is a good idea but the strips need 5 channels and I'm already running out of gpio pins for other reason so I will try to stick with a single strip segment for now. Another option could be to use the buck converter to generate 5v and then use a linear regulator from 5v to 3.3v, what do you think? Anyway I really like you proposed solution but I don't understand the purpose of the 8ohm r4 resistor, can you explain it to me? Thanks!!! \$\endgroup\$
    – Suxsem
    Aug 19, 2022 at 21:59
  • \$\begingroup\$ Oh the 8 ohm resistor just represents the LEDs in the simulation. You can use the buck to make 5V, you'd have to run the math to know if it would be more efficient depending on how much current the 74HCT driver uses versus the ESP32. \$\endgroup\$
    – bobflux
    Aug 19, 2022 at 22:09
  • \$\begingroup\$ oh I see! I think it's called "totem pole driver" right? I think this is the proper solution \$\endgroup\$
    – Suxsem
    Aug 19, 2022 at 22:12
  • \$\begingroup\$ Yes. 74HCT will be simpler if you have many outputs, but it can only output 5V. If you need higher gate voltage, then discrete transistors. \$\endgroup\$
    – bobflux
    Aug 19, 2022 at 22:14
0
\$\begingroup\$

...Previous text deleted...

EDIT: Sorry folks, Thanks AaronD. I misread the question and withdraw my previous remarks.

Get a FET with a "logic-level" gate drive. The miller plateau must be less than 3.3 V. The pull-up to 24 V should go to 3.3V. Make it small enough to use the maximum current available in the bipolar. The gate pull down should be 50k to 100k.

You can also use a 3-terminal regulator to drop the 24 v to 10 volts for the gate bias.

\$\endgroup\$
4
  • \$\begingroup\$ My understanding was that the LED strips take 24V, but the OP only wants 10V on the gate of the FET. \$\endgroup\$
    – AaronD
    Aug 19, 2022 at 17:20
  • \$\begingroup\$ @AaronD correct, the strips already takes 24v and have builtin current limiting resistors for the led. \$\endgroup\$
    – Suxsem
    Aug 19, 2022 at 17:22
  • \$\begingroup\$ @russellh thank you, but I think that a linear regulator would waste too much power so I want to avoid it. Do you know any cheap logic gate mosfet with enough low rdson at 3.3v? \$\endgroup\$
    – Suxsem
    Aug 19, 2022 at 21:52
  • \$\begingroup\$ @Suxsem : They are challenging to find. There are lots that work at 5V VGS. (Digikey and Mouser). The one I would try is a version of the one that you have IRLZ24. I still recommend a 5V to 10V 3T regulator to guarantee a low RDSon. \$\endgroup\$
    – RussellH
    Aug 19, 2022 at 22:53
0
\$\begingroup\$

Gate drivers may be expensive, but they do quite a bit. If you want to do a DIY gate driver, then even the most rudimentary one will have quite a few components. But it will be very inexpensive, and the components will always be available. So - it's a tradeoff.

The circuit below is a 35ns rise/fall time gate driver for an IRF540 FET that could be suitable for your application - although any better FET would work too, of course.

PWMing LEDs directly creates high amplitude, high slew rate voltages that radiate like crazy. I suggest not doing it, and instead adding a current smoothing inductor L1, and the associated freewheeling diode D4 - it should be a Schottky type rated for 100V and the maximum LED current. The LED current will be proportional to the PWM duty cycle, with some ripple amplitude that decreases with larger values of L1.

L1's value is for 200kHz operation. For 20kHz, while retaining same ripple current, it should be 1mH. I don't suggest going lower than 20kHz - there's little advantage to it, and L1 would get quite bulky then, as you'd be looking for a 5mH, 10A inductor.

When choosing L1, ensure that the saturation current spec is at least 20% higher than the maximum LED current.

Of course, the circuit will work without L1-D4, but it will obliterate the broadcast AM band and who knows what else. The spikes will be probably picked up by a nearby oscilloscope with just a probe plugged in and laying on the bench.

R10-L10 represent the source impedance of the MCU GPIO pins and are only used in the simulation. Same goes for the load R20: you can use a dummy resistor load, but eventually you'll want to put LEDs there.

schematic

simulate this circuit – Schematic created using CircuitLab

The input logic signal is buffered by the Q1-Q2 emitter follower.

There are two control paths for the output stage Q4-Q5.

At DC: When the input signal is high or disconnected, the R1-R2-R3-R4 biasing network keeps Q5 on and Q4 off, and M1 turned off. When the input is low, Q3 is on, turns Q4 on and Q5 off.

During input edges, C1 and C2 conduct and provide fast charge injection/drainage to the bases of Q4 and Q5.

The circuit could be easily extended for synchronous rectification, i.e. having D4 replaced by a second mosfet.

The layout of this circuit is critical. A breadboard prototype should only be used for very light loads, say up to 250mA - otherwise there's good likelihood of destroying components.

The circuit put to use with a 100W LED strip must be laid out on a 2-layer PCB, with a ground plane, and with attention to all current loops - their area must be minimized, and their impedance should be kept low by using wide traces and ideally polygon fills.

\$\endgroup\$
3
  • \$\begingroup\$ This is an interesting design. How does Q3 get turned on, when the input is low? I imagine the orientation of D2 prohibits any base current for Q3. Can you explain the role of Q3 and D2 here, why D2 is oriented that way, and why 9.1V? \$\endgroup\$ Aug 20, 2022 at 5:29
  • \$\begingroup\$ @Kuba thank you!! Very useful advices about the inductors, I will add them. Thank you also for the circuit but I'm starting to think that it's indeed too complex for me. Can I ask you what you think about this driver IC? datasheet.lcsc.com/lcsc/… It's cheap and from what I understood I can power it with 24v and control it with 3.3v. \$\endgroup\$
    – Suxsem
    Aug 20, 2022 at 7:15
  • \$\begingroup\$ D2 is a Zener diode. They regulate/drop voltage when connected on reverse. So it will turn on Q3 when the input voltage is sufficiently low relative to the emitter voltage. The 9.1V rating is selected to make it work with 24V supply. It’d be different for other supplies, as would be the bias network. It’s a very rudimentary circuit. It takes a few more transistors to make one that’s not sensitive to supply variations. The driver you looked at seems reasonable for the purpose you have in mind. Also do heed the advice of phase shifted separate lower power driving of led strips. \$\endgroup\$ Aug 20, 2022 at 17:40
0
\$\begingroup\$

One issue with this driver is that BJTs have "storage time", so they may take several microseconds to turn off when saturated. This is going to result in a few percent duty cycle distortion at 5 kHz.

Also, when the BJT turn off your driver current to turn on the MOSFET gate starts at 24 mA and ends at 12 mA. Typically, you want the drive current to be much higher (like over 1A). The rather low drive current will increase the MOSFET turn on time and result in a lot more power dissipation (probably like 50X more than with a fast driver).

\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.