Going round in circles trying to come up with a MOSFET solution - Page 1
Forum section: electronics / projects

author: ilium007
author_rank: Frequent Contributor
timestamp: October 23, 2017, 02:58:42 pm
content: 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.

author: Benta
author_rank: Super Contributor
timestamp: October 23, 2017, 03:20:56 pm
content: Lower your PWM frequency. 200 Hz is high enough to avoid flicker.

author: ilium007
author_rank: Frequent Contributor
timestamp: October 23, 2017, 03:22:53 pm
content: Quote from: Benta on October 23, 2017, 03:20:56 pmOk 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 ?

author: Benta
author_rank: Super Contributor
timestamp: October 23, 2017, 04:22:24 pm
content: 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.

author: danadak
author_rank: Super Contributor
timestamp: October 23, 2017, 04:48:37 pm
content: 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.jspLook at total drive spec all outputs on I/O expander, Make sure gate drive currents of allMOSFETs do not exceed that. If it does consider coding turn on by doing a loop where onesolenoid is turned on at a time. So say you need to turn on 3, then turn one on, then bitstreamto 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 considerusing optocouplers between expander and MOSFET gates.Regards, Dana.

author: ilium007
author_rank: Frequent Contributor
timestamp: October 24, 2017, 02:54:10 am
content: 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.

author: frog
author_rank: Contributor
timestamp: October 24, 2017, 04:20:39 am
content: 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.

author: ilium007
author_rank: Frequent Contributor
timestamp: October 24, 2017, 04:22:52 am
content: Quote from: frog on October 24, 2017, 04:20:39 amI 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.

author: ilium007
author_rank: Frequent Contributor
timestamp: October 24, 2017, 04:28:21 am
content: 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).

author: ilium007
author_rank: Frequent Contributor
timestamp: October 24, 2017, 08:58:50 am
content: 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.

author: danadak
author_rank: Super Contributor
timestamp: October 24, 2017, 10:25:17 am
content: The current limit total is driven by internal buss voltage inside part,to make sure all subcircuits meet noise margins. Can also be limitson internal bond wire/pad capability before metal migration occursinside part.You have to meet both specs, Pdiss and Ivdd, Ivss.Regards, Dana.

author: Jeroen3
author_rank: Super Contributor
timestamp: October 24, 2017, 11:14:17 am
content: 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.

author: jaycee
author_rank: Regular Contributor
timestamp: October 25, 2017, 04:31:08 pm
content: Consider one of TI's PowerLogic chips insteadhttp://www.ti.com/logic-circuit/power/products.htmlFor 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.

author: frog
author_rank: Contributor
timestamp: October 25, 2017, 07:22:30 pm
content: Quote from: ilium007 on October 24, 2017, 04:22:52 amThere'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).

author: ilium007
author_rank: Frequent Contributor
timestamp: October 26, 2017, 12:19:19 am
content: 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.

author: frog
author_rank: Contributor
timestamp: October 26, 2017, 09:32:48 am
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: October 26, 2017, 10:44:32 am
content: 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.pdfIf 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

author: ilium007
author_rank: Frequent Contributor
timestamp: October 26, 2017, 11:56:09 am
content: Quote from: Hero999 on October 26, 2017, 10:44:32 amI've decided to ditch the isolation. It's not required as others have pointed out.

author: ilium007
author_rank: Frequent Contributor
timestamp: October 26, 2017, 12:02:07 pm
content: Quote from: frog on October 26, 2017, 09:32:48 amI 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.

author: Old Don
author_rank: Regular Contributor
timestamp: October 26, 2017, 12:17:02 pm
content: 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?

author: ilium007
author_rank: Frequent Contributor
timestamp: October 26, 2017, 12:27:42 pm
content: 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.