Warning: Chloralkali process can release toxic chlorine vapor and sodium hydroxide, which is corrosive. Research conditions before attempting electrolysis on a substance. Only release halogens outside, in a fume hood, or in a test tube.
The chloralkali process can produce sodium hydroxide, hydrogen, chlorine, sodium hypochlorite, and sodium chlorate from sodium chloride and water. If potassium chloride is used, then the potassium compounds are formed. Here is a sample design to get you started in building chloralkali apparatus.
You will need:
Screw, nail, etc.
24VDC power supply
Take two sturdy glasses that do not tip over easily. Fill one with salt water and the other with fresh water. Take a piece of hose shaped like a U and fill it with salt water. Plug the ends with tissues. This is called a salt bridge. Insert it into the two solutions so it connects them like a liquid wire. Obtain a carbon rod and any iron object. Insert the iron object in the fresh water and the carbon rod in the salt water. Attach wires to the electrodes and run them to a 24VDC power supply. Higher voltages may be used, but there is a risk of severe electrical shock. Run the fresh water electrode to the negative and the salt water electrode to the positive. Turn on the power supply. Nothing appears to happen at first. Very small amounts of bubbles start forming at the cathode (negative electrode). Eventually, sodium ions start trickling in from the anode (positive electrode) container. The reaction speeds up and keeps at a moderate speed. Sodium hydroxide and hydrogen is produced at the cathode. Chlorine gas is produced at the anode. If you do not want the chlorine gas, find a large silver-colored screw. Use that instead of the carbon rod. The chlorine gas will oxidize the iron and form large quantities of iron(III) chloride, which hydrolyzes to iron(III) hydroxide. The screw will be eaten away. Even stainless steel cannot withstand this corrosive action. The reaction produces heat. Heat evaporates the water. Continue to replenish the water.
Modifications: To make chlorates, do the electrolysis in one glass of salty water with two carbon rods. The electrolysis is very fast and large amounts of chlorine gas are released. The glass will get hot. Make sure the glass is steaming hot or hypochlorites will form instead. To make hypochlorites, do the first modification, but place the glass in an ice bath.
There are many alterations that can be made to this process to make it more efficient, quicker, etc. Bromides and iodides can be used as well as other cations.
Here is a picture of my chloralkali process. This is the no-chlorine modification. The iron(II) and iron(III) hydroxides are visible in the left container, which was stained permanently. The salt bridge is visible in the middle.