I'm trying to control a solenoid using the RasPi 2's GPIO pins. Since the solenoid needs more power than the RasPi can provide, I'm using a 9V battery to provide the power.
I started with just wiring the circuit and checking if it works by connecting and disconnecting the 3v3 output to the board.
First, here's the wiring I'm currently using:
https://i.stack.imgur.com/Afoko.png
The diode accross the solenoid inputs is a standard flyback diode, and the resistor is a 1kOhm resistor.
The inductor represents my solendid, which I got from Amazon. As far as I can tell, it requires 12V / 1A to operate, but connecting the 9V battery straight to it (skipping the transistor) works nicely enough. Even the RasPi 5V output provides a weak activation.
However, when going through the transistor, the solenoid does not activate properly. I have noticed that when the base pin is on though, it will "hold" the end position if pushed manually, just not push towards there by itself. It does not do this if the base 3v3 pin is not connected.
I tried using a BC547 NPN transistor, then I figured the output current was not enough, so I switched to a BC639, but that didn't help either.
My question is, what transistor should I use? Am I doing anything else wrong? I've seen other people use a TP120, which seems to have an even higher output current.
Since I'm setting up a circuit with 24 of these, I'd like to know for sure before ordering another batch of transistors.