0
\$\begingroup\$

I have 2 power supplies in my scheme, one is from Raspberry Pi GPIO and one is 9v battery. I need GPIO output to work like a button, e.g. when output from GPIO is 1, battery should power the scheme and when output 0, the scheme should not work. I've read that the transistor key is what I need in this situation, but I can't figure out how to connect all of it. There is 2 grounds, 1 from RPi and 1 from battery, and 2 +'s one from GPIO output and one from battery.

Can you show me the right way to do it? Or what should I use in this case?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

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.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
0

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.