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:

  1. 24v plug was inserted
  2. SW1 pressed (doesn't matter if 24v plug or pcb2 is plugged) (uC keep it enable high after sw1 pressed)
  3. 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


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ upvote for a well presented question, especially for spending time on the CircuitLab schematic \$\endgroup\$ – jsotola Oct 3 '20 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.