I had a similar problem recently. The fill valve (a Watermaster brand) was intermittently leaking, and for some reason (I didn't bother to autopsy the old valve, which I installed back in 1996, and which performed faithfully for nearly 15 years - no complaints) this would trigger the fill action; the float (or something internal) would stop the flow and then it would start again. Since this particular model of the valve shut off with a snap, there was a definite water hammer, at a frequency of about 2 cycles per second. This osillation could be started by a sudden pressure drop in the system (such as the washing machine fill valve opening) or it could self-start (usually about 3AM).
Needless to say, this was not likely to improve the plumbing system. I could generally stop it for a while (days) by jiggering the float valve arm, but a replacement valve solved the problem completely.
If there is a lesson from all this, it is that, in most houses, the toilet fill valve is the only automatic system in the plumbing. Everything else - washing machines, dishwashers, various faucets, etc. tends to operate only upon command. The toilet fill valve will operate whenever the water level in the tank drops or (in my case) from an internal malfunction. Way back when, I worked as a plumber for a few years, and the most common problem was toilet repair, so I learned to hate fixing toilets!
In all the houses and remodels I have done, I've always required my plumber to install water hammer arrestors like the ones described by Sliderulefarmer in the hot/cold lines adjacent to every electrically operated valve; washing machine, dish washer. Water hammer probably destroys more water mains and causes more damage inside houses than most other single events. I've seen 30 ton fire trucks actually moved sideways when a valve was incorrectly slammed shut on a 5" line. Good observation, connecting the toilet valve and knocking noise.
While you did stop the hammering by finding the source of initially oscilating valve, the true problem lies in poorly installed lines. Having worked under a great plumbers watchful eye, he always made sure we secured the lines throughout the walls. Water hammering is started by a valve opening and closing quickly, toilet, washer, dish washer, even shower valves can do this at times, but the real noise comes from the pipes banging on the studs and walls somewhere in the house. To really stop this from ever happening again you need to install a water hammer arrester. Sounds complex but it is simply a short piece of capped pipe (<1 foot) installed vertically somewhere in the system, being vertical it holds a small air pocket at the top that dampens & eliminates water hammering. You need to install one on both the hot and cold lines. With the new PEX piping this has become less of a problem as PEX seems to have a little give in it that dampens the hammering.
The 100% solar-powered airplane Solar Impulse 2 is prepping for its upcoming flight, becoming the first plane to fly around the world without using fuel. It's able to do so because of above-average performance by all of the technologies that go into it, especially materials.
With major product releases coming from big names like Sony, Microsoft, and Samsung, and big investments by companies like Facebook, 2015 could be the year that virtual reality (VR) and augmented reality (AR) finally pop. Here's take a look back at some of the technologies that got us here (for better and worse).
Good engineering designs are those that work in the real world; bad designs are those that don’t. If we agree to set our egos aside and let the real world be our guide, we can resolve nearly any disagreement.
Focus on Fundamentals consists of 45-minute on-line classes that cover a host of technologies. You learn without leaving the comfort of your desk. All classes are taught by subject-matter experts and all are archived. So if you can't attend live, attend at your convenience.