A ballcock is a mechanism or machine for filling water tanks, such as those found in flush toilets, while avoiding overflow and backflow. The modern ballcock was invented by José Antonio de Alzate y Ramírez, a Mexican priest and scientist, who described the device in 1790 in the Gaceta de Literatura Méxicana. The ballcock device was patented in 1797 for use in steam engines by Edmund Cartwright. It consists of a valve connected to a hollow sealed float by means of a lever, mounted near the top of the tank. The float is often ball-shaped, hence the name ballcock. The valve is connected to the incoming water supply, and is opened and closed by the lever which has the float mounted on the end. When the water level rises, the float rises with it; once it rises to a pre-set level, the mechanism forces the lever to close the valve and shut off the water flow. This is an example of negative feedback and of proportional control.
Flapper valve
When a toilet's handle is turned, a discharge mechanism is activated by means of a rod or chain. The mechanism may be a flapper valve, which is designed to sink more slowly than the water, which will exit to the toilet bowl below, so that the tank may empty. As the tank water level drops, the float descends and actuates the fill valve. Water is fed to the tank to replenish its supply, and a smaller flow is directed into the overflow tube to refill the bowl. Once the flapper valve closes, the water flow from the fill valve continues until the tank level again reaches the fill line.
Siphon valve
Another discharge mechanism, common in the United Kingdom, is a siphon. The rod or chain lifts a piston that pulls an initial charge of water up into the siphon. When the column of water passes over the siphon bend and starts to fall down the exit pipe, the siphon action continues to empty the tank until the water in the tank falls below the siphon intake.
Ballcock valve
Toward the end of the discharge process, the ballcock responds to the drop in water level and refills the tank. Should the float or valve fail and allow the water level to exceed the fill line, the water will pour into the overflow tube and out to the bowl or to an outside drain. Although this does not stop the wastage of water, it avoids the flooding that would otherwise occur after a single-point valve failure. Typically the fill valve is secured by a ballcock shank washer, which prevents leakage from the supply line. These devices are sold at most hardware, plumbing supply, and home improvement stores. Delay valves are becoming more common in the UK, which delay the filling until the level has dropped to a low level. This avoids short-cycling of the water supply.