section_path: Science and technology/Mechanical and hydraulic engineering
section_name: Mechanical and hydraulic engineering
paragraph_text: Mechanical and hydraulic engineering
  
  Han-era mechanical engineering comes largely from the choice observational writings of sometimes-disinterested Confucian scholars who generally considered scientific and engineering endeavours to be far beneath them. Professional artisan-engineers (jiang 匠) did not leave behind detailed records of their work. Han scholars, who often had little or no expertise in mechanical engineering, sometimes provided insufficient information on the various technologies they described. Nevertheless, some Han literary sources provide crucial information.
  
  For example, in 15 BC the philosopher and poet Yang Xiong described the invention of the belt drive for a quilling machine, which was of great importance to early textile manufacturing. The inventions of mechanical engineer and craftsman Ding Huan are mentioned in the Miscellaneous Notes on the Western Capital. Around AD 180, Ding created a manually operated rotary fan used for air conditioning within palace buildings. Ding also used gimbals as pivotal supports for one of his incense burners and invented the world's first known zoetrope lamp.
  
  Modern archaeology has led to the discovery of Han artwork portraying inventions which were otherwise absent in Han literary sources. As observed in Han miniature tomb models, but not in literary sources, the crank handle was used to operate the fans of winnowing machines that separated grain from chaff. The odometer cart, invented during the Han period, measured journey lengths, using mechanical figures banging drums and gongs to indicate each distance travelled. This invention is depicted in Han artwork by the 2nd century, yet detailed written descriptions were not offered until the 3rd century.
  
  Modern archaeologists have also unearthed specimens of devices used during the Han dynasty, for example a pair of sliding metal calipers used by craftsmen for making minute measurements. These calipers contain inscriptions of the exact day and year they were manufactured. These tools are not mentioned in any Han literary sources.
  
  The waterwheel appeared in Chinese records during the Han. As mentioned by Huan Tan c. 20 AD, they were used to turn gears that lifted iron trip hammers, and were used in pounding, threshing, and polishing grain. However, there is no sufficient evidence for the watermill in China until about the 5th century. The Nanyang Commandery Administrator, mechanical engineer, and metallurgist Du Shi (d. 38 AD) created a waterwheel-powered reciprocator that worked the bellows for the smelting of iron. Waterwheels were also used to power chain pumps that lifted water to raised irrigation ditches. The chain pump was first mentioned in China by the philosopher Wang Chong in his 1st-century Lunheng.
  
  The armillary sphere, a three-dimensional representation of the movements in the celestial sphere, was invented in Han China by the 1st century BC. Using a water clock, waterwheel, and a series of gears, the Court Astronomer Zhang Heng (78–139 AD) was able to mechanically rotate his metal-ringed armillary sphere. To address the problem of slowed timekeeping in the pressure head of the inflow water clock, Zhang was the first in China to install an additional tank between the reservoir and inflow vessel.
  
  Zhang also invented a device he termed an "earthquake weathervane" (houfeng didong yi 候風地動儀), which the British sinologist and historian Joseph Needham described as "the ancestor of all seismographs ". This device was able to detect the exact cardinal or ordinal direction of earthquakes from hundreds of kilometres away. It employed an inverted pendulum that, when disturbed by ground tremors, would trigger a set of gears that dropped a metal ball from one of eight dragon mouths (representing all eight directions) into a metal toad's mouth. The account of this device in the Book of the Later Han describes how, on one occasion, one of the metal balls was triggered without any of the observers feeling a disturbance. Several days later, a messenger arrived bearing news that an earthquake had struck in Longxi Commandery (modern Gansu), the direction the device had indicated, which forced the officials at court to admit the efficacy of Zhang's device.