An oxygen generator is simply a device to run electricity through water. Electricity separates the atoms of oxygen from those of hydrogen. Any source of electricity will perform this function, but to generate a significant volume of oxygen, one would need both a large amount of water and a powerful source of electricity. For instance, you can build a Hoffman apparatus, which separates oxygen from water through the application of electricity.
Strip the ends of the wires. Form spirals of the exposed wire on one end of the red wire. Do the same for the black wire. The wires should be stiff enough to hold their shape.
Pour water into the vat and add salt. The salt helps the electricity to travel through the water and separate the oxygen and hydrogen atoms. Place the jars into the vat and hold them on their sides to fill them completely with water. Neither jar should contain any air. Impure air will pollute the oxygen generated. Air also may cause the hydrogen accumulating in the other jar to ignite or explode.
Place the spirals of the wires in the mouths of the two jars and place the jars with their openings down at the bottom of the vat. Put weights on the flat tops of the jars to hold them into place.
Dry your hands. Connect the red wire to the positive terminal of the battery. Connect the black wire to the negative terminal of the battery. The device will now operate, and gas will collect in both jars. The jar with the smaller amount of gas will have oxygen, and the jar with the greater amount of gas will have hydrogen.
Extinguish all flames. Disconnect the wires from the battery. Remove the jar with hydrogen to release the gas. To collect the oxygen, lift the jar with oxygen in it from the floor of the vat without taking it out of the water. Fill a tube with water, place it through the jar's opening and draw the oxygen out.
Do not let the two unconnected ends of the wires get close enough to spark.