OCCRA
Go to Post Everyone better enjoy the broadcast, Dave had to cancel a shuttle launch to make it happen :D - The Lucas [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 01-15-2017, 02:47 PM
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 102
duane is an unknown quantity at this point
Send a message via AIM to duane
Custom CAN Devices?

While I dig through the manual ...

Can we build a device that has an interface that uses the CAN bus? Are there any specific rules for creating and accessing a device on the CAN bus?

...Duane
__________________
Duane Murphy
Mentor - Software
Vanden Vikings FIRST Team 701
http://www.vandenrobotics.com
Reply With Quote
  #2   Spotlight this post!  
Unread 01-15-2017, 09:52 PM
MetaEngineer's Avatar
MetaEngineer MetaEngineer is offline
Director of magic smoke
AKA: Barden
FRC #0246
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2010
Location: Boston, MA
Posts: 27
MetaEngineer is an unknown quantity at this point
Re: Custom CAN Devices?

Section 8, R78, bullet point A, at the bottom of page 91 of the Complete Game and Season Manual, as of today (1-15-2017):

Quote:
Additional switches, sensor modules, CUSTOM CIRCUITS, third-party modules, etc. may also be placed on the CAN-bus.
You can add whatever custom devices you want as long as the roboRIO, PDP, PCM, etc are connected to the CAN bus legally and the custom device(s) do not interfere with, block, or override other signals (See rules R61, R75 to R78).

I'm curious to know what custom devices you intend to build, if you don't mind sharing
Reply With Quote
  #3   Spotlight this post!  
Unread 01-15-2017, 10:16 PM
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 102
duane is an unknown quantity at this point
Send a message via AIM to duane
Re: Custom CAN Devices?

Thanks for the quote out of the manual. I found the same information not too long after you posted this message.

Quote:
Originally Posted by MetaEngineer View Post
I'm curious to know what custom devices you intend to build, if you don't mind sharing
We've enjoyed using CAN bus for Talon's and the added support for sensors on the Talon's have simplified wiring and programming.

We would like to build an interface to a Raspberry Pi. We have a vision program operating nicely with the Raspberry Pi. We'd now like to get the data to the RoboRio.

Ethernet is a common suggestion, but the Ethernet interfaces on the robot are limited. Adding the Pi to Ethernet would take up bandwidth as well as likely require the addition of a switch (weight, space, ouch).

I'd like to hear the benefits of other interface choices.

I'm also on the lookout for examples of using the CAN interface on the RoboRio.
__________________
Duane Murphy
Mentor - Software
Vanden Vikings FIRST Team 701
http://www.vandenrobotics.com
Reply With Quote
  #4   Spotlight this post!  
Unread 01-15-2017, 10:38 PM
bobbysq bobbysq is offline
Registered User
FRC #4646 (Team ASAP)
Team Role: Alumni
 
Join Date: Apr 2016
Rookie Year: 2015
Location: Des Moines, IA
Posts: 649
bobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond repute
Re: Custom CAN Devices?

Quote:
Originally Posted by duane View Post
Ethernet is a common suggestion, but the Ethernet interfaces on the robot are limited. Adding the Pi to Ethernet would take up bandwidth as well as likely require the addition of a switch (weight, space, ouch).
Anything on board the robot doesn't have the bandwidth restriction. Switches are also pretty lightweight and not too big.
Reply With Quote
  #5   Spotlight this post!  
Unread 01-15-2017, 11:07 PM
MetaEngineer's Avatar
MetaEngineer MetaEngineer is offline
Director of magic smoke
AKA: Barden
FRC #0246
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2010
Location: Boston, MA
Posts: 27
MetaEngineer is an unknown quantity at this point
Re: Custom CAN Devices?

CAN bus is great for many things, but high bandwidth is not one of them. Small amounts of data such as motor controller commands and sensor data can be moved with low latency, but it will struggle with a video stream. Last year a code bug early in development resulted in a flooded CAN network on our robot. Very laggy and unpredictable behavior resulted as the network hit its limits and could not update frequently enough.

As bobbysq said, there's no bandwidth limit on the bot itself. Only transmissions between bot and field are limited to <7 mbit/sec. If you are really tight on weight and space, you can use the second Ethernet port on the radio to feed data through to the RIO. It works quite well as a switch, though you lose that port for tethering.
Reply With Quote
  #6   Spotlight this post!  
Unread 01-16-2017, 10:15 AM
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 102
duane is an unknown quantity at this point
Send a message via AIM to duane
Re: Custom CAN Devices?

Quote:
Originally Posted by MetaEngineer View Post
CAN bus is great for many things, but high bandwidth is not one of them.
I should clarify. This is not a video stream. There's a Raspberry Pi operating as a sensor independently evaluating the video stream. The Pi is returning the distance to the target so that we can adjust the targeting and shooting system with vision.

The data between the Pi and the RoboRio will be quite small (several integers).

I'm digging but could still use more examples of how to use the CAN bus properly.
__________________
Duane Murphy
Mentor - Software
Vanden Vikings FIRST Team 701
http://www.vandenrobotics.com
Reply With Quote
  #7   Spotlight this post!  
Unread 01-16-2017, 11:14 AM
MetaEngineer's Avatar
MetaEngineer MetaEngineer is offline
Director of magic smoke
AKA: Barden
FRC #0246
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2010
Location: Boston, MA
Posts: 27
MetaEngineer is an unknown quantity at this point
Re: Custom CAN Devices?

That makes far more sense using the Pi is a coprocessor and sending small amounts of data back to the RIO. CAN bus will handle that no problem, though unfortunately the implementation of such a setup is where we leave my realm of expertise.

From what I've researched, the Pi will need a separate CAN module, as it does not natively support CAN. However, it has hardware support for SPI and I2C built in, as does the RIO. Those seem like a more accessible method of communicating than CAN.
Reply With Quote
  #8   Spotlight this post!  
Unread 09-09-2017, 04:01 PM
Wasabi Fan Wasabi Fan is offline
Registered User
AKA: Kaelin Laundry
FRC #0488
 
Join Date: Dec 2015
Rookie Year: 2015
Location: Washington
Posts: 23
Wasabi Fan has a spectacular aura aboutWasabi Fan has a spectacular aura about
Re: Custom CAN Devices?

Duane, did you get a chance to follow these leads? I'd be interested if you did any research into getting custom devices on the CAN (or, even better, actually managed it!). I'm looking into doing this myself and any info I can get on how successful others were would be great.
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


All times are GMT -5. The time now is 01:31 PM.

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