Is it possible to calculate the max baudrate of a CAN-Bus using distance and wire size? In my previous projects I used Arduinos with the MCP2515\2551 pairs. The maximum distances were <5m (shielded 0.8mm KNX cable). Now I have a situation where I need to communicate with different devices at longer distances. The infrastructure in the building has a lot of unused Ethernet-ports in the wall. I opened one box and connected a transceiver\ receiver on both ends (~15m). The cable is a 4x2 twisted pair 23AWG shielded ethernet cable.
I reduced the baudrate to 125kbits\s (OpenCAN) but I am unable receive continuous packages.
After some research I only found recommended wires for 1Mbit\s communication which should be AWG18\19. I would like a formula where I can calculate the necessary baudrate dependent of wiresize, distance maybe temperature.
The best source for the answer is the manufacturer's data sheet on the transceivers. Just for a reference: The electrical characteristics of the CAN bus cable restrict the cable length according to the selected bit rate. You can use cabling up to 250 meters with the baud rate of 250 kbit/s. The maximum bus length with a bit rate of 10 kbit/s is 1 km, and the shortest with 1 Mbit/s is 40 meters. This assumes everything is properly assembled and terminated. I question the wire size: Ethernet wire is commonly constructed of 28 AWG wire, these slim Ethernet cables can be more than 25% smaller in diameter than their full-size counterparts. The copper conductors have a higher AWG size (remember, a larger gauge means thinner wire), reducing the overall outside diameter (OD) of the cable. In the end my answer is depends on what your hardware actually is. You should also purchase the appropriate CAN test equipment, and I know you know you have to have a responder on a CAN network.