The Stirling engine ( or Stirling 's air engine as it was known at the time ) was invented and patented by Robert Stirling in 1816 .
It was invented by a Scottish minister , Reverend Dr. Robert Stirling in 1816 .