Device hang when switch power supply
-
- Posts: 45
- Joined: Wed Aug 30, 2017 4:56 am
Device hang when switch power supply
Hello,
Actually,i am using 2 type power sources with esp-wrrom32 module.
One is 12 volt dc supply and another is 3.7 volt(back_up battery purpose).
Problem which i have facing is that when i try to switch power supply,sometimes device will detect Brownout and reset,then start application as it is.But sometimes device has hang_up.
So,what should be reason behind this.If any one can guide me,its great for me.
Thanks in advance.
Regards,
Kishan Patel.
Actually,i am using 2 type power sources with esp-wrrom32 module.
One is 12 volt dc supply and another is 3.7 volt(back_up battery purpose).
Problem which i have facing is that when i try to switch power supply,sometimes device will detect Brownout and reset,then start application as it is.But sometimes device has hang_up.
So,what should be reason behind this.If any one can guide me,its great for me.
Thanks in advance.
Regards,
Kishan Patel.
-
- Posts: 9727
- Joined: Thu Nov 26, 2015 4:08 am
Re: Device hang when switch power supply
How exactly do you switch power supplies?
-
- Posts: 45
- Joined: Wed Aug 30, 2017 4:56 am
Re: Device hang when switch power supply
Hello,
I have used MOSFET.When i remove 12 volt,device has hangup.If i again give 12 volt when device has working on backup battery,there is no issue.But when remove 12 volt,sometimes Brownout reset occur and sometimes device has hang.
Thanks.
I have used MOSFET.When i remove 12 volt,device has hangup.If i again give 12 volt when device has working on backup battery,there is no issue.But when remove 12 volt,sometimes Brownout reset occur and sometimes device has hang.
Thanks.
-
- Posts: 9727
- Joined: Thu Nov 26, 2015 4:08 am
Re: Device hang when switch power supply
Do you have a schematic? I'm asking because your way of switching may leave the esp32 out of power for a fraction of a second.
-
- Posts: 45
- Joined: Wed Aug 30, 2017 4:56 am
Re: Device hang when switch power supply
Hello,
Yeah sure.I have attached schematic image of power supply.
Thanks.
Yeah sure.I have attached schematic image of power supply.
Thanks.
-
- Posts: 9727
- Joined: Thu Nov 26, 2015 4:08 am
Re: Device hang when switch power supply
That's what I thought. Your issue most likely is that when you remove the 12V, your 4.2V doesn't immediately collapse to zero; instead, it goes down slowly. This means that Q2 won't switch supplies instantaneously, but only when the voltage is Vbat minus its gate threshold voltage. You didn't specify what mosfet you use, but let's say you're using a logic-level mosfet with a gate threshold of 1.5V: this means that you'll only switch over to battery power when the 4.2V line is 1.5V under the Vbat level. With a 'normal' Vbat of 3.7V, this means the 4.2V rail node will drop to (3.7-1.5=)2.2V before switching over. Add to that the drop of D1 as well, which is give-or-take 0.4V, and your poor ESP32 only gets 1.8V (minus whatever the 3.3V regulator eats up) to live off.
The hacky way to solve this would be to just increase C24 so it doesn't drain during the switchover. The non-hacky way would probably either mean adding some logic so Q2 switches sooner, or maybe getting rid of it entirely so only D1/D2 are responsible for the switchover. If you go for the 2nd solution, I'd also advise setting U4 to output more than 4.2V (make it 5V or so) so you don't accidentally have a full battery sourcing current when the 12V supply is still plugged in.
The hacky way to solve this would be to just increase C24 so it doesn't drain during the switchover. The non-hacky way would probably either mean adding some logic so Q2 switches sooner, or maybe getting rid of it entirely so only D1/D2 are responsible for the switchover. If you go for the 2nd solution, I'd also advise setting U4 to output more than 4.2V (make it 5V or so) so you don't accidentally have a full battery sourcing current when the 12V supply is still plugged in.
-
- Posts: 45
- Joined: Wed Aug 30, 2017 4:56 am
Re: Device hang when switch power supply
Thanks,
We have using CPH6341 MOSFET. We have tried as you told(remove MOSFET circuit) then check the process.But our TLV chip has blown-out.
Regards,
Kishan Patel.
We have using CPH6341 MOSFET. We have tried as you told(remove MOSFET circuit) then check the process.But our TLV chip has blown-out.
Regards,
Kishan Patel.
-
- Posts: 9727
- Joined: Thu Nov 26, 2015 4:08 am
Re: Device hang when switch power supply
Yeah, that mosfet has a gate threshold voltage of about 2V, so the scenario I sketched is probably what happened. I don't get how removing that mosfet (and connecting the pads of its source and drain, if that wasn't obvious) would kill the TLV, though... there's no voltage on either side of the mosfet that can kill that chip.
Re: Device hang when switch power supply
Hello
I am having some question related to this problem of esp wroom 32 hang.If i go with solution :-
1)Will the problem of device hang will be solved if c24 value is increased to 47uf or any other if any suggestion for value.
2) Please can you suggest any logic so Q2 switches sooner to solve this problem.
Accepting favorable reply.
Thanks and Regards
Abhijeet Gupte
I am having some question related to this problem of esp wroom 32 hang.If i go with solution :-
1)Will the problem of device hang will be solved if c24 value is increased to 47uf or any other if any suggestion for value.
2) Please can you suggest any logic so Q2 switches sooner to solve this problem.
Accepting favorable reply.
Thanks and Regards
Abhijeet Gupte
-
- Posts: 9727
- Joined: Thu Nov 26, 2015 4:08 am
Re: Device hang when switch power supply
Dunno. I can probably calculate a value, but I'd say it's easier and less error-prone to look up the minimum working voltage for your TLV chip, taking a prototype and a scope, change the ESP32 for a resistor that burns up 500mA (to simulate the worst-case scenario) and just solder on various capacitance values until the value on the input stays comfortably above the minimum working voltage.abhijeet wrote: 1)Will the problem of device hang will be solved if c24 value is increased to 47uf or any other if any suggestion for value.
As I said: just remove it (and short the source and drain pads) and increase your 4.2V output to something higher. I honestly can't see why that would destroy your TLV; if it did last time I'd say it may have been an artifact of reworking the prototype, not the schematic change.2) Please can you suggest any logic so Q2 switches sooner to solve this problem.
Who is online
Users browsing this forum: Google [Bot] and 25 guests