I have a microcontroller which needs to communicate over a cable, which will be approx. 5m long, with another very small microcontroller. The devices will be used outdoors in various conditions. The data rate will not be very high. When you connect the small uC with the cable to the big uC, a identification string and periodic (each minute) battery updates are sent from the small uC.
I thought about I2C but I'm not sure if it is designed for such needs? CAN is also possible but I think it´s a little bit overkill for my needs. Does anyone have good ideas?
EDIT:
I want to use as few pins as possible for the cable.
Best Answer
While CAN might be a bit "overkill", it is always to prefer if you have that option. Brief comparison or CAN versus RS232/RS422/RS485:
CAN advantages:
CAN disadvantages:
The cost of CAN transceivers versus RS-xxx transceivers should be about the same (except if you pick old crap transceivers like MAX232 that need 5x 1uF decoupling caps). Signal voltage levels don't matter, there's CAN and RS-xxx transceivers for both 3.3V and 5V.
The number of wires for a semi-duplex system will be 3 in either case. In the case of CAN, you have CAN H, CAN L and signal ground. In the case of for example RS-422 you have T+, T- and signal ground. Skipping signal ground is really not recommended for either case, don't listen to people telling you otherwise.