# Primary Battery and DC Power Switch

I have designed the below circuit to automatically switch between a primary cell (3v) battery, and if available, an external DC power supply (~3.3v). Since the cell is a primary cell, it needs to be protected against trying to charge from the DC power supply.

I used a P-Channel MOSFET for the design, as I would like as little voltage drop as possible when the device is powered by the primary cell battery.

My theory of circuit operation is:

No Aux DC Power

• Gate of the M1 (P Channel MOSFET) will be pulled nearly to 0V by R1 (47K pull-down). Technically between the R1, and voltage divider (R2 & R3), it should have ~31.33K pull-down to ground.
• Voltage would flow (through the M1 body diode) from Drain to Source. This would give the source of M1 a voltage of around 1.8v (1.2V Forward voltage). With the Gate at ~0v, and Source at around 1.8V, M1 should become fully "ON", and create a low resistance flow from the Primary Battery to Vout. This would then provide 3V on the Source pin of M1, making -3V Gate-Source.

With Aux DC Power

• When 3.3V is provided on Aux DC Pwr, the Gate pin of M1 will be around 3.3V, turning the FET to an "OFF" state. The voltage will then flow through D1 (schottky diode) to Vout.
• In this mode, the current could still flow from the Primary Cell Battery to Vout if, the voltage after D1 is lower than the Voltage at Drain of M1 (after the body diode of M1).

simulate this circuit – Schematic created using CircuitLab

So I have production boards using this design, and all of my testings had been going well with this design. I recently started running into an issue, where D1 seems to fail, and cause "funky" results on Vout. For instance, 1 out of 20 boards will have the issue, and when I measure Voltage, I will get:

• 3.1V at Primary Cell Battery (Drain of M1)
• 2.6V at Vout (Source of M1)
• 2.6V at Gate of M1.
• D1 appears to have failed, as I can replace it, and usually, the boards will start working as I expected them to once again.

Can I get some thoughts on what I may be doing wrong, that would be killing D1?

• Does this answer your question? Automatic Power Selection with MOSFET Mar 8, 2021 at 16:00
• @ElliotAlderson Thank you for the reply. No, I do like the circuit they recommend, but the issues I am seeing on the above circuit are still baffling to me. I feel like its important that I understand what is going on here. Mar 8, 2021 at 16:24