Printer Model: Custom
MCU / Printerboard: Manta M8P and EBB42
Host / SBC CB2
klippy.log No
Fill out above information andin all cases attach yourklippy.logfile (use zip to compress it, if too big). Pasting yourprinter.cfgis not needed Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there
Describe your issue:
…
This question is not exactly about Klipper, but I think many of you can answer me, so here it goes
I’m designing the connections for a new machine, and I need to connect four CAN devices.
To achieve that, I have a CEB GitHub - bigtreetech/CEB, where I’m going to connect these devices, as well as the Manta. The setup follows this diagram:
It would be clear that the termination resistors should be placed at the ends of the bus. However, in my current setup, where should I place the resistors? In the CEB? One in the Manta and another in one of the EBBs?
Here, the two ends of the bus should be terminated.
I am not fully sure here, so I am open to corrections. Finally, it might be a bit of an academic question how to do it “as spec compliant as possible” as long as it works.
I’ve always been taught to minimize radiating stubs as much as possible.
With the CEB, if you terminate at the board itself, you have two long stubs (the Manta M8P and the last EBB in the chain) in the (star) network. However, if you terminate at the Manta M8P and the EBB, you have two very short stubs (at either end of the CEB).
If you’re curious as to what works better; it’s a pretty easy to set up an experiment to see which approach works better (or, if they work the same) - just try the jumpers on the Manta M8P/EBB versus having the jumpers on either end of the CEB.
This is exactly my point.
In its simplest form, a terminating resistor ensures signal integrity, especially on differential pairs of an electronic signal transmission. Its main purpose is to prevent signals from “bouncing back” at the end of the signal line.
In a star topology there is effectively no “end of the line”, there is at most a point with the greatest distance, in this case the longest stub.
I’d be surprised if you found any difference. As I said above, I think, it is more a question of what is the best solution that also gives the most headroom (signal to noise ratio) to avoid edge cases and subtle problems.
Wow, that might explain some problems with my other machine!
My other machine is a large format printer with idex sistem, where i have 2 ebb connected by CanBus with a very similar diagram, with a stub cable of at least 8 meters long in one of the devices, using a baud rate of 1000 kBd, so maybe some of the weird errors that occurs in that machine is caused by this! Maybe using a lower baud rate makes everything work in a more reliable way, isn’t it?
It seems like a star topology instead of a CAN bus type.
I guess I’ll place one of the resistances in one EBB and the other maybe in the Manta, or maybe in other EBB.
Well, I’m not really a CAN guru, nor do I have any experience with such lengths.
The sources on the web are not consistent:
The source I quoted above is one of the more optimistic ones
There are quite a few sources that limit stub lengths to 0.3 m unconditionally
There are sources that limit e.g. stub lengths to 1.5 m with a cumulative length of all stubs of max 7.5 m at 1 Mbit/s
And so on
I would dare to say:
Keep the stubs as short as possible
The maximum stub length depends on the bitrate. The higher the bit rate, the lower the max length
CAN is a linear bus system, not a star topology. If you need longer lengths then build a real bus and not a stub mess
The more bus nodes you have the higher the bit rate should be or you will get different problems due to communication delays / congestion problems.
Where exactly the individual limits of these values are, will be really hard to pinpoint and will probably depend on a number of environmental factors. Including but not limited to cable quality, proper shielding and grounding, EMI etc.
The general idea that seems to be widespread is: take some extrusion profiles, some steppers, a bit of electronics and patch this together with a handful of arbitrary cables. Voila, you have a 3D printer. And if it doesn’t work, it’s probably because of the firmware.
(I’m not saying this is your attitude, I’m just saying it’s a common one)
Did you just get this from an AI program? I just did a quick search on Google and got almost literally what you wrote above.
A better definition of the purpose of a terminating resistor is that it is used to ensure consistent signal quality. Reflections are one of the symptoms of an improperly terminated line/network.
Another is loss of energy, which can happen when you have the “radiating stubs” I was talking about above. Each unterminated “arm” in a star network is a radiating antenna which is why, in my reply, I suggested putting the terminating resistor at the Manta M8P and final EBB - this eliminates two radiating antenna from the network.
Going back to your original reply - each “arm” of the CAN star network is an unterminated CAN bus which means each one can have a “bounce back” of the signal on the line. The longer the line, the longer the delay between when the original signal and reflection from the arm. Putting the terminating resistor at the devices at the “ends” of the network moves the reflection from the long lines to the very short stubs on the PCB that minimizes the changes to the original signal and helps maintain the overall signal quality.
This is why I always push back when somebody suggests a star configuration for CAN buses.
Well, you are essentially repeating what I said, but it seems to miss the point. The issue with unterminated stubs being problematic has been sufficiently addressed.
The question is about finding a good solution for a star topology and determining where to place the terminating resistor, as there is no “end of the line.” There may be a beginning with the controller, but effectively, there is no end.