To stop water pipes from banging there a couple of different types of banging that can occur and each has a different cause and a different cure. The first is “Water Hammer”which occurs when water shuts of usually caused by a large volume flow and a valve, which closes rapidly. Water hammer has a bang or, series of bangs that are loud at first then taper off in severity.
The second banging sound occurs while water is flowing and usually at certain flow rates is aggravated, sometimes you may even see the water flow pulsate. The sound resembles a jackhammer and can go on indefinitely unless the flow rate is changed when it may go away. This is usually caused by debris in the path of the flowing water and many times is caused by a loose washer in a valve. The third banging sound closely resembles a water hammer, but occurs when the water is turned on, usually caused by a large flowing valve suddenly opening and again the first bang is the worst and each successive bang less severe. This is often referred to as a reverse water hammer.
With water hammer the banging is caused by the momentum of a moving column of water coming to a sudden stop. The momentum is worsened by high pressure, undersized pipes, and the noise worsened by pipes that are not secured well. Check your water pressure with a gauge, the pressure reading should be less than 80-psi. If the pressure is higher than 80-psi you should take measures to lower the pressure. Secure your pipes in place with pipe hangers to prevent movement of the pipes. In the past air chambers were installed near the point of use to absorb the shock of the water suddenly stopping.
It has been proven however that these air chambers are not effective as the air is rapidly absorbed into the water. Instead you should install hammer arrestors, which have a piston in them that keep the air charge from mixing with the water at the point of use where the noise is being made. Hammer arrestors are available that can screw directly on to washing machine, dishwasher, faucet, and toilet connections. Reverse water hammer is for the most part an inadequate supply and remedies consist of installing larger pipes, securing pipes better, and sometimes installing a pressure tank in the area that is affected to boost the initial flow of water.
The Jack hammering sound is caused by something loose in the water stream flowing to a fixture of fixtures. Quite often this loose object may even block the stream of water causing the water flow to pulsate along with the jackhammer sound. The most frequent cause of this noise is a loose washer on a valve that is feeding the affected fixture(s). The sound may be changed by different flow rates and often as you move the handle of the valve the sound level changes. Sometimes too the problem may just be loose debris that can be flushed from the line.
Getting the debris or changing the loose washer is the common cure for this problem. Sometimes on a hot water line this problem may be caused by excessively high water temperatures, which are so high they cause the rubber washer to soften and swell. In this case reducing the water temperature to a safe operating temperature and replacing the washer will cure the problem.