This spreadsheet is an ok guide, though old (not sure how it still holds up) -
Before Mil tech 16, no stacks should have cannons in them, unless you want to run 1 per stack for the +1 siege bonus. After Mil tech 16, you want cannons to fill your entire back line of army width, with enough...