Can someone tell me if a diode is required in this circuit, please?

Thread Starter

JosXD

Joined Mar 16, 2022
8
circuito.png

Okay in the above picture, I want to supply power to the MCU with a Li-ion Battery 3.7V-4.2V Max when fully charged.

I added a P-channel mosfet to have Reverse Polarity Protection, next to the mosfet there is a 3.3V LDO that sends an aproppiate voltage to the MCU.

There is also a Capacitor to keep the MCU in deep sleep mode for some seconds, and here is the doubt:

¿Do I need to place a schottky diode after the LDO?

Wondering if is dangerous to the battery, when I press the switch to turn off the circuit and then the capacitor release power not only to the MCU also to the battery through the LDO and mosfet or is not dangerous and the schottky diode is only placed there to minimize current leakage?

I'm pretty new to this and I really want to learn about it, I hope some of you guys can help me with this topic, please.
 

crutschow

Joined Mar 14, 2008
29,792
The MOSFET will protect against reverse polarity connection of the battery.

The battery will have no problem charging any capacitance when you connect the battery.

How would you connect a diode and what do you think the diode will do?
 

Thread Starter

JosXD

Joined Mar 16, 2022
8

Thread Starter

JosXD

Joined Mar 16, 2022
8
The MOSFET will protect against reverse polarity connection of the battery.

The battery will have no problem charging any capacitance when you connect the battery.

How would you connect a diode and what do you think the diode will do?
circuito1.png
Hey mate, thanks for the reply. I updated the picture, the diode will be placed after de LDO and before the MCU and first I was thinking that the diode can protect Battery+ from Capacitor+ when the switch is open, another thing is to prevent current leakage from C1 because it has to power the MCU for a few seconds in deep sleep mode, there is also a bleeding resistor(R1) and a led+resistor(R2 + LED) to turn ON when the device is OFF, what do you think? also I don't know if LDO Vout should be protected with that diode from Capacitor+.
 

Thread Starter

JosXD

Joined Mar 16, 2022
8
? You don't have a switch in your circuit.
circuito1.png
Whoops! that's right, forgot to add it, there you go the updated picture it also has a bleeding resistor(R1) and a led+resistor(R2+LED) to turn ON when the device is OFF, do you think diode is needed?
 

ericgibbs

Joined Jan 29, 2010
15,525
hi Jos,
Why do you need a Power Off LED , which will discharge your battery.?
Don't place an On/Off switch in the Ground line.
E
Update: As you are using a NodeMCU, check the maximum current required, as the LM2936 is only 50mA maximum output.

How much current does NodeMCU draw?
The NodeMCU has an on-board voltage regulator, that needs excess voltage to supply the 3.3V. So if the voltage for the regulator is too low, the voltage for the ESP8266 may become too low too or it can't draw enough current as it needs. (During boot or wifi operation it's drawing up to 200mA peak current).




circuito2.png
 
Last edited:

Thread Starter

JosXD

Joined Mar 16, 2022
8
hi Jos,
Why do you need a Power Off LED , which will discharge your battery.?
Don't place an On/Off switch in the Ground line.
E
Update: As you are using a NodeMCU, check the maximum current required, as the LM2936 is only 50mA maximum output.

How much current does NodeMCU draw?
The NodeMCU has an on-board voltage regulator, that needs excess voltage to supply the 3.3V. So if the voltage for the regulator is too low, the voltage for the ESP8266 may become too low too or it can't draw enough current as it needs. (During boot or wifi operation it's drawing up to 200mA peak current).




View attachment 265137
Hey ericgibbs, thanks for your reply, the OFF led is optional also I'd add resistors to it to draw 0.5mA or less.

The MCU is an ESP32 C3, it needs a minimum of 3v, that's the reason i would like to avoid a schottky diode it's because 3.3v output from LDO minus 0.22v dropout voltage from schottky diode = 3.3v - 0.22v = 3.08V, so let's say that the esp32 c3 could barely run but the capacitor won't have much margin to keep the C3 in deep sleep mode for some seconds.

It just draws like 5uA in deep sleep mode and 8-10mA when wakes up for about i hope just a couple of miliseconds to do a simple task. it'll wake 4 times in a period of 2 seconds, so i need the capacitor powering it for at least 3 seconds.

The C3 with the config I'm going to implement will draw just 10mA, no wifi or bluetooth needed.

I have found nice options but I don't know how to calculate the current when C3 awakes for some miliseconds, so here are some calculations when C3 is in deep sleep mode:

Option 1 - RT9080-33GJ5 LDO (datasheet) + CUS08F30 Schottky Diode (datasheet). 3.3V-0.22V = 3.08V

Let's say 99% of 3.08v = 3.04V to the Capacitor and 5uF current consumption in deep sleep mode.

dv = 3.04V - 3V = 0.04V, I = 5uA, dt = 470uF*0.04V/5uA = (0.000470*0.04)/0.000005 = 3.76 seconds, not enough.

Option 2 - MIC5205 LDO with Reverse-battery protection (datasheet). 3.3V-0.1V(with luck) = 3.2V

Let's say 99% of 3.2V = 3.16V and 5uA current consumption

dv = 3.16V - 3V = 0.16V, I = 5uA, dt = 470uF*0.16V/5uA = (0.000470*0.16)/0.000005 = 15.04 seconds

The LDO from option 1 RT9080 seems to have the lowes quiescent current and also the lowest dropout voltage when Vin reaches Vout, so I'm thinking that if the diode is place before the LDO will be like:

100% Batt+ 4.2V-0.22V = 3.98V
AVG Batt+ 3.7V-0.22V = 3.48V
Low Batt+ 3.5V-0.22 = 3.28V dropout voltage beigns and supposedly the graph @10mA is 10mV or less, can't see exactly.
3.5V-0.22 = 3.28V - 0.01V = 3.27V -> 99% to the capacitor = 3.23V
Low Batt+ 3.4V-0.22 = 3.18V - 0.01V = 3.17V -> 99% to the capacitor = 3.13V = 12.22 seconds
Low Batt+ 3.3V-0.22 = 3.08V - 0.01V = 3.07V -> 99% to the capacitor = 3.03V - not enough.

Option 3 - There is another LDO AP2112K-3.3TRG1 (datasheet) @10mA has a dropout voltage of tipically 5mV to a max of 8mV ( be sure to read the right table, there is a table for each model e.g. 1.8V, 2.5V, 3.0V and 3.3V).

so for this option should be similar to the RT9080
Low Batt+ 3.4V-0.22 = 3.18V - 0.01V = 3.17V -> 99% to the capacitor = 3.13V = 12.22 seconds

And as I said, I don't know how to calculate the spikes of current when the C3 gets awake those 4 times, the task to do when awakes is simply, it will just count the awakes and depending on the awake count when you turn ON the C3 again, it will do a specific task.

I need that the capacitor can hold enough charge when battery at 4.2V or > 3.4V, if battery <= 3.4V C3 will be programmed to shut down.

Sorry if some parts of the text have not much sense, I'm not a native english speaker.
 
Last edited:
Top