WARNING: This is too technical and I spent far too much time writing this up for something that doesn't matter too much, but it was a fun thing to do while sipping on my morning coffee. Please read it that way
The resistor is placed as a safety precaution, when the G mosfet not connected to the picofly, while the switch on. That is why i calculated without the picofly first, using the maximum current the resistor might handle at the maximum voltage of mosfet vgs.
Assuming the accumulated charge will be discharged via the resistor.
I agree that a discharge resistor separate from the Picofly is a reasonable safety precaution in case the Picofly is disconnected. But I can just imagine how yet another offboard connection will increase the chances of someone doing it wrong and frying their Switch

Anyhow...
Then after that, if picofly connected, also taking into account the pull down resistor it have, whether the resistor added in the mosfet is suitable. Such that the high and low voltage of the GPIO (G mosfet) still in range, so the picofly could control the gate.
How much resistance value do you suggest for the pull down resistor on IR8342?
Right... so it makes sense that we want a large value resistor instead of a small one so the Picofly voltage doesn't droop. And we're also saying that the internal pulldown of the Pico when connected and powered on is sufficient to discharge the mosfet gate, which by itself is 50-80k. So we can in theory get away with a relative high external resistance that doesn't affect this value much.
If those mosfet is alone in there without the gate connected, only the Vds and GND connected to the apu cap, in your experience what are the possible Vgs might be in there, that we could use as a base of calculation?
I just use the maximum value the mosfet (Vgs) could hold as bases of calculation.
The highest value of Vgs to expect is the highest voltage in the circuit: 3.3V. But this value really isn't important because the calculation you did is for the maximum continuous power rating of the resistor that it can take all day long. Discharging the mosfet gate will happen in a tiny fraction of a second as we'll see below. And that calculation leads to a minimum resistance value that is way too small considering the Picofly internal pulldown.
From that diagram, if i use R 300kOhm then the parallel, assume the internal pulldown 65kOhm, is 53kOhm. It seems wrong using 300kOhm as pull down resistor in there, my guts told me that.
You seem expertise on this field. I rather interesting on your analysis for the pull down resistor we could use?
Let's think about the problem we are trying to solve. We want to discharge the mosfet gate to a small percentage of whatever gate voltage might be on there in a relatively short period of time. The mosfet has some gate capacitance and we are adding a resistor in parallel. A resistor and capacitor connected in this way discharges (and charges) exponentially
to 63% of its final value in one "time constant", 86% in two, and 95% in three time constants. The time constant is simply R * C. If R=65K and C = 1000pF,
we can calculate the time constant as only 65 microseconds. Three time constants is 195 microseconds. In actual fact, the mosfet will have stopped conducting well before this time because we'd be well below the threshold voltage where it is doing anything useful anyway.
Normaly the most used value for the pull down resistor is between 5k and 10k. I never saw someone using any deep calculation for this. Have done a few electronic layouts with 10k ohm, was never an issue.
Yes me too. Usually use 4.7k, 5k, 1k, 10k. Thats why, my instinct says its around that value..
This isn't a pullup / pulldown circuit in the traditional sense there we're pulling the voltage to defined LVTTL levels at (potentially) some relatively high frequency. We're just trying to discharge the tiny amount of charge on one or two mosfets in some rare circumstance without affecting the normal Picofly operation. So we probably want to use a higher value resistor to ensure the Picofly internal pulldown
and the glitch timing isn't substantially affected.
So what would I recommend? I would probably...
- Be lazy, look at what they used on the hwfly flex, and copy that because they have probably thought this through better than I. Or...
- I'd pick a value of comparable size to the internal pulldown of the Picofly since we are trying to cover the case where it is out of circuit or not powered up.
Something like 100K would probably be what I'd reach for. Sub-millisecond gate discharge time with negigible impact on normal Picofly operation.
If anybody sees anything wrong in this wall of text, please let me know!!!