This question already has an answer here:
I successfully learned how to turn on an LED. Now, having a battery and a motor, I want to turn on the circuit using the Pi: basically starting the motor when I send a signal from Pi, but not sending current to the motor itself.
I want the Pi to only send the signal that I want to power the motor using the battery.
How can I do that?
A simple way would be just using an electromagnet which will turn on the circuit mechanically, but I want to use an electric component if possible.