|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: CAN Jaguar: could longer CAN cables cause problems?
The former -- the whole network, but not counting the first serial cable, so the length from the first Jag to the last. This assumes a linear single string and that you don't have a 2CAN but the serial adapter.
|
|
#2
|
||||
|
||||
|
Re: CAN Jaguar: could longer CAN cables cause problems?
We were having problems last year with our CAN network until we shortened the network, ours was not 20 feet but most of our problems were solved by shortening the network and a fresh termination resistor.
|
|
#3
|
|||
|
|||
|
Re: CAN Jaguar: could longer CAN cables cause problems?
In the course of many swaps of single cables leaving everything else unchanged, we thought we had identified some cables that almost always worked and some that usually didn't. For the most part this testing was 2 jags connected to BDC-Comm, with "works" defined as both units showing up in the program's device menu. However, the cables weren't 100% consistent. Sometimes a "good" one failed to pass, and I'm not positive the "bad" ones always failed. But clearly some worked more often than others. When we tried to put together all four with the better cables, we got all four to show up once, after that never got the last one to appear. Reordering the chain moved the failure to whichever one was last, though we stopped testing before running through all combinations. A few days ago I was able to get all four to show up in BDC-Comm, then got errors trying to access them from a program.
These modular crimp connectors seem pretty foolproof to me. Other than simply getting them backwards, which I'm sure we didn't do, is there any way to mess them up? We have used this same bunch (we have ten or so) of jags many years without any such issues, and now they're suddenly all flaky. The only thing obviously different is the physical layout (usually we put them all in a close group) and the wires. Using generic part-swapping troubleshooting methods, we've been having a terrible time isolating the problem to any particular device or cable, and it just doesn't make sense to suppose simultaneous failure in many parts that have worked so well for so long. It seems like it just HAS to be the cables, but I'm baffled as to where and how; they seem so simple. Inspecting the connectors inside the Jaguars is an idea we hadn't had, though we did do a little "wiggle" testing to no apparent effect. That will be first on the todo list when we hit it tomorrow. Thanks to everyone for the ideas and suggestions. We're on the verge of pulling the whole blasted thing and dropping in some old-school PWM Victors, but this problem has to have a solution, and one hates to admit defeat before even taking the field ![]() Edit: A general shortening of the wires sounds like a good thing to try too. We've been testing with a big pile of cables, most of which are 3' long or so. We could probably cut the total chain length in half by cutting to exact lengths. It would still be longer than we've used in the past, but much shorter than what we've been trying. Last edited by buchanan : 31-01-2014 at 00:41. Reason: just read kevin's last post |
|
#4
|
||||
|
||||
|
Re: CAN Jaguar: could longer CAN cables cause problems?
In addition to checking the pins inside the Jaguars, check your termination resistor closely. Make sure it isn't shorting against itself, and make sure it is also in pins 2 and 3 of the connector. Good luck troubleshooting!
|
|
#5
|
|||
|
|||
|
Re: CAN Jaguar: could longer CAN cables cause problems?
If you attach a multimeter across CANH and CANL you should consistently measure 50 ohms as you wiggle various connectors.
If you have an oscilloscope, you can watch CANH and CANL versus GND. They should sit at around 2.5V when the bus is idle. If all's well you should see something that looks a bit like this. If you see inconsistent high/low levels or a super consistent message (50% high/low jabber) then something is wrong. Terminators aside, it's very easy to crimp an RJ-12 terminated cable upside down and swap CANH and CANL. That'll instantly break a bus. If you hold the two ends of the cable up next to each other and look at the wire colors inside the plug, they should be in exactly the same positions on both sides. If they're not, re-crimp it correctly or throw it away. CAN is normally implemented as a twisted-pair network. Most telephone cable is untwisted. If you're simply picking up too much differential noise across CANH and CANL, you could consider using CAT5 wiring. You should also move your CAN cabling away from wires going to/from motor controllers and batteries. Lack of twisting is why TI specified the max length to be so much shorter than the CAN specification for a 1 mbps bus. If you post a scope trace of CANH and CANL, I can probably help you debug your circuit remotely. -Sasha |
|
#6
|
||||
|
||||
|
Re: CAN Jaguar: could longer CAN cables cause problems?
If you made your own serial adapter (it sounds as though this is what you are using), be sure you included a termination resistor in it...
|
|
#7
|
|||||
|
|||||
|
Re: CAN Jaguar: could longer CAN cables cause problems?
About 90% of all CAN issues I have seen are traceable to the termination loads. Remember that the wiring is a transmission line just like coax to an antenna. Without the correct loading, there are a lot of reflections of signal along the line. The CAN bus requires a termination at both ends of the line so if you made your own RS232 interface, this requires a resistor as well. The termination resistor is 100 ohms. Using something other than 100 ohms is almost as bad as no termination. The flat cable that the phone company uses in lengths of 20 feet or less, emulate a twisted pair transmission line at 1MHz just fine. Yes, it is not hard to make your own RJ11 plugs but you can screw it up too. Just be careful and follow the instructions. The Jaguar Getting Started Guide on the FIRST website or IFI site has some great instructions in Chapter 6.
Last edited by Al Skierkiewicz : 31-01-2014 at 09:01. |
|
#8
|
|||
|
|||
|
Re: CAN Jaguar: could longer CAN cables cause problems?
Our RS232 converter wire does have a resistor on it, but the resistor is on the CAN plug's end instead of the serial end. Does anyone think that could cause some signal reflection between the resistor and the serial connector? Also - in the case of the Jaguars - could a longer cable length cause more signal reflection? Do the Jaguars increase the baud rate to accommodate for the increased length, or is it constant? Cause I know that increased baud rate could cause more signal reflection. Is there a way we could lower the baud rate via BDC-COMM? We are planning on make a better RS232 cord in the future.
We should have an oscilloscope and CAN tap available to us on Saturday, so I will try to get a scope trace uploaded if further investigation is needed afterwards. I think trying the shorter cables is a good plan as well as checking the plugs. I think we still have the Jaguar board from our older robot mostly assembled, so that's another thing we should try using. Then we could swap out parts to diagnose the bad components. We have used the resistors on the terminator and RS232 plug for many years, but I suppose we should check those to see if some of the wiring has moved in there, causing a short. Honestly I'm a little troubled by the fact that we could only talk to #3 and #5 with BDC-COMM, #2 (and #4 too I think) wouldn't even respond to BDC. Yet I was able to get as far as accessing #2 from the cRIO JagTest program I made... Further attempts later on might yield different results. Perhaps the NET ports just need to be cleaned somehow? Maybe there's dust getting in there causing problems? This seems like the CAN network is being severed or isn't being completely connected, considering the "sometimes it works, sometimes it doesn't" nature of this problem. I hope I can post back on Saturday night with useful information and even a solution. As recommended, I will make an emphasis on testing the resistors on both ends. |
|
#9
|
|||||
|
|||||
|
Re: CAN Jaguar: could longer CAN cables cause problems?
Auto,
You should remake terminations every year. If you are following the instructions and crimped a plug onto the resistor leads, the connection is not gas tight and likely deteriorated over the year or two since you made it. terminating in the CAN side of the RS232 cable is the recommended practice. If you didn't change the baud rate, I don't think the Jaguars can do that by themselves. |
|
#10
|
|||
|
|||
|
Re: CAN Jaguar: could longer CAN cables cause problems?
I read the Jaguar source code last night, mostly just for my own amusement. The CAN baud rate is not dynamic. There's basically no support for handling accumulated errors.
That said, I'm nearly certain you have a wiring problem. An oscilloscope and some diligent cable wiggling while watching the bus will almost certainly reveal your problem. The hard part is when you have multiple problems - de-convolving many problems is really hard. |
|
#11
|
|||
|
|||
|
Re: CAN Jaguar: could longer CAN cables cause problems?
Quote:
About remaking the terminators, do we only need to replace the deteriorated CAN crimp connector? Or do we need to replace the resistor as well? For the RS232 cable, should we need to get a new CAN cable for it? EDIT: zbrozek, while using the oscilloscope, is there a way to tell if there's termination failure due to a deteriorated CAN crimp connection? Is there a way to tell how bad the deterioration is? It'd be nice to estimate the lifetimes of our terminators and whether they're "expired". Last edited by AutoBotAM : 31-01-2014 at 19:05. Reason: Just read zbrozek's last post |
|
#12
|
||||
|
||||
|
Re: CAN Jaguar: could longer CAN cables cause problems?
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|