We usually think of Leonardo as an artist. However, it was his skill as a military engineer that was largely responsible for securing his employment in 15th century Milan.
Around 1486, Leonardo drew several designs for a giant crossbow. The figure atop the machine gives an indication of scale. The weapon was cranked with winding gears. It had two different firing mechanisms - the simplest of which involved releasing a holding pin by striking it with a mallet.