Reverend Dr Robert Stirling (1790-1878) was a Scottish clergyman, and inventor of a highly efficient heat engine.
1790 October 25th. Born at Cloag Farm near Methven, Perthshire in Scotland, the third of eight children of Peter Stirling, a farmer at Cloag. Michael Stirling, Robert's grandfather, was the inventor of a threshing machine
He inherited his father's interest in engineering
1805-06 He studied divinity at the University of Edinburgh
1816 He became a minister of the Church of Scotland.
He became concerned about the dangers the workers in his parish faced from steam engines, and decided to develop an engine using heated air, in the hope that it would provide a safer alternative. His engine would not be liable to explode, and could not cause steam scalding. He would include a heat economiser (later to be misnamed a regenerator), to increase the efficiency of his air engine.
Stirling was by no means the first to pursue an interest in this form of engine. Henry Wood (1715-1795) patented an air engine in 1759. He described the principle, but probably did not produce an engine. George Cayley built his first air engine in 1807. It had a working cylinder and a co-axial working cylinder. The working medium was air heated directly in the furnace (together with a small proportion of the products of combustion, including abrasive ash).
1816 Robert Stirling obtained Patent No. 4081. The document was misplaced in the Patent Office and only came to light by chance 100 years later.. The patent specification described methods of effectively transferring heat between fluids at different temperatures, and also described a hot air engine incorporating a wire mesh economiser to aid heat transfer. The engine had a cylinder whose upper portion was thin-walled and heated by exposure to the hot gases leaving the furnace. The lower portion of the cylinder was cooled by air or water. The bottom portion of the cylinder was accurately bored to accommodate the close-fitting power piston (which was oil-sealed). Above this was a tall thin-walled displacer piston, about 1" smaller in diameter than the cylinder. Stirling specified a shiny outer surface for the piston, to reflect heat. Surrounding the displacer, and attached to it, but not in intimate contact with it, was a wire mesh heat exhange element. Heated air passing down to act on the power piston gave up some of its heat to the mesh, and in turn the mesh gave up heat to the cooled air which was being forced back to the top chamber.
Stirling's engine differed from the 1807 engine of George Cayley in a number of important respects. In Cayley's engine air heated in the furnace, along with the furnace gases, acted directly on the power piston, and was then exhausted, while in Stirling's engine there was a thin metal barrier between the hot furnace gases and the working medium (air), and the same air was heated and cooled (i.e. the engine worked on a closed cycle), although Stirling also described a speed governing system which acted to release and admit air from the working chamber.
1818 Built the first practical version of his engine, a 2 HP machine used to pump water from a quarry in Ayrshire.
1819 Stirling married Jane Rankine. They had seven children.
1820 June 29th. Birth of son Patrick Stirling
1825-1827 Robert Stirling presented two experimental hot air engines to museums. The first had been presented to the University of Edinburgh by 1825. It is now (2016) on display at the National Museum of Scotland in Edinburgh. See photograph. Evidently heat was applied to the lower part of the displacer cylinder, carefully. The other was donated to the University of Glasgow in 1827. They differ from the engine shown in the 1816 patent, having separate displacer and working cylinders. These are located either side of the flywheel, which is fixed on an overhead crankshaft. The two cranks are set at approximately 90 degrees to each other. The two engines are generally very similar, except that the Glasgow engine has what is presumably a water-cooled jacket embracing the upper half of the displacer cylinder. Also, the Edinburgh engine had a wooden pulley on the crankshaft.
In Kilmarnock, he collaborated with another inventor, Thomas Morton, who provided workshop facilities for Stirling's research. Both men were interested in astronomy, and having learnt from Morton how to grind lenses, Stirling invented several optical instruments.
1827 Stirling and his brother James patented a second hot air engine (Patent No. 5456). They inverted the design so that the hot ends of the displacers were underneath the machinery. The engine was double acting, and an air compressor was added to obtain increased power. . Illustrated descriptions here.
c.1830 Birth of son William Stirling
1835 October 2nd. Birth of son James Stirling
1840 (1841?) James and Robert Stirling's third air engine patent (No. 8652). More information here.
1851 Living at Galston Manse: Robert Sterling (sic) (age 60 born Methven, Perthshire), Minister of Galston. With his wife Jane (age 50 born Kilmarnock) and their children Jane (age 29 born Kilmarnock), James (age 15 born Galston), and Agnes (age 12 born Galston). Two servants.
1861 Living at Galston: Robert Sterling (sic) (age 70 born Methven, Perthshire), Minister of Parish Church Galston. With his wife Jane (age 60 born Kilmarnock, Ayrshire) and their children Jane (age 39 born Kilmarnock) and James (age 25 born Galston), Engine Smith. Two servants.
1871 Living at Galston: Robert Sterling (sic) DD (age 80 born Methven, Perthshire), Minister of the Parish. With his wife Jane (age 70 born Kilmarnock) and their daughter Jane (age 48 born Kilmarnock). Two servants.
In a letter of 1876, Robert Stirling acknowledged the importance of Henry Bessemer's new invention – the Bessemer process for the manufacture of steel – which made steam engines safer and threatened to make the air engine obsolete. However, he also expressed a hope that the new steel would improve the performance of air engines.
1878 June 6th. Stirling died in Galston, East Ayrshire. The theoretical basis of Stirling's engine, the Stirling cycle, would not be fully understood until the work of Sadi Carnot (1796–1832). Carnot produced (and published in 1825) a general theory of heat engines, the Carnot cycle, of which the Stirling cycle is a particular case.
1878 Obituary 
DR. STIRLING.- The Rev. Dr. Stirling, the inventor of the hot-air engine, died in June, in his 88th year, having been born in the year 1790, near Methven, in Perthshire. Educated at St. Andrews, he was licensed to preach by the Presbytery of Dumbarton in the year 1815; and in the following year he received a presentation from the Commissioner of the Duke of Portland to the Kilmarnock second charge.
In the year 1824 he was translated to the neighbouring parish of Galston, where the living was in the gift of the same patron; and there he lived And laboured during the remainder of his long ministerial career, which in all extended over a period of sixty-three years.
The honorary degree of D.D. was conferred upon Mr. Stirling in the year 1840 by the University of St. Andrews, in recognition of his scholarly and scientific attainments, which were of an unusually high order.
Dr. Stirling was decidedly of a mechanical turn of mind, and indeed there seems to have been a special bent in that direction in the family. His brother, Mr. James Stirling, was a very accomplished engineer; and of his sons no fewer than three have inherited his taste for mechanical pursuits, and have become well known in railway engineering, their honourable positions being due alike to their professional abilities, and to the possession of much resolute and independent spirit, such as specially distinguished their father's character.
The eldest son, Mr. Patrick Stirling, was for a long time the locomotive superintendent on the Glasgow and South-Western Railway, with headquarters at Kilmarnock, and is now well known on this side of the Border as the locomotive superintendent of the Great Northern Railway.
The youngest son, Mr. James Stirling, succeeded Patrick in the service of the Glasgow and South-Western Railway Company, and has recently been appointed to a similar position on the South-Eastern Railway.
Another son, William, was engineer to the Lima and Callao, and is still in South America.
Like his brother James, the late Dr. Stirling early developed a remarkable taste for mathematics and mechanics, and, as already indicated, so early as the year 1816, when he was about twenty-six years of age, he invented and patented his air engine, which was afterwards improved somewhat by his brother James, and re-patented in 1827, and again in 1840.
In its best form Stirling's air engine was constructed at the Dundee Foundry in the year 1842, for the purpose of driving the machinery there; it had a working cylinder of 16 in. in diameter, with a stroke of 4 ft. The engine drove the machinery at the Dundee Foundry for several years at a very small cost for maintenance, there being little tear and wear of parts.
During his whole life mechanics formed the favourite pursuit of Dr. Stirling, and he constructed, with great neatness and dexterity, many optical and other scientific instruments. He also discharged the duties of his pastorate with great fidelity, and his upright, straightforward character won for him the esteem, not only of his own people, but also of the whole community who enjoyed the benefits of his public spirit and active benevolence.
1878 Obituary