I built and tested a CAN-Network using the following schematic
Here is also the physical monstrosity
The master sends telegrams in varying intervals to the 5 devices. The longest arm of the line (Device2 <-> Device3) is ~10m. The telegram from the Master will get a response from the slave with the correct address (mask and filters are also implemented -> separate question). Each slave sends a telegram to the master without a query from the master.
Network specs:
- 6 x Arduino Nano with MCP2515-CAN shield
- CAN-Bus sniffer with cangaroo CAN-analyzer
- unshielded\ untwisted copper cables
- Tested speeds 125, 250, 500, 1000kbit\s
- MCP2515 library from coryjfowler
For now I analyzed the telegrams manually using the delta times and not one telegram was misinterpreted or lost. My next step will be to add a counter in the datapackage of the telegram for easier parsing.
I found quite a discussion only regarding the star-topology. Most people advise against it, but at lower speeds it should be possible (see post #4).
dump.log (89.6 KB)
One of the remaining problems is the correct calculation and position of the terminating resistor. Currently the master (center) and the farthest device has a terminating resistor, since more resistors in parallel would drop the resistance across the line. This needs to be adjusted if other devices are located far away also.