Go to Post Your cat-bell skills are most impressive. - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-04-2010, 22:16
NyCityKId's Avatar
NyCityKId NyCityKId is offline
That Weird Kid
AKA: Andre Dunkley
FRC #1601 (Quantum Samurai)
Team Role: Mechanical
 
Join Date: Mar 2010
Rookie Year: 2007
Location: Queens, New York
Posts: 137
NyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to behold
Send a message via AIM to NyCityKId
What is CAN?...

So I've been hearing a lot about CAN lately but I'm not sure what it is. I know it has something to do with the jaguars but I dont know exactly what it does. If anyone is willing to give me a full or semi-full description of CAN I would greatly appreciate it. I'm going to spend my summer learning LabVIEW and a a little C++ (since my team mostly programs in LabVIEW as of now), so it would be very helpful if i actually understood the basics of CAN.

Thanks in advance to all the responders,
Andre Dunkley
Reply With Quote
  #2   Spotlight this post!  
Unread 03-04-2010, 23:10
Zholl Zholl is offline
Registered User
AKA: Chris Sherwood
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Colorado Springs
Posts: 267
Zholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to behold
Re: What is CAN?...

I asked one of our programmers the same thing. basically, he described it as an output bus that allows you to daisy chain your speed controllers to one output port with phone cables. then it just sends signals which get forwarded on to the next controller in line until it reaches the desired controller.

other than that, the best I can do is to point you in the direction of wikipedia
Reply With Quote
  #3   Spotlight this post!  
Unread 04-04-2010, 00:37
David Brinza's Avatar
David Brinza David Brinza is offline
Lead Mentor, Lead Robot Inspector
FRC #0980 (ThunderBots)
Team Role: Mentor
 
Join Date: Feb 2003
Rookie Year: 2003
Location: Glendale, CA
Posts: 1,378
David Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond repute
Re: What is CAN?...

CAN is a low-speed (<1 Mbps) serial bus that is used primarily in newer automobiles, but also in other imbedded applications (including FRC robots). CAN provides a simple, standardized communications interface between the cRIO and Jaguar speed controllers.

The advantage of using CAN in FRC robots is not just the simplified (daisy-chain) wiring, rather it is access to the intelligence provided within the Jaguar controllers. The FRC controls architecture allows PID control to be distributed to individual motor controllers. Speed, position, current (torque) control can be off-loaded from the cRIO to Jaguars with feedback sensors (encoders, potentiometers, etc.) directly connected to the Jaguars. I suspect this advantage will be more widely recognized and utilized by FRC teams next year.
__________________
"There's never enough time to do it right, but always time to do it over."
2003 AZ: Semifinals, Motorola Quality; SoCal: Q-finals, Xerox Creativity; IRI: Q-finals
2004 AZ: Semifinals, GM Industrial Design; SoCal: Winners, Leadership in Controls; Championship: Galileo #2 seed, Q-finals; IRI: Champions
2005 AZ: #1 Seed, Xerox Creativity; SoCal: Finalist, RadioShack Controls; SVR: Winners, Delphi "Driving Tomorrow's Technologies"; Championship: Archimedes Semifinals; IRI: Finalist
2007 LA: Finalist; San Diego: Q-finals; CalGames: Finalist || 2008 San Diego: Q-finals; LA: Winners; CalGames: Finalist || 2009 LA: Semifinals; Las Vegas: Q-finals; IRI: #1 Seed, Finalist
2010 AZ: Motorola Quality; LA: Finalist || 2011 SD: Q-finals; LA: Q-finals || 2013 LA: Xerox Creativity, WFFA, Dean's List Finalist || 2014 IE: Q-finals, LA: Finalist, Dean's List Finalist
2016 Ventura: Q-finals, WFFA, Engineering Inspiration
Reply With Quote
  #4   Spotlight this post!  
Unread 04-04-2010, 01:40
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: What is CAN?...

What I can tell you about CAN from experience is, the Wizard (My team's robot) wouldn't be the same without CAN.

The current sensing abilities of the jaguar are invaluable.

- Before ship we used it to determine how much current was used going over the bump (70 amps per side! and that was in low gear!). Because we were able to see that we were pulling way too much current, we ordered new sprockets to increase the torque output, and thus lower the current needed.

- In autonomous, we use the current sensing ability to good use in our ball magnet. The ball slows down the roller, thus increasing the current draw, which signals the bot to go into its next state in its FSM

- Our kicker's quadrature encoder is sometimes finicky after kicking (loses counts, or something). The current draw is checked to look for a stall, if it is then abort the kick and return. This has saved us from some penalties for extending past the frame for more then 2 seconds.

Then there is the PID control feature for encoders.
Using the position control mode, in auto the FSM just tells each side how far to go, then the Jags go there (unless preempted by the roller state).

Using the Speed control mode, in tele mode the driver's stick is no longer a % voltage, instead it is a % of full speed. So, what that means is if you get into a pushing match, for example, the driver doesn't have to move the stick any further then it already is. The bot will automagically start to apply more power until the obstacle is cleared.

Could all of this been done without CAN? Sure, but it would have required more electrical hardware (4 current sensors and a better encoder) and more software robot side ( PID controllers for speed, and distance)
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #5   Spotlight this post!  
Unread 04-04-2010, 12:26
NyCityKId's Avatar
NyCityKId NyCityKId is offline
That Weird Kid
AKA: Andre Dunkley
FRC #1601 (Quantum Samurai)
Team Role: Mechanical
 
Join Date: Mar 2010
Rookie Year: 2007
Location: Queens, New York
Posts: 137
NyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to behold
Send a message via AIM to NyCityKId
Re: What is CAN?...

Okay, I think I'm starting to see how this works. But tell me more about the physical aspects of how this system works. How does it connect to the cRIO? How does it connect to other jags? And lastly, where do the sensors connect to? (I think David sort-of explained how it's done, but I just want to be sure...).

By the way. I'm sure some of this information that I'm asking about can be found out by working with the robot, but the season is over for my team so i really wont get a lot of hands on time with the robot.

Once again thanks to all, this has been really helpful.

Last edited by NyCityKId : 04-04-2010 at 12:34.
Reply With Quote
  #6   Spotlight this post!  
Unread 04-04-2010, 14:34
Zholl Zholl is offline
Registered User
AKA: Chris Sherwood
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Colorado Springs
Posts: 267
Zholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to behold
Re: What is CAN?...

I don't recognize the cRIO module it's hooked up to, but here's a picture of a demo setup. it looks like it has to use a serial adapter to connect to the module as well. Digital sensor inputs are plugged into the digital sidecar, and analog sensors are plugged into the analog breakouts on the cRIO (assuming I'm reading this diagram correctly).
Reply With Quote
  #7   Spotlight this post!  
Unread 04-04-2010, 15:11
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: What is CAN?...

Quote:
Originally Posted by Zholl View Post
I don't recognize the cRIO module it's hooked up to, but here's a picture of a demo setup. it looks like it has to use a serial adapter to connect to the module as well. Digital sensor inputs are plugged into the digital sidecar, and analog sensors are plugged into the analog breakouts on the cRIO (assuming I'm reading this diagram correctly).
There were two legal ways to use the CAN bus in FRC this year. One is by connecting from the serial port on the cRIO to a Black Jaguar which acts as a serial-to-CAN bridge. From the Black Jaguar you then daisy chain each successive jaguar (black or tan) together.

The other way is to use the 2CAN Ethernet-to-CAN adapter plugged into Ethernet port 2 of the cRIO. Then the 2Can is the start of the chain instead of a Black Jaguar and you daisy chain from it to either black or tan Jaguars.

If you want to take advantage of the onboard PID functionality of the Jaguars, you connect the sensors to the sensor inputs on the Jaguars themselves.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #8   Spotlight this post!  
Unread 04-04-2010, 16:41
NyCityKId's Avatar
NyCityKId NyCityKId is offline
That Weird Kid
AKA: Andre Dunkley
FRC #1601 (Quantum Samurai)
Team Role: Mechanical
 
Join Date: Mar 2010
Rookie Year: 2007
Location: Queens, New York
Posts: 137
NyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to behold
Send a message via AIM to NyCityKId
Re: What is CAN?...

ok i think i understand the basics if can. the pic was really helpful, not to mention the thread that went along with it. (i am officially all CAN-ed out for the day after readiung that thread -_-...)

thanks for the info guys
Reply With Quote
  #9   Spotlight this post!  
Unread 04-04-2010, 20:16
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: What is CAN?...

The only thing to look out for when running CAN, is to handle your exceptions VERY well.
If you lose a CAN Jaguar (Smoke, fuse, etc.), and don't handle its loss in the code then the library will throw an exception that will crash the main thread (ie. the one that communicates with the DS)

So, if you happen to lose a jag in auto for example, then you don't have a tele.
Where if the same thing happened on PWM, you would only be crippled for that motor the JAG controlled not the whole bot.

Handle Exceptions!
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #10   Spotlight this post!  
Unread 04-04-2010, 21:01
NyCityKId's Avatar
NyCityKId NyCityKId is offline
That Weird Kid
AKA: Andre Dunkley
FRC #1601 (Quantum Samurai)
Team Role: Mechanical
 
Join Date: Mar 2010
Rookie Year: 2007
Location: Queens, New York
Posts: 137
NyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to beholdNyCityKId is a splendid one to behold
Send a message via AIM to NyCityKId
Re: What is CAN?...

Quote:
Originally Posted by biojae View Post
The only thing to look out for when running CAN, is to handle your exceptions VERY well.
If you lose a CAN Jaguar (Smoke, fuse, etc.), and don't handle its loss in the code then the library will throw an exception that will crash the main thread (ie. the one that communicates with the DS)

So, if you happen to lose a jag in auto for example, then you don't have a tele.
Where if the same thing happened on PWM, you would only be crippled for that motor the JAG controlled not the whole bot.

Handle Exceptions!
Is this concerning LabVIEW?

Either way I'm a little lost as to what an exception is. I currently don't have a copy of LabVIEW (due to miscommunication and lack of reading the manual, it was generally accepted that there was a limited number of licences per team...so i wasn't allowed to bring it home and play with it), so when i get back to school on Wednesday (NYC is on spring break ) I'll get the disc from my mentor. I'll probably be back around Friday to discuss these exceptions more.
Reply With Quote
  #11   Spotlight this post!  
Unread 04-04-2010, 22:19
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: What is CAN?...

This is mostly referring to C++ and Java.
I only know a little about Labview's error handling, but what would happen when an error occurs (Lose a jag, etc.) is an error condition other then "OK" would be returned from the VI.
If not handled, it may crash the program (Not quite sure how labview handles un-handled errors )
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
IRI - What Can Be Improved Chris Fultz Off-Season Events 47 06-08-2007 08:27
can anyone please tell mw where or with what can i lear programing in C techsage Programming 7 23-08-2005 00:25
What can i do? yangotang Website Design/Showcase 14 12-01-2003 23:55
What can we do to get noticed WorkThoseBuns Regional Competitions 17 21-03-2002 20:57


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

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