Yen Su's Mechanism

 
Mr. Moule and Mr. Wang Chen-To gave the depicted arrangement of gears, staying as close as possible to Yen Su's description reported in the Sung Shih
(click for details)
 top view

 The function is described as follows:

The essence of the mechanism was that the subsidiary or inner gear-wheels fixed to the road-wheels engaged with small horizontal toothed wheels which rotated the central large one attached to the same shaft as the main figure. But the small horizontal toothed wheels were never both in gear at the same time; mounted on weights sliding up and down vertical shafts, they were hung on cords passing over pulley-wheels above and attached to the rear end of the carriage-pole below. Supposing that the carriage, going south, should deviate to the west (i.e. turn to the right), the horses would carry round the pole to the right and hence its rear end would move to the left. This would raise the right small gear-wheel and lower the left one so that it enmeshed with the inner gear of the road-wheel and with the central wheel. As the left road-wheel would be moving while the right one would be out of gear, this train would obviously have the effect of compensating for the change in direction of the carriage and so maintaining approximately the south-pointing direction of the wooden figure. Upon resumption of a straight course, both gear-wheels would again be disengaged.
 
                             Source: Needham. Joseph: Science and Civilization in China, Volume 4, Part II, 1965