MOSFET for high speed PWM

Hello gang! :slight_smile:

I am working on an IR based distance sensor that operates with modulated light (40kHz).

I’d now like to do some tests with the emitter on whether a low current with a larger duty cycle produces best results or if a high current with low duty cycle will improve the sensor.

The LED I am working with states a max pulsed current of 1.2A for 100ns as max value.

I am now looking for a logic level MOSFET that will allow me to perform this test.
Having never worked before with transistors/mosfets, I am now a bit overwhelmed by the amount of models available.

My basic requirements would be:

  • logic level gate
  • 1A at 5-12V for the LED
  • fast switching time (< 1uS, if possible down to 100ns but not absolutely necessary since I am not even sure yet if the Atmega allows for such small duty cycles on a 40kHz frequency)

Can someone who has some experience in this recommend a part for this application?

Is there anything else important to consider? I read about possible overheating problems with such high frequencys for example?!

Thank you very much for your advice, it is much appreciated!
Have a great day!

Hi Tom,

Interesting question....

The Frequency of 40 KHz is no problem for Arduino. Making a pulse with a width of 100 nS (One cycle of 10 Mhz) would have to be done differently.

So, the pulse width part:

The idea is to have Arduino do the repetitive frequency and have one 'edge' of that signal trigger a pulse. You can use a chip for that, a "Retriggerable 1-Shot" such as 74HC123 I think might be OK.. See: The data sheet says that timing components of 2K ohms and 30pf gives a pulse width of 100nS. You can vary the pulse width by varying resistor and capacitor values.

Now, that's the Old Skool way of doing it for a couple dollars. .. Anybody else??

The MOSFET question: Basically a smaller FET (you don't need 50 Amp drain current capability).. Not my expertise.. Anyone??

40kHz is 25uS and you want 10th of a uS pulse so that's only a 250:1 ratio, I would think a timer with PWM would do that but I haven't tried it. You might have to settle for 2 clock cycles though (130nS unless you change the crystal).


Graynomad: You might have to settle for 2 clock cycles though (130nS unless you change the crystal).

I think that would be fine, I'd just trim the current down a little.

I haven't read the entire article yet, but says Timer1 is PWM @ 16bit, so very small duty cycles should be possible if I understand the example right.

But that still leaves the question how to trigger the LED properly at this speed. Any recommendations on a MOSFET (or another approach for that matter)?

Terry: Very interesting idea! I will keep this in mind of the Arduino PWM turns out not to be able to do it directly.

Thanks again!

I’d now like to do some tests with the emitter on whether a low current with a larger duty cycle produces best results or if a high current with low duty cycle will improve the sensor.

If you ask Mr. Fourier, it doesn’t matter. You are still delivering the same amount of average power, which tends to be what IR receivers are sensitive to. The most power is achieved at 50% duty cycle since that puts the most power at the actual 40 kHz frequency. If you go with a lower duty cycle but higher current, you are pumping more power into the LED but the Fourier series at 40 kHz goes down in power so it’s a wash.

You will also have trouble with 100ns on-off MOSFET pulses unless you get a MOSFET with very low gate capacitance and a high-current driver. If you look at a “standard” 2A logic-level MOSFET with low gate charge, e.g., STP27N3LH5 it has 4.6nC of gate charge. Charging this up from 0V to 4.5V in a “reasonable” time relative to 100ns, say 10ns, will take I=Q/t = 4.6nC/10ns = 460mA, more than a microcontroller pin can supply.

My gut tells me you’re barking up the wrong tree here and should just stick to 50% duty cycle.

The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O’s fused and protected

I know what you mean, but I think that there will be differences regarding precision and range of the sensor when using differently modulated pulses.

If they are significant enough to be useful is a question we can only find out by testing it - which is what I'd like to do.

So what I would need is a mosfet with very low gate capacitance or some kind of driver to switch it right?

Alright! I'm curious to learn of your results.

You are right, if you want fast, well-defined pulses you will want a combination of a low gate capacitance MOSFET and high-current MOSFET driver, like a Microchip TC4426A.

-- The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

Would this be a good alternative IC?

(The one you suggested is not available from the supplier I will be ordering other parts in the next few days anyway.)

Almost...they require a minimum 6.5V Vcc voltage while the TC4426A works at 5V. If you have a 7V-12V supply available you could use that. Otherwise it looks like it will do the job.

-- The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected

Alright! I'm curious to learn of your results.

Me Too!

I THINK most 'Regular' Red / IR LEDs are relatively linear with pulsed current VS radiant output, up to some point.

If so, for IR communication / beam detection the (unknown to me) question is the RECEIVER response and how that works into the equation. ie. does twice the pulse current give twice the response, or can the pulse be "too short"??

White LEDs etc. that have a phosphor that indirectly produces light CAN be pumped to higher levels with short pulses and give a beneficial non-linear response to short high-current pulses. I read somewhere.

No question that pulsed IR beams are far more stable and long-range with tuned receivers than simple on-off source / receiver. These are cool: when you need to have a beam several meters from the transmitter to receiver.

I want to experiment with an infrared laser for long beams. I'd like to design a product that includes a visible laser you turn on temporarily to align the transmitter to the receiver. Then the Invisible beam can trip your camera, etc...

Thanks again RuggedCircuits and Terry, I'm about to leave for a concert but will come back tomorrow for the details.

Do I need anything else beside the driver IC and the mosfet? Any special resistors / capacitors for that part of the circuit?

I would add a resistor (10k?) from the input of the MOSFET driver to ground to keep it off when the Arduino is in reset or being programmed. Don’t want those MOSFET’s turning on at random times! I’d put a similar resistor from MOSFET gate to ground just to bleed charge from the gate should it start to accumulate while you are messing around with wiring and such.

I can’t think of where you’d need capacitors…oh…wait, I’d put a capacitor at the power supply of the MOSFET driver (between the supply pin and ground), 1uF-10uF as minimum, bigger is better (but don’t go nuts else you’ll have a huge inrush current).

Beat707: MIDI drum machine / sequencer / groove-box for Arduino

or can the pulse be "too short"??

Terry, I can only guess at this point, but assuming you have a fast photodiode with rise & fall times in the nanosecond range I assume that this part will not be a problem. But what the effect of the following bandpass filter and demodulator will have, I have no idea... I guess we will see in a few days once I got all the parts.

RuggedCircuits: Would you mind having a look at this datasheet After lots of digging through datasheets it seems that this might be a candidate but since I have no experience with mosfets so far I'd appreciate a second opinion ;)

Thanks a lot! Tom

The IRFD024 is not a good choice IMHO because its gate charge (Qg) is 25nC, or about 5 times higher than the MOSFET I recommended. Ballpark, it'll take 5 times longer for it to switch on and off.

-- The Flexible MIDI Shield: MIDI IN/OUT, stacking headers, your choice of I/O pins

You are right, unfortunately the one you recommended isn't available from my supplier.

But I think I found a reasonable alternative: Not quite as fast as and low Qg than the STP27N3LH5 but almost, would you agree?

Meh...that's a 1.5 ohm MOSFET. That's pretty high and will get very warm if carrying ~1A of current.

If you're constrained by a particular supplier, let us know what that is and perhaps we can work around this constraint.

-- The DIN Rail Mount kit for Arduino: quickly attach your Arduino to standard DIN rail

I guess with such a short pulse, using multiple parallel mosfets (that are available), isn't an option?

Darn, I didn't check the resistance you are right.

I am currently living in Germany and will be ordering from in the next few days. If I could find a driver and mosfet there that would be great. Unfortunately their assortment isn't too big, so might be the alternative.

They both seem to carry a lot of transistors by "International Rectifier" so I'm now trying to find suitable mosfet from them, but no luck so far.

Dave: I have no idea since I haven't worked with mosfets so far, but wouldn't parallel mosfets actually increase the total gate capacitance and thus be even slower?!

I was thinking in terms of charging say 4 in parallel would be quicker than 1 large gate. Finding suitable mosfets for the job isn't trivial though :~ In terms of mosfet top trumps - the item that RuggedCircuits posted (STP27N3LH5) is pretty hard to beat.... I'm currently trying to design an utterly indestructible H Bridge (it's taking me forever). I think I might use a number of those.

You are right, if you want fast, well-defined pulses you will want a combination of a low gate capacitance MOSFET and high-current MOSFET driver, like a Microchip TC4426A.

Not necessarily, for an amp or so a MOSFET driver chip is sufficient in itself (and much faster) - the MIC4422 for instance will drive several amps and has logic level input. For a low-duty cycle application this will do without further boosting (not much power dissipation required).