Zhang Heng, also known as Chang Heng, was an educated man during a time that western history paints as "barbaric."
Zhang Heng was originally a lowly civil servant in Nanyang, China, Henan province. He was basically an old-timey cop who also took care of people in his community.
However, his early interest in astronomy, mathematics, and engineering blossomed as he worked his day job while also taking breaks to study scripts and texts of local inventors at the time. He eventually became the Chief Astronomer of the Prefect of the Majors for Official Carriages for the imperial court. He later became a palace attendant to the elder scientists. This was all happening around 120-135 AD.
Heng is most famous for his extensive knowledge of mechanics in a time where technology was still a budding interest to the human race. He invented the world's first water-powered armillary sphere to assist his cohorts with astronomical observation.
He also expanded on the original calculations of pi (which, mind you, were in the millions at that point).
But, his most famous invention was the world's first seismoscope, which had later been credited to Leonardo da Vinci. The seismoscope is an earthquake detector that could sense an earthquake up to 500 km (roughly 310 miles) away.
This was both earlier, and more impressive than the one that had been made several hundred years afterward.