Тёмный

From The Bench: Episode 11 - Where DO the CAN Bus 120 Ohm resistor pins need to be jumpered? 

Old Guy Melts Plastic
Подписаться 2,3 тыс.
Просмотров 2,6 тыс.
50% 1

Links:
www.ni.com/docs/en-US/bundle/...

Опубликовано:

 

15 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 29   
@pinealservo
@pinealservo 7 месяцев назад
There are a number of things technically "wrong" with your wiring, but CAN is designed to be very robust, so it pretty much works anyway. I'm not an actual electrical engineer, but I worked with some of them on network protocols for a decade or so. I will try to explain what's going on, but I may not get some of the nuances perfectly correct. Hopefully it'll give you enough to search for more thorough explanations. :) Any time a protocol spec calls out for "termination resistors" you know you're dealing with a "transmission line" and that line has got a specified "characteristic impedance". Not only are you supposed to terminate the bus at the ends, but you are also supposed to use a pair of cables with a certain range of twists-per-inch and which have the specified impedance. The termination resistors match the characteristic impedance of the transmission line, and they perform the important function of cancelling out signal reflections from the bus ends. Without termination at the characteristic impedance of a line, a signal will propagate out from the transmission point towards the ends and then literally bounce back to be picked up some time later (the time being determined by the length of the segment and the propagation speed as set by the impedance) at the transmission point; these echoes will combine constructively or destructively with the ongoing transmission depending on the phase offset of the reflection and can make a serious mess of things. Putting a terminating resistor at the end of a transmission line that matches the characteristic impedance will effectively absorb the whole signal as it reaches the end, so nothing reflects back. For high-speed CAN (i.e. up to 1Mbit, rather than low-speed CAN which goes up to 125Kbit) the termination resistors also function as part of the differential drive; they form a voltage divider to set the common mode voltage on the pair of CAN-H and CAN-L when the line is idle. You must have exactly two 120Ohm resistors on the network to create a parallel resistance of 60Ohm, which sets the common mode voltage at the correct level. The drivers of CAN-H and CAN-L drive away from the common mode voltage, and the resistors pull the bus back to the common mode voltage. This is analogous to the single-ended protocol I2C, where drivers pull the bus line to ground and a pull-up resistor returns it to high. Your wiring has both resistors in place, so it's setting the correct common mode voltage to get the signal levels right. Who knows what the characteristic impedances of your wire segments are, but the wire lengths are extremely short, so reflections are probably just showing up as a bit of ringing in the transitions. Transmission line effects make a lot more difference as the lengths of the line increase and the rise/fall time of your signals becomes quicker. Modern on-board differential communication busses like PCI-E require length-matched and impedance-controlled PCB traces and proper termination due to their extremely fast transitions, so it's all a function of what kind of signals you're trying to work with.
@oldguymeltsplastic
@oldguymeltsplastic 7 месяцев назад
Thank you for your very detailed response!
@stevehanwright481
@stevehanwright481 Месяц назад
Nice work guys
@kiiiddd
@kiiiddd 7 месяцев назад
It matters less when there is less than 10ft of total wire. CANBUS gets more finicky when you are on say a Dozer or other heavy equipment when that CANBUS network is say stretch over a 100ft or more of wire
@oldguymeltsplastic
@oldguymeltsplastic 7 месяцев назад
1000% agree.
@ticso24
@ticso24 7 месяцев назад
The resistor belong to the physical end because of reflections. You have the last EBB36 connected with an unterminated cable stub, which will cause reflections. That’s just basic physics of transmission lines. The cable wave resistance is 120 Ohm and so are the end terminations. For the same reason using ethernet cable is wrong, since it 100 Ohm, but you only get 120/100 of the signal as reflection, which is usually small enough for digital signals. You can get away with doing things wrong to a certain degree, especially since the unterminated cable stub on your desk is very short. To be a bit more specific, you can do stubs as long as those are short enough for the signal frequencies used. However, the frequencies are not exactly the transmission clock frequency since those a square wave there are higher frequencies involved. The bad thing by doing it non perfect (non 120 Ohm cable and/or wrong termination) is that even if it seem to work, it is less resistant to external noise and may randomly fail by sparks from a nearby light switch when a correct installation would have had no issues.
@oldguymeltsplastic
@oldguymeltsplastic 7 месяцев назад
Your point is well taken, but if a nearby lightswitch is sparking, I likely have bigger issues than whether my CAN Bus wiring is stable or not. 🤣
@ticso24
@ticso24 7 месяцев назад
@@oldguymeltsplastic Light switches always spark when switched. They shouldn’t do that in between.
@oldguymeltsplastic
@oldguymeltsplastic 7 месяцев назад
@@ticso24 huh, I was (obviously) not aware of that.
@TheMrDrMs
@TheMrDrMs 4 месяца назад
So then I couldn't run my Manta M8P and connect it's can port to two devices, in parelle from the can port on the manta? If so which board gets the resister jumper, aside from the manta?
@lcdconsultant5252
@lcdconsultant5252 7 месяцев назад
I agree with most of the termination feedback below. Having said that, on a 3D printer the cable is only 1-2 Meters and has few nodes, so termination locations do not make a big difference. That's why "Old Guy" gets away with cables terminated wrong and without twisted cable. The other more important reason to use CAN is it has other characteristics besides differential signaling. People have been running differential signals 2 meters at >100MHz for ages. The protocols built-in to CAN are very robust and resilient to noise and power supply issues. You don't want your Tesla to die in the street if one of the CAN sensors fails. In CAN if you short out either pin to power or ground or break a wire, the network stays running on the good signal wire. In most differential signally if you short either pin to power or Ground or break a wire the network will stop and it could damage the device. I installed CAN in my Voron as soon as it was available😋. I removed the termination and it worked the same as with it although its more robust with it installed.
@oldguymeltsplastic
@oldguymeltsplastic 7 месяцев назад
That was partly the point I was trying to make: in the typical short wire runs of 3D printers, you can get away with a doing things a little off spec, and still be totally fine. I do add two 120 Ohm resistors on my CAN network, but it doesn't seem to matter which devices get those resistors. I also have never twisted my CAN H and L, beyond whatever twisting is already done within the Igus chainflex and 3DO cables that I am using. I never see any packet traffic issues with these set ups.
@winandd8649
@winandd8649 9 дней назад
Yeah, all tool heads show up and they do seem to work, BUT: I have seen an other video from a guy who also connected his (6) tool heads in parallel and is seemed to work fine when printing PLA. When printing ABS (higher temps) is was unreliable.. He started trouble shooting, adding cooling fans, and in the end swapping out his USB2CAN board for an other brand. This fixed his particular issue, but later on he discovered the real problem causing the issues he was having; Tool heads connected in parallel, and not in series. He did the connection the right way, and then the other USB2CAN board also turned out to work fine when printing ABS. So the moral of the story; Please stick to the official way when connecting CAN devices, it an save you a lot of trouble in the long run..
@artfedderson
@artfedderson 7 месяцев назад
This is a great line of questioning and I'm tempted to bust out my CAN networking textbook so I can help here because my memory is horrid but the high level is this; kiiiddd is exactly correct. It's all about wire length. Standard for resistance across the network was decided based on this. They could have just as easily made it 240ohms and required 120 at each end. (Though they probably should have gone the other way if anything).. CAN networks can seem like ring networks because they are bidirectional. Because the signal strength degrades heavily at long wire lengths, it's necessary to have resistors in the signal path to keep signal integrity. Since it's bidirectional H to L or vice versa, it makes most sense to have it across the H to L at the farthest point from signal source/master controller. With your demo network your wire lengths means you are gonna have zero issue maintaining integrity. If you were building an industrial printer with an 11ft x 5ft footprint... you should follow the standard.
@oldguymeltsplastic
@oldguymeltsplastic 7 месяцев назад
Also true. Good thing I only have 3 foot wide doorways then. 🤣
@artfedderson
@artfedderson 7 месяцев назад
@@oldguymeltsplastic what?! Where are you gonna put your V24? I'm looking at selling my 25 year automotive tool collection to make room in the garage. (Wanna wager they announce at smrrf?)
@oldguymeltsplastic
@oldguymeltsplastic 7 месяцев назад
@@artfedderson Our garage is unheated, and Canadian winters are not conducive to 3D printing.
@TheMrDrMs
@TheMrDrMs 4 месяца назад
So as you describe the 'ring' I see it as parallel then, despite it being wired in series simply because if the can ports are really pass through on the ebb, then really, it's physically series, but electrically parallel. Does this mean that I could use my mcu (manta m8p) with stealthburner EBB and ERCF (v2) and just run them in parallel from the manta rather than 'daisy chain' (which daisy chain inherently means series)... If so, then which board should have the jumper enabled (of course manta being one of them). Interesting example you posted, thanks!
@oldguymeltsplastic
@oldguymeltsplastic 4 месяца назад
I have not specifically tried this. It is possible to configure the hardware with more than one can network. I expect that both CAN ports on the Manta are linked to each other, but that may be irrelevant for our use case, as all CAN devices in our printers are managed via the Pi/SBC, and unless I am mistaken don't communicate directly with each other.
@ziruszirus1654
@ziruszirus1654 7 месяцев назад
If I remember correctly length was one point the 2nd one was to find errors in the system.
@oldguymeltsplastic
@oldguymeltsplastic 7 месяцев назад
Yes, and a 3D printer's CAN Bus ecosystem is very different to that found in a vehicle. The published specifications likely never considered how CAN usage might be applied over significantly smaller distances.
@ticso24
@ticso24 7 месяцев назад
@@oldguymeltsplasticIt has nothing to do with the use cae, it is about physics, which is the same in a printer as it is in a car and everywhere else in the universe. See my other message about this.
@Aron3DP
@Aron3DP 7 месяцев назад
With my Micron if I placed a 120R on the EBB36 and the M8P 1.1 it would never see the EBB36. If I removed the 120R from the M8P side it then functions. This is also the same on my 300 Trident using a UTOC with a Mellow SB2040. I only have a 120R placed on the toolhead side. For what ever reason it just would not work any other way. However with my 250 Trident using a U2C and EBB36 I had to place a 120R on both ends. So some how some other factors beyond my understanding were at play with it all.
@oldguymeltsplastic
@oldguymeltsplastic 7 месяцев назад
Okay, those are strange situations. I would be curious to know what resistance you measure across CAN H and L in each of those configurations, with and without the second jumper. Some MCUs like the Octopus come pre-terminated.
@Aron3DP
@Aron3DP 7 месяцев назад
@@oldguymeltsplastic They are all at 60. My first two setups were the ones where I only put them on the toolhead side so I just that, that was the way it works. Once I got to my the 250 and it didn't work is where I learned typically it should be on both ends and to check resistance.
@C650101
@C650101 6 месяцев назад
Why not use br8dge mode no ebb?
@oldguymeltsplastic
@oldguymeltsplastic 6 месяцев назад
I had some bad experiences with bridge mode about 4 months after implementing CAN Bus on my Voron 2.4. After several frustrating weeks of troubleshooting, someone suggested that a U2C provides a more stable experience. This was back in March 2023. I swapped Bridge mode for a U2C, and the Timer Too Close errors disappeared and haven't returned since. I feel it's worth the extra small investment in the U2C. Recent updates to Klipper may have improved the stability of Bridge mode, but I haven't felt the need to shake things up again.
@artezmia1920
@artezmia1920 7 месяцев назад
I can't like this video, the counter stays at zero.
@oldguymeltsplastic
@oldguymeltsplastic 7 месяцев назад
Unsure why that is.
Далее
Лайфхак для дачников
00:13
Просмотров 15 тыс.
CAN Bus Properties and Troubleshooting
18:09
Просмотров 1,3 млн
Tridex: First Home All, Z-Tilt, and Bed Mesh
3:03
Просмотров 1,6 тыс.
Toolboard mount for EBB36
2:32
Просмотров 266
Setting Up CAN Bus On Your 3D Printer (U2C & EBB)
16:43
The EASIEST Way to Connect to a Car's CAN Bus
4:46
Просмотров 257 тыс.
Making: Stealth Press Heatset Insert Tool - Testing
3:40
Hacking a weird TV censoring device
20:59
Просмотров 3 млн