I should mention that I am trained in biochemistry with a basic college-level physics background, but with no background in DIY electronics.
I'm trying to make my Raspberry Pi control a simple valve. There are many similar threads, but I couldn't find anything to solve my issue. My circuit is set up the same way as this guy: http://www.davidhunt.ie/water-droplet-photography-with-raspberry-pi/
- TIP31C NPN transistor
- 1N4007 diode
- generic 1k resistor
- 8x 1.5V AA batteries in series
- 12V solenoid valve (http://www.amazon.com/dp/B00827FP26)
The problem is simple - the solenoid valve doesn't move when I tell the pi to make it open. I think I set up the diode and transistor correctly (diode line mark on positive side and transistor base/collector/emitter from left to right).
To check the circuit setup, I replaced the valve with a 1k resistor + LED in series, and it turned on and off as desired. When I directly attach the solenoid valve to the 12V power pack it opens just fine.
Is there some issue with the amount of current going through the valve? I don't really know what else to try with troubleshooting. I can take a picture of the breadboard setup tomorrow if needed, but if the circuit wasn't set up correctly, then I don't think the LED would've worked?
Finally - on the second or third time I was swapping the valve with the resistor/LED, right after I unplugged the positive/negative wires leading to the resistor/LED, the Raspberry Pi turned off. !!! But now it appears to be (temporarily?) bricked and the red power light doesn't even turn on when it's plugged in. I am not looking for solutions to this per se but it might be useful information so I'm mentioning it.
edit: I solved this by adding a second 1k resistor in parallel with the first. Transistor is still TIP31C.