Author Topic: Slow switching mosfet??  (Read 5547 times)

0 Members and 1 Guest are viewing this topic.

Offline LukeBTopic starter

  • Contributor
  • Posts: 46
  • Country: au
Slow switching mosfet??
« on: September 02, 2018, 10:28:30 am »
Hello,

I have been working on this solar charge controller project recently and have slowly been figuring things out and have come to this circuit. The trouble is is that I want to run it at 60khz using the attiny85. However when I do this and check the voltage at the gate of the mosfet it seems to take too long to reach the supply voltage. This means that the mosfet doesn't turn off for high duty cycles.

See the attachment for schematic. Note: all the values and components are the actual ones i used.

Does anyone know why this happens??

Thanks
 

Offline Phoenix

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: au
Re: Slow switching mosfet??
« Reply #1 on: September 02, 2018, 10:40:03 am »
The MOSFET is only able to turn off using the 1k resistor to discharge its gate capacitance - you will need to make R4 a lot smaller (and fix the consequences) or find a better way to turn off Q2.
 

Offline LukeBTopic starter

  • Contributor
  • Posts: 46
  • Country: au
Re: Slow switching mosfet??
« Reply #2 on: September 02, 2018, 10:54:23 am »
what are the downsides to smaller resistance? I assume it is only power losses??
 

Offline LukeBTopic starter

  • Contributor
  • Posts: 46
  • Country: au
Re: Slow switching mosfet??
« Reply #3 on: September 02, 2018, 10:55:52 am »
Oh and what is a better way of turning it off?
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2320
  • Country: au
Re: Slow switching mosfet??
« Reply #4 on: September 02, 2018, 11:23:54 am »
Yes, if you only use a resistor to turn it off, reducing the resistor value causes your Q1 to get hot (and at some point, leave saturation.)

The ultimate solution is a specific gate driver IC ( here's a short list :P ).

Here's a guide by TI, section 5.1.2 basically describes your schematic (except you don't have an Rgate), and describes the problem you're having, and subsequent sections describe alternatives that alleviate these issues.

Your schematic is poorly drawn. PANEL+ should be at the top, PANEL- at the bottom; and maybe labels used to break the ATtiny and regulator out into a separate section. Also, you don't note on the schematic what the panel voltage is, which would be helpful!
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6262
  • Country: de
Re: Slow switching mosfet??
« Reply #5 on: September 02, 2018, 11:31:36 am »
The schematic is horrible, you'll need to learn how to draw.

That being said, your circuit is really nasty. The MOSFET is turned on by the 1k resistor and turned off through the BC547. This is a complete no-go, as the MOSFET will turn on uncontrolled while your MCU is booting.

For the frequency you're aiming for, I strongly recommend using a dedicated gate driver IC. The input capacitance of your MOSFET is several nF, which takes a lot of punch to charge/discharge.

« Last Edit: September 02, 2018, 04:47:00 pm by Benta »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Slow switching mosfet??
« Reply #6 on: September 02, 2018, 12:24:37 pm »
Use a high side gate driver.  This includes a bootstrap function to generate positive gate drive (for a cheaper N channel FET), and level translation.

As for the circuit: there's no current feedback.  All it takes is one hiccup from the MCU and the transistor is toast.  Consider the transient response of the circuit.  Take measures to ensure the peak inductor current doesn't build up beyond design maximum current.  This is usually done with a current sensor, maybe a shunt resistor and INAxxx shunt amplifier for this case (placed in series with L1, just before C2).  Peak current mode won't be easy with an ATtiny, but average current mode is doable, especially with that large value inductor.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline LukeBTopic starter

  • Contributor
  • Posts: 46
  • Country: au
Re: Slow switching mosfet??
« Reply #7 on: September 02, 2018, 01:37:54 pm »
Thanks for all the responses guys. Clearly I have a lot more to learn. Hopefully once I get to uni (only in year 12) I will learn what I need to. For now ill just keep tinkering. The responses are really really good. Thanks again.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9935
  • Country: us
Re: Slow switching mosfet??
« Reply #8 on: September 02, 2018, 09:48:23 pm »
The problem with MOSFETs is gate capacitance and the capacitor charging and discharging equations.

https://www.electronics-tutorials.ws/rc/rc_2.html

During the time it takes to get the MOSFET into full 'on' or 'off', the device is in a linear region and heating up.  What you really want to do is get the MOSFET to switch in zero time.  Well, in the presence of capacitance, switch in zero time takes infinite energy and you don't have it.  You particularly don't have it when you charge through a 1k resistor.

Second problem:  The capacitance problem means there is a slow rising edge to drain current.  And there is a slow corresponding falling edge although the transistor helps.  So, there are linear regions taking some amount of time on each end of the on-pulse waveform.  Kind of a trapazoid.  Here's the thing:  As the frequency increases, these edges stay the same (in time) and become a bigger portion of the total period.  As a result, the device is never in a full 'on' or 'off' state and is heating all the time.

Again, the answer to higher frequencies is to use a MOSFET driver that can pump AMPS into the gate - milliamps just doesn't cut it.  It won't be zero time switching but it'll pretty fast.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2320
  • Country: au
Re: Slow switching mosfet??
« Reply #9 on: September 03, 2018, 12:34:47 am »
Use a high side gate driver.  This includes a bootstrap function to generate positive gate drive (for a cheaper N channel FET), and level translation.

I'm curious: the output of the device is a battery, which means that if the switch stays off for a while (or even, spends a bunch of time in discontinuous conduction mode); the voltage at the source of the MOSFET will settle at Vbat; which would prevent the bootstrap capacitor from charging. So depending on the exact startup transients etc; such a solution could end up paralyzed at startup. Am I missing something? What's a non-horrible workaround?

PS: I just built an LED driver circuit that failed for a virtually identical reason... so I'm not making this up  ;D

Thanks for all the responses guys. Clearly I have a lot more to learn. Hopefully once I get to uni (only in year 12) I will learn what I need to. For now ill just keep tinkering. The responses are really really good. Thanks again.

You'll do well if you're tinkering with building solar battery chargers from scratch at year 12! Unsolicited career advice: Keep at it though; and don't wait for Uni to teach you things. Uni is way more fun if you're ahead of the curve (like you are now) than if you're in the middle of the curve (like you might be if you rest on your laurels until Uni). We've all been talking about complicated stuff; analysis of exactly what happens in your current circuit, bootstrapping high side drivers, bla bla bla. But this is your thread, feel free to direct it however you like. The one problem (apart from the lack of feedback mentioned by T3sl4) is that the gate is not being strongly driven to Vpanel when required. If you focus on that issue, you'll do fine. In particular, just replace your BJT with a TC4428 IC and that'll solve that problem instantly.
 

Offline Phoenix

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: au
Re: Slow switching mosfet??
« Reply #10 on: September 03, 2018, 01:01:00 am »
what are the downsides to smaller resistance? I assume it is only power losses??

Lots of power loss!

I wasn't sure of your background and how much info was required. I think rs20's document from TI is pretty good, especially the circuit in figure 20 might be the next step up in simplest circuit to do want you want. Would be good to know the input voltage range and expected output volts/amps.
 

Offline LukeBTopic starter

  • Contributor
  • Posts: 46
  • Country: au
Re: Slow switching mosfet??
« Reply #11 on: September 03, 2018, 12:33:53 pm »
the input voltage is around 18v and the output is around 14. The max amps is around 5 amps.
 

Offline LukeBTopic starter

  • Contributor
  • Posts: 46
  • Country: au
Re: Slow switching mosfet??
« Reply #12 on: September 03, 2018, 12:36:04 pm »
What would be better, smaller resistance to gate to reduce the switching time or a bigger one to reduce power losses to ground??
 

Offline xani

  • Frequent Contributor
  • **
  • Posts: 400
Re: Slow switching mosfet??
« Reply #13 on: September 03, 2018, 01:02:02 pm »
What would be better, smaller resistance to gate to reduce the switching time or a bigger one to reduce power losses to ground??
You've basically have two problems:

* level translating from your micro's 5V to MOSFET voltage
* driving MOSFET gate with decent current to switch it fast

You can solve both, as other mentioned, by just using dedicated MOSFET driver. They are cheap and useful so you will probably find use for them.

But if you for some reason don't want to, and if you can spare 2 more trannies you can do something like in attached schematic.

Q2 does level translation. It's speed will depend on resistor values, Q3/4 provides driving current for MOSFET gate, MOSFET resistor helps with oscillation.


 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf