Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Using a star configuation for Jaguars on CAN (http://www.chiefdelphi.com/forums/showthread.php?t=85741)

Dale 10-05-2010 11:53

Using a star configuation for Jaguars on CAN
 
This last season, we had a ton of problem with the CAN bus ... in particular with intermittent RJ10 connectors. We had best results with the Tyco connectors Luminary recommends but still there would be times when the whole robot would go down just because one CAN connector wasn't making contact quite to its liking. Unplug and re-insert the connector and it was happy again.

I know the CAN bus is really designed to be a bus with 100 ohm terminators at each end. For the length of bus most robots have, I'm wondering if it might be possible to come up with a star configuration instead. This would involve a a central hub which then distributes the signals to all the Jaguars, You wouldn't daisy chain the Jaguars in this case so the failure of one wouldn't bring the whole robot down.

Has anyone tried such a thing or have opinions about the chances of getting it to work? Perhaps someone would like to sell it as a product?

Peter Johnson 10-05-2010 13:45

Re: Using a star configuation for Jaguars on CAN
 
It should be possible, but part of what makes CAN better than PWM is the fact you can daisy chain, which simplifies wiring. I think really what is needed is a more robust connector on the Jaguars. Cars use daisy chain CAN, but don't have comm issues because they don't use RJ-11 style connectors. DB-9 would be very robust but is overkill on size/weight.

I'm not sure whether it's simply an issue with the RJ-11 connectors on the Jaguars themselves or the fact we're making our own cables, but few people seem to have an issue with the modular jack RJ-45 connectors on the cRIO and radio, as long as they're using premade cables. Maybe a good RJ-45 connector on the Jaguar instead of the RJ-11?

Dale 10-05-2010 14:19

Re: Using a star configuation for Jaguars on CAN
 
We went so far as to buy the best RJ10 crimpers we could and buying a RJ10-45 cable tester. We tested each cable before putting it on the robot wiggling around the wire while we were doing it. We still had problems.

You make a good point about the RJ45 connectors not seeming to fail though there are always the unexplained loss of coms on the field so who knows. Maybe they are dropping in and out too?

I love the way the daisy chain cleans up the control board, I just don't like having, in our case, 18 flaky connectors in that chain any one of which can bring down the whole robot.

EricVanWyk 10-05-2010 14:33

Re: Using a star configuation for Jaguars on CAN
 
I've tried in the past, with varying degrees of success. There was a major push internally a few years back to launch FRC-CAN as a star network, but in the end it was determined to not be worth the trouble, in both the $$ sense and the confusion sense.

That is not to say that it is impossible, and I'd love to see your implementation.

One that showed promise was a passive star. 60 Ohm termination in the center, no termination on the end points, and equal length arms. The difficulty here is making sure that all devices are the same distance from each other (electrical length wise). I never got this to be quite good enough to launch to 2000 teams, but it might be do-able for the N teams with good enough mentors to compensate.

Another option is an active star. A CAN-hub has one PHY per branch, and a CPLD to act as a fancy OR-gate. Expensive!

Lastly, you could do a 'vampire tap' system. This is a trunk with lines hanging off of it. The maximum length of each tap is determined by the speed of the bus. I don't really like this option.

Dale 10-05-2010 15:30

Re: Using a star configuation for Jaguars on CAN
 
How important was it to have equal length arms? If that's vital that would be a deal killer for us since all that wire hanging around would start to look ugly real fast.

An active star module that allowed every jaguar to remain at it's default address of 0 would be very cool. You'd determine which address it had by the jack it was plugged into on the star module, just like PWM. The active module would handle translating the address from the cRio and rebroadcasting the signal to each device with the proper address. The advantage is then if a Jaguar fails, you just slap in a new one. I know that's just a fantasy, though.

Peter Johnson 10-05-2010 15:43

Re: Using a star configuation for Jaguars on CAN
 
Quote:

Originally Posted by Dale (Post 961389)
We went so far as to buy the best RJ10 crimpers we could and buying a RJ10-45 cable tester. We tested each cable before putting it on the robot wiggling around the wire while we were doing it. We still had problems.

You make a good point about the RJ45 connectors not seeming to fail though there are always the unexplained loss of coms on the field so who knows. Maybe they are dropping in and out too?

I love the way the daisy chain cleans up the control board, I just don't like having, in our case, 18 flaky connectors in that chain any one of which can bring down the whole robot.

Most of the comm issues on the field were due to one of 3 reasons:
1) Radio reset button getting hit (black button on the front of the old radios). This could happen simply from the mass of the button if the shock was large enough (e.g. going over a bump hard, even kicking could do it if the axis of the shock was in line with the button).
2) cRIO or radio power disconnect. The radio power connection was friction fit. The cRIO power connector uses non-locking screws that like to back out under vibration.
3) Driver station ethernet disconnect (less common).

The FMS this year had really good reporting on radio issues: e.g. it showed whether the disconnect was on the robot or driver station side.

We used CAN this year to 7 Jaguars. We only had two issues with CAN disconnecting: in one, going over the bump hard, some of our pneumatic brass came loose and fell onto one of the RJ11 tabs, neatly disconnecting the cable. We also had one unexplained failure which we believe was a cable working its way loose. Another common failure on the CAN bus we saw on our practice base but not on our main robot was the terminator resistor leads shorting: the way they have you make the terminator seems to be vulnerable to the leads being too long and vulnerable to touching each other (as the pins are adjacent).

biojae 10-05-2010 16:53

Re: Using a star configuation for Jaguars on CAN
 
Quote:

Originally Posted by Peter Johnson (Post 961407)
Another common failure on the CAN bus we saw on our practice base but not on our main robot was the terminator resistor leads shorting: the way they have you make the terminator seems to be vulnerable to the leads being too long and vulnerable to touching each other (as the pins are adjacent).

That is where some form of conformal coating helps.

If you get epoxy down into the connector, the leads won't be able to move and the epoxy is non-conductive so they will never short each other out.

It also protects against metal fatigue breaking the leads from frequent insertion / removal because they can't move.

EricVanWyk 10-05-2010 21:16

Re: Using a star configuation for Jaguars on CAN
 
Quote:

Originally Posted by Dale (Post 961404)
How important was it to have equal length arms? If that's vital that would be a deal killer for us since all that wire hanging around would start to look ugly real fast.

I'm not positive, but I think it is important. Only way to find out is to try (and measure signal integrity).

Since I changed jobs I don't have access to the RF / SI simulators. Perhaps one of our forum members could rig something up?

Quote:

Originally Posted by Dale (Post 961404)
An active star module that allowed every jaguar to remain at it's default address of 0 would be very cool. You'd determine which address it had by the jack it was plugged into on the star module, just like PWM. The active module would handle translating the address from the cRio and rebroadcasting the signal to each device with the proper address. The advantage is then if a Jaguar fails, you just slap in a new one. I know that's just a fantasy, though.

Costs associated are:
microcontroller + FPGA per board
CAN transceiver+ Connector + terminators per leg

Not something I can justify for the KoP. Also, it takes a bit of work to make sure you don't get the bus latched into a dominant bit. Lastly, propagation delay is a concern.

apalrd 10-05-2010 21:24

Re: Using a star configuation for Jaguars on CAN
 
It seems like a star configuration would negate the advantages of using CAN over PWM. Just a thought.

NickE 10-05-2010 21:28

Re: Using a star configuation for Jaguars on CAN
 
Quote:

Originally Posted by apalrd (Post 961482)
It seems like a star configuration would negate the advantages of using CAN over PWM. Just a thought.

In theory, you could still utilize the current sensing and PID features on the Jaguars.

Dale 10-05-2010 21:31

Re: Using a star configuation for Jaguars on CAN
 
In our case we needed to use CAN for current and voltage sensing throughout our robot. For example, our front ball magnet would capture a ball and then stall by design with the current held at a constant value so as not to smoke the motor. It could also sense if it had a ball by looking at the voltage being delivered to the motors.

Our kicker would vary it's kicking power by monitoring the current going to the winch as it's being cocked.

We'd love to use the daisy chain configuration if it were reliable. We might give it another whirl next season but be ready to fall back to PWM for speed controllers that don't need all the fancy features.

apalrd 10-05-2010 21:39

Re: Using a star configuation for Jaguars on CAN
 
Quote:

Originally Posted by Dale (Post 961486)
In our case we needed to use CAN for current and voltage sensing throughout our robot. For example, our front ball magnet would capture a ball and then stall by design with the current held at a constant value so as not to smoke the motor. It could also sense if it had a ball by looking at the voltage being delivered to the motors.

Our kicker would vary it's kicking power by monitoring the current going to the winch as it's being cocked.

Interesting uses for the current sensors. We used a broken-beam sensor and pulsed the roller, although we didn't have any problems with heating (with a FP). It would spin so much that the ball would begin climbing up the front of the machine and get carrying penalties, so we pulsed the roller to keep torque on it while not continuously forcing it. If we back up, the roller runs full.

We used a potentiometer for our kicker. The kicker motor is actually on a Spike, and Spikes don't have current sensors. We had no jaguars at all (all Victors and Spikes), so CAN wasn't a question we asked. (the answer would have been NO unless we needed the current sensors).

biojae 10-05-2010 23:38

Re: Using a star configuation for Jaguars on CAN
 
Quote:

Originally Posted by apalrd (Post 961489)
(the answer would have been NO unless we needed the current sensors).

The current sensors have a way of making themselves useful. :)

The original design (in software) of our kicker only used an encoder and a reed switch.
This software was buggy, sometimes it would not know when to return and continue applying power after it reached the hard stop. (I blame the encoder... :] )

Needing a quick fix, the current sensing feature of the kicking jag was used to terminate the kick if it was stalled (meaning it either reached the hard stop, or got stuck on something else :ahh:) .

This fix worked well enough that no more modifications were needed for the rest of the season.

And like Dale, our magnet uses the current to detect a ball.
(This is used mostly for auto)
It stops it if the ball gets too far in, but isn't needed as much to prevent blowing the motor. (Its a CIM)

The use of current sensing was an after thought, but because we had the capability, it was very useful.

Bryscus 11-05-2010 15:47

Re: Using a star configuation for Jaguars on CAN
 
Quote:

Originally Posted by Dale (Post 961389)
We went so far as to buy the best RJ10 crimpers we could and buying a RJ10-45 cable tester. We tested each cable before putting it on the robot wiggling around the wire while we were doing it. We still had problems.

...

I love the way the daisy chain cleans up the control board, I just don't like having, in our case, 18 flaky connectors in that chain any one of which can bring down the whole robot.

Dale,

I'm not sure about untwisted pair phone cable, but for Ethernet there are two types of wire you can buy - stranded and solid core. In this case it is absolutely vital that one buys the correct plug for the wire type used. Patch cables (the ones used for repeated connections between two devices) are twisted pair cables and allow more bending cycles (with a slight reduction in performance electrically). Solid core cable is what you run in the wall for static use. Again, the correct plug type is absolutely necessary. Now you mentioned you used RJ-10 connectors. I need you to clarify something for me. Is your connector a 6 position 4 conductor connector (RJ-11) or a 4 position, 4 conductor connector? Since the receptacles themselves are 6 position 4 conductor receptacles, I would personally use nothing less than a 6P4C connector. We used 6P6C (RJ-12) for everything because it will work in any connection between devices that one could possibly need (also, the 6P6C cable we bought was easier to strip than the 6P4C). The 4P4C connector is a flimsy connector that is most commonly used for connecting the handset of a phone to its base unit (for any of you that still have analog wired phones with the curly wires).

I do not believe we had any issues with the physical CAN bus itself last year (not that we didn't have troubles with the differences between the PWM style and CAN style, design-wise).

So in summary:

If you decide to use the CAN bus again next year, I would use at least a 6P4C connector for connections between Jags. The 6P6C setup may make the cables more robust because there are 50% more wires connected mechanically. Also, be sure to use standard phone cable (which I believe is stranded). We bought a fairly inexpensive crimper - about $20 bucks - and it seemed to do the trick. We did not test our cables with a tester either.

Good luck and I hope my ramblings help someone.

- Bryce

Dale 11-05-2010 16:02

Re: Using a star configuation for Jaguars on CAN
 
I was wrong in my previous post about RJ10s. We used the 4 pin RJ11s because that's what Luminary said to use (except for the RS-232 connection which we didn't use with the 2CAN.) It meant you didn't have to worry about the two unused pins. It might be, though, that the 6 pin RJ12 creates a more solid mechanical connection. That's a good idea and would be something for us to try next pre-season.

We used stranded four conductor cable with connectors made for stranded. The problem didn't seem to be in the cables themselves but in their tenancy to loose connection inside the Jaguar. The RJ12s might help with that.

Al Skierkiewicz 12-05-2010 08:22

Re: Using a star configuation for Jaguars on CAN
 
Dale,
The six pin connectors are the only way to go here. The RJ-11's will move slightly in the connector body of the Jaguar and lift one or more of the spring wire contacts. If you examine the connector you will see a slight rise of plastic between each contact on the plug. If the wire doesn't sit down between the two adjacent plastic bumps, the wires move and either touch each other or don't contact the receptacle wires. I don't know why the sheet and FAQ recommend the 4 wire connectors other than those are easily available parts. In most cases if the plug is inserted properly, there is no problem. With a moving robot, and insertions in a confined space, the chance of accurately inserting the plug is vastly reduced.

The terminators in this kind of arrangement add some noise immunity while maintaining the transmission line characteristics of the daisy chain in both directions. If a star configuration were used, it would need to use active drivers each feeding a separate leg of the star. A simple star arrangement with a terminator on each leg without the active drivers would pull the buss impedance so low that the individual drivers would not be able to supply enough current to communicate via the buss. If you check the Jaguar schematic you will find the CAN sense input which is simply a voltage divider feeding the controller. If the voltage at this point falls to a level too low to communicate the controller will simply communicate with the CAN buss.

Just to remind everyone, UTP stands for Unshielded, Twisted Pair and that a four wire UTP has two twisted pairs, a six wire has three twisted pair and a four wire, Ethernet, has four twisted pairs. Each pair acts as a balanced transmission line and in the case of CAT 5 and 6 cables the pairs are twisted at different rates (twists per inch).

Dale 12-05-2010 10:19

Re: Using a star configuation for Jaguars on CAN
 
Al,
Thanks for the input. We'll definitely try the six pin connectors in the fall.

I wasn't thinking of terminating each leg of the daisy chain since, as you mention, that would lower the impedance too far. I was thinking of just a 100 ohm resister at the middle of the star (or maybe 50 ohm with nothing on the leg coming from the 2CAN.) It sure isn't ideal from a noise standpoint, though. The active driver would be terrific but beyond what we'd want to take on.

We never considered using UTP (twisted) cable because it's such a pain to use. Untwisting all those pairs and getting them in the right order seems like an error prone process. All of our cable was straight through like they picture in the Jaguar Manual in appendix A. Do you think UTP is necessary?

By the way, we found our terminators were much more reliable when we soldered the resistor on the end of a short pigtail crimped into the connector. That's probably because our RJ11s were designed for stranded wire.

Hugh Meyer 12-05-2010 10:57

Re: Using a star configuation for Jaguars on CAN
 
Dale,
We used Ethernet UTP cable with the six pin connector. We found it best to only connect the two center pins, which are the CAN_H and CAN_L signals. I would suggest NOT connecting the pin labeled ground. The ground signal just creates ground loops and is not needed. After we disconnected the ground circuit our system became much more stable. We had 8 Jaguars on the bus. Our final cable configuration was just two conductors, one twisted pair. We would remove the other unused wires from the cable assembly by pulling them out. I always had the students test the cables with an ohm meter and in a working loop before declaring them done. We put shrink tubing on the resistor leads to prevent them from shorting to each other when we assembled the terminator.
Hugh

Dale 12-05-2010 11:38

Re: Using a star configuation for Jaguars on CAN
 
Now that's a novel idea. I hadn't thought about just using the CAN_H and CAN_L pins. You make a good point about ground loops. Has anyone else tried this?

Al Skierkiewicz 12-05-2010 11:38

Re: Using a star configuation for Jaguars on CAN
 
Dale,
In the relatively short connection length that a FRC robot would use, the flat telco wire should pose no real problem. (1/4 wavelength at 1 MHz is about 234 ft.)
I included the reference of UTP to prevent any misunderstanding with the term. The device used in the Jaguar is a balanced transceiver chip capable of driving a 60 ohm load. The Jaguar chip is specified as having 30 kohm input and the Jaguar itself has 20 Kohm from CANL to ground so it is unlikely that 10 Jaguars would significantly load the buss. As I was checking the spec sheet for the Jaguar, I found the following...
"Use RJ11/RJ14 modular cables to daisy-chain CAN communications to any other MDL-BDC devices. The cables should be 6-position with either 4 or 6 contacts installed. Suitable cables have plugs crimped on opposite sides of the cable and are referred to as reverse or straight cables, because pin 1 connects to pin1."
And...
"When controlling more than one MDL-BDC, modular cables (6P-4C or 6P-6C) should be used to link the modules. Suitable cables include the Digikey H2642R-07-ND cable."
I can go along with the ground suggestion, theoretically it is not needed for the transmission line. It does tie each internal ground through a separate connection in addition to the power supply common. This produces ground loops with motor noise and common mode noise added to the chassis common in each device.

Dale 12-05-2010 11:51

Re: Using a star configuation for Jaguars on CAN
 
For what it's worth, our RJ11s have have four pins installed and six channels, just like a normal teleco connector.

Hugh,
How did you get a good crimp on the cable with the round(ish) Ethernet cable? It would seem like with most of the wires removes the top part of the connector might not grab the outside shell of the cable very well. Did they tend to come off, did you do something special, or did it just happen to work?

Dale

Dave Flowerday 12-05-2010 11:52

Re: Using a star configuation for Jaguars on CAN
 
Quote:

Originally Posted by Al Skierkiewicz (Post 961783)
Dale,
The six pin connectors are the only way to go here. The RJ-11's will move slightly in the connector body of the Jaguar and lift one or more of the spring wire contacts. If you examine the connector you will see a slight rise of plastic between each contact on the plug. If the wire doesn't sit down between the two adjacent plastic bumps, the wires move and either touch each other or don't contact the receptacle wires.

Al, are you sure you're not thinking of the handset plug (sometimes incorrectly called an RJ9)? An RJ11/12/14* jack has all of the necessary "slots" for the spring wire contacts on the Jaguar side and should not allow those spring contacts to move and touch each other. The only difference between the RJ11, RJ12/RJ25, and RJ14 is that the RJ11 has only 2 positions populated with contacts, the 14 has 4 loaded, and the 12/25 has all 6 loaded (but all 6 positions still exist in each case).

If anything, I would expect that an RJ14 would allow the outside spring contacts to sit even deeper in the plastic "slot" than an RJ12 because without a contact in the outside positions of the plug, the "slot" is actually deeper than a populated one.

* Note that a real RJ11 only has 2 contacts, which seems to contradict the Jaguar manual specifying at least 4 contacts. Seems like they should be recommending RJ12,14, or 25 only.

Al Skierkiewicz 12-05-2010 14:25

Re: Using a star configuation for Jaguars on CAN
 
Dave,
There is a lot of confusion out there on these jacks including the Jaguar docs. The cheaper RJ11 jacks do not always have the depressions you speak of where the two outside contacts of a six position plug would normally be located. However, I have seen teams using the handset plug (which is narrower than a standard RJ11) this year. Specifying the six position connector prevents any ambiguity. Although one pin of the connector is labeled +5volts, that is not connected to any power supply internal to the Jaguar. If other sensors are used to that provide power on that pin, misalignment could cause some other serious issues. Also a crimper that is designed for four position plugs will not push in on the outer contacts of a six position plugs when assembling these plugs.

Hugh Meyer 12-05-2010 17:35

Re: Using a star configuation for Jaguars on CAN
 
Quote:

Originally Posted by Dale (Post 961819)
Hugh,
How did you get a good crimp on the cable with the round(ish) Ethernet cable? It would seem like with most of the wires removes the top part of the connector might not grab the outside shell of the cable very well. Did they tend to come off, did you do something special, or did it just happen to work?

Dale

Dale,
It clamps down about like on a RJ45 network connector. We just try to push the outer insulation into the connector before making the crimp. Even if it comes out the wires are still securely held by the crimp pins deeper in the connectors.
Hugh

DonRotolo 12-05-2010 18:01

Re: Using a star configuation for Jaguars on CAN
 
Quote:

Originally Posted by Dale (Post 961404)
An active star module that allowed every jaguar to remain at it's default address of 0 would be very cool.

That would kind of defeat the advantages of CAN networking though (the added complexity of the "router")

But there is no reason CAN can't be used in a star topology. We use a star topology in the cars where I work, on both the 125 kb/s and 500 kb/s networks. The key is proper terminations.

Terminating resistors are intended to prevent the signal reflections that occur at the end of an open-circuited wire. What happens is the signal hits the open wire end (at the speed of light) and bounces back into the network (at full amplitude). Do this just wrong and your data bits turn into garbage.

A good tool to see if your star network is well-terminated is an oscilloscope. Compare a known-good signal to your network.

Regarding noise: A CAN-Bus is inherently resistant to noise, since it uses differential signaling. It is the difference between CAN-H and CAN-L that determines logic 0 or 1. In theory, both wires of the network will be affected equally by some induced noise, while the difference between the wires remains constant. In practice, the noise induced into each wire is "same" enough to work against noise very well.


All times are GMT -5. The time now is 07:13.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi