Can someone tell me what year was the cogwheel gear invented? I tried searching it up but the answers were too complicated.
Leonardo thought it was Archimedes (287-212 BC) who invented the cogwheel gears. This would make a neat story, but history is rarely neat. In a similar matter we know that Archimedes did not exactly invent the “Archimedes’s screw”, but rather perfected it, which led to its wide use in the Hellenistic period. One can speculate that something similar happened with cogwheel gears as well, especially complex arrangements of them, but this is only an educated guess. Primitive cogwheels might have been known to Egyptian and Mesopotamian engineers prior to that, just like the screw.
The first written mention of the gear that survives is from Mechanics by Heron of Alexandria (10-70 AD), and Heron is known to rely on Archimedes in other parts of his book. Also, the earliest gear known today comes from the famous Antikythera mechanism, an ancient astronomical calculator, which contained over 30 of them. It is dated to about 150-100 BC and its maker is not known, although Hipparchus (190-120 BC), the father of astronomy, and Posidonius (131-50 BC), the Hellenistic polymath from Rhodes, are likely possibilities.
The mechanism is very complex, “technological artifacts approaching its complexity and workmanship did not appear again in Europe until the development of mechanical astronomical clocks in the fourteenth century”. In other words, gears must have been well known and used by the time it was constructed, one can speculate that earlier Archimedes’s planetarium also used gears. There were reports about an older gear dated to 200-150 BC and possibly connected to Archimedes’s Syracuse, but they are disputable, see discussion at Did Archimedes use epicycles in his planetarium?
In 2006 a fragment of a cogwheel was discovered in Olbia (Italy); the layer where the fragment was found has been dated to the second quarter of the 2nd century BCE (https://www.academia.edu/35795869/Un_frammento_del_Planetario_di_Archimede_da_Olbia, p. 1788). The striking characteristic of this cogwheel, however, is that its teeth are not triangular but have an involuted profile, which is a strong indicator that the concept of cogwheel had already been in use for some time.
One Italian engineer, Giovanni Pastore, claims the Olbia cogwheel actually belongs to a planetarium built by Archimedes (https://www.youtube.com/watch?v=hp-FXnjxNfw), but I do not know how scientifically strong this claim is.