How to use 2 power supplies in transistor key?
Below is a simple example of how to achieve this. Here V1 is your GPIO pin an V2 is your battery. R_load is whatever your trying to switch and R1 is a current limiting resistor and is optional. R2 limits current from pi and will need to be adjusted depeding on your load and R2.







simulate this circuit &ndash; Schematic created using CircuitLab