I am trying to design a micro-controller power supply that can use three power sources with a particular order of priority. The sources are:
- 5V USB - overrides all other sources when available
- 12V DC - only on when micro-controller provides a 3.3V enable.
- 3.7V LiIon battery - charged from the other two when available
The current requirements of this system are less than 100mA @ 3.3V.
My concept, shown in the schematic, is to use power a 3.3V LDO regulator from 5V (if present) or the battery. The battery has a charge controller that is powered by 5V (this charging circuit is described in Microchip AN1149). The 5V can come from either USB or from another 12V rail via a buck regulator. The USB 5V must supersede the 12V supply and the microcontroller can also turn off the 12V source. I would like the buck regulator to power off when 12V source is not used.
I have attached a sketch of my circuit concept but I am unsure about the correct use of MOSFETs and Schottky diodes in this context. With the voltage regulators and charge controller in the system I am not sure how to simulate this.
Can anyone help me determine if this MOSFET configuration makes sense and what I need to do to bias them correctly for each operating state?