Author Topic: Stumped by slow MOSFET rise time  (Read 7625 times)

0 Members and 1 Guest are viewing this topic.

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Stumped by slow MOSFET rise time
« on: July 21, 2017, 05:52:18 am »
Mighty EEVBLOG,

I have the attached very simple circuit.
DIN is a 3.3V signal from an ATmega328p.

The MOSFET is a BS270
Datasheet -> http://www.mouser.com/ds/2/149/BS270-1006630.pdf

I'm using it to control WS2812 LEDs.

The problem I'm having is that despite the datasheet showing 10ms turn-on time, on my oscilloscope the nice, square 3.3V wave I'm feeding in get's turned into horrible peaks with seemingly a ~300ns rise time.

I'm saying seemingly, because the LEDs actually work. Which has me confused :D

Ideas?
 

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
Re: Stumped by slow MOSFET rise time
« Reply #1 on: July 21, 2017, 06:10:50 am »
You are looking at the switching times under very specific conditions specified in the datasheet. You are feeding it a GS voltage of 3.3V and the datasheet specifies 10V, so that could be one reason why you are not seeing the expected raise time.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: Stumped by slow MOSFET rise time
« Reply #2 on: July 21, 2017, 07:59:05 am »
Try reducing the value of R1 to 1k.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Stumped by slow MOSFET rise time
« Reply #3 on: July 21, 2017, 11:07:50 am »
Spec shows turn on from a V source with 25 ohms source Z. Your Atmega output
has much higher effective Rdson than 25 ohms. Additionally you are driving the
miller C at the MOSFET gate as it moves into active region, these all contribute
to slowing down turn on & off time.  Another contributing factor is Vgs drive available,
look at the normalized gate drive vs Rdson curves.


http://www.vishay.com/docs/73217/73217.pdf


https://www.onsemi.com/pub/Collateral/AN1090-D.PDF


The resolution is to use gate drivers.


Regards, Dana.


« Last Edit: July 21, 2017, 11:11:23 am by danadak »
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Stumped by slow MOSFET rise time
« Reply #4 on: July 21, 2017, 01:44:24 pm »
I don't know what to think.

Where in the datasheet does it show 10ms?

CMOS pins are typically a few ns.  It'll be a lot slower with a MOSFET gate on there loading it down.

Are you referring to the drain / output waveform instead?

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

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Stumped by slow MOSFET rise time
« Reply #5 on: July 21, 2017, 02:14:25 pm »
I had been thinking that the 10 ms number should have been 10 ns and the op is measuring 300 ns.

In any event, this particular MOSFET doesn't even pretend to be a "logic level" device.  There are "logic level MOSFETs" around that might show better switching but the fact is, a 3.3V ATmega uC simply can't drive enough gate current to get over the capacitance that is slowly charging at the gate.

Figure 5 in the datasheet shows that at 3.3V Vgs the device is barely on the curves.  Sure, it will switch a hundred milliamps but is won't do it very quickly.

That's why they invented gate drivers - a device that can dump AMPS into a gate to get it switching a lot faster.
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: Stumped by slow MOSFET rise time
« Reply #6 on: July 21, 2017, 02:26:11 pm »
Max Vgs(th) of 2.5v means that MOSFET is really not suitable for a 3.3v drive, you want at least ~5v drive.  Look for a FET with a max Vgs(th)<1.7, or get a gate driver.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Stumped by slow MOSFET rise time
« Reply #7 on: July 21, 2017, 04:20:18 pm »
Max Vgs(th) of 2.5v means that MOSFET is really not suitable for a 3.3v drive, you want at least ~5v drive.  Look for a FET with a max Vgs(th)<1.7, or get a gate driver.

To this end, you want low voltage MOSFETs, Vds <= 20V.  These have higher specific transconductance than conventional (>= 30V) parts, so they can be used on 3.3V, even 2.5V and 1.8V logic.

Offhand, I like RUM001L02T2CL for small switches, but the package may be inconveniently small for prototyping.

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

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Re: Stumped by slow MOSFET rise time
« Reply #8 on: July 21, 2017, 08:01:02 pm »
Try reducing the value of R1 to 1k.

Even tried shorting R1 - no effect.

Where in the datasheet does it show 10ms?

As others have pointed out, yes, NANO seconds (typo :( ).

Max Vgs(th) of 2.5v means that MOSFET is really not suitable for a 3.3v drive, you want at least ~5v drive.  Look for a FET with a max Vgs(th)<1.7, or get a gate driver.

Awww crap. As you and others pointed out, yes, 3.3V doesn't seem to be on the curve.
Sloppy part selection.

Thanks everyone!
 

Offline bson

  • Supporter
  • ****
  • Posts: 2269
  • Country: us
Re: Stumped by slow MOSFET rise time
« Reply #9 on: July 22, 2017, 01:14:38 am »
How many WS2812?
The datasheet for that part has no current consumption vs brightness info, so I'd start by measuring current consumption at my desired brightness.  Multiply this by the number of LEDs, and that's the drain current the MOSFET needs to handle.  A BSS806 might switch fast enough, and has Rds(on) on the order of tens of \$m\Omega\$ so can easily handle 1.5A - as long as you switch it fast enough.

By the way, if the WS2812's power on in an off state, then switching speed may not matter.
« Last Edit: July 22, 2017, 01:35:10 am by bson »
 

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Re: Stumped by slow MOSFET rise time
« Reply #10 on: July 22, 2017, 06:09:50 am »
The MOSFET is only for the data line, not drawing any current really.
 

Offline bson

  • Supporter
  • ****
  • Posts: 2269
  • Country: us
Re: Stumped by slow MOSFET rise time
« Reply #11 on: July 22, 2017, 07:57:42 am »
The WS2812 datasheet suggests the data line current consumption is 1uA, so you can probably connect that directly to the I/O pin.
 

Offline Beamin

  • Super Contributor
  • ***
  • Posts: 1567
  • Country: us
  • If you think my Boobs are big you should see my ba
Re: Stumped by slow MOSFET rise time
« Reply #12 on: July 22, 2017, 08:41:22 am »
Mighty EEVBLOG,

I have the attached very simple circuit.
DIN is a 3.3V signal from an ATmega328p.

The MOSFET is a BS270
Datasheet -> http://www.mouser.com/ds/2/149/BS270-1006630.pdf

I'm using it to control WS2812 LEDs.

The problem I'm having is that despite the datasheet showing 10ms turn-on time, on my oscilloscope the nice, square 3.3V wave I'm feeding in get's turned into horrible peaks with seemingly a ~300ns rise time.

I'm saying seemingly, because the LEDs actually work. Which has me confused :D

Ideas?

Pardon my ignorance but how does that circuit work? I could see if it had one led that fed into the mosfet but how is that LED wired and why does it have a pin going to ground and not to the source(top) of the mosfet in the scematic?
Max characters: 300; characters remaining: 191
Images in your signature must be no greater than 500x25 pixels
 

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Re: Stumped by slow MOSFET rise time
« Reply #13 on: July 22, 2017, 06:38:00 pm »
The WS2812 datasheet suggests the data line current consumption is 1uA, so you can probably connect that directly to the I/O pin.

I/O pin is 3.3V, WS2812 needs 5V in this case.
 

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Re: Stumped by slow MOSFET rise time
« Reply #14 on: July 22, 2017, 06:39:43 pm »
Pardon my ignorance but how does that circuit work? I could see if it had one led that fed into the mosfet but how is that LED wired and why does it have a pin going to ground and not to the source(top) of the mosfet in the scematic?

LED is not one LED, it a strip of WS2812b LEDs:
http://www.seeedstudio.com/document/pdf/WS2812B%20Datasheet.pdf
 

Offline bson

  • Supporter
  • ****
  • Posts: 2269
  • Country: us
Re: Stumped by slow MOSFET rise time
« Reply #15 on: July 22, 2017, 06:56:35 pm »
It doesn't need 5V, it needs 0.7*Vdd.  If you drop the 5V with a diode you get 4.35V and VIH becomes 4.34*0.7 = 3.04V.  A Vdd of 4.35V is perfectly within its range of 3.5-5V.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Stumped by slow MOSFET rise time
« Reply #16 on: July 22, 2017, 08:02:27 pm »
74HCT07 or '17 has TTL/LVCMOS compatible inputs and 5V compatible outputs ('07: open drain).

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

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Re: Stumped by slow MOSFET rise time
« Reply #17 on: July 23, 2017, 11:02:53 pm »
It doesn't need 5V, it needs 0.7*Vdd.  If you drop the 5V with a diode you get 4.35V and VIH becomes 4.34*0.7 = 3.04V.  A Vdd of 4.35V is perfectly within its range of 3.5-5V.

Yes, I've seen that trick. But you have to "sacrifice" one LED and it's really no easier than using a MOSFET.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Stumped by slow MOSFET rise time
« Reply #18 on: July 24, 2017, 12:56:19 am »
The usual way to do the voltage translation for driving pixels from a 3.3V micro is to use a 74ACT541 or similar buffer.

The buffer is run from the 5V supply, but has 3.3V compatible inputs.
 

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Re: Stumped by slow MOSFET rise time
« Reply #19 on: July 25, 2017, 05:20:29 am »
Wow, I'm really questioning my life choices right now....

Replaced the MOSFET with this one:
http://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en570658

Now I'm not getting any real output at all, just ground+noise. :(
So what's wrong with my part choice now? :(
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Stumped by slow MOSFET rise time
« Reply #20 on: July 25, 2017, 06:11:07 am »
More likely incorrect connections.
 

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Re: Stumped by slow MOSFET rise time
« Reply #21 on: July 25, 2017, 06:34:45 am »
More likely incorrect connections.

I have made a PCB for this. So same connections as with the other MOSFET.
Also measured everything. Source is ground, Drain is 5V / output and Gate is 3.3V signal as in the original schematic.
 

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Re: Stumped by slow MOSFET rise time
« Reply #22 on: July 25, 2017, 07:48:37 am »
It's speed once again :(
At around 90kHz or so the signal breaks down.
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4527
  • Country: gb
Re: Stumped by slow MOSFET rise time
« Reply #23 on: July 25, 2017, 08:24:37 am »
It's speed once again :(
At around 90kHz or so the signal breaks down.

Probably because R1 10K will give a slow rise time, as it takes time to charge the stray (including the Fets contribution) capacitance.

Lower R1 to e.g. 1K or use the other suggestions in this thread, such as logic gates. Which should be considerably faster.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Stumped by slow MOSFET rise time
« Reply #24 on: July 25, 2017, 08:40:20 am »
If you're still using that 10K pull-up that's definitely an issue.  You need to drive the pixels with a lot lower source impedance than that.  Even 470R is only around 10mA of +ve drive.
 

Offline Kerr

  • Newbie
  • Posts: 1
  • Country: us
Re: Stumped by slow MOSFET rise time
« Reply #25 on: July 25, 2017, 11:27:39 am »
as a note that led control says 6v minimum input
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Stumped by slow MOSFET rise time
« Reply #26 on: July 25, 2017, 11:44:17 am »
WS28xx are 5V devices and require a 5V drive signal.
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Stumped by slow MOSFET rise time
« Reply #27 on: July 25, 2017, 03:39:14 pm »
As far as levels are concerned you only need to talk to the first LED....

There is a hack...

http://hackaday.com/2017/01/20/cheating-at-5v-ws2812-control-to-use-a-3-3v-data-line/

or for the level shifter... 2N7000? BSS138?

Oh.... and what danadak said.  ;)
« Last Edit: July 25, 2017, 03:43:35 pm by NivagSwerdna »
 
The following users thanked this post: Beamin

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Re: Stumped by slow MOSFET rise time
« Reply #28 on: July 25, 2017, 10:13:09 pm »
Thanks David and MK14!
Spot on.

Changed the pull-up to 220Ohm and it does a nice square(-ish) wave at 800kHz.
Works great now.
 
The following users thanked this post: MK14, Beamin


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf