-
-
Notifications
You must be signed in to change notification settings - Fork 20
Connecting CAN4VSCP devices together
CAN4VSCP is a CAN based bus. This is the same communication system that is used in factories and in vehicles, and it is very robust if installed correctly. The communication on a CAN network can use different bitrates from 10 Kbits/s to 1 Mbits/s. CAN4VSCP however, always use 125 Kbits/s.
CAT5e cable or better should be used. The most important thing with the selected cable is that CANH/CANL should be on a twisted pair.
CAN4VSCP modules use an RJ-45 contact to connect to the communication bus. Normally you use an RJ-45 connector, but if you want you can use an RJ-11 or RJ-11 connector instead. Beware that you limit the power that can be transferred over the bus by selecting another contact than RJ-45.
Pin | Use | Rj-11 | RJ-12 | RJ-45 | Patch cable wire color |
---|---|---|---|---|---|
1 | +9-28V DC | RJ-45 | Orange/White | ||
2,1 | +9-28V DC | RJ-12 | RJ-45 | Orange | |
3,2,1 | +9-28V DC | RJ-11 | RJ-12 | RJ-45 | Green/White |
4,3,2 | CANH | RJ-11 | RJ-12 | RJ-45 | Blue |
5,4,3 | CANL | RJ-11 | RJ-12 | RJ-45 | Blue/White |
6,5,4 | GND | RJ-11 | RJ_12 | RJ-45 | Green |
7,6 | GND | RJ-12 | RJ-45 | Brown/White | |
8 | GND | RJ-45 | Brown |
The CAN4VSCP bus should be terminated with a 120 ohms resistor at both ends of the bus.
Terminators are needed to cancel signal echos in the cable. In short, you get less noise in the cable if you use them. It is recommended to use them even if at 125 kbit it is possible that your bus will work correctly anyway in a silent environment.
CAN4VSCP always communicate with 125 Kbps. This means that if you use a good quality cable, it can be up to a maximum of 500 meters using AWG24 or similar (CAT5). Actual length depend on the environment and other parameters. Drops with a maximum length of 24 meters can be taken from this cable, and the sum of all drops must not exceed a total of 120 meters.
Even if it is possible to have cable lengths up to 500 meters, it is better to stay at shorter distances to have some margins. Here are some guidelines for a reliable set up
- Total cable length of 300m.
- Stub cables count double their length in that total.
- Nodes count as 6 m in that total.
- Never less than 30 cm of cable between nodes, nor between a stub connection and a node.
- No more than 50 nodes connected.
Following this best practice, you will have a setup that will work reliable even in harsh environments.
A good paper is (here)[http://digital.ni.com/public.nsf/allkb/D5DD09186EBBFA128625795A000FC025] and (in Steve Corrigan's classic paper)[http://www.ti.com/lit/an/slla270/slla270.pdf] is the final words on building CAN bus systems.
The easiest and cheapest way to connect CAN4VSCP devices together is to use standard Ethernet cables and connectors. Use one T-connector at each node and use a short patch cable (should be >= 0.3m) to connect to the node. And then use standard Ethernet cables to connect T-connectors together. Each T-connector counts as a drop in your wiring budget.
You must remember to add a terminator at both ends (the last t-connectors on your bus).
This is how our ready-made RJ-45 terminator looks like.
This is a setup for two devices.
Somewhere you have to supply power to the bus. This is easily solved with a RJ45 terminal block as of above, which you just add to one T-connector block just as a node.
A guide on troubleshooting CAN can be found here
The VSCP Project (https://www.vscp.org) - Copyright © 2000-2025 Åke Hedman, the VSCP Project