Go to Post I used to wonder if the FRC staff would read the CD game hint posts and just laugh to themselves..now I know they do. - rachelholladay [more]
Home
Go Back   Chief Delphi > Technical > Control System
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-02-2016, 09:56
loafdog loafdog is offline
Registered User
AKA: Maciej
FRC #2876 (DevilBotz)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2009
Location: Burlington, MA
Posts: 33
loafdog is an unknown quantity at this point
pros/cons of wiring sensors to can talon srx

Hi,
My team is using can talon srx first time this season. We are running low on dio ports on roborio. We are tossing around ideas to avoid running out of ports and one idea is to wire some sensors directly to the can talon srx. We are thinking of encoders and limit switches mostly. Maybe a pot. From what I can tell, we can read these sensors using can talon class and use the values in our robot code. Even if we don't want to use any close loop control on the talon. To me it looks like a no brainer method to avoid running out of ports. And I like having the option of running closed loop control on the talon if we so choose. We would have to purchase breakout boards/wires and figure out how to hook up the sensors directly to talons. Learning about that is the only downside I see so far(if you can call learning something new a downside).
Any other downsides?

Thanks.
-Maciej
Reply With Quote
  #2   Spotlight this post!  
Unread 01-02-2016, 10:12
JesseK's Avatar
JesseK JesseK is offline
Expert Flybot Crasher
FRC #1885 (ILITE)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2005
Location: Reston, VA
Posts: 3,624
JesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond repute
Re: pros/cons of wiring sensors to can talon srx

The only con I have comes from having to manage your code in two different places. Your PID tuning/etc comes from the Talon web interface, and the logic code comes from the robot code. Your robot code has to perform all boundary and logic checking prior to sending the desired position value to the SRX.

We have a filter for "maximum speed" on each mechanism as a safety when new kids are learning PID, and that filter is the last line of defense when things go awry.

Even with that said, this year we're putting sensors directly on the SRX's because we're attempting two things we've never done before: a double-jointed arm and a turret. Both are easily coded and tuned while physically off of the robot though.
__________________

Drive Coach, 1885 (2007-present)
CAD Library Updated 5/1/16 - 2016 Curie/Carver Industrial Design Winner
GitHub
Reply With Quote
  #3   Spotlight this post!  
Unread 01-02-2016, 20:01
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 521
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: pros/cons of wiring sensors to can talon srx

A lot of this is in the Talon SRX Software Reference Manual...
http://www.ctr-electronics.com/talon...ical_resources
Quote:
The only con I have comes from having to manage your code in two different places. Your PID tuning/etc comes from the Talon web interface, and the logic code comes from the robot code.
You can also set your gains using robot API(section 10 Talon SRX software ref manual). Also check out all of our examples on our github/software reference manual. Your post suggests that web-interface is the only way.
Quote:
We have a filter for "maximum speed" on each mechanism as a safety when new kids are learning PID, and that filter is the last line of defense when things go awry.
Talon SRX allows you to cap the maximal outputs during closed-loop (section 10.5). So that means you can do this with SRX Closed-Loop as well.
Quote:
Your robot code has to perform all boundary and logic checking prior to sending the desired position value to the SRX.
You mean you have to tell the Talon what position to servo to, which is correct. How else could that work?
Quote:
we can read these sensors using can talon class and use the values in our robot code. Even if we don't want to use any close loop control on the talon. To me it looks like a no brainer method to avoid running out of ports.
Section 16.9 talks about that a bit, but yep that's the point. Talons can be used to extend the number of inputs in your control system: limit switches, analog inputs, Pulse-width, and quadrature signals, and more to come. Checkout section 20.5 to tune how often signals get updated.

But I think you'll find the closed-loop examples available for Talon SRX will help quite a bit if you go that route.
Reply With Quote
  #4   Spotlight this post!  
Unread 01-02-2016, 20:04
sraque's Avatar
sraque sraque is offline
Registered User
AKA: Steve Raque
FRC #2614 (MARS)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2009
Location: Morgantown, WV
Posts: 79
sraque is on a distinguished road
Re: pros/cons of wiring sensors to can talon srx

We did what you are considering quite a bit this off season. There were no cons for us, although all the sensors are used by the SRX itself and we are getting informational values. Our RIO is almost bare this season!

The SRX manual talks quite a bit about update rates and monitoring the CAN bus for issues if you need to adjust the data rate back to the RIO for some reason.

Quote:
Originally Posted by JesseK View Post
The only con I have comes from having to manage your code in two different places. Your PID tuning/etc comes from the Talon web interface, and the logic code comes from the robot code.
Not true. You can do everything from within your robot code using the provided API.
Reply With Quote
  #5   Spotlight this post!  
Unread 01-02-2016, 22:45
kylelanman's Avatar
kylelanman kylelanman is offline
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 186
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: pros/cons of wiring sensors to can talon srx

One pro for us last year that we implemented mid season was wiring our limit switches for hard stops directly to the Talons.

Twice during the season we had our robot start turning on all the motors randomly in the middle of a match (possibly dead lock) One time a mechanism was damaged a bit because it didn't stop at the hard stop due to the limit switch not being checked. After this we wired the switch directly into the Talon. The next time the robot code crashed/locked up the mechanism still stopped properly when it hit the limit switch and didn't over run the hard stop.

From that experience we basically decided that limit switches for mechanisms that absolutely can not over run their hard stops will be directly wired to Talons to provide an extra level of protection if our code ever crashes or dead locks.
__________________
"May the coms be with you"

Is this a "programming error" or a "programmer error"?

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 03:44.

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