Anti-siphon traps are designed to prevent the buildup of pressure and gases inside plumbing systems, especially toilets and other wastewater units. They keep waste from entering clean water through siphons by breaking vacuums and siphonlike condition in plumbing. These traps allow air to enter pipes while preventing gases from escaping. They can be installed in several places along plumbing systems.
The purpose of an anti-siphon trap is to manage pressure within your pipes. The trap may be a solution for water hammer and the banging pipes that result, but this is not the primary purpose of the component. Plumbers may suggest an anti-siphon trap as part of a larger venting and pressure-management system designed to fix water hammer issues. But anti-siphon traps help prevent backflow, and their effects on banging pipes are only secondary.
Water hammer can be dealt with more directly by using shock arrestors on main lines or by adjusting pump settings to prevent the buildup of these explosions of pipe pressure. These solutions tend to offer more permanent, effective treatments for banging pipes. For more serious pressure issues, a temperature and pressure relief valve or pressure-management system can be installed to constantly control pressure in your pipes.
Banging pipes may be caused by problems not associated with water pressure. Your wastewater pipes or vent lines may not be securely bracketed to your floors or walls. Re-securing the pipes can solve the noise problem while also preventing more serious problems caused by damaged pipes.