Go to Post Play FRC like Bruce Lee, not an MMA fighter. - Jessica Boucher [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-01-2015, 11:36
Thad House Thad House is online now
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,091
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Using CAN in a star configuration

Is it possible to use CAN in a star configuration. Like having one output to the PCM and PDP, 1 output to a few talons, and another output to a few other talons. I know you would need termination resistors on each line, but other then that would it work?
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
  #2   Spotlight this post!  
Unread 07-01-2015, 11:42
jee7s jee7s is offline
Texan FIRSTer, ex-frc2789, ex-frc41
AKA: Jeffrey Erickson
FRC #6357
 
Join Date: Nov 2007
Rookie Year: 1997
Location: Dripping Springs, TX
Posts: 315
jee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond repute
Re: Using CAN in a star configuration

Quote:
Originally Posted by Thad House View Post
Is it possible to use CAN in a star configuration. Like having one output to the PCM and PDP, 1 output to a few talons, and another output to a few other talons. I know you would need termination resistors on each line, but other then that would it work?
Really risky. You're going to end up with all sorts of reflections on the line that will tend to corrupt the CAN signalling. The signalling really does depend on a properly terminated transmission line of proper characteristic impedance to work properly. There's a boatload of specs on how to do it properly, most of which are summarized by TI here: http://www.ti.com/lit/an/slla270/slla270.pdf

Succinctly, you want a 100 ohm characterisic impedance (twisting wires together does that) and 120 ohm terminations. There are other factors like stub length and number of nodes that the document addresses. But, fundamentally the bus needs to be that differential pair with the 120 ohm terminations at each end and drops along the way for each device.
__________________

2013 Alamo Regional Woodie Flowers Finalist Award Winner
2012 Texas Robot Roundup Volunteer of the Year
Texas Robot Roundup Planning Committee, 2012-present
FRC 6357 Mentor, 2016-
FRC 2789 Mentor, 2009-2016 -- 2 Golds, 2 Silvers, 8 Regional Elimination Appearances

FRC 41 Mentor 2007-2009
FLL Mentor 2006
FRC 619 Mentor 2002
FRC 41 Student 1998-2000
  #3   Spotlight this post!  
Unread 07-01-2015, 13:47
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,647
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Using CAN in a star configuration

First off, no, you don't need or want more than 2 termination resistors. If you add more resistors, you're going to drop the total resistance between the lines, which will cause problems with signal levels.

Second, the recommended topology is a single line terminated at both ends, with the unterminated stubs as short as possible. It is possible to run with unterminated stubs of a non-negligible length, but you need to know some specific details of the CAN drivers to calculate the max length for a single stub, and the max total length of all stubs.

If you were to try such a topology, you'd want the roboRIO at one end of your line, the PDP (with termination resistor) at the other, and you'd want to connect all the other devices directly to the line between the roboRIO and PDP. And keep all the stub lines as short as possible.

Before you try that, though, I think you should look at what you're doing and why you think you need to do it in a star topology. You whole problem could be solved with a few extra wires and connectors. I can't think of a reason each of your outputs couldn't be a line out to (whatever) and then a line back. Your "output to a few Talons" could be line from connection point to a Talon, daisy chain a bunch of Talons, line back to connection point. I don't think you can actually design a star-topology that couldn't be converted into an equivalent straight line topology.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #4   Spotlight this post!  
Unread 07-01-2015, 14:00
philso philso is offline
Mentor
FRC #2587
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Houston, Tx
Posts: 938
philso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond repute
Re: Using CAN in a star configuration

^
|
|
+1

According to the research I have had to do when designing CAN interfaces into the circuit boards I am working on, I would have to say that there is no valid reason for you to try to implement a star CAN network. Go focus your energies on improving other areas of your robot instead.

If you have a node, say a motor controller, that is not "conveniently" located near the other nodes, a proper daisy-chain connection scheme would only require an extra pair thin wires. This extra pair of wires can be run next to the other pair of CAN signal wires. Since the two wire pairs carry the same signals, one would not have to be concerned about noise coupling between them.
  #5   Spotlight this post!  
Unread 08-01-2015, 12:45
JefferMC JefferMC is offline
Registered User
AKA: Jeff Corbett
FRC #1319 (Flash)
Team Role: Mentor
 
Join Date: Nov 2012
Rookie Year: 2005
Location: United States
Posts: 44
JefferMC will become famous soon enough
Re: Using CAN in a star configuration

I would think the reason someone would want to run a star topology vs. a single end-to-end would be a desire to retain some control in the event of a failure of a single point of the CAN wiring.

With a daisy chain arrangement with end terminators, the CAN bus cannot survive any physical failure at any point.

With a star arrangement, e.g. with discrete PWM cables, any single PWM cable can be lost and not affect the ability to control any other PWM.

I'm not saying it is possible to run CAN in a star topology. But I observe the move of Ethernet from a single coax bus arrangement with end termination to the current star topology and one of the reasons behind it is robustness.
  #6   Spotlight this post!  
Unread 08-01-2015, 12:51
jee7s jee7s is offline
Texan FIRSTer, ex-frc2789, ex-frc41
AKA: Jeffrey Erickson
FRC #6357
 
Join Date: Nov 2007
Rookie Year: 1997
Location: Dripping Springs, TX
Posts: 315
jee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond repute
Re: Using CAN in a star configuration

Quote:
Originally Posted by JefferMC View Post
I would think the reason someone would want to run a star topology vs. a single end-to-end would be a desire to retain some control in the event of a failure of a single point of the CAN wiring.

With a daisy chain arrangement with end terminators, the CAN bus cannot survive any physical failure at any point.

With a star arrangement, e.g. with discrete PWM cables, any single PWM cable can be lost and not affect the ability to control any other PWM.

I'm not saying it is possible to run CAN in a star topology. But I observe the move of Ethernet from a single coax bus arrangement with end termination to the current star topology and one of the reasons behind it is robustness.
Keep in mind that ethernet has separate transceivers for every port. You can conceptually do the same with CAN, but most controllers have 1 or 2 CAN ports.

CAN really isn't all that fragile. It's used in automobiles, airplanes, automation, etc. It just takes some care during the wiring to make sure you have a bus that is intact and reliable. I would say that this new approach to CAN adopted by FIRST and CTRE using twisted pairs is much more reliable than the 6P6C version we had with the black jaguar. My experience with the old method was that the connectors were the most likely point of failure. Sometimes it was because they weren't made properly, some times it was because the connector was abused. But, with twisted pairs, if you take your time to get good solid connections and keep your colors straight, I don't think reliability is that much of a concern.
__________________

2013 Alamo Regional Woodie Flowers Finalist Award Winner
2012 Texas Robot Roundup Volunteer of the Year
Texas Robot Roundup Planning Committee, 2012-present
FRC 6357 Mentor, 2016-
FRC 2789 Mentor, 2009-2016 -- 2 Golds, 2 Silvers, 8 Regional Elimination Appearances

FRC 41 Mentor 2007-2009
FLL Mentor 2006
FRC 619 Mentor 2002
FRC 41 Student 1998-2000
  #7   Spotlight this post!  
Unread 08-01-2015, 13:11
crake crake is offline
National Instruments
AKA: Chris Rake
no team (Athena)
Team Role: Engineer
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 185
crake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond repute
Re: Using CAN in a star configuration

We spent quite a bit of time discussing the tradeoffs of a star topology with relatively short stubs vs. daisy chain with termination at each end. Many of the things discussed in this thread (robustness, stub length, reflections, risk of single point of failure, etc.) were brought up.

In the end we decided to stick with CAN as it was spec'ed to be - daisy chain, twisted pair, terminated at the ends. Can you get away with stubs several inches long? Probably. Can you get away with loosely twisted or even untwisted pair? Probably. Is it recommended? No. Should you chance it? I dunno - how much of a learning experience do you want?
  #8   Spotlight this post!  
Unread 08-01-2015, 13:32
philso philso is offline
Mentor
FRC #2587
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Houston, Tx
Posts: 938
philso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond repute
Re: Using CAN in a star configuration

Quote:
Originally Posted by JefferMC View Post
I would think the reason someone would want to run a star topology vs. a single end-to-end would be a desire to retain some control in the event of a failure of a single point of the CAN wiring.

With a daisy chain arrangement with end terminators, the CAN bus cannot survive any physical failure at any point.

With a star arrangement, e.g. with discrete PWM cables, any single PWM cable can be lost and not affect the ability to control any other PWM.

I'm not saying it is possible to run CAN in a star topology. But I observe the move of Ethernet from a single coax bus arrangement with end termination to the current star topology and one of the reasons behind it is robustness.
It may be possible (and probably difficult) to tweak the stub lengths and the termination values to get a star configuration to work reliably. If you then have wiring failure in one of the stubs, your CAN network would likely stop working correctly anyways. A short would kill the signal throughout the network. An open would change the reflections and ringing experienced at each node in the network causing the Signal-to-noise ratio to degrade, making it likely that some or all of the nodes fail to function correctly.

Yes, the daisy-chain configuration is vulnerable to a single wire connection failing. So is much of the rest of your control system. How many robots have sat dead on the field because the power jack popped out of the radio? The proper response to such a vulnerability to take very seriously the task of improving the quality of the construction so that the probability of a failure is acceptably low (longer MTBF). Treat the wiring as seriously as any repairs to the brakes on your car. It is not that hard to and there are people who can help you learn how to do it properly. It would be much easier than forcing a CAN network to work with acceptable reliably in a star configuration.
  #9   Spotlight this post!  
Unread 08-01-2015, 16:21
JefferMC JefferMC is offline
Registered User
AKA: Jeff Corbett
FRC #1319 (Flash)
Team Role: Mentor
 
Join Date: Nov 2012
Rookie Year: 2005
Location: United States
Posts: 44
JefferMC will become famous soon enough
Re: Using CAN in a star configuration

My reply was not targeted at whether it is worth attempting to twist a CAN bus in to a star-topology.

I accept that the way CAN is designed is that it is a bus and that daisy chaining is the most reasonable physical implementation. I accept that this simplifies things and lowers costs in comparison to Ethernet. I agree that it makes little if any sense to try to wire it other than as a straight bus.

Instead, my reply was targeted at what I read (perhaps between the lines) in the replies prior to mine that seemed to express utter incredulity in why someone would want to do something so foreign.

I understand that there are plenty of other SPoF in the control systems. That doesn't mean that you like having any of them.

I also understand that CAN is in widespread use in automobiles, etc. But can we agree that automobiles aren't normally assembled by teenagers in training?

I especially want to thank crake for his amusing and informative reply.
  #10   Spotlight this post!  
Unread 08-01-2015, 18:31
timytamy's Avatar
timytamy timytamy is offline
Registered User
AKA: Tim
FRC #3132 (The Thunder Down Under)
Team Role: Electrical
 
Join Date: Nov 2009
Rookie Year: 2010
Location: Australia
Posts: 293
timytamy has a brilliant futuretimytamy has a brilliant futuretimytamy has a brilliant futuretimytamy has a brilliant futuretimytamy has a brilliant futuretimytamy has a brilliant futuretimytamy has a brilliant futuretimytamy has a brilliant futuretimytamy has a brilliant futuretimytamy has a brilliant futuretimytamy has a brilliant future
Re: Using CAN in a star configuration

On another project, we're actually moving from a 100% daisy chain CAN bus to one with some minor stubs.

The most important thing is to make sure that you keep the stub lengths as short as possible. In fact, even with the current daisy chain implementation, you'll find that there is a very short stub length inside the node (between the CAN transceiver and the tracks between the two CAN cables). We're using <300mm for stub lengths on a bus that goes ~10m. There is only two termination resistors in this configuration.

It can be done, in our case it's to allow greater flexibility in pulling out nodes and to clean up wiring. Realistically you should think about the benefit from a star topology and try to work out other ways of achieving that. For robustness, the cables on the Talon SRXs are long enough that you can probably solder the ends together (and heat-shrink), and just cut them off when they need replacing. There are plenty of splice crimps or BP style connectors that can be used quickly in a competition, and a quick wrap of tape will make them quite reliable. This only really leaves the roboRIO, PDP and PCM. Getting really good at the weidermuller connections is one of the only options here (especially for the roboRIO).
__________________
Tim W
FIRST® Team 3132 - The Thunder Down Under
Sydney, Australia
Website | Facebook | Youtube
  #11   Spotlight this post!  
Unread 08-01-2015, 19:45
FrankJ's Avatar
FrankJ FrankJ is offline
Robot Mentor
FRC #2974 (WALT)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Marietta GA
Posts: 1,913
FrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond repute
Re: Using CAN in a star configuration

This post has some relevance. It references an NI spec that allows stubs up to a foot. Personally I would stay as close to line to line as possible because I am superstitious & the whole concept of a digital buss is Voodoo (youdoo?) to me.
__________________
If you don't know what you should hook up then you should read a data sheet
  #12   Spotlight this post!  
Unread 16-01-2015, 11:35
Levansic's Avatar
Levansic Levansic is offline
Registered User
AKA: Len Evansic
FRC #0585 (Cyber Penguins)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Tehachapi, CA
Posts: 185
Levansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud of
Re: Using CAN in a star configuration

I appreciate the citing of specs and bold admonitions about signal reflectance voodoo, but a star topology is not all that dangerous or bad for CAN. The physical size of the robots tend to make the overall length of the CAN bus, regardless of topology, far shorter than what is allowed by the specifications.

We all need to keep in mind that FRC is about STEM education. Instead of dispensing absolute expert opinions, we should be encouraging students and mentors to test their ideas to see if they are valid.

Granted the new securely connected 2-wire CAN interface in this year's control system does make the daisy chain a much more reliable bus topology than in the past. Our team could not successfully utilize CAN Jaguars, without a star topology. The improved in connections this year do not mean that a star or partial star is no longer viable, especially for teams who decide to continue using Jaguars.

In summary, if you are considering using a star or a hybrid, you need to construct your network and test it against a plain daisy chain. You may find no difference, or you could find that parts of your network don't work. Don't blindly take the opinions offered here as fact. Very little is absolute when it comes to CAN usage, aside from unique addresses and bus terminatons.
  #13   Spotlight this post!  
Unread 16-01-2015, 16:30
crake crake is offline
National Instruments
AKA: Chris Rake
no team (Athena)
Team Role: Engineer
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 185
crake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond repute
Re: Using CAN in a star configuration

Quote:
Originally Posted by Levansic View Post
We all need to keep in mind that FRC is about STEM education. Instead of dispensing absolute expert opinions, we should be encouraging students and mentors to test their ideas to see if they are valid.
Depends on how you define "valid". If someone is asking what is the right way to wire a bus, or weld, or grind metal, or design a 3D printed part, or... sure you can just figure it out, and kludge something together, and it might work - maybe it'll even work the entire season. Many people will do this. Or you can teach best practices, good engineering, and solid design along the way!
  #14   Spotlight this post!  
Unread 16-01-2015, 21:30
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,991
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Using CAN in a star configuration

Quote:
Originally Posted by Thad House View Post
I know you would need termination resistors on each line
Quote:
Originally Posted by Kevin Sevcik View Post
First off, no, you don't need or want more than 2 termination resistors. If you add more resistors, you're going to drop the total resistance between the lines, which will cause problems with signal levels.
The FRC CAN implementation is 1 Mb/s class C, which is very finicky about terminations and stub lengths. You WILL get poorer communications on CAN if you use a star topology without proper terminations, up to and including NO communications.

Go ahead and try it - don't take my word for it - but be prepared to evaluate performance carefully (I suggest a CANalyzer/similar or perhaps an Oscilloscope) and return to daisy-chain if your results are not satisfactory.

It would be a very bad idea to not properly evaluate performance before going to competition. This is not a place to take an unknown risk.
__________________

I am N2IRZ - What's your callsign?
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:47.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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