I want to have Vbat enter Vcc when Vdd goes Low. The schematic I'm following is using a P-channel mosfet with Vbat connected to drain. I feel like this is wrong and I should either use a n channel or flip the drain and source.
-
\$\begingroup\$ Are VDD and VCC related in any way or completely independent? \$\endgroup\$– Ste KulovCommented Aug 11 at 6:55
-
\$\begingroup\$ Please use correct English to the best of your abilities. Take hints from a spelling checker! (Note to self: find&use one for duckduckgo.) \$\endgroup\$– greybeardCommented Aug 11 at 9:00
3 Answers
P-channel is the right one for this. You just need to mirror it: Source (pin2) must be connected to Vbat.
You need to reverse the P-MOSFET source and drain as noted. Whether that circuit works depends upon the values of Vbat, VCC, and VDD. Is there another source for VDD? What are the voltage values?
Use another P-channel FET in series with the first one. Connected them at the sources. Put a resistor between source and gate. The way you turn it ON/OFF depends on the voltages levels of a vbat and Vdd.