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?
The thing that catches my eye, there is no designated common 0v / signal ground.
It’s fine to have positive and negative supplies, but their reoationships should be clear,
This leads to the chance your low voltage components could be reverse biased.
I’d redraft the schematic so the potentials are clearly visible in their relationship to the supply rails.
Thanks! Could the issue be addressed with the use of a BJT as voltage amplifier on the gate signal? I would use a Nano instead but I have to use XIAO...
You are still missing ground connections and you are still using IRLZ44N
It's also not a good idea to use low side switches for the RPi and the LED drivers.
In general, it's not a good idea to cut power to a device that may have active signals connected to it.
Thanks for the schematic.
Ideally a schematic should be drawn with positive at the top and negative at the bottom, not all jumbled up like you have it, which makes it very difficult to follow.
What is NID35-5?
This has the negative of the battery, which I think you are designating as ground, connected to COM_2, what is COM_2?
You then take something from COM_1, what is COM_1? You seem to use this a ground for some things, but it can't be ground as it is different to the battery negative (assuming I'm right that you have designated -Ve as ground, but it's not at all clear)
You then use Q2 to switch this might or might not be ground to the Pi, which won't work for the reason @jim-p has stated, but even if it did switch OK you will have parasitic powering from the other connections to the Pi.
Jim is absolutely right but I think he is downplaying this, it's a terrible idea, it won't work.
The whole concept is wrong, you need to be switching the supply not ground. You need a schematic that follows conventions and you need to be clear what parts are what. Finally, remember there is only one ground, if you doubt this have a look outside at the muddy stuff. Once you switch ground then whatever is on the other side of the switch is not ground.
Hi and first of all thanks for your attention and time.
I updated the schematic trying to to follow your guidelines and @jim-p suggestion in order to move a little further on. I made GND coincident with - Ve as you correctly assumed and reversed the switching on the positive side of the supply. I'm leaving the rest as it was so that I can proceed step by step.
NID35-5 is a DCDC converter from 24V to 5V, capable of supplying at max 3.5A. COM_1 and COM_2 are the commons of the stepdown converter (connected together).
Question: I'm now using a digital pin (D0) set to LOW in order to give GND reference to the digital control signal of the Femtobuck LED drivers; may I directly connect them to the XIAO GND terminal?
A I/O pin is NOT a ground connection.
You CANNOT use an N channel MOSFET as a high side switch without much more additional circuitry,
You seem to be disregarding all recommendations and are going from bad to worse with this design.
Sorry to give you that impression, I'm just trying to address every issue in this schematic that it was given to me as Bible but actually does not work at all...And, as I stated, I'm not an expert, so please forgive my mistakes.
The use of I/O pin as GND was weird for me indeed, but I was compelled to do so until now...
Regarding the use of N channel MOSFET as high side switch, I just followed your tip to avoid switching on the low side. Saying I have a gate signal voltage sufficient to saturate the MOSFET, should I use a p-channel instead? Is this what you are saying?
Search for 'high side switch', you need a P channel MOSFET to switch plus an N channel MOSFET or an NPN BJT to control the gate, plus one or two resistors. This has been covered many times on the forum so you should be able to find the information if you look.