This experiment demonstrates the splitting of water into Hydrogen and Oxygen by electrolysis, and the re combining of these elements in an energetic reaction.
You can never recover the full energy from the Hydrogen fuel due to the lack of efficiency in the process used to make the hydrogen gas. During the electrolysis a current is flowing in the water to seperate the Hydrogen from the Oxygen, it is this current that produces wasted energy in the form of heat.
A plastic tube with one closed end has two electrodes inserted in the base so that they can be connected to wires on the outside. The electrodes should be made from carbon, but any conductor such as thick wire will do for this experiment. The space between the electrodes should be as small as possible but without them touching each other.
When the device is complete the tube should be filled with water until it just covers the electrodes. When the switch is pressed, the battery is connected to the electrodes and the flowing current begins to split the water into Hydrogen and Oxygen.
At some distance above the electrodes there are two more wires that are used for creating a spark to detonate the Hydrogen and Oxygen gas inside. The Piezo Sparker comes from a cheap lighter with click type ignition. When this is pressed it creates a high voltage that is used to create a spark. The two wires inside should be separated so that the spark will jump between them, and should be far enough from the water so that they don't get drenched when the water is bubbling.
The projectile should fit snugly inside the end of the tube so that it doesn't fall down to the water. It is important that this object is able to move freely enough to to leave the tube without a lot of resistance or else the whole thing could explode. The best type of projectile is a tube like the main one but slightly smaller so that it fits inside. If it is inserted so that the open end is down inside the larger tube the Hydrogen/Oxygen gas can build up behind it. As the tube is forced out when the gas is detonated it is forced to move in a straight line and can be more accurate than other shaped projectiles.
To fire the cannon the switch should be pressed for around 20 seconds depending on the electrodes and battery used. When enough gas has built up inside, the piezo sparker can be pressed detonating the H2 and O2 gas mixture. The gas expands rapidly forcing out the projectile and the product of the energetic reaction is just water again. The energy released in the explosion is almost the same as the energy supplied by the battery but it is released in a fraction of a second.