Why is this reed switch / solenoid circuit not working?
It sounds like you have two problems.
First, reed switches are delicate and shouldn't be used to switch a lot of current. When the switch opens (and, to a lesser extent, closes) a small arc is generated between the contacts. This can cause
- The contacts to eventually weld together, so that it won't open correctly, or
- A buildup of non-conductive junk between the contacts, preventing it from closing correctly!
You never know which failure mode will happen first. Even before it finally fails, it may become more and more resistive as the contacts degrade.
To solve the problem, you should use the reed switch to signal some other, less delicate, device. Then, this device should switch power to the solenoid. Common solutions would be either a MOSFET or a relay.
Here is a simplified MOSFET example:
simulate this circuit – Schematic created using CircuitLab
It includes a pull-down resistor and a flyback diode (sometimes called "anti-kick diode"). If you like, please see this answer for why they are required.
The second problem is that you need to provide enough power to your solenoid. It sounds like yours is rated for 6V.
If you are giving it the rated voltage and it isn't working, then you probably aren't able to supply enough current. 9V batteries have a high internal resistance, and so can't provide much current. You could put 4 AA batteries in series to get 6V and it could supply a lot more.
By the way, solenoids require a lot of current. AA batteries might not be sufficient. Do you know the current specification for your solenoid? You may need a dedicated power supply.
By the way, don't just increase the voltage! If you exceed the rated voltage you can cause failures in the solenoid.
This isn't working because 9 volt batteries can't supply the current needed to operate the solenoid.
9V batteries are made for low current uses. If you connect them to something that needs a lot of current, the voltage drops drastically.
You are trying to fill a swimming pool (the solenoid) using a soda straw (the 9V battery.)
Won't work. You need a battery capable of supplying the correct voltage at the needed current.
A better power source would be 4 AA or C cells in series. That gives you 6V, and much more current and capacity.
Your reed switch is sticking because you are pushing too much current through it. The contacts are designed for low current, and you are trying to push enough current for the solenoid through them. They get hot and stick together.
After the contacts have stuck once, they have rough spots that make them even more likely to stick. The reed switch is basically ruined once the contacts get stuck.
You can't use a reed switch to directly operate a solenoid. You will burn out the contacts.
A reed switch is very fragile. The reason it's getting stuck in a closed position is that the contacts are sticking, due to arcing damage on them.
You need a catch diode across any switch contacts that switch an inductive load. As the switch opens, it tries to break the current flowing in the inductance of the solenoid, which reacts by creating a large voltage across the switch contacts to keep the current flowing, in an arc between them.
If the 9v battery is a PP3, then it's fairly low current output. If you have two, you may do better putting them in parallel rather than series. Test your power supply and solenoid directly, rather than via your reed switch.