From ‘pin’ machine to punch card

Kris Merckx
11 min readJan 11, 2023

--

Also read the first part about “programming in ancient times”. https://medium.com/@krismerckx/mechanical-programming-in-ancient-times-bc7798b8163d

With the help of software, a computer can automate a lot of tasks in order to take work off people’s hands and, above all, reduce the amount of (working) time needed. Yet many still do not realise how to do this exactly. The search and replace command in a word processing programme is a simple example of this. In a great deal of software, recurring tasks can be automated using so-called macros. You carry out a number of tasks, while the computer registers the tasks performed step by step. Afterwards, it can repeat that task independently. The list of instructions is stored in the computer’s memory. In automats, the instructions are also in the machine.

Clocks and automatons

The knowledge of how to build bells and automatons was not completely lost in the Middle Ages. Indeed, many churches and cathedrals were equipped with automatons based on ‘pin mechanisms’. So the knowledge Heron demonstrated with his automatic theatres was certainly not lost. Clocks, automatons, music boxes… they shared a common evolution and cross-fertilisation that would directly influence modern computer and robot technology.

Over the centuries, mechanical musical devices were developed by order of and for the wealthier classes (nobility and clergy). The history of mechanical music is closely linked to that of the clock and automatic dolls and statues. In English, a distinction is made between the words ‘clock’ and ‘timepiece’. Clock’ always refers to the mechanical sound produced by the timepiece, whereas a ‘timepiece’ indicates the time, but does not make any sound.

In both the Muslim world and the Christian West, bells were essential in religious practice. They indicated when the moments of prayer and reflection had arrived. Historical sources are not always complete and often inventions are wrongly attributed to a particular person or even region. It may be clear that the engineers in the East and West drew inspiration from the classical examples, and sometimes made their own additions. Moreover, a strict distinction was not always made between clocks, automatons and mechanical musical instruments.

In essence, in music boxes we find two different, yet similar, techniques:

A cylinder with pins;

punched discs or plates.

Both are set in motion, with either the pins or the holes passing instructions to the rest of the mechanism. Without doubt, the cylinder with pins is the oldest form for the mechanical transmission of instructions, such as the production or reproduction of music. Heron of Alexandria (first century AD) already made use of it.

Automatons in the East

For the oldest known cylinder-driven mechanical musical instrument, we have to go to ninth-century Baghdad. The three brothers Ahmad, Muhammad and Hasan bin Musa ibn Shakir, better known as the Banū Mūsā (Sons of Moses, after their father’s name), were active in the astronomical observatories of Baghdad and in the so-called House of Wisdom (Bayt al-Hikma) by order of the Abassid Caliph al-Ma’mun. They reportedly sent messengers to Byzantium and elsewhere in search of original or copied classical texts on science and technology. Muhammad himself is also said to have travelled to Byzantium. Each month, they paid more than five hundred dinars to a group of translators who translated the classical works brought over into Arabic.

By order of the caliph, they verified the circumference of the earth calculated by Eratosthenes, which proves that they were not only well versed in astronomy, but also in mathematics. Most famous, however, was their book Kitāb Al-Hiyal (The Book of Ingenious Devices). Many of the devices in this book were clearly inspired by the designs of Heron of Alexandria, Philo of Byzantium and others, as well as older Persian, Indian or perhaps even Chinese inventions.

Nevertheless, the brothers clearly left their own mark and came up with many ingenious additions. The difference lay in the use of, among other things, automatic cranks, valves and conical valves as automatic regulating systems. Like no other, they knew how to deal with small variations in aerostatic and hydrostatic pressure to achieve the goal they had in mind.

An important device for our starting point in the Kitāb Al-Hiyal is the automatic flute player. The device clearly has its precursors in the work of the Alexandrian engineers Ktesibios, Heron and Philo of Byzantium. Many consider the Musa brothers’ automatic water-powered flute player to be the first programmable musical instrument. The detailed description of the appearance and function of the device tells us that it really functioned and that it is not just a legend. It would be going too far to explain the complete functioning of the device here, so we limit ourselves to the most essential part: the programmable drum or cylinder to record or play the melody.

A flute blew a constant supply of air. Just like a recorder, their automatic flute had openings for the various ‘fingerings’. Dampers closed the openings of the flute airtight. The dampers were in turn attached to wooden arms or lighters. A large gear was set in motion by a constant stream of water. This in turn set a smaller gear wheel in motion which rotated a drum or cylinder. The cylinder probably had wooden pins on it that pressed the arms or lighters down while rotating, causing the dampers of one or more openings to be lifted, the air to escape and the melody to resound. It goes without saying that the speed of the water flow determined the speed at which the music was played. In their description, the Musa brothers also foresaw the possibility of hiding the whole construction in a statue of a flute player, using the fingers as lighters and hiding the drum in the sleeve.

Music recording

An even greater challenge was capturing the melody. Here, too, the Musa brothers were extremely inventive. Their description of how to record the fingerings of a real flute player and transfer the melody to the cylinder is not only very clear, but also incredibly ingenious! They were clearly inspired by the wooden, waxed plates that primary school pupils in Byzantium used as writing tablets. They covered a wooden or brass cylinder with black wax. A construction of lighters was attached on one side to the fingers of a real flute player.

On the other hand, pins were attached and hung above the waxed drum. When the flute player played his melody, the markers drew a pattern in the wax of the rotating drum each time he lifted his fingers. In this way they obtained an almost perfect reproduction of the melody in the layer of wax. Similarities with Edison’s first phonograph with wax cylinders are very clear here! Of course, they then had to transfer this pattern to a smaller cylinder.

Not all parts or extensions of the automatic flute player are equally well worked out, but the brothers clearly saw many possibilities. They thought, for example, that it should be possible to have the cylinder move aside after a melody has been played. They wanted to achieve this by fastening the drum to a float with a rope. By emptying a water tank with a siphon at the right moment, the sinking float could pull the drum aside and replace it with another.

Evolution in the West

In Toledo, the water clock of al-Zarqali in the eleventh century caused astonishment and awe. In the twelfth century, the engineer Badi al-Zaman al-Jazarieen built an imaginative water clock in the form of an Indian elephant with Chinese dragons, a phoenix and all sorts of Arabic figures on its back. He described the clock in detail in his Kitab fi ma’rifat al-hiyal al-handasiyya (Book of Knowledge of Mechanical Devices).

Like the Banū Mūsā, he was inspired by classical examples. In Christian Prague, the astronomical clock was equipped with a series of “automatons” in the fourteenth century. In Europe, the Low Countries and Southern Germany were the leading countries. Together with his father, clockmaker Nicholas Vallin (1558–1603) moved from Lille to England in the 1580s. The British Museum still preserves a splendid example of a musical chamber clock made by him. The device has a dial with hands for hours and minutes. Every quarter of an hour, the clock plays a different piece of music on the thirteen bells attached to the top. Following classical example, the clock is driven by weights.

In the third century B.C., the Alexandrian engineer Ktesibios already equipped his water clocks with singing birds. The automaton builders of the eighteenth century wanted their birds not only to sing, but above all to be lifelike. Famous is the mechanical duck made by Jacques de Vaucanson (1709–1782), which could eat, drink and… produce faeces. The London jeweller and goldsmith James Cox (1723–1800) surrounded himself with the right people to turn his unbridled fantasy into reality. His fame brought him customers in East and West. In 1772, he opened his own museum, the Spring Gardens, where he housed his automata. In order to reduce the costs of this very expensive operation, he organised lotteries in London and Dublin. The collection of the Hermitage in St. Petersburg still contains the Peacock Clock, a splendid automaton by Cox that includes a mechanical peacock, cock and owl and a dial hidden in a mushroom. The automaton is still the museum’s showpiece and the only remaining automaton from the eighteenth century.

In order to save space, Antoine Favre-Salomon (1734–1820), a clockmaker from Geneva, replaced the bells with a comb with pre-tuned metal notes in 1796. This enabled clockmakers to incorporate mechanical music devices into much smaller instruments. Four years later, his fellow townsman Isaac Daniel Piguet (1775–1841) replaced the cylinder with a horizontally placed disc with pins. Barely eleven years later, the production of music boxes accounted for about ten per cent of Swiss exports, surpassing sales of timepieces and lace. For the first time, music boxes reached a wider public.

Modular design

But what about Leonardo, who appears just about everywhere and is often portrayed as the great genius of the Renaissance? Leonardo da Vinci was not only a painter, but also an engineer and sculptor. He avidly read the translations of Heron and Vitruvius, and studied the different parts of the machines. He called them the ‘elements’ or ‘organs’ of the machines. In his view, by combining these parts in all kinds of ways, an infinite number of machines could be conceived and built. When you look at Da Vinci’s works, they often remind you of the manuals from Lego® Technics boxes. So modular design, as it appears today in so-called “object-oriented programming”, was already in his writings.

In his texts, he described what types of screws, gears, flywheels, ball bearings, chains, springs, pulleys, etc. existed and how to make them. He provided his texts with extensive technical drawings in perspective. He himself designed a whole range of machines: war machines, such as mortars and tanks, dredgers, aeroplanes, a helicopter, a diving suit, a hydraulic saw … Many people think that he tested prototypes of these ingenious inventions himself. Yet most of his inventions were never put into practice.

Leonardo da Vinci was convinced that nature could not make living beings move without the use of ‘mechanical parts’. Therefore, he secretly performed dissections on corpses to study the functioning of human organs and muscles. From what he learned, he became convinced that it must be possible to recreate organs or working organisms. Centuries before it was rediscovered, he found arteriosclerosis and its cause. By carefully studying bones and muscles, he succeeded in building the first ‘robots’ that could move ‘independently’.

In 1550, Giorgio Vasari (1511–1574) wrote about the lives of the most important Italian artists in his book:

When Leonardo da Vinci was in Milan, the King of France came to visit. He asked him to do something special. Da Vinci went to work and presented him with a lion that took a few steps and opened its chest, from which emerged numerous lilies.’

The American robot expert Mark Rosheim studied Da Vinci’s Codex Atlanticus in the hope of finding traces of that robot lion. He is convinced that Da Vinci installed the lion on a mechanically programmable cart. A spring mechanism made wheels turn, which in turn set smaller wheels in motion. These wheels controlled wooden arms to which a sort of scissor mechanism was attached. By moving the arms according to a set plan, the cart could move and also turn.

Leonardo was not the only one to make successful use of the knowledge of automata that trickled down through translations of classical and Hellenistic works. During the Middle Ages, which are often portrayed as a dark period without progress, automatons and clocks experienced great development. So Leonardo is not the great genius who invented the programming of robots. He could lean on a great tradition in Europe, a tradition that originated in ancient Egyptian Alexandria.

The interior of the “automatic writer” that served as a model for Martin Scorcese’s film “Hugo”. — From: Chapuis and Gelis, “Le monde des automates”, 1928.

Automation in industry

The first to introduce a similar programmable system for industrial use was the Frenchman Joseph Marie Jacquard (1752–1834). In 1801, he designed a loom that was operated by punch cards. He based his work on the earlier inventions of Basile Bouchon, Jacques Vaucanson and Jean Falcon, among others. Basile Bouchon, son of an organ builder, invented as early as 1725 a way to control a loom with a perforated roll of paper. Bouchon’s father made cylinders with pins for organs. To place the pins at the right places in the cylinder, he first drew a pattern on a cardboard sheet. He then turned the plate around the cylinder and knew exactly where to put the pins. Basile thought it would be more convenient to use the cardboard sheets themselves. Jacquard was the first to successfully implement the system.

“Androide marchant” (Collection sir David Salomons, London) — From: Chapuis and Gelis, “Le monde des automates”, 1928.

In the nineteenth century, we also saw the punch card system appear in music boxes and pianolas. Punch cards worked in a similar way to pin or comb systems. In the case of music boxes, air from a bellows could escape through the holes or pins could shoot through, giving instructions to the rest of the mechanism. With Jacquard, pins popped up through the holes in the punch cards and allowed the loom to weave a certain pattern. The main advantage of a punch system was that you could have many more instructions carried out by the machine in succession. With a cylinder system with pins or combs, you were limited by the circumference of the cylinder. Punch plates could be rolled up or folded and allowed to slide through the mechanism as the programme was executed. The weavers of Lyon feared for their work and burned the loom in 1808, so the story goes. Blind protest against an unstoppable innovation. But this story is not true. There was no such fire. The story first emerged at the beginning of the 19th century.

Punch card for a Jacquard loom, Source: https://www.nms.ac.uk/explore-our-collections/stories/science-and-technology/jacquard-loom/

The usefulness of a punch card system was soon recognised in other areas of society as well. It was possible to store all kinds of information in coded form on a punched card and have it read out automatically. Charles Babbage (1791–1871) drew up plans for an analytical calculator and foresaw the introduction of punched cards. His plans represented a serious step forward in the development of a calculator. Earlier, the Frenchman Blaise Pascal (1623–1662) had built a mechanical calculator, but this never became a success. Babbage’s machine did not get much further than the design table either. Babbage’s punch-card computer found its way into modern industry via companies such as IBM.

This chapter appeared in my Dutch book “Uit het hoofd”

--

--

Kris Merckx

Historian, web developer, animated film producer, multimedia, author (history, information technology), lecturer at the University of Applied Sciences, Leuven.