I have a battery pack powering a project. I am adding a DC barrel Jack to the enclosure so I can charge my pack. But I don’t want the project to be powered on IF I have the wall wart plugged in to charge the battery. What is the best way to make this circuit? Just put a manual switch in or do I use a transistor? Or am I just making this overly complicated?
Look at the schematics of some of the boards from Sparkfun, e.g. like https://cdn.sparkfun.com/assets/c/5/7/e … -Qwiic.pdf. This one is using a FET and pull-up resistor to autoselect between VUSB or Battery source.
Many DC jacks have a switch contact in them
/mike
Thank you both!