Robert Stirling was born on October 25, 1790 in Methven, Scotland. He was the third of eight children and lived on a farm. As a youth, he gained a great deal of interest in engineering and machinery from his father. However, his interest in theology prevailed and he decided to study the subject.
In 1805, he enrolled at Edinburgh University, studying Latin, Greek, Logic, Mathematics, and Law. In 1808, he graduated and enrolled at Glasgow University in 1809 as a student of Divinity. In November of 1814, he enrolled at the Edinburgh University as a student of Divinity, finishing his education. In 1815, he was examined for priesthood and issued a license to preach the gospel on March 26, 1816. On September 19, 1816, he was ordained Minister of the Second Charge of Laigh Kirk. There, he became aware of the dangers of traditional steam engines. At that time, steam engines were made with weak iron boilerplates, which would frequently explode under the high pressures that they contained. The resulting shrapnel and release of hot gases posed a great risk to workers.
Stirling decided that he wanted to try to improve upon the steam engine by making a safer version. His first invention was something that he called a "Heat Economiser", which improved the efficiency of air engines. In 1817, he was awarded a patent for the device itself, as well as a patent for an air engine model that utilized it. In 1818, he built the first practical version of this air engine, which has now become known as the "Stirling Engine".
In 1819, he married a woman named Jean Rankin, with whom he would have seven children. Two of his children, Patrick and James, decided to become locomotive engineers. Most of Stirling's later work consisted of inventions related to optics. He performed this work with Thomas Morton, who gave Stirling the proper facilities and equipment for his work.
Stirling's invention was largely overshadowed by another innovation, the Bessemer process for economically making steel. With steel, steam engines could me made more durable and explode less often. Stirling realized that his invention was no longer vital, but still expressed hope that steel could be used to improve the performance of his air engine.
On June 6, 1878, Stirling died of natural causes in Galston, Scotland. Unfortunately, his engine has not been widely adapted since then, but still has been implemented in limited applications. The engine itself relies on the Carnot cycle, which generates kinetic motion from the expansion and compression of a gas.