Attempting to open and close a solenoid valve

Hello,

I'm using this tutorial to try to open and close a solenoid valve. The ultimate goal is to create a garduino, but baby steps.

My set up is here which, at least to my newbie eye, is pretty much exactly what the tutorial shows. Close up. I load up their basic on/off code:

int solenoidPin = 4;    //This is the output pin on the Arduino we are using

void setup() {
  // put your setup code here, to run once:
  pinMode(solenoidPin, OUTPUT);           //Sets the pin as an output
}

void loop() {
  // put your main code here, to run repeatedly:  
  digitalWrite(solenoidPin, HIGH);    //Switch Solenoid ON
  delay(1000);                      //Wait 1 Second
  digitalWrite(solenoidPin, LOW);     //Switch Solenoid OFF
  delay(1000);                      //Wait 1 Second
}

But the valve doesn't react. There is no clicking noise or anything. I tried with just a 9V battery alone, just the USB alone, and USB+9v. Since we're using VIN, I think it should work with just a 9V battery though. I am using the following hardware:

Anyone able to guide me in the correct direction?

Hi,
This is a 12V solenoid valve.

You also need to learn abut current requirements. You don't have enough current capability from a small 9V battery..

See THIS PAGE

Suggest you get a 12V 2A small plug-in power supply and power the Arduino and the solenoid separately.

That Amazon seller just swiped some words (but no data) from Adafruit.com and doubled the price. SAD.

I just tested one that I had setting around. It would energize as low as 9Vdc @ 250mA, and at 12Vdc pulled 325mA.

Yes, Amazon is chock full of similar "deals". I ordered just one of these through Digikey, and they mistakenly sent a whole box as "1" for the price of a single unit. I called them and confused the poor lady on the other end. She couldn't understand that I wanted to return the extra's, and kept trying to send more to make me satisfied. After 15minutes, she finally caught on and said to simply keep them, as it wasn't worth the time or shipping costs to return them.

Make sure the thing works with your power supply by connecting it directly, no Arduino or anything in between. If that doesn't work, get a better power supply. If a better power supply still doesn't work, get a new solenoid.

Your 9V battery won't be able to supply sufficient current for the solenoid (well, maybe it could, for a few minutes), and your 5V USB has too low a voltage.

Make sure the thing works with your power supply by connecting it directly, no Arduino or anything in between. If that doesn't work, get a better power supply. If a better power supply still doesn't work, get a new solenoid.

Ah, should have checked this first. My 9V makes the solenoid buzz a little bit but otherwise doesn't react.

Update: silly me. Got it to work.

12V is needed to power the solenoid (although the adafruit site says 6V should get it to work too), but then it also needs a minimum pressure. Blowing into the solenoid gets it all going perfectly, valve is opening/closing every second just like the code directed.

It is very well possible that your 9V battery can't supply the current the solenoid needs. Using a proper power supply it's very well possible you can get it to open with 6V. Anyway, good you have it working.