I’m having a problem controlling a 12v Solenoid Valve, when I run the sketch nothing happens. I have attached a couple of photos to help illustrate my wiring (ignore the 2 LEDs).
I have a 1K-Ohm 1/2 Watt 5% Resistor going from Pin 12 to the Base of a TIP120 Transistor. Forward of the TIP120, I have one lead of the Solenoid Valve and a Rectifier Diode (IN4004) connected to the Collector of the TIP120. I have a Jumper going from the Emitter to the 12V(-) on the breadboard. The other end of the rectifier diode goes to the 12v(+) on the Breadboard.
At the top of the Breadboard, I have 12v(+) on the left column and 12v(-) on the right column. At the bottom, I have the remaining Solenoid Valve lead going to the 12v(+) and a Jumper going from 12v(-) to the GND pin on the Arduino.
Im using a modified Blink sketch to control the Valve from Pin 12 as opposed to Pin 13.
When I switch the 12v(+) and 12v(-), the solenoid “knocks” repeatedly, so I know the Breadboard is getting power and the Solenoid works.
This is my first Arduino project and really my first time working with the hardware end of things. Any help (in lamens terms) would be great!