Author Topic: Proper MOSFET driver for 30N06L  (Read 1950 times)

0 Members and 1 Guest are viewing this topic.

Offline help_me_pick_usernameTopic starter

  • Contributor
  • Posts: 36
  • Country: au
Proper MOSFET driver for 30N06L
« on: November 21, 2019, 09:26:24 pm »
I have a project where I am controlling a 10 watt LED with an ESP8266. The LED runs at 12 volts and the ESP8266 at 3.3 volts. I have a 30N06L MOSFET that is controlling the LED via pwm. Since the MOSFET is being driven by 3.3 volts, it's not being driven to 100% output. I have burnt two ESP8266's so far when I tried to use a BJT to control the MOSFET instead.

At this point I don't want to burn another ESP8266 so I'm looking for a suitable mosfet driver IC that I can use to drive the MOSFET properly.
 

Offline aheid

  • Regular Contributor
  • *
  • Posts: 245
  • Country: no
Re: Proper MOSFET driver for 30N06L
« Reply #1 on: November 22, 2019, 05:15:42 pm »
Could it be you wired the BJT wrong and got 12V onto the GPIO pin? Find it hard to believe you bricked the whole thing by simply forgetting a base resistor for the BJT.

Could you perhaps post schematic of what you've tried so far? Also, which BJT?
 

Offline help_me_pick_usernameTopic starter

  • Contributor
  • Posts: 36
  • Country: au
Re: Proper MOSFET driver for 30N06L
« Reply #2 on: November 23, 2019, 06:24:18 am »
I think I did wire the BJT (2N3906) wrong when I burnt the first one. Since I'm powering this project with an 18v power supply, yeah. 18v to the 3.3v tolerant GPIO pin. Umm, so I didn't actually use a base resistor for the BJT in either scenario, I didn't think that it was that important (reading your reply, I guess I was very wrong).

The first time, the was an audible sound, and I could smell the burnt chip (after I took off the shielding, I could clearly see where the chip ruptured). The second time though, it was completely silent, there was no smell. (The second time though, I'm pretty sure I used 12v from the buck converter to supply the BJT instead).

I was honestly being really careful the second time when I wired up the circuit, was it the lack of a base resistor that got me?
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3180
  • Country: au
Re: Proper MOSFET driver for 30N06L
« Reply #3 on: November 23, 2019, 06:31:12 am »
What is the pwm frequency? Probably doesn’t need to be much more than 100Hz. Low frequency means low switching losses.
 

Offline help_me_pick_usernameTopic starter

  • Contributor
  • Posts: 36
  • Country: au
Re: Proper MOSFET driver for 30N06L
« Reply #4 on: November 23, 2019, 12:15:37 pm »
Some quick googling shows that the default switching frequency for the ESP8266 is 1kHz.
 

Offline aheid

  • Regular Contributor
  • *
  • Posts: 245
  • Country: no
Re: Proper MOSFET driver for 30N06L
« Reply #5 on: November 23, 2019, 07:12:03 pm »
A PNP, if you hooked that with emitter to 18V and base to GPIO then no wonder the microcontroller fried, think about the voltage drop over the base-emitter junction and what voltage would present itself a the GPIO pin.

Anyway, I've attached a LTSpice file for a simple driver circuit. It uses a pull-up resistor, R1, to drive the gate high when the GPIO pin is low. When the GPIO pin is high, it turns on the NPN transistor, which drives the gate low. R2 here is just to ensure the gate is discharged when the circuit is without power.

In the attached screenshots you can see the effect of the base resistor Rb. Note the scale of the current (blue trace) in the two screenshots. In this case the voltage source driving the "GPIO pin" in the simulation is an ideal voltage source, so can source and sink as much current as it needs to. In reality the actual GPIO pin has internal resistances etc so results won't be quite as bad as this, but it's still informative I think.

I've also attached screenshots of the rise and fall time of the gate voltage. One concern when driving MOSFETs is that these transition periods should be short, because the MOSFET dissipates a lot of power when it's in this in between state, the linear region as it's called. I'm no expert, but I think the graph shows the R1 value is low enough. I'm considering the MOSFET to be fully saturated at Vg = 8V, which is slightly conservative.

Note that the NPN driver means the load will be on when the GPIO pin is low or not driven (ie before the ESP8266 starts). If this is an issue you could add a PNP transistor between the GPIO and NPN, but hooked up to the 3.3V line instead. I can show an example if you wish.
« Last Edit: November 23, 2019, 07:14:02 pm by aheid »
 
The following users thanked this post: help_me_pick_username

Offline help_me_pick_usernameTopic starter

  • Contributor
  • Posts: 36
  • Country: au
Re: Proper MOSFET driver for 30N06L
« Reply #6 on: November 24, 2019, 09:49:32 am »
Woah! Thanks for the schematics. Super useful, but the only problem is I won't have another ESP to try this with until at least a few more weeks.
 

Offline aheid

  • Regular Contributor
  • *
  • Posts: 245
  • Country: no
Re: Proper MOSFET driver for 30N06L
« Reply #7 on: November 26, 2019, 03:30:25 am »
You can build the circuit without the ESP, and test it by connecting the lead that would be going to the ESP to GND or 3.3V / 5V to emulate the GPIO pin being high or low. Double check connections before powering up.

Once you have verified it works it should be safe to connect the ESP.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Proper MOSFET driver for 30N06L
« Reply #8 on: November 26, 2019, 04:33:18 am »
You absolutely need a base resistor to drive a BJT. Take a step back and take the time to learn how to use transistors as switches, you should be able to pick up the fundamentals in an evening, it's not complex and it will save you a lot of time and damaged parts.
 

Offline help_me_pick_usernameTopic starter

  • Contributor
  • Posts: 36
  • Country: au
Re: Proper MOSFET driver for 30N06L
« Reply #9 on: December 08, 2019, 01:04:59 am »
You absolutely need a base resistor to drive a BJT. Take a step back and take the time to learn how to use transistors as switches, you should be able to pick up the fundamentals in an evening, it's not complex and it will save you a lot of time and damaged parts.
Does anyone have a link to a proper tutorial/guide on how to drive a BJT? That goes over absolutely everything?
 

Offline jonroger

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: Proper MOSFET driver for 30N06L
« Reply #10 on: December 08, 2019, 03:11:38 am »
I would look into a different mosfet - one that is fully on at 3.3V.
I am available for custom hardware/firmware development.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Proper MOSFET driver for 30N06L
« Reply #11 on: December 08, 2019, 03:18:45 am »
If you want "absolutely everything" you'll want to go get yourself a stack of textbooks. These should get you started though:

https://www.electronicshub.org/transistor-as-a-switch/

https://jeelabs.org/2012/11/12/high-side-switching/
 

Offline help_me_pick_usernameTopic starter

  • Contributor
  • Posts: 36
  • Country: au
Re: Proper MOSFET driver for 30N06L
« Reply #12 on: December 08, 2019, 11:09:29 am »
You can build the circuit without the ESP, and test it by connecting the lead that would be going to the ESP to GND or 3.3V / 5V to emulate the GPIO pin being high or low. Double check connections before powering up.

Once you have verified it works it should be safe to connect the ESP.

I built your circuit and tested it, and it works! Thank you. I have attached a picture of my schematic at the moment. One change I made, I connected the MOSFET pull-up resistor to 12v instead of 18v VCC, since that leads to about 10v on the pin, which is enough to fully saturate the MOSFET (I think), and leads less heat dissipation when BJT is active.

I have not tested the circuit with the ESP yet.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Proper MOSFET driver for 30N06L
« Reply #13 on: December 08, 2019, 10:50:36 pm »
In the future you can make a schematic a lot more readable by moving things around a little. For example place R2 vertically and connect it directly to the voltage rail instead of having it loop around like that.
 
The following users thanked this post: help_me_pick_username


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf