Other than a few hen scratches of an image you submitted of "
MOSFET CIRCUIT" I see NO evidence of electronics involved in either the "problem" or your attempted "solution". How was the fan turned on and off
before you added a MOSFET to perform this switching function? A relay contact perhaps, with the relay coil driven from a digital output of something?
If this is a production product and you
have HUNDREDS of these boxes out the door and VERY FEW of them have this issue.
then this is a defective design. There should be ZERO boxes out the door with this issue.
So, why don't you get down off your high horse and tell us what is really going on? You said the problem is the barometer indicates a falling pressure when the fan is on, but recovers to its normal reading when the fan is off. This factoid lead you to diagnose this as an electrical problem associated with
how the fan is powered on and off, rather than an electrical problem associated with actual
power delivery to the fan. Further, you said the indicated pressure drop (which apparently is erroneous) occurs when the fan is remotely located from the box, thus eliminating mechanical effects associated with air flow.
The electronics expert conclusion here at EP is there is an interaction between the power supply for the fan and the power supply for the barometer whenever the fan is on. This has
nothing to do with how the fan is turned on or off, and everything to do with what happens to the power supply rails when the fan is turned on or off.
Since your MOSFET switching circuit works just fine to turn the fan off and on, and draws zip power from the "2 pin MOLEX for fan" then the problem has to be related to the current consumption of the "910 Ω" fan, supplied with power from what you indicate is a "5 V" cell. Your drawing is BS is that respect. Where does the "5 V" for the fan actually originate? Is this "5 V" supply also used by whatever circuitry implements the barometer? Is it perhaps the sole "5 V" supply for the entire box? Just for shits and giggles, try using a
real battery to power the fan while using your MOSFET circuit to switch the fan off and on. Does the problem magically disappear?
Thanks to
@kellys_eye and
@Chemelec and
@(*steve*) and
@BobK and
@Bluejets and
@Kabelsalat and
@WHONOES for some penetrating and relevant questions and comments.
What more detail would you like? I can try to provide anything you ask for.
Why should we have to try to pry the relevant information from you?
Power the barometer independently. Does the fault still occur?
Power the fan independently - does the fault still occur?
This is from the Troubleshooting 101 Course. You should have performed these two tests from Day 1 and then perhaps would not have needed to visit here.