Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 2 1 2 LastLast
Results 1 to 25 of 42

Thread: Do I need a Mosfet Driver?

  1. #1

    Do I need a Mosfet Driver?

    Hello everyone,
    I'm currently designing a PCB drone with the 8520 brushed motors and the Teensy 4.0.
    However, I wonder whether a gate driver is necessary for my Mosfets?

    I chose the following mosfet. (I dimensioned it a little larger so that I can later use two motors on one arm)
    https://datasheet.lcsc.com/lcsc/1806...8-R_C84908.pdf

    I will control the motors with 20khz PWM. Does anyone know whether I can switch quickly and efficiently enough with my gate current?
    (VCC is of course a 1S HV Lipo)


    Would be nice if someone could help me.

    Click image for larger version. 

Name:	Unbenannt.PNG 
Views:	19 
Size:	25.7 KB 
ID:	26518

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,496
    Yes, for 20 kHz PWM, you probably do need a gate driver chip or circuit.

    You should also use a "fast" diode across the motor. IN4007 is very slow. Without a good quality diode or other snubber circuit, the motor's "back EMF" will create voltage spikes which stress or even destroy the mosfet. Use a good diode!

    Computing actual gate voltage waveforms involves way to much non-linear math (at least for me). Better to use a simple approximation and then design in a little extra margin.

    The main mosfet spec to consider is the "total gate charge", which sort of packages up all the complexity of a mosfet into 1 simple number that's actually useful for circuit design. I'm not familiar with this transistor, but quick google search turned up a datasheet which says 10nC typical and 12nC worst case. If those numbers aren't accurate for the part you're using, hopefully this explanation will at least help show how to estimate this sort of thing.

    The other key piece of info is an idea of how slowly you're willing to tolerate the transistor switching. This number is really matter of your personal preference or performance requirement. I'm going to just guess 1% of the PWM period, which is 500ns for 20 kHz PWM.

    If you use some imagination that your gate driving circuit will deliver constant current, then just divide these numbers to get the current required to make the gate change in that amount of time, because the electrical current (amperes) is coulombs per second. So for this case, 10nC divided by 500ns means you need 20mA.

    Of course driving the gate with a fixed voltage through a series resistor isn't going to give constant current. But 3.3V and 1K definitely isn't going to be fast enough, since the current starts at 3.3mA and decreases as you go, which falls pretty far short of the constant 20mA goal.

    Again, you could put a lot of work into non-linear math, but I usually prefer to just do a simpler estimate. Usually I look for the lowest gate voltage the transistor datasheet gives an on resistance spec, which is 2.5V in the datasheet I found. I just assume if the transistor actually works reasonable well at lower voltage, the marketing folks who wrote the datasheet would have mentioned it (remember, datasheets are a sales pitch). So I would compute the actual current through the resistor when the mosfet is at this minimum performance point. That means 0.8V across the resistor when the mosfet is just reaching a reasonably good on state. If you choose the parts for the right current at that point, you can know you drove more current before the mosfet got to this minimum performance, and then less to go from that point to the gate fully charged.

    So if you want 20mA current when you have only 0.8V, then you would need a 40 ohm resistor. That's too low for Teensy to drive directly. You could add a buffer chip. If you use a chip which drives with more than 3.3V, then the required resistor changes. If you drive 5V, then you would have 2.5V at the mosfet-just-turned-on point. For 20mA, you could use 125 ohms, rather than only 40.

    This is all very approximate, but hopefully it gives you a way to estimate without diving down a difficult and error-prone rabbit hole of non-linear math.

  3. #3
    Hello Paul Nice, I didn't expect an answer from the Mastermid right away. Thank you very much for your time.

    I feel the same way, I am also someone who likes to do without complicated mathematics. That's why I didn't even ask for a mathematical calculation formula, because I certainly wouldn't understand it anyway But you explained it to me in a very understandable way! So I'm supposed to use an Arduino that can do 20mA
    No, I'm just kidding, I'm sticking to Teensy devinitely! I've got a lot of them and have been using them for years.

    So I'll be sure and use a gate driver because I don't want to exceed the 4 mA (max) per pin.

    -> Then I would be with the next question. I've made quite a few PCBs before, but this would be my first time using a gate diver or buffer. Maybe someone can help me here.
    My first thought would be a small but fast P channel mosfet in front of the UT4404. But to be honest, I have no idea. However, I want it to be as simple as possible

    Also thanks Paul for pointing out that the diode is slow. Wonderful, I should put questions to the forum more often!

    I have revised my circuit. I already apologize if this is completely wrong. Is this design better?

    Click image for larger version. 

Name:	Unbenannt.PNG 
Views:	15 
Size:	18.3 KB 
ID:	26537

  4. #4
    From your schematic I'm not sure the 10K will pull the main MOSFET low fast enough to get the MOSFET fully off.

    I would defiantly breadboard this up first. I've spend some time trying to get a decent driver circuit to work with 15K-25K PWM frequency, and it's challenging. My MOSFET seem to get very hot even with a 2 amp load. In my case I'm guessing my driver is not getting the MOSFET fully /off. I started with and idea from the web shown below and seems drive a decent signal to the mosfet.




    Click image for larger version. 

Name:	MOSFET.png 
Views:	15 
Size:	38.7 KB 
ID:	26538

  5. #5
    Microchip makes some nice FET drivers in several varieties. Something like the MIC4416 should do the job.

  6. #6
    Thank you Kris,
    I kind of like your design, even if I don't fully understand it yet, but it's getting late. I'll take a look at it tomorrow and try to learn something from it.
    But I'm starting to understand that my design is pretty stupid.
    Still, I think it's very funny how much you learn here. Thanks.
    I try to think through my next design better.

  7. #7
    Hello UhClem,
    Thank you very much, I had already looked for a driver module, but I didn't really know where to start. According to the data sheet, the MIC4416 is apparently exactly what I need!
    Nevertheless, I would like to work on my schematic a little more to find out whether this is also possible with a single P-Channel. I have the feeling that I still have a lot to learn from these lines of thought. On the other hand, it also helps others if I or we come to a solution. In the worst case, I just take a driver module. After all, they are not there without a reason. When I look at what is happening inside the module according to the data sheet, it may not be that easy ...

  8. #8
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,456
    Quote Originally Posted by KrisKasprzak View Post
    I started with and idea from the web shown below and seems drive a decent signal to the mosfet.


    Click image for larger version. 

Name:	MOSFET.png 
Views:	15 
Size:	38.7 KB 
ID:	26538
    Two issues with that: it won't drive the gate to the full 5V due to the Vbe drop, so its a little borderline,
    but mainly no free-wheel diode across the inductive load, so it'll probably fry the MOSFET and produce
    loads of interference until this happens.

    It actually simpler to use a gate driver chip than discrete gate-driver circuits, they are tailor made for
    the job and can accept 3.3V logic signals in. and if you have 12V supply you aren't limited to logic-level
    FETs either. And if you socket the gate driver chip and provide series resistance on the logic connections
    to it you have protected your microcontroller should the FET blow up and take the driver with it.

  9. #9
    UhClem, thanks for bringing this to my attention. It looks like the control input voltage min is 2.4 and suitable for a direct connection to a Teensy. I didn't see a range for control frequency but the graphs indicate this is well over 20khz. I'm going to get some and experiment. I tried different drivers but were not as elegant as this. Any idea if this driver can drive several MOSFETS?

    wasserwiesel. I would start with this driver. It's basically the same principal as my schematic above, but uses MOSFETS, see image from the data sheet. Also internally and has some more capability--namely it's not-inverting meaning a low signal from the Teensy will drive a low signal to your MOSFET. My implementation is inverting meaning to drive you MOSFET on, your teensy must output high. The do offer an inverting version if that's your thing.

    MarkT, I do use a snubber but just not shown in my screen grab. My Vcc is +12 and i get a bit over 10 at the gate, but something is still wrong since the mosfets are running hot. I'll be trying the above cited chip.

    Click image for larger version. 

Name:	driver.PNG 
Views:	15 
Size:	46.5 KB 
ID:	26543

  10. #10
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    1,094
    IMO, it's worth learning to use LTSpice. It makes things like this easy and is good for visualizing the results.

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,496
    Quote Originally Posted by wasserwiesel View Post
    Nevertheless, I would like to work on my schematic a little more to find out whether this is also possible with a single P-Channel.
    Generally speaking, you would need at least 2 transistors to drive the mosfet gate. With PWM, turning the mosfet off quickly is as important as turning it on quickly. The circuit in msg #3 only delivers current to turn the mosfet on, leaving the on-to-off switching to be done very slowly by only a 10K resistor (10X slower than you would have achieved with the 1K resistor directly from Teensy's pin).

    Using a driver chip is easiest, as it will usually have more transistor which level shift the 3.3V input to a higher voltage that better drives the mosfet gate. If you use the circuit from msg #4, keep in mind it loses 0.7 volts of the drive voltage in exchange for boosting the current.

  12. #12
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,496
    Your other option is to find a different mosfet with lower total gate charge. If you can find one with only 2nC instead of 10nC, then you could use 5X lower gate current which you can easily get directly from a Teensy pin. Usually this requires a compromise in on-resistance spec and maximum current rating. Mosfets with lower voltage rating also tend to require less gate charge.

  13. #13
    Many thanks Paul and everyone else for the help. I took a closer look at the MIC4417, but unfortunately I will probably not be able to use it. Just like almost every other gate driver I have found, it needs at least 4.5V as a voltage supply. However, I have to use a 1S Lipo Battery for my circuit.
    I also looked at infineon, which also offer similar drivers, but I couldn't find a suitable module. Does anyone happen to know a small driver which I can use for it?

    Assuming I replaced the 10K resistor with a 100 ohm, would the circuit work? So far you have only told me that the resistance is too great. Maybe someone can explain to me why this wouldn't work. I would like to try it out on the breadboard, but unfortunately I can't do that at the moment.

    I am aware that I would then have to invert the PWM signal, but would that be a problem? I could invert the signal beforehand, but I would do without it for reasons of space. Unless there's a reason I have to.

    Click image for larger version. 

Name:	Unbenannt.PNG 
Views:	15 
Size:	18.4 KB 
ID:	26555
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Unbenannt.PNG 
Views:	10 
Size:	33.6 KB 
ID:	26554  

  14. #14
    Senior Member BriComp's Avatar
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    501
    it needs at least 4.5V as a voltage supply. However, I have to use a 1S Lipo Battery for my circuit.
    Use one of these or one of these.
    Could well solve a lot of problems. Those prices are for lots of 5 for the first and 10 for the last by the way.

  15. #15
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    1,094
    For example, a SSM3K56CT has a 1 nC gate charge. Doesn't a teensy pin source and sink current, meaning that the mosfet will turn off about as fast as it turns on with no pull-down resistor?

  16. #16
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,456
    Quote Originally Posted by jonr View Post
    For example, a SSM3K56CT has a 1 nC gate charge. Doesn't a teensy pin source and sink current, meaning that the mosfet will turn off about as fast as it turns on with no pull-down resistor?
    Yes, but you need some sort of pull-down to keep the FET off during reset too.

    Also the SSM3K56CT as a high on-resistance of 300 milliohms - its not for high current drone motors.
    You'll probably need several amps for those motors under load, so an on-resistance less than 100milliohms
    is wise, and less than 50 milliohms for easy thermal management. 2A in 50 milliohms is 200mW which
    is about tolerable for a small SMT FET without special heat sinking.

  17. #17
    Yes, during a reset or upload it is very important that the motors do not start. In addition, the motor can quickly pull over 4A. So I doubt I can find a single mosfet that can do that. Even if there is a Mosfet that can do this to some extent, I might not be satisfied, because I don't want a structure that is close to the limit.

    Yes, a step-up controller would be an option, but I would like to forego it if possible, at the moment. But thank you for the tip!

    I have a very simple and easy way of thinking, and that's what my solutions usually look like. And that's why I'm currently still stuck with my schematic, as no one has been able to tell me why it doesn't work with a small resistor.
    Maybe simply because it's such a stupid circuit and you usually don't design a driver that way. But I learn most from my mistakes, so it would be nice if someone could tell me if this is total bullshit or if it would be worth a try.

  18. #18
    As Paul said, with PWM, turning the mosfet off quickly is as important as turning it on quickly. So if this doesn't work with my somewhat unusual design, just say so. I would just like to understand why, because then I'll be a little smarter again

  19. #19
    Senior Member BriComp's Avatar
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    501
    Can I ask you a quick question? How are you charging the LipO?

  20. #20
    With a lipo charger

  21. #21
    Senior Member BriComp's Avatar
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    501
    While plugged into the circuit or are you taking the battery out to charge it?

  22. #22
    Yes, the battery is taken out for charging.

  23. #23
    Senior Member BriComp's Avatar
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    501
    Why don't you use one of these in circuit chargers which also gives 5v output? Then you can use a MIC4417 Mosfet gate driver.
    Click image for larger version. 

Name:	Lion charger 5v output.jpg 
Views:	14 
Size:	262.9 KB 
ID:	26561

  24. #24
    I actually didn't plan to include a charger in my circuit. But the idea isn't all that bad. Thanks, I'll keep it in mind.
    At the moment I am interested in understanding whether my driver circuit would work.

  25. #25
    Senior Member BriComp's Avatar
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    501
    Yes, I am using some of these in my remote monitoring system.
    They have both 5v and 3.3v output.
    I solder a lead directly to the battery +ve connection so that I can monitor
    battery voltage, so as to not deep discharge the battery. I can then send a
    message that the battery needs to be connected to be charged. That is for
    systems not permanently connected and effectively used as a UPS.
    Click image for larger version. 

Name:	Lion charger 3.3v 5v output battery holder.jpg 
Views:	15 
Size:	111.0 KB 
ID:	26562

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •