The scenario is simple. I have a large draw component that I need to run from a separate, closed-loop power supply(batteries) separate from the RPI. I want to be able to trigger(complete the loop) the device with a logic HI from a GPIO pin to activate a transistor.


Can voltage from a RPI GPIO pin not complete a circuit with the ground of another closed loop power source? enter image description here

3 Answers 3


First "Ground" is a misnomer; this is a name commonly given to the common power rail, which on the Pi, is rarely connected to "Ground".

ANY electrical circuit NEEDS to be complete. That means that you need a loop for current to flow.

Your proposed circuit has 2 loops;

  1. Pi GPIO, base resistor (missing), transistor Base, transistor Emitter, and back to the Pi common rail.
  2. Battery, Load (missing), transistor Collector, transistor Emitter, and back to the battery.

The first loop causes Base current to flow, which causes amplified current in the Collector. To complete both circuits they need to have a common connection.

Your circuit has a number of errors, and will NOT work. The load should be attached to the Collector, and Base current needs to be limited. See http://elinux.org/RPi_GPIO_Interface_Circuits

The circuit, as drawn will put ~2.6V across the load, the transistor will have 9-2.6V across it and dissipate almost 3 times the power delivered to the load! It will overheat the transistor and possibly destroy it, depending on the load current (not specified in the question). –


That will be fine and will work as long as the transistor needs 3V3 or less to trigger.

Of course you need to connect a Pi ground to your circuit ground so there is a common voltage reference.

In the circuits I have seen a series resistor is used to limit the (base) transistor current.

  • Right, I just didnt include it in the schematic. So my question is WHY do i have to connect the grounds to eachother? Why cant my 3.3v HI go to the battery ground? and why will it not work unless I connect battery ground and Pi ground together? Also, what comes along with having to tie the two grounds together?
    – Lanet Rino
    Commented May 20, 2017 at 18:10
  • Ground is the common voltage reference.
    – joan
    Commented May 20, 2017 at 18:32
  • @joan Transistors do not need a voltage (provided it exceeds 0.7V) they are current amplifiers. The circuit, as drawn will put 2.6V across the load, the transistor will have 9-2.6V across it and probably overheat the transistor depending on the load.
    – Milliways
    Commented May 20, 2017 at 23:40

The gpio output has to have a reference (to ground) for the output to have any meaning. Electricity flows from point A (gpio pin) to B (ground). If no B there is no flow, it just floats, there is no high nor low, will not trigger a transistor. If you need to keep the ground points separate, use an optoisolator.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.