A coin briefly opened the water supply

A first-century device described by the engineer Hero of Alexandria turned a coin’s weight into a temporary valve opening. The coin landed on a small pan attached to a lever. As the pan tipped downward, the lever lifted a plug from the outlet, letting water flow from a reservoir into a worshiper’s vessel.

The payment did not operate a modern-style dispenser with gears or a pump. It simply held the outlet open. As the coin slid off the pan, the lever rose again and the plug closed the flow. The amount released depended on how long the valve remained open, so the mechanism delivered a limited portion rather than allowing a visitor to draw freely from the supply.

A small machine for managing a shared resource

In a temple, the arrangement linked access to water with a coin payment and made each serving self-limiting. A visitor could not keep the outlet open by hand: the coin itself supplied the brief force that lifted the valve. That made the transaction automatic and helped prevent one person from taking an unrestricted amount from a shared supply.

Hero’s device is often described as the earliest known vending machine, though it is more precise to call it an early documented example. Its significance lies in the simple economic idea built into its mechanism: a payment could trigger a measured release of a useful good. The same basic logic—payment opens access, and a limit controls how much is received—would become familiar in far more elaborate machines.