Go to Post "The robot is horribly overweight. We need to delete some code" - Dumper FTW 435 [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-08-2016, 01:08
asid61's Avatar
asid61 asid61 is offline
Registered User
AKA: Anand Rajamani
FRC #0115 (MVRT)
Team Role: Mechanical
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Cupertino, CA
Posts: 2,214
asid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond repute
CAN to PWM converter?

After reading the recent thread on motor controller selection, I realized that if a poor-ish team wanted to use CAN they would have to drop $40 more than a SPARK to buy a Talon SRX. Does anybody know how one could have a separate PCB that would act as a CAN device and relay commands to a Spark or Victor SP as PWM? I anybody could help me with it/answer case-by-case questions (like how CAN commands would be set up, how to set up a particular chip) I would be very grateful.
__________________
<Now accepting CAD requests and commissions>

Reply With Quote
  #2   Spotlight this post!  
Unread 23-08-2016, 02:14
nickbrickmaster's Avatar
nickbrickmaster nickbrickmaster is offline
Captain
AKA: Nick Schatz
FRC #3184 (Blaze Robotics)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Eagan MN
Posts: 146
nickbrickmaster is an unknown quantity at this point
Re: CAN to PWM converter?

IIRC, the CAN protocol used for FRC is pretty heavily modified and kept under wraps to prevent tampering.

If you do somehow figure out the protocol, you would need to use a microprocessor to a. spoof a talon SRX and b. translate the commands into PWM values.

I can't really help you with anything, sorry. If you wanted to try to reverse-engineer the protocol, I would start with the firmware files, or maybe see if it's on robotpy's github.
__________________
I have approximate knowledge of many things.

FRC 3184: 2014-, FTC 10648: 2015-
Reply With Quote
  #3   Spotlight this post!  
Unread 23-08-2016, 08:51
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,893
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: CAN to PWM converter?

Current FRC rules would prohibit that anyway. R68 in 2016 rules. The usual caveat about future rules, but I don't see this changing. The device would be more than a simple convertor. It would have to read & respond to Canbus commands and the make a PWM output. Would still would not get the advantages of the additional modes in the native Canbus motor controler By the time you made that, you would have covered the gap to the Talon.

If you just want Canbus, a cheaper solution might be to find used Jaguars. They have a somewhat undeserved bad reputation.
__________________
If you don't know what you should hook up then you should read a data sheet

Last edited by FrankJ : 23-08-2016 at 09:46.
Reply With Quote
  #4   Spotlight this post!  
Unread 23-08-2016, 09:15
Chris is me's Avatar
Chris is me Chris is me is offline
no bag, vex only, final destination
AKA: Pinecone
FRC #0228 (GUS Robotics); FRC #2170 (Titanium Tomahawks)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Glastonbury, CT
Posts: 7,601
Chris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond repute
Send a message via AIM to Chris is me
Re: CAN to PWM converter?

I don't understand why someone would want to do this. Can you elaborate on the advantage?
__________________
Mentor / Drive Coach: 228 (2016-?)
...2016 Waterbury SFs (with 3314, 3719), RIDE #2 Seed / Winners (with 1058, 6153), Carver QFs (with 503, 359, 4607)
Mentor / Consultant Person: 2170 (2017-?)
---
College Mentor: 2791 (2010-2015)
...2015 TVR Motorola Quality, FLR GM Industrial Design
...2014 FLR Motorola Quality / SFs (with 341, 4930)
...2013 BAE Motorola Quality, WPI Regional #1 Seed / Delphi Excellence in Engineering / Finalists (with 20, 3182)
...2012 BAE Imagery / Finalists (with 1519, 885), CT Xerox Creativity / SFs (with 2168, 118)
Student: 1714 (2009) - 2009 Minnesota 10,000 Lakes Regional Winners (with 2826, 2470)
2791 Build Season Photo Gallery - Look here for mechanism photos My Robotics Blog (Updated April 11 2014)
Reply With Quote
  #5   Spotlight this post!  
Unread 23-08-2016, 09:18
ASD20's Avatar
ASD20 ASD20 is offline
Registered User
AKA: Andrew
FRC #4761 (The Robockets)
Team Role: College Student
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Reading, MA
Posts: 271
ASD20 has much to be proud ofASD20 has much to be proud ofASD20 has much to be proud ofASD20 has much to be proud ofASD20 has much to be proud ofASD20 has much to be proud ofASD20 has much to be proud ofASD20 has much to be proud ofASD20 has much to be proud of
Re: CAN to PWM converter?

Quote:
Originally Posted by Chris is me View Post
I don't understand why someone would want to do this. Can you elaborate on the advantage?
I'm guessing the main one is that a poorer team would not have to buy all new motor controllers if they wanted to connect everything with CAN
__________________

Reply With Quote
  #6   Spotlight this post!  
Unread 23-08-2016, 09:35
Chris is me's Avatar
Chris is me Chris is me is offline
no bag, vex only, final destination
AKA: Pinecone
FRC #0228 (GUS Robotics); FRC #2170 (Titanium Tomahawks)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Glastonbury, CT
Posts: 7,601
Chris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond repute
Send a message via AIM to Chris is me
Re: CAN to PWM converter?

Quote:
Originally Posted by ASD20 View Post
I'm guessing the main one is that a poorer team would not have to buy all new motor controllers if they wanted to connect everything with CAN
I mean, what is the advantage of using CAN on a motor controller that does not support it? You don't get any of the cool CAN-only features of the Talon that way. I'm not the most electrical / software guy so I think I'm missing something here.
__________________
Mentor / Drive Coach: 228 (2016-?)
...2016 Waterbury SFs (with 3314, 3719), RIDE #2 Seed / Winners (with 1058, 6153), Carver QFs (with 503, 359, 4607)
Mentor / Consultant Person: 2170 (2017-?)
---
College Mentor: 2791 (2010-2015)
...2015 TVR Motorola Quality, FLR GM Industrial Design
...2014 FLR Motorola Quality / SFs (with 341, 4930)
...2013 BAE Motorola Quality, WPI Regional #1 Seed / Delphi Excellence in Engineering / Finalists (with 20, 3182)
...2012 BAE Imagery / Finalists (with 1519, 885), CT Xerox Creativity / SFs (with 2168, 118)
Student: 1714 (2009) - 2009 Minnesota 10,000 Lakes Regional Winners (with 2826, 2470)
2791 Build Season Photo Gallery - Look here for mechanism photos My Robotics Blog (Updated April 11 2014)
Reply With Quote
  #7   Spotlight this post!  
Unread 23-08-2016, 10:25
nickbrickmaster's Avatar
nickbrickmaster nickbrickmaster is offline
Captain
AKA: Nick Schatz
FRC #3184 (Blaze Robotics)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Eagan MN
Posts: 146
nickbrickmaster is an unknown quantity at this point
Re: CAN to PWM converter?

Quote:
Originally Posted by Chris is me View Post
I mean, what is the advantage of using CAN on a motor controller that does not support it? You don't get any of the cool CAN-only features of the Talon that way. I'm not the most electrical / software guy so I think I'm missing something here.
The advantage I see is being able to connect all your devices in sequence.
__________________
I have approximate knowledge of many things.

FRC 3184: 2014-, FTC 10648: 2015-
Reply With Quote
  #8   Spotlight this post!  
Unread 23-08-2016, 14:31
asid61's Avatar
asid61 asid61 is offline
Registered User
AKA: Anand Rajamani
FRC #0115 (MVRT)
Team Role: Mechanical
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Cupertino, CA
Posts: 2,214
asid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond repute
Re: CAN to PWM converter?

Quote:
Originally Posted by Chris is me View Post
I mean, what is the advantage of using CAN on a motor controller that does not support it? You don't get any of the cool CAN-only features of the Talon that way. I'm not the most electrical / software guy so I think I'm missing something here.
Mostly just the ease of wiring. Plus, if you already own PWM motor controllers, if one can make a CAN-PWM converter for $2 or $3, it's not a bad investment to purchase them instead of SRXs. Personally, if I wanted to do CAN control the next year, I would rather purchase a few converters before jumping on SRXs; SRXs could be used for the motion profiling, and the converters for less critical applications.

That being said, if I could get a converter working, then it's possible to increase the size of the microcontroller and add support for PID or something, although at that point we're getting into SRX territory anyway. Kind of unfortunate that the rules disallow it, although the rule makes sense.
__________________
<Now accepting CAD requests and commissions>

Reply With Quote
  #9   Spotlight this post!  
Unread 23-08-2016, 14:37
AdamHeard's Avatar
AdamHeard AdamHeard is offline
Lead Mentor
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Atascadero
Posts: 5,494
AdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond repute
Send a message via AIM to AdamHeard
Re: CAN to PWM converter?

Quote:
Originally Posted by asid61 View Post
Mostly just the ease of wiring. Plus, if you already own PWM motor controllers, if one can make a CAN-PWM converter for $2 or $3, it's not a bad investment to purchase them instead of SRXs. Personally, if I wanted to do CAN control the next year, I would rather purchase a few converters before jumping on SRXs; SRXs could be used for the motion profiling, and the converters for less critical applications.

That being said, if I could get a converter working, then it's possible to increase the size of the microcontroller and add support for PID or something, although at that point we're getting into SRX territory anyway. Kind of unfortunate that the rules disallow it, although the rule makes sense.
if it were a COTS converter for FRC it would likely be in the $20-30 range (if not more).

You also give up most of the usefulness of CAN while doubling your number of control system connections.
Reply With Quote
  #10   Spotlight this post!  
Unread 23-08-2016, 14:52
Chris is me's Avatar
Chris is me Chris is me is offline
no bag, vex only, final destination
AKA: Pinecone
FRC #0228 (GUS Robotics); FRC #2170 (Titanium Tomahawks)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Glastonbury, CT
Posts: 7,601
Chris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond repute
Send a message via AIM to Chris is me
Re: CAN to PWM converter?

Quote:
Originally Posted by asid61 View Post
Mostly just the ease of wiring. Plus, if you already own PWM motor controllers, if one can make a CAN-PWM converter for $2 or $3, it's not a bad investment to purchase them instead of SRXs..
I don't think people actually invest in the SRXs simply because they prefer the wiring layout of a CAN system. If you're using SRXs and CAN, it's to take advantage of the features that require the CAN bus (e.g. PID). These features don't become a thing on other speed controllers just by converting PWM to CAN. It's not a good idea.
__________________
Mentor / Drive Coach: 228 (2016-?)
...2016 Waterbury SFs (with 3314, 3719), RIDE #2 Seed / Winners (with 1058, 6153), Carver QFs (with 503, 359, 4607)
Mentor / Consultant Person: 2170 (2017-?)
---
College Mentor: 2791 (2010-2015)
...2015 TVR Motorola Quality, FLR GM Industrial Design
...2014 FLR Motorola Quality / SFs (with 341, 4930)
...2013 BAE Motorola Quality, WPI Regional #1 Seed / Delphi Excellence in Engineering / Finalists (with 20, 3182)
...2012 BAE Imagery / Finalists (with 1519, 885), CT Xerox Creativity / SFs (with 2168, 118)
Student: 1714 (2009) - 2009 Minnesota 10,000 Lakes Regional Winners (with 2826, 2470)
2791 Build Season Photo Gallery - Look here for mechanism photos My Robotics Blog (Updated April 11 2014)
Reply With Quote
  #11   Spotlight this post!  
Unread 23-08-2016, 14:57
asid61's Avatar
asid61 asid61 is offline
Registered User
AKA: Anand Rajamani
FRC #0115 (MVRT)
Team Role: Mechanical
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Cupertino, CA
Posts: 2,214
asid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond repute
Re: CAN to PWM converter?

Quote:
Originally Posted by AdamHeard View Post
if it were a COTS converter for FRC it would likely be in the $20-30 range (if not more).

You also give up most of the usefulness of CAN while doubling your number of control system connections.
Forgive me, but I don't know enough about CAN to see where $20 to $30 came from. I was looking up general-purpose CAN controllers and microcontrollers and found options in the $1-3 range, and PCBs should only cost $1-2 tops. What would drive up the cost?

Quote:
Originally Posted by Chris is me View Post
I don't think people actually invest in the SRXs simply because they prefer the wiring layout of a CAN system. If you're using SRXs and CAN, it's to take advantage of the features that require the CAN bus (e.g. PID). These features don't become a thing on other speed controllers just by converting PWM to CAN. It's not a good idea.
That's pretty fair. But if you could do it for cheap or wanted to try out CAN in general, a cheap converter would be useful. Plus, it would be easy to go from converter to SRX without changing much code.
__________________
<Now accepting CAD requests and commissions>

Reply With Quote
  #12   Spotlight this post!  
Unread 23-08-2016, 15:02
AdamHeard's Avatar
AdamHeard AdamHeard is offline
Lead Mentor
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Atascadero
Posts: 5,494
AdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond repute
Send a message via AIM to AdamHeard
Re: CAN to PWM converter?

Quote:
Originally Posted by asid61 View Post
Forgive me, but I don't know enough about CAN to see where $20 to $30 came from. I was looking up general-purpose CAN controllers and microcontrollers and found options in the $1-3 range, and PCBs should only cost $1-2 tops. What would drive up the cost?



That's pretty fair. But if you could do it for cheap or wanted to try out CAN in general, a cheap converter would be useful. Plus, it would be easy to go from converter to SRX without changing much code.
Not all of the profit in the per item reference frame goes to the overall business profit... Most of it is eaten up by salaries of engineers, warehouse, quality control, support etc...

I know nothing about the COTS FRC Market, but I wouldn't be surprised if the per item cost on a Talon SRX is in the $20-40 range.They need to sell it at $90 to cover all the overhead and still make a profit.
Reply With Quote
  #13   Spotlight this post!  
Unread 23-08-2016, 16:11
Andrew Schreiber Andrew Schreiber is offline
Data Nerd
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,055
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: CAN to PWM converter?

Quote:
Originally Posted by asid61 View Post
Forgive me, but I don't know enough about CAN to see where $20 to $30 came from. I was looking up general-purpose CAN controllers and microcontrollers and found options in the $1-3 range, and PCBs should only cost $1-2 tops. What would drive up the cost?



That's pretty fair. But if you could do it for cheap or wanted to try out CAN in general, a cheap converter would be useful. Plus, it would be easy to go from converter to SRX without changing much code.
PCB fabrication is cheap, populating it? Less so. Add in a case, quality control, development costs... I've got a hunch COTS would be in that range if not a little higher.
__________________




.
Reply With Quote
  #14   Spotlight this post!  
Unread 24-08-2016, 08:56
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,893
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: CAN to PWM converter?

Not to mention programing & design time. If you are doing it as a hobby or have students do as a project that might not be much of an issue. If you have to actually pay your programmers and engineers, it starts to add up. Quite expensive for a prototype or small production run. Obviously the per unit costs come down with the more you make.
__________________
If you don't know what you should hook up then you should read a data sheet
Reply With Quote
  #15   Spotlight this post!  
Unread 23-08-2016, 14:53
MichaelBick MichaelBick is offline
Registered User
FRC #1836 (MilkenKnights)
Team Role: Alumni
 
Join Date: Oct 2011
Rookie Year: 2010
Location: Los Angeles
Posts: 733
MichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant future
Re: CAN to PWM converter?

Quote:
Originally Posted by asid61 View Post
Mostly just the ease of wiring
I'm going to agree with Adam here and add on. One of the bigger negatives of CAN is that if your first connection in the daisy chain fails, all of your motor controllers go down. Although CAN seems like the easier method of wiring motor controllers, it has its fair share of issues.
__________________
Team 1836 - The Milken Knights
2013 LA Regional Champions with 1717 and 973
2012 LA Regional Finalists with 294 and 973
To follow Team 1836 on Facebook, go to http://www.facebook.com/MilkenKnights
To go to our website, go to http://milkenknights.com/index.html
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 08:15.

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