Adding more physical CAN ports

Hello.

I’ve started using DroneCAN for many devices, including all servos and GPS. I now require more physical connection ports (/there are only 6 coming out of the included CAN board). Does anyone know of any board compatible with ardupilot which increases the number of physical CAN connections? Or can I simply daisy chain another of the included boards to increase the number of CAN connections? If so, what is the limit of in number of connections in doing that?
I require 12 CAN connections.

CAN uses a daisy chain topology with 120 Ohm termination resistors at both ends of that daisy chain. The CAN board violates that by providing a star-like topology. And that will reduce the maximum allowable cable length and the max allowable devices. So there is no number fits all here. you deviate from the standard, so the standard no longer applies to you.

Theoretically you can have up-to 255 devices on the BUS. Try it.
If does not work, reduce the wire lengths and move to a more chain-like topology.

What you must observe at all times is the rule that only the two furthest devices have the 120 Ohm termination resistor active.

1 Like

Hello,

This is a nice reference for the CanBus topology

We can read:
The high speed ISO 11898-2 CAN standard defines a single line structure network topology.
CAN bus does not support star or even a multi star topologies.

Depending of the size, you can probably make short star topology using I2C type expander boards, just make sure it is terminated properly.

2 Likes

Thank you both for the responses. Oh. So the little board with 6 connectors that comes with the cubes is made for I2C and not CAN?

Do you know of any CAN expansion boards which is commonly used with the cube? I assume people are usually using more than 1 CAN device.

What I would be looking for is a board (but with additional ports) which is displayed on the cubepilot ecosystem overview (https://ardupilot.org/copter/_images/Cubepilot_ecosystem.jpg).

Does anyone know if that’s something that’s available off the shelf somewhere?

Just google Pixhawk JST GH I2C Bus Splitter
I work with the 6 ports
I inject power from UBEC using JST GH connector, but in that case, just make sure you disconnect VCC to the connector going to the Flight Controller

I found that one. But I need 12-14 connectors. Where have you put the second 120 Ohm resistor? On one end the cube has one internally, but another one should be present, correct?

Correct, one and only one on the other end

Alright. I am thinking something like this. That should work, right? Should I share the (-)/pin 4 to the cube from the external power supply?

That looks like a star topology. But if you make the vertical wires very short and the horizontal wires as short as possible you should be fine.

It does? Doesn’t it look like in the document ppoirier posted?

image

The diagram above can be easily replicated by DaisyChaining multiple I2C splitters, what is problematic is the length of the branches, you need to keep them as short as possible to avoid bus desync when running at 1Mbps

Technically you dont have to connect ground as the CanBus transceiver are Push-Pull and can be “floating”. In some case this is necessary to prevent floating grounds and offer glavanic isolation.

1 Like

LOL @amilcarlucas and I are echoing each other :joy:

1 Like

How long can these branches be? I would need them to be around 2-3 meters each… Almost all comms are servos, so there won’t be very much data. I don’t need the horizontal wires to be very long.

I am wondering, doesn’t the schematic I sent use the basic CAN topology from the link you sent? Shouldn’t that then offer the best performance? If not, how should I wire them? Any suggestion is greatly appreciated.

I’ve been thinking and I think I understand how it should be done “properly”. I suppose, that from the connector called “To cube” I should connect the bus-cable (CAN-HI, CAN-LO), then run the same cable to each and every device and splice each of the devices with a short cable into the “bus-cable” and lastly, connect the bus cable to the board where another termination 120 ohm is present. Right?

Yes, that is the concept.
You can as well use twisted pair cable for the CanH-CanL so it helps to get higher noise immunity.

1 Like

You need to read a bit of CAN documentation if it is not clear yet.

The schematic is correct, but what @ppoirier and I are talking about is the physical topology. The location and length of each wire.

2 to 3 meters is definitely going to be a problem in a star topology. And 10m are not a problem in a proper physical daisy chain.

Topology IS important and does make a difference

Cube (Pixhawk 2.1) I2C / CAN Splitter : Drones, UAV, OnyxStar, MikroKopter, ArduCopter, RPAS : AltiGator, drones, radio controlled aircrafts: aerial survey, inspection, video & photography you can check

Yes, that is EXACTLY the kind of topology that is incorrect and you need to avoid.

That piece of equiment is for ~1m cable max.

1 Like

Yes I remade the design and now it’s a CAN bus cable which runs through the entire UAV and from there servos are connected to the bus via a roughly 50 cm cable.