An 1868 diagram of one of Scottish engineer James Watt's steam engine governors, in which the spinning of the weighted balls acts to regulate the inflow of steam into the piston and cylinder. [1]
In engineering, governor is a device that regulates the passage of either steam or fuel into a cylinder, thus acting to either increase or decrease the driving force of the heat engine, in a balancing manner.

Overview
An upright spindle has two balls jointed to it, and revolving along with it, the spindle being set in motion by a pulley in connection with some shaft of the machinery. At the ordinary velocity of the engine, the balls have a certain divergence, bat when, as often happens, the resistance to the machinery becomes for a time less, and the speed consequently increases, the balls, having their centrifugal force increased, begin to diverge further. In doing so, the upper ends of the rods by which they hang pull down a boss that slides upon the spindle, and is clasped by the forked end of a lever. This lever is connected with a throttle-valve, or circular disc, in the tube that conveys the steam to the cylinder; and the depression of the end of the lever has the effect of closing more or less the passage for the steam, and thus diminishing the driving-force.

History
In 1788, James Watt invented the governor for controlling the steam throttle and thus the speed of his engine, by adapting the centrifugal or flyball governor from the flour mills, where it was used to regulate the ‘distance from the top millstone from the bed stone’, for use in his Watt engine. [3]

In 1868, Scottish physicist James Maxwell, in his “On Governors”, did some of the first mathematical analysis of the governor. [2]

In c.1870, Willard Gibbs made a governor, which is shown below: