Heron of Alexandria was one of the most inventive writers on machines in the ancient world, a Greek engineer and mathematician known for steam toys, self-opening temple doors and trick vessels that seemed to obey their owners. Among the gadgets in his Pneumatics is a peculiar box that gave out water only after a coin had been dropped inside. Modern writers often hail it as the first vending machine. But did Heron really build one, and did temples ever use it?
A Box That Waited for Payment
The device appears as chapter 21 of the Pneumatics, which the 1851 English translation, made by J. G. Greenwood and edited by Bennet Woodcroft, titles "Sacrificial Vessel which flows only when Money is introduced". The chapter opens with a simple promise:
"If into certain sacrificial vessels a coin of five drachms be thrown, water shall flow out and surround them."
The working parts are few and cleverly concealed. A chest, which the translation calls "a sacrificial vessel or treasure chest," hides a tank of water with a small box at its base and a pipe that leads outside. A lever turns on a vertical rod beside the tank, and one end widens into a flat plate, while the other end holds a lid that seals the small box so that nothing can escape through the pipe.
The whole trick lies in a careful balance of weights inside the chest. Heron specifies that the lid "must be heavier than the plate R, but lighter than the plate and coin combined." Without a coin, the lid sinks into its seat and the vessel stays dry, but with a coin resting on the plate, the scale tips the other way.
Heron then describes the moment of payment in a single sentence:
"When the coin is thrown through the mouth A, it will fall upon the plate R and, preponderating, it will turn the beam O P, and raise the lid of the box so that the water will flow: but if the coin falls off, the lid will descend and close the box so that the discharge ceases."
The design limits each purchase without any attendant. The coin stays on the plate only for a short time, and once it slides away, the flow stops while the money remains safely inside the chest.
A Temple Setting?
Heron's chapter on the coin vessel does not say which god it served or name any temple where it stood. Another chapter in the same book, describing a different device, hints at the kind of setting such vessels might have suited. In chapter 31, on a turning wheel that releases purifying water, the translation reads:
"In the porticoes of Egyptian temples revolving wheels of bronze are placed for those who enter to turn round, from an opinion that bronze purifies. There are also vessels of lustral water, from which the worshippers may sprinkle themselves."
Lustral water was water used for ritual cleansing, but that passage describes the wheel and lustral vessels, not the coin vessel of chapter 21. The Pneumatics is full of temple machinery, and Heron explains how to build temple doors that open by themselves when a fire is lit on an altar, and how to make a trumpet held by a figure sound with compressed air, a design readers may know as Heron's trumpet automaton. He even devotes a chapter to a drinking horn that pours wine mixed with water or pure water at will, one of several trick vessels in the book.
Modern retellings of the device add details that the Pneumatics itself never gives. The Kotsanas Museum, which presents the machine among its exhibits of ancient inventions, says the machine "was placed outside temples and allowed the faithful to obtain holy water by dropping a five-drachma coin into a vessel." Sky HISTORY goes further, stating that "Vending machines made to this design were installed at temples across Egypt." Neither source cites a surviving machine or a temple record, and none appears in Heron's chapter.
The First Vending Machine?
The label "first vending machine" is the claim most often attached to the device. The Kotsanas Museum calls it "the oldest automatic vending machine in history," and ABC News in Australia reported in 2018 that "The first recorded contraption was created in first century Egypt." Both claims rest on the same evidence, which is Heron's written description.
That evidence is real, but it is narrow, because a text that explains how to build a machine does not prove that the machine was widely built, or that Heron was the one who first thought of it. The 1851 translator's preface also reports a tradition, passed down by a later writer called Hero the younger, that Heron "was a pupil of Ctesibius."
Heron's other famous design shows the same pattern. His aeolipile, a sphere spun by jets of steam, is often called the first steam engine. The 1851 edition titles it "The Steam-Engine" and describes how "a ball shall revolve on a pivot" over a heated cauldron. As with the coin vessel, it is clear that Heron described the device. How far it spread beyond the page is far less certain.
When Did Heron Live?
Even the date of the coin vessel is open to debate, because the lifetime of Heron himself has long been argued over. The MacTutor History of Mathematics archive, run by the University of St Andrews, places him in the first century AD. It reports that Otto Neugebauer "in 1938 discovered that Heron referred to a recent eclipse in one of his works," which he matched to an eclipse seen in Alexandria on March 13, 62 AD.
However, the historian of science Nathan Sidoli revisited that argument in a 2011 paper in the journal Centaurus. He accepted that the eclipse of 62 AD is "certainly the best fit" for the figures, but he argued that the text "does not contain a carefully recorded eclipse observation that can be attributed to Heron." As Sidoli put it:
"The most that can be said is that the lunar eclipse of 13 March 62 can probably be taken as a terminus post quem for Heron's activity."
A terminus post quem is the earliest date something can belong to, so on Sidoli's reading, Heron worked in or after 62 AD, but the year does not pin him down. Older scholarship spread its guesses even wider, and the translator's preface of 1851 weighed dates for Heron as early as the second century BC before suggesting he lived "about B. C. 150." Sidoli notes that because Heron mentions Archimedes and is in turn cited by Pappus of Alexandria, his possible span runs "from around 200 BCE to 300 CE."
Weighing the Coin Vessel Today
What can be said with confidence is that a design for a coin-operated water dispenser survives in Heron's Pneumatics, in a working form that museums can rebuild. However, the details that make the story so appealing, from the holy water to the crowds of worshippers to machines lining Egypt's temples, come from modern retellings rather than from Heron.
Whether anyone in antiquity actually dropped five drachms into such a box, and where, is a question Heron's text cannot answer. For now, the coin vessel survives as a set of instructions on a page, waiting for an archaeologist to find one in the ground.
How we label claims
Established: Heron's Pneumatics describes a sacrificial vessel that releases water when a coin of five drachms is dropped in, as given in the 1851 Woodcroft edition. Disputed: Heron's date, placed in the first century AD by Neugebauer's eclipse argument as reported by MacTutor, treated by Sidoli as no earlier than 62 AD, and set at about 150 BC in the 1851 preface. Unverified: that the device dispensed holy water as such, that Heron invented it, that it was the first vending machine, and that such machines were installed at temples across Egypt.
Figure 21 from the 1851 English edition of Heron's Pneumatics, edited by Bennet Woodcroft, showing the coin-operated sacrificial vessel. It is a 19th-century diagram drawn from the text, not an ancient object or a surviving machine. Public domain, via Project Gutenberg.
By Aris Manus
Sources
- Hero of Alexandria, The Pneumatics of Hero of Alexandria from the Original Greek, translated by J. G. Greenwood, edited by Bennet Woodcroft, London: Taylor Walton and Maberly, 1851 (Project Gutenberg eBook 77400)
- Nathan Sidoli, Heron of Alexandria's Date, Centaurus 53 (2011), 55 to 61
- J. J. O'Connor and E. F. Robertson, Heron of Alexandria, MacTutor History of Mathematics Archive, University of St Andrews
- The automatic holy water server with coin-collector, Kotsanas Museum
- The first vending machine dispensed holy water, not Coke, ABC News, January 18, 2018
- The vending machine was invented a lot earlier than you think, Sky HISTORY

