I want to know how can I enable the regulator in three different ways in correct way through the hardware. There is two PCBs in below picture.
- 24V input plug (user plugged)
- 16V battery
- Charging circuit
- small microcontroller
- 5V regulator
- SW1 to turn on regulator and as input to uC
PCB2: Main PCB get power from PCB1
I would like to enable regulator pin if:
- 24v plug was inserted
- SW1 pressed (doesn't matter if 24v plug or pcb2 is plugged) (uC keep it enable high after sw1 pressed)
- if pcb2 attached to pcb1(doesn't matter if 24v pug or sw1 pressed)
I came up with below design but I don't know what to do with 24v plug or external board plug.
Note: Below schematic is for demonstration no P/N or Value is correct. Vsys is equal to 24V if plugged or if not is battery voltage.
MY Solution check this link