Early Cannons are really only usefull for sieging, so put at least one in each sieging army (you will always get one bonus siege and better break-wall-chance if you have at least 1(000) cannon units).
Lategame you will want more cannons, both for sieging and for attack once fire becomes a viable and important stat, though you probably still want to seperate cav and inf/canons to use the speed of the first to catch weak armies, and only consolidate against large/strong armies (ottomans, commonwealth and maybe ming might be good enemies for this)
This 'myth' that early game cannons are only good for sieging should really be tackled at some point..... because it's just total b*llsh*t...
Yes, cost effective they are very expensive for what they add, and, if you can replace them with another ACTIVE unit those units by then do more damage... BUT cannons fire from the backrow, a place where any other unit is useless.. So in any major fight (or fights in closed spaces) your damage from having 100 infantry or having only 20 (if your combat with is 20) is exactly the same. (of course, having some extra for reinforcement is usefull, else your army runs out of steam quickly)
So in any army that is at combat width size, cannons are just extra free damage, sure, it's not much at this point, but it is still damage, free damage which there is no way for extra infantry to be doing at that moment. And, the second big bonus from cannons is that it gives you extra defense on the units it is 'covering' (standing behind) so it also end up making your front row (infantry/cav) more effective.
Of course, also this is still not that strong, but it helps and in big/long battles can certainly make a huge diference.
So basicly, the golden rule is:
Infantry/Cavalary (only cav if you are horde) until combat width and then artilary.
Of course, if you don't have the forcelimit/money to support this then go with infantry/cav > artilary early on.. Also, always get a more frontrow then you need for the reinforcement/replacement from weakened units... But if you have the money/forcelimit artilary is certainly worth it from tech 7.