Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Low-cost Talon SRX computer? (http://www.chiefdelphi.com/forums/showthread.php?t=147704)

GeeTwo 24-04-2016 22:58

Low-cost Talon SRX computer?
 
As an off season project, I'd like to lead a build of a couple of the catapult concepts we had back around week 1 or 2 that we dropped because we didn't have any experience with them. Ideally, these would be standalone projects, with no drive system and a low-cost controller (e.g. arduino, rather than RoboRIO). One is essentially pneumatic, so we're ready to drive this with some relay modules. Another requires PID. I don't see any reason that a Talon SRX internal PID shouldn't fill the bill, but I really don't want to commit a RoboRIO to control the SRX over CAN. As controlling the SRX is a means rather than an end (our end is more mechanical), I'm hoping we can adapt a relatively inexpensive way to control an SRX via CAN. Arduino would be the preferred tool, as we have several Leonardo clones already in hand, but learning another infrastructure if needed is certainly acceptable.

A search for CAN bus shields turned up a number of shields with DB-15 ports to interface to vehicles. While this may be adaptable to our needs, it was not clear from a high-level read of their capabilities. I also found a number of really low cost devices which seemed to want to interface to something through IR, which didn't seem like the right answer.

Does anyone have an inexpensive (<$100, or at least < $200) way (both hardware and software) to control a Talon SRX (in encoder mode) which includes both driving at a specified speed and driving (a single encoder) to a "click count"?

asid61 24-04-2016 23:01

Re: Low-cost Talon SRX computer?
 
Old cRIOs from neighboring teams could do it, maybe.
The Arduino has some built-in PID libraries, if you want to go really cheap, but if you do go that route you wouldn't be using CAN and would probably need the Arduino Due for the processing power.

Ether 24-04-2016 23:02

Re: Low-cost Talon SRX computer?
 
Quote:

Originally Posted by GeeTwo (Post 1578473)
Does anyone have an inexpensive (<$100, or at least < $200) way (both hardware and software) to control a Talon SRX (in encoder mode) which includes both driving at a specified speed and driving (a single encoder) to a "click count"?

Have you asked Omar? He is usually very helpful.



GeeTwo 24-04-2016 23:03

Re: Low-cost Talon SRX computer?
 
Quote:

Originally Posted by asid61 (Post 1578475)
Old cRIOs from neighboring teams could do it, maybe.
The Arduino has some built-in PID libraries, if you want to go really cheap, but if you do go that route you wouldn't be using CAN and would probably need the Arduino Due for the processing power.

cRIOs introduce the same issue as RoboRIOs for this purpose - I'm looking for something else.

Edit: I considered using arduino-controlled PID, but I am concerned that this would not translate into a "proven FRC-capable solution" if it were to come up in future years. I'd rather solve this with basic programming of an SRX.


Quote:

Originally Posted by Ether (Post 1578476)
Have you asked Omar? He is usually very helpful.

No, I haven't asked him specifically, but I did spend a few minutes browsing ctr-electronics.

RufflesRidge 24-04-2016 23:07

Re: Low-cost Talon SRX computer?
 
The HERO is probably your best bet unless you want to be re-implementing/porting all of the software for communicating with the Talon: http://www.ctr-electronics.com/hro.html

Michael Hill 24-04-2016 23:20

Re: Low-cost Talon SRX computer?
 
If you're wanting to control over CAN, be wary of the security token put in the CAN bus every 100 msec (I believe that's still a thing). I don't believe it's part of the standard CAN protocol, so you may have to install the non-FRC firmware on the Talon (I assume that's one of the differences in the firmware). Someone who knows more about it should comment if this is the case.

GeeTwo 25-04-2016 00:16

Re: Low-cost Talon SRX computer?
 
Quote:

Originally Posted by RufflesRidge (Post 1578480)
The HERO is probably your best bet unless you want to be re-implementing/porting all of the software for communicating with the Talon: http://www.ctr-electronics.com/hro.html

Not that I really want to, but is there an inexpensive C# programming environment?

Quote:

Originally Posted by Michael Hill (Post 1578491)
If you're wanting to control over CAN, be wary of the security token put in the CAN bus every 100 msec (I believe that's still a thing). I don't believe it's part of the standard CAN protocol, so you may have to install the non-FRC firmware on the Talon (I assume that's one of the differences in the firmware). Someone who knows more about it should comment if this is the case.

Thanks for the reminder that FIRST always has a watchdog! I knew this, but hadn't considered it in this context.

cbale2000 25-04-2016 00:34

Re: Low-cost Talon SRX computer?
 
Quote:

Originally Posted by GeeTwo (Post 1578524)
Not that I really want to, but is there an inexpensive C# programming environment?

Microsoft Visual Studio is free for personal use and supports C# (amongst others):

https://www.visualstudio.com/vs-2015-product-editions

BeardyMentor 25-04-2016 07:36

Re: Low-cost Talon SRX computer?
 
There is an arduino CAN library http://www.chiefdelphi.com/forums/sh...d.php?t=145564

Greg McKaskle 25-04-2016 07:48

Re: Low-cost Talon SRX computer?
 
Your project is still shrouded in mystery, so my suggestions may not be that applicable. Here are my tinkering $.02.

1. The cheapest stuff is what you already have.
2. SRX are quite nice, but it is not hard to do PID on almost anything, and you'll learn and understand it better if you can see the response plots and understand what the control terms do.
3. A key part of engineering is transferring from a scale prototype to a full implementation. Or from one domain to another. You don't have to meet all constraints at once, especially if this is risky, so using a laptop and building a big one with the tools you have may be the quickest way to prove it works.

Then take what you learned and grow/shrink speed it up, make it cheaper, etc.

Yes, you can skip these steps, but many times, the optimization and lack of iteration drives you off course and gets in the way of other discoveries.

By the way, CTR provides non-FRC firmware that has no tokenization for safety.

Greg McKaskle

GeeTwo 25-04-2016 09:29

Re: Low-cost Talon SRX computer?
 
Quote:

Originally Posted by Greg McKaskle (Post 1578607)
Your project is still shrouded in mystery, so my suggestions may not be that applicable.

I wasn't intending to be mysterious. The PID controller would drive a (non-parallel) four-bar linkage similar to one I described in this post, though with a lever arm rather than a linear slide.

techhelpbb 25-04-2016 11:36

Re: Low-cost Talon SRX computer?
 
Is there a reason one couldn't use these IC to service the CAN requirement:
http://www.microchip.com/design-cent...heral-products

I'd be interested into doing this. I previously had some of this working with the Parallax Propeller but my code base for it is just a mess right now.

ozrien 25-04-2016 14:04

Re: Low-cost Talon SRX computer?
 
Hey All, Some answers below...

Quote:

Does anyone have an inexpensive (<$100, or at least < $200) way (both hardware and software) to control a Talon SRX (in encoder mode) which includes both driving at a specified speed and driving (a single encoder) to a "click count"?
We get this question a lot through our support email. This is one of the main reasons why we made the HERO development board.
http://www.ctr-electronics.com/hro.html
It's a C# based NETMF board that allows you to write/debug C# robot code (works with the free Visual Studio IDE/Debugger). This is where we add features to our CAN actuators first, test them, then port what makes sense to the FRC system.

Our C# library is open source so you can use it as a reference for porting the Talon library to whatever.
https://github.com/CrossTheRoadElec/HERO-SDK

Also, if you are married to another hardware platform (familiarly, preference, whatever) you should consider looking at HERO anyway as a tool to field-upgrade/set-IDs, and to get your robot moving immediately. Then you can begin your porting effort by studying our library.

If you happen to be at Worlds this week, check out our demos at our booth. We'll have at least one robot using HERO and Talons.

Quote:

Not that I really want to, but is there an inexpensive C# programming environment?
Visual Studio Community is free, see HERO User's Guide for installation steps.

Quote:

...be wary of the security token put in the CAN bus every 100 msec (I believe that's still a thing). ....
We have FRC and nonFRC firmware. FRC firmware requires a roboRIO that safely tells us that we can enable, nonFRC does not need the roboRIO to enable.
The firmware file is on our site, use a HERO or roboRIO to field-upgrade your Talons.

Quote:

A search for CAN bus shields turned up a number of shields
I've had a few customers do this. Typically they prove out what they want to do using HERO, then do a minimal port to Arduino/RaspPi/whatever. This is particularly helpful if you don't have a lot of flash on your platform.

I've also had a few customers just send high level commands to a HERO, which in turn updates the Talons (over UART or similar). See HERO User's Manual for serial example.

Andrew Schreiber 25-04-2016 14:19

Re: Low-cost Talon SRX computer?
 
Quote:

Originally Posted by ozrien (Post 1578782)
Hey All, Some answers below...


We get this question a lot through our support support. This is one of the main reasons why we made the HERO development board.
http://www.ctr-electronics.com/hro.html
It's a C# based NETMF board that allows you to write/debug C# robot code (works with the free Visual Studio IDE/Debugger). This is where we add features to our CAN actuators first, test them, then port what makes sense to the FRC system.

Our C# library is open source so you can use it as a reference for porting the Talon library to whatever.
https://github.com/CrossTheRoadElec/HERO-SDK

Also, if you are married to another hardware platform (familiarly, preference, whatever) you should consider looking at HERO anyway as a tool to field-upgrade/set-IDs, and to get your robot moving immediately. Then you can begin your porting effort by studying our library.

If you happen to be at Worlds this week, check out our demos at our booth. We'll have at least one robot using HERO and Talons.


Visual Studio Community is free, see HERO User's Guide for installation steps.


We have FRC and nonFRC firmware. FRC firmware requires a roboRIO that safely tells us that we can enable, nonFRC does not need the roboRIO to enable.
The firmware file is on our site, use a HERO or roboRIO to field-upgrade your Talons.


I've had a few customers do this. Typically they prove out what they want to do using HERO, then do a minimal port to Arduino/RaspPi/whatever. This is particularly helpful if you don't have a lot of flash on your platform.

I've also had a few customers just send high level commands to a HERO, which in turn updates the Talons (over UART or similar). See HERO User's Manual for serial example.

Omar, if we're not married to the idea of using Talons (cost/ more features than we need) how well would the Hero work for general purpose robot platform controller using, say Spark ESCs or for even lower load motors Vex Controller 29s.

FrankJ 25-04-2016 14:29

Re: Low-cost Talon SRX computer?
 
How difficult would it be to get Jaguars working through Hero on the CanBus? Does anybody know if the Jaguar firmware exists? We have a bunch of those sitting around. It would be great to have a test bed that connected them to a x-box controller.

I see there are 3 PWM outputs on the board. I suppose that would do about the same.


All times are GMT -5. The time now is 21:51.

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