Historical Hackers: Hero Builds Vending Machines

We tend to think of mechanical contrivances as products of the industrial revolution and true automation as something computers handle. Yet even before computers, automation existed — using timing motors and cams and other mechanical contraptions. But it might surprise you to know that there was actually some sophisticated automation going way back. Really way back, invented in a world without computers, CAD software, or even electricity. For example, around 50 AD an inventor named Hero — sometimes known as Heron — built machines powered by steam and wind. His inventions included vending machines and music players.

It is hard to imagine what kind of music player or, indeed, vending machine you could build in 50AD. Some of Hero’s inventions were used in temples to, for example, dispense holy water. Others were used in theater to do things like automatically lighting a fire or creating thunder effects. There was even an entirely automated puppet show that used knotted ropes to put on a ten-minute production with no human assistance.

About Hero

Hero was either Greek or Hellenized Egyptian. Most of his writings we know of are actually lecture notes for courses he taught at the Musaeum, the home of the Library of Alexandria. While some of the inventions credited to Hero may have existed already, he applied them with such great success that his name is bound to them as well as the devices and mathematics that he developed.

Given how long ago Hero lived, there is some uncertainly about the years he worked and much of his writing has been lost or diluted. Hero quoted Archimedes and was himself quoted by Pappus so that narrows the possible years down. However, Hero describes a lunar eclipse in great detail and this allowed Neugebauer to calculate that the observation occurred in 62 AD.

His most famous writing Pneumatica has many surviving copies, but the oldest is from the 13th century. Another text, Mechanica, is only known through an Arabic translation from around 865 AD.

The image to the right shows a page from Automata where a figurine dispenses wine and milk through a series of hidden pipes and tanks. However, Hero wasn’t just an inventor, he was also a mathematician. Most famously, he devised a formula for computing the area of a triangle, showed an iterative way to compute square roots, and articulated an important principle in optics.


Given how long ago Hero lived, it is hard to know if he was a genius or just someone good at adapting ideas from others. For many years, only the Pneumatica was known. It is a very practical description of machines and some of the material is from another source. Worse still, most of the machines were frivolous amusements or parlor magic. There were exceptions, such as a working pump for fire fighting, but most of the items were automated musical instruments, animated animal puppets, and other impractical devices. Apparently, the book is also poorly organized.

Because of this, many scholars dismissed Hero as a frivolous inventor. However, texts found later show that Hero was quite educated and worked with serious technology for his day. Perhaps the toys were examples, much as we might write a textbook today with software to flash an LED or play Tetris to teach students how to program.

Today it is generally accepted that Hero was an inventor ahead of his time. He understood how to harness wind, steam, and gravity. He also understood mechanical advantage and a variety of simple machines. He didn’t necessarily invent all of these, but in true engineering fashion, he did put them to good use.

Puppet Show

The Automata, or Automatic Theater, describes two different automated puppet shows. One moved of its own accord and shows a temple in which a fire is lit on an altar. The god Dionysus pours out wine while figures dance about him to the sound of trumpets and drums.

Another puppet show was immobile but had doors that opened and closed to set off each scene. The performance tells the myth of Nauplius whose son was killed by Ajax. A ship is built and launched. The ship crosses the sea, passing leaping dolphins. Nauplius lights a false beacon to lead the crew astray and the ship is wrecked. Finally, Athena destroys Ajax with thunder and lightning. You can see a computer recreation of the device in the video below.

The puppet theaters used a heavy lead weight on a pile of grain that would escape slowly through a hole. The weight pulled a rope that would spin an axle. Almost all the machinery used strings and drums controlled by the axle. There were no springs or cogs, so it was a very simple machine with very complex effects. You can see a physical recreation of the moving theater that shows some of the working details in the video below.

The rope and pegs are reminiscent of pre-computer automation schemes using timing motors, cams, and microswitches.

Famous Inventions

One of Hero’s more famous inventions was a mechanical fountain. That doesn’t sound like much today, but with no electricity, pumping water is a big task. The fountain is a lesson in applied hydraulics. There are three vessels stacked one atop another and connected by pipes. The top basin is initially empty. The middle basin contains water and the bottom container holds air. The bottom two containers must be airtight. Water falling from the middle container to the bottom creates pressure that a pipe carries to the top of the middle container, forcing water up another pipe to the top container.

Confused? Grab some bottles and straws along with some common tools and watch the video below. At about 5:20, [Dave] explains the operation very clearly. While it might seem like the fountain will never stop, it does as soon as the water levels reach a certain point, so no ancient perpetual motion machine here.

However, one of Hero’s most famous inventions is one he probably didn’t actually invent. The aeolipile was a crude form of steam engine. A vessel of water has two L-shaped jets pointing opposite directions. The vessel is free to rotate and a fire underneath boils the water. As steam comes out of the jets, the vessel will rotate.

You can make one of these easily out of a soda can, as demonstrated by Hackaday’s own Steven Dufresene on his RimstarOrg channel. It would probably work better if the can had proper jets, but it clearly works well enough.

Hero used these, although they had been written about earlier. However, he didn’t appear to use it for anything very practical. With his understanding of steam and hydraulics, he was very close to inventing a proper steam engine.

There were other inventions including one that used the weight of a coin to tip a basin of holy water. The tilt would eventually cause the coin to slide off stopping the flow of water. This could be the first coin-operated vending machine. While a wind-powered organ might have been a bit more practical than some of his inventions, it still wasn’t a revolutionary work-saving device. Some think it was, however, the first wind-powered machine.


It does seem odd that for all of Hero’s use of steam, wind, and gravity, there doesn’t appear to be much practical use of the technology until much later. Although the Chinese had windmills, for example, possibly as early as 400 AD, it would be the 9th century before Persians used a sort of horizontal windmill to grind grain and draw water. Imagine a Greek-led industrial revolution 2,000 years ago.

We have to wonder what technology we have under our noses today that we aren’t taking advantage of. Meanwhile, making replicas of Hero’s devices is great sport. We’ve seen engines using a lot more than soda cans.

14 thoughts on “Historical Hackers: Hero Builds Vending Machines

    1. Future historians be all “Lest you think the inhabitants of the early 2000s were bright, they’d had thimbles for hundreds of years, but had only ever used them to protect the fingers while manually sewing, a process used to join fabrics in a crude fashion…”

  1. I found Hero/Heron’s stuff as a kid in middle school I think, and then the antikythera mechanism later. I became fascinated with complex technology done with basic tools at an early age and that’s part of what inspired me to get into machining and watchmaking.

    Too many people assume ancient cultures were not that complex in technology but we have lost more knowledge for a couple thousand years then we had until recently.

    To this day, Hero, Archimedies, and DaVinchi are all heros of mine. My neverending dream of a waterwheel powered house started with Hero.

    Really nice to see a modern article on one of the most ancient and prolific of makers.

    1. Not to mention the Maya, a stone age people with the most advanced mathematics and astronomy on the planet at the time. People can know things without applying that knowledge without applying it in a way future generations would seemingly find obvious.

      1. Or spread it and popularised it, Adam Smith comes to mind, he described it, not sure he invented it. I remember a Time Team or similar show where they were digging out a 5000 year old pottery operation and there was indications of production line techniques, rather than each pot being individually crafted, start to finish, by one potter.

        1. The change never comes from an invention, it comes from the changes in society and culture — an “inventor” will pop up sooner or later if there is a room for them. This is why so many inventions have been made simultaneously by different people. And if not for the whole ridiculous “intellectual property” system, would continue to be made by further inventors. In practice those ideas have always been around, they just need to find a fertile soil, and a group of people who have the need and the resources.

          Mass production doesn’t make any sense, when people don’t actually *want* huge numbers of identical things, and when you have no way to transport them to your customers. Just-in-time ad hoc production makes much more sense then, and we are switching to that in many areas.

          1. Without the “ridiculous” intellectual property system to protect them, inventors would simply keep their techniques hidden from the world and routinely take them to the grave. Only the most trusted apprentices would be allowed to learn anything that wasn’t already common knowledge, but then they would again protect the knowledge through obscurity just as their masters did. As Mark Twain’s time travelling Yankee correctly assumes, a patent office is the first thing needed for technological progress.

          2. Mass production didn’t come into being because people “wanted” huge numbers of identical things, but because that was the only way (nearly) everyone in society could afford those things at all. If there is an equally cheap way to manufacture customized things, sure why not. But usually customized means more expensive because someone had to spend time especially for you, and such a trend seems more first world decadence than anything else.

  2. Greek technology included trains, of a kind: a causeway with fixed rails and small carts that ran on them, for transporting ships across a narrow isthmus so they could avoid a navigational hazard.
    He also designed (probably didn’t build) a mechanism that used a small fire to produce a volume change which in turn allowed the weight of falling water to open doors (which means, amplification.)
    They weren’t culturally set up to need mechanization and automation, so it didn’t thrive.

  3. Yeah but it sucked back then too…. you go to a stoning at the coliseum… put your last Drachma into the vending machine… and the rock gets stuck half way down… 😁

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.