BSS214 MOSFET circuit not working

Thread Starter

kowshik1729

Joined May 10, 2020
99
Hi guys,

A really bad+silly hardware bug is making us sleepless. We are using a SPI based display which is being controlled using a ESP32-S3 module. We are using a BSS214 MOSFET to control the power to the display so we can turn on and off whenever we want to save the power as it's a battery operated device.

We have a P-Channel circuitry to switch between USB and VBAT voltages whenever one of the power supplies are not present, which looks like this
1737496280171.png

And the Display circuit looks like this (here GND is not board ground, just the display's ground).

1737496315655.png

it looks like if either USB or Battery alone are connected the board is working fine. However when the battery is connected if I try to connect USB and program the board a kind of glitch is happening on the display and the board is going into an unknown state. I am not sure if this is the correct way to handle a N-channel MOSFET to drive displays? I am suspecting that when the USB is plugged there is some kind of ground potential change and the SPI channel's ground reference is changing there by causing havoc in interpreting the signal date hence the glitch. But this is just an assumption, I like experts to clarify it.

Any help is appreciated. I am attaching full schematics for your reference.
 

Attachments

ronsimpson

Joined Oct 7, 2019
4,701
MOSFET theory, the MOSFET only cares about the Gate to Source voltage. It does not care about the Gate to Ground voltage.
I assume VBAT is higher than VBUS. So U6 will never turn off.
To get U6 off the Gate must be VBAT or above VBAT.
To turn on U6 Gate must be below VBAT by several volts. (did not look up the Gate-Source voltage to get the part turned on well)
1737497347074.png
 

Thread Starter

kowshik1729

Joined May 10, 2020
99
I assume VBAT is higher than VBUS. So U6 will never turn off.
To get U6 off the Gate must be VBAT or above VBAT.
In my case I am using this circuit to switch from VBUS (5V) to VBAT (3.7V). So when a USB is plugged in, the main power source will be VBUS so it charges the battery and also powers the device. As soon as USB is plugged off, the circuit will fallback to battery voltage. So yes, the circuit is switching on properly as per my requirement. Can you have a look at my BSS214 circuit and let me know if anything is wrong with that? This is the display i am using this exact LCD display https://www.waveshare.com/wiki/1.28inch_LCD_Module
 

Thread Starter

kowshik1729

Joined May 10, 2020
99
I think this might be what you want.
VBUS disconnects M1 when ON.
Thanks for the reply, but I think I don't have any problem with the switching circuit. My issue was with the way display's VCC & GND are being handled. Can you please look into that part of the schematic specifically please? I can share the video of what's happening on the PCB. https://we.tl/t-4PocpknwEM
 

sghioto

Joined Dec 31, 2017
8,634
Ok I'll try to do this, now I'm trying to analyze a little bit more on why my initial circuit isn't working. Do you think SPI lines are going into some random state when the Q3 is switching off? I need some more insight into this so I can better analyze this issue
Not really sure but I would try the new circuit first to see if the issue is resolved before try to analyze too much.
 

Thread Starter

kowshik1729

Joined May 10, 2020
99
Us

Yes using a Logic low to activate.
View attachment 340913
Ohh by the way I think I already thought of this circuit and chosen not to use it because may be I thought here my LDO_IN value will be around 3.7 to 4.3, which means that voltage will pass into my esp32 IO pin when a logic 0 is given which might mess up the MCU state by drawing too much current May be that's why I refrained from it. Does this make sense?
 

sghioto

Joined Dec 31, 2017
8,634
Ohh by the way I think I already thought of this circuit and chosen not to use it because may be I thought here my LDO_IN value will be around 3.7 to 4.3, which means that voltage will pass into my esp32 IO pin when a logic 0 is given which might mess up the MCU state by drawing too much current May be that's why I refrained from it. Does this make sense?
No voltage can enter if the pin is Low.
 

Thread Starter

kowshik1729

Joined May 10, 2020
99
No voltage can enter if the pin is Low.
Ahhh I see your point, when the 0 is given MOSFET will turn on which means MOSFET Rds is much lower than the 10k which we added that means no current flows through the MCU. Damn I should've used this initially in my PCB. Thanks for this I'll give it a try
 

Thread Starter

kowshik1729

Joined May 10, 2020
99
Us

Yes using a Logic low to activate.
View attachment 340913
Hi this circuit isn'y working. My LDO_IN is 4.7V and the DISP_PWR_CTRL is at 3.3V when MCU is high and at 16mV when pulled low. But in both cases looks like the MOSFET is always conducting. Is my voltage difference causing any trouble? I definitely have to use this type of circuitry only if i have to use a P-Channel MOSFET (driving it with a transistor)

1737633522065.png
 
Last edited:
Top