Author Topic: Going round in circles trying to come up with a MOSFET solution  (Read 4054 times)

0 Members and 1 Guest are viewing this topic.

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Going round in circles trying to come up with a MOSFET solution
« on: October 23, 2017, 02:58:42 pm »
Hi - I have spent hours trying to come up with ideas for a multi-use MOSEFT circuit for use on a model train layout.

I am going to be switching 26 solenoids from a 3.3v MCU and thought I would use a logic level MOSFET, the FQP30N06L is easily available in Australia -
 https://www.sparkfun.com/products/10213.

I am going to use multiple MCP23017 I2C I/O port expanders to increase the MCU outputs and had hoped to trigger the N channel MOSFET with this.

I then thought, "maybe I need opto-coupling" from the MCP23017 to the MOSFET, but what about PWM ? I want to also be able to dim a string of LED's from the MOSFETs and this is where I became stuck. I figured I would need up to 10kHz PWM capability and I don't know whether I can drive the FQP30N06L at 10kHz and not have the gate capacitance issues at that frequency. I also don't know how to find an optocoupler that will support 10kHz. A lot of topics I read talked about using a MOSFET driver such as the MCP1407 to provide a faster gate charge pump (I think) to speed up switching time.

I am switching < 30v at about 5A max. The PWM LED's will be significantly less.

The MCP23017 pins can drain about 20mA so I would need approx 150ohm gate resistor (at 3.3v) and a 10k gate to GND resistor as well as the usual flyback diode.

I am not sure where to go from here, do I need opto-isolation (this is all just for low voltage DC), how do I know what the max PWM freq I can use with the FQP30N06L and is a dedicated low-side MOSFET driver required?

Any help would be appreciated.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5875
  • Country: de
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #1 on: October 23, 2017, 03:20:56 pm »
Lower your PWM frequency. 200 Hz is high enough to avoid flicker.
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #2 on: October 23, 2017, 03:22:53 pm »
Lower your PWM frequency. 200 Hz is high enough to avoid flicker.

Ok thanks, so if I said, limit PWM for this design to 1Khz can I use the FQP30N06L direct ? How do I calculate the capacitance effect at the gate at 1kHz ?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5875
  • Country: de
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #3 on: October 23, 2017, 04:22:24 pm »
The gate capacitance results in slower switching (depending on gate driver resistance), but that's not necessarily a bad thing. It limits the irradiated noise considerably.
The thing you need to balance is static loss (which is basically the on-resistance of the MOSFET) and dynamic loss, which is the loss generated from rise time / fall time during switching. By lowering the frequency, this happens a lot less often, and so reduces dynamic losses.

At 1 kHz, I wouldn't worry about it.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #4 on: October 23, 2017, 04:48:37 pm »
Clamp the solenoids with diodes to suppress transients created by the solenoid.





Ground routing a challenge, single point ground in system.


Calculator for MOSFET Pdiss. https://webench.ti.com/wb5/FETs_Selection/FETPBWizard.jsp


Look at total drive spec all outputs on I/O expander, Make sure gate drive currents of all
MOSFETs do not exceed that. If it does consider coding turn on by doing a loop where one
solenoid is turned on at a time. So say you need to turn on 3, then turn one on, then bitstream
to expander adds another so now one is on and the next is turning on.....

Isolation, if soelenoid power system very noisey or you need galvanic isolation you could consider
using optocouplers between expander and MOSFET gates.


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #5 on: October 24, 2017, 02:54:10 am »
I had a NTD5867NL N-Channel Power MOSFET (60 V, 20 A, 39 m ohm) here at home so I set it up with a gate resistor of 1k and a drain pull down of 10k and tested it with a 5v gate trigger from the MCU.

I tested it at 10kHz and 20kHz PWM with a 200mA load (I'll I could find!) and it seems to work fine.

The circuit is the same as the one I found published by Freetronics.



I would still like to know if a MOSFET driver such as the MCP1407 is required and how I go about specifying an optocoupler that will handle the PWM frequencies.
« Last Edit: October 24, 2017, 02:56:33 am by ilium007 »
 

Offline frog

  • Contributor
  • Posts: 42
  • Country: nz
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #6 on: October 24, 2017, 04:20:39 am »
I don't see why you'd need optocouplers unless you need to keep the ground of your solenoid supply separate from the ground of your micro.  If you're worried about conducted transients from the solenoids (and you'd be right to be worried) then just make sure that there's a single point where the micro ground connects to the solenoid ground and you should be fine.  If you're going to connect the grounds to earth then that could be done at the same point.  In terms of switching speed, a micro pin will switch the FETs in a matter of microseconds.  Even putting a series resistor between the micro output and the FET isn't essential, although I'd be inclined to leave the pull-down in place just in case of the unexpected, although 100k should be adequate.

If the load is relatively high then you'd want to make sure that the FETs remain saturated at the max current you expect when the gate is driven at 3.3v.  At a pinch you may be able to increase the micro supply to 3.6.
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #7 on: October 24, 2017, 04:22:52 am »
Even putting a series resistor between the micro output and the FET isn't essential

I thought it was there to prevent excess current draw on the MCU pin that can only sustain 20mA or so.

I have 26 solenoids that will be switched via a capacitor discharge unit. I will be switching the DC negative from the CDU via the N-channel MOSFETs.
« Last Edit: October 24, 2017, 04:25:24 am by ilium007 »
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #8 on: October 24, 2017, 04:28:21 am »
I now need to work out if the MCP23017 is capable of sinking gate current for 16 of these MOSFETs simultaneously as the MCP23017 VSS max sink current is 150mA with 20mA capable on each output pin ie. you can't sink 20mA on each of the 16 pins simultaneously. I assume I size the series gate resistor to get lower than than 9mA (as long as this is enough for the MOSFET to turn on).

Does the Vss 150mA limit include the power requirement for the MCP23017 itself ?

And around in circles I go again.... maybe I need a MOSFET driver (MCP1407) to supply the gate source and then drive the MCP1407 with the I/O expander (MCP23017).
« Last Edit: October 24, 2017, 04:49:43 am by ilium007 »
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #9 on: October 24, 2017, 08:58:50 am »
The point I got to today was to design boards that had 16 MOSFET's each:

MCP23017 -> MCP1407 -> NTD5867NL -> LOAD (with flyback diode)

The 1 x MCP23017 I/O expander controlling 16 x MCP1407 MOSFET drivers that trigger 16 x n-channel MOSFETs. I still haven't found a way to provide the isolation between the MCP23017 and the 16 MCP1407's.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #10 on: October 24, 2017, 10:25:17 am »
The current limit total is driven by internal buss voltage inside part,
to make sure all subcircuits meet noise margins. Can also be limits
on internal bond wire/pad capability before metal migration occurs
inside part.

You have to meet both specs, Pdiss and Ivdd, Ivss.


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #11 on: October 24, 2017, 11:14:17 am »
I don't know about your solenoids, but you could save yourself many parts by getting a few of infineon high side (or low side) smart switches.
Then you only need a few different channels with actual mosfets, like FQD13N06L with a few of those cheap MCP14XX gate drivers for the LED strips.

I fail to see use in an isolator. But if you want to isolate do it before the IO expander with some SI86xx parts.
If all outputs need to be isolated, get an omron SSR or actual relays.
 

Offline jaycee

  • Regular Contributor
  • *
  • Posts: 206
  • Country: gb
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #12 on: October 25, 2017, 04:31:08 pm »
Consider one of TI's PowerLogic chips instead http://www.ti.com/logic-circuit/power/products.html

For example the TPIC6C595 is an 8-bit shift register with open drain MOSFET outputs. I've used them to switch relays, solenoids are basically the same thing. They are cascadeable and easy to drive from a microcontroller.

What voltage are your solenoids operating at ? I wouldn't say you need optoisolation.
 

Offline frog

  • Contributor
  • Posts: 42
  • Country: nz
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #13 on: October 25, 2017, 07:22:30 pm »

I thought it was there to prevent excess current draw on the MCU pin that can only sustain 20mA or so.

I have 26 solenoids that will be switched via a capacitor discharge unit. I will be switching the DC negative from the CDU via the N-channel MOSFETs.

There's no DC gate current, only what's required to charge the gate capacitance as you switch on/off.  If you're only going to switch one output at a time then I wouldn't worry too much about it, but on reflection, given that you have 26 solenoids I'd be inclined to agree that series resistors wouldn't be a bad thing.  With 1k you'd see a maximum transient of 3.3mA per channel, or a total of 26.4mA if you switch 8 outputs simultaneously (i.e. in the same CPU instruction).
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #14 on: October 26, 2017, 12:19:19 am »
The solenoids are driven at 12vDC and draw 2-3A on actuation. The TPIC6C595 won't be able to sink that sort of current !!!! This is why I was looking at driving the MOSFETs. I wanted to build a board that can be used for other general DC switching around the 5A mark as well as PWM outputs via the MOSFETs for lighting. This why I was thinking of using an I/O expander to get addressable outputs rather that using a shift register however over the past few days of research I came to the conclusion that the shift register would be the simplest option, something like a 74HC595 driving the MOSFET driver ICs and in turn then-channel MOSFETs. I would then have to mand PWM MOSFETs separately. However it would be nice to have 8 / 16 channel boards that are expandable and could be used for switching / PWM.

In regards to the gate current, I understand that the voltage here is used to charge the gate capacitor. The previous response says around 3.3mA with the 1k - how was this calculated ? Is this common between MOSFETs or do I calculate this based on some gate capacitance value in a data sheet ?

Given the comments here and reading more on the topic I'll drop the opto isolation to make things simpler. I'll look more in to the Infineon devices as well.

Thanks for the responses.
« Last Edit: October 26, 2017, 12:30:02 am by ilium007 »
 

Offline frog

  • Contributor
  • Posts: 42
  • Country: nz
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #15 on: October 26, 2017, 09:32:48 am »
3.3mA: initially the gate is driven low By the IO pin.  Assuming that the drive jumps instantly to 3.3v, the gate will still be at 0v and so a 1k resistor between the IO pin and the gate will see 3.3v and will pass 3.3mA (I=V/R) to charge the gate.  If you don't bother with a series resistor then the IO pin will source whatever current it can and switch the FET faster but with more or a transient on the supply.  If you're not interested in switching at hundreds of kHz then a series resistor will improve the EMC characteristics.

For a 5A capability I"d suggest choosing some FETs that reliably give that current capability with 3.3v on the gate, some require a little more.  In reality a micro will never quite reach the supply voltage on an IO pin but it won't be much below if there isn't a significant load.

Rather than using an IO expander you might consider using a micro with plenty of pins - they aren't that expensive and you have a lowered part count plus direct control over each IO pin.  SAM3S or SAMD20 would be my favourite at the moment - you get an ARM core and 32-bit processing and good clock speeds for a few dollars.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #16 on: October 26, 2017, 10:44:32 am »
I don't see why you need isolation.

How about using a high side driver IC, such as the VNQ690SP-E?

http://www.st.com/content/ccc/resource/technical/document/datasheet/a9/b9/7d/17/fe/d5/41/42/CD00044338.pdf/files/CD00044338.pdf/jcr:content/translations/en.CD00044338.pdf

If isolation is required, then a digital isolator such as the Si8640BA could be used, but then an isolated DC:DC is required to power the secondary side.
https://www.silabs.com/documents/public/data-sheets/si864x-datasheet.pdf
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #17 on: October 26, 2017, 11:56:09 am »
I don't see why you need isolation.

How about using a high side driver IC, such as the VNQ690SP-E?

http://www.st.com/content/ccc/resource/technical/document/datasheet/a9/b9/7d/17/fe/d5/41/42/CD00044338.pdf/files/CD00044338.pdf/jcr:content/translations/en.CD00044338.pdf

If isolation is required, then a digital isolator such as the Si8640BA could be used, but then an isolated DC:DC is required to power the secondary side.
https://www.silabs.com/documents/public/data-sheets/si864x-datasheet.pdf

I've decided to ditch the isolation. It's not required as others have pointed out.
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #18 on: October 26, 2017, 12:02:07 pm »
3.3mARather than using an IO expander you might consider using a micro with plenty of pins - they aren't that expensive and you have a lowered part count plus direct control over each IO pin.  SAM3S or SAMD20 would be my favourite at the moment - you get an ARM core and 32-bit processing and good clock speeds for a few dollars.

I have at least 120 I/O required for the project, I'm basing it on a Teensy 3.6 at AUD$55 and get 1/2 the I/O requirement.

I wanted to use a PWM LED driver for the approx 60 LEDs but off the shelf boards will be AUD$25 for 12 outputs, so that's too expensive. I'll probably use a high current shift register for them. The MOSFETs will switch the 26 solenoids and was looking at the port expander for these as well as the approx 20 switch inputs as I can get input interrupts with the MCP23017.

I have run out of ideas to get this working.
 

Offline Old Don

  • Regular Contributor
  • *
  • Posts: 163
  • Country: us
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #19 on: October 26, 2017, 12:17:02 pm »
Sounds like you are trying to re-invent DCC, have you looked into using existing boards and just controlling from a computer using open source JMRI?
Retired - Formerly: Navy ET, University of Buffalo Electronic Tech, Field Engineer and former laptop repair business owner
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: Going round in circles trying to come up with a MOSFET solution
« Reply #20 on: October 26, 2017, 12:27:42 pm »
I'm not going down the DCC path. I simply need solenoid control with LED visualisation, 3 PWM speed controls which I have already built and tested and a couple off Hall effect sensors to flash some lights.

I wanted to use this project to design a small board that I could use for 16 channel MOSFET control on other low voltage DC projects.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf