Instability Issue When Switching MOSFET for Raspberry Pi Power

Thread Starter

mbari

Joined Feb 15, 2025
8
Hi everyone,

I’m working on a relatively simple system, but I’m encountering an instability issue in some of my prototypes. I would appreciate any insights you might have!

**System Overview**

- Power is supplied by a 24V 20Ah battery with a max discharge current of 9.8A.
- The 24V line powers an industrial modem and LED drivers.
- A DC-DC converter steps down 24V to 5V, providing up to 3.5A.
- The 5V line powers:
- A Seeeduino XIAO (MCU)
- A Raspberry Pi 4B+
- The XIAO and Raspberry Pi communicate via UART.
- The XIAO controls three MOSFETs via digital pins, which act as switches for the power lines of the LEDs, Raspberry Pi, and modem. (Previously, I used 5VDC 10A relays, but I switched to MOSFETs for reliability.)

**The Issue**

I have built several versions of this system, first on a breadboard, then on prototyping boards, and now on a custom PCB. One of the systems has been running for over three months without issues. However, at least half of my prototypes show instability:

- Specifically, when the MOSFET switching the Raspberry Pi power turns on, I observe a voltage drop across the XIAO, causing it to reset.
- This results in a loop, since the XIAO loses control and restarts repeatedly.

**Thoughts**

I suspect a fundamental design issue, but I’m struggling to pinpoint it since different instances of the same system behave inconsistently.

I’ve attached the circuit schematic—any ideas on what could be causing this?

Thanks in advance for any help!

schem.jpg
 

Alec_t

Joined Sep 17, 2013
15,101
Welcome to AAC!
In the absence of a complete schematic we can only guess.
Do you have adequate decoupling?
Is it a star ground layout?
 

Thread Starter

mbari

Joined Feb 15, 2025
8
Thanks Alec!

I'm quite new at circuit design and this is actually my first attempt to transform a protoboard into a proper PCB.
The schematic I attached is the one I used to produce the PCB, where there are no decoupling capacitors or star ground layout. (yes, I'm a newbie!)
 

MisterBill2

Joined Jan 23, 2018
27,164
OK, since there is a voltage drop when a switch-on is attempted, the first guess is excess series resistance. The second guess is inadequate bias, leading to not fully switching on. An accurate circuit schematic drawing would tend to show where that section is.
And if you are actually switching the negative side of the power, probably at least one of the mosfets is not correctly biased to switch solidly on.
I would not accept that drawing from a designer as a final version. Snippets are OK for autorouters, but ot for those of us who need to rapidly analyze a circuit.
 

Thread Starter

mbari

Joined Feb 15, 2025
8
Thank you everyone for your answers! I'm drawing the complete schematic with circuitlab: I'll post here asap.
 

MisterBill2

Joined Jan 23, 2018
27,164
Certainly it does look like that "GND" is switched by mosfets in three different locations. It is not clear how any portion of the system actually gets powered.
To point out what I see as a serious design flaw, normally the "GND" does not get switched. That tends to produce problems with the GS voltage.
 

Thread Starter

mbari

Joined Feb 15, 2025
8
Hey everyone, thanks for your suggestions and help.

I'm attaching an updated version of the schematic, including GND(i assumed gnd coincident with -Ve of the battery) and I reversed the switching on the positive supply.I left everything else identical in order to proceed step by step in the debugging.

full_schematics.jpg
 

BobaMosfet

Joined Jul 1, 2009
2,211
Hi everyone,

I’m working on a relatively simple system, but I’m encountering an instability issue in some of my prototypes. I would appreciate any insights you might have!

**System Overview**

- Power is supplied by a 24V 20Ah battery with a max discharge current of 9.8A.
- The 24V line powers an industrial modem and LED drivers.
- A DC-DC converter steps down 24V to 5V, providing up to 3.5A.
- The 5V line powers:
- A Seeeduino XIAO (MCU)
- A Raspberry Pi 4B+
- The XIAO and Raspberry Pi communicate via UART.
- The XIAO controls three MOSFETs via digital pins, which act as switches for the power lines of the LEDs, Raspberry Pi, and modem. (Previously, I used 5VDC 10A relays, but I switched to MOSFETs for reliability.)

**The Issue**

I have built several versions of this system, first on a breadboard, then on prototyping boards, and now on a custom PCB. One of the systems has been running for over three months without issues. However, at least half of my prototypes show instability:

- Specifically, when the MOSFET switching the Raspberry Pi power turns on, I observe a voltage drop across the XIAO, causing it to reset.
- This results in a loop, since the XIAO loses control and restarts repeatedly.

**Thoughts**

I suspect a fundamental design issue, but I’m struggling to pinpoint it since different instances of the same system behave inconsistently.

I’ve attached the circuit schematic—any ideas on what could be causing this?

Thanks in advance for any help!

View attachment 342561
I've added a datasheet for the FETs for ease for people to evaluate.
 

Attachments

BobaMosfet

Joined Jul 1, 2009
2,211
Hey everyone, thanks for your suggestions and help.

I'm attaching an updated version of the schematic, including GND(i assumed gnd coincident with -Ve of the battery) and I reversed the switching on the positive supply.I left everything else identical in order to proceed step by step in the debugging.

View attachment 342715
Redacted. I just realized, you need a pull-down... silly me.
 
Last edited:

Alec_t

Joined Sep 17, 2013
15,101
I reversed the switching on the positive supply.
If you're switching the high side (+5V) you need either P-FETs, or else N-FETs with a bootstrap arrangement. What you show won't switch the supply; the Pi will get about 4.3V continuously via the body diode in the N-FET.
 

BobTPH

Joined Jun 5, 2013
11,463
This doesn't look right:
Why are you tying your gates to ground through a resistor, when in fact, you should be putting the resistor in series with the gate to limit current to the gate, not to ground. Gate should not be connected to ground in any way.
A resistor between source and gate to keep the MOSFET off when not driven is correct and recommended as best practice and no gate resistor is needed to limit current, though it may be needed for other reasons.
 

BobaMosfet

Joined Jul 1, 2009
2,211
A resistor between source and gate to keep the MOSFET off when not driven is correct and recommended as best practice and no gate resistor is needed to limit current, though it may be needed for other reasons.
No, no-- forget my original post- I just realized, you need a pull-down... silly me.
 

BobaMosfet

Joined Jul 1, 2009
2,211
I just realized something you need to be aware of. You DO NOT have enough resistors in your circuit. First of all, all your FET gates need a resistor in series with the MCU. This is to limit current to the gate. Then you need a resistor in parallel to act as a pull-down. The gate is voltage driven, not current driven- it's a capacitor.

If your MCU is resetting, it could be you are exceeding the total mA it can handle across all pins because without the resistor on the gate, you're throwing maximum current at the gate from the MCU pin (whatever the MCU is trying to support).

1739977658005.png
Vgs(th) is the value you're looking for. Note: 250uA is the minimum required, so you should limit your gate current to perhaps 1mA. Your pulldown should be half that, at least, so that the MCU can overcome the pulldown.

For example: R = E/I -> R = 5/.001 -> R = 5K (closest is 4K7).
For the pulldown, you want parasitic current; not a lot, otherwise you're dumping current to ground and using way more power than you need in the logic side. So 10K-Ohm, or perhaps higher would be ideal.

IMHO
 

MisterBill2

Joined Jan 23, 2018
27,164
The gate also has quite a bit of capacitance and so it will draw current charging until the voltage rises to the applied level. So the voltage drop mentioned will be for a very short time, rather difficult to even see.
Aside from that possible cause, it might be excessive resistance in either the positive supply wire someplace, or even the negative side wired connections.
 

Thread Starter

mbari

Joined Feb 15, 2025
8
Since the gate is voltage driven why a series gate resistor?
Thanks everyone, again, for your contribution.

Replying to this one, but addressing also @BobaMosfet and @MisterBill2 replies: I put the 10K resistor on the gate channel as a classic pull-down resistor. I reckon that i should put a pull-up resistor, instead, if I'd ever use MOSFET as high-side switch.

I think the issue with IRLZ44N is about the value of R_ds when the applied voltage to the gate is less than 5 V: given a 3.3V signal on the gate, there is no reference telling where R_ds is going. This comes from another discussion I'm having regarding this system.

I attach this link to an interesting component I'll use before the circuit redesign (in which I'll turn to high-side switch, first of all) --> https://www.pololu.com/product/2811
 
Top