BBC Four just aired a cracking documentary on automata, written and presented by historian of science Simon Schaffer. It's really good, and you should watch it. It covers early clockwork machinery, jacquemarts (bell-ringers) and clockwork automata, minaturization, revolution, fraud, and the replacement of human workers with machines. I particularly liked the section on Schloss Hellbrunn (which I shall be visiting later this summer) and the way that the "Mechanical Theatre" depicts the nobility's idea of a utopian society, complete with perfectly regular laborers. Schaeffer makes some interesting connections to the fact that horological and artistic innovation rested mainly on low-paid, low-status artisanal workers; these artisanal workers ended up displacing themselves when captains of industry built machines, using the same principles as elaborate, richly decorated luxury automata, to replace human labor.
Schaffer's expertise as a scholar is in early modern science, and he concentrates in the documentary on the automata of the seventeenth and eighteenth centuries. I have a few small emendations to offer to Schaffer's narrative. Although it's true that the regularity of clockwork machinery became used as a metaphor to understand the human body in the early modern period, early modern automata were not the first to mimic natural forms. The ancient Greeks, especially in the Alexandrian School (3rd-1st centuries BCE) designed fabulous automata (driven by pneumatics and hydraulics, rather than the verge-and-foliot escapement and falling weight drive of the early modern period) in the forms of animals and people. And Arabic engineers, in the ninth and thirteenth centuries, wrote detailed treatises on how to build programmable, musical fountains; mechanical servants; and elaborate clocks. It's also interesting to note that in the Middle Ages, descriptions of automata in narrative texts often describe them as perfect servants and as enforcers of different kinds of behavior.
Still, the documentary is a treat, and if you're interested in automata, horology, or the history of technology, you should see it.