Go to Post Another team update, another change in the definition of a rope - Hallry [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 08-06-2015, 16:15
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Arduino Micro with Talon SR

Quote:
Originally Posted by Rman1923 View Post
Does anyone know how to calibrate the SR so it doesn't go reverse
Quote:
Originally Posted by emileh3467 View Post
Here are the calibration instructions...
So, using the instructions you posted, how would you propose to "calibrate the SR so it doesn't go reverse" ?



  #17   Spotlight this post!  
Unread 08-06-2015, 16:19
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Arduino Micro with Talon SR

Quote:
Originally Posted by Rman1923 View Post
Does anyone know how to calibrate the SR so it doesn't go reverse, I'm making an electric skateboard and don't plan to parallel park.
You can't "calibrate" it to only go one direction. If you try giving it only forward commands while calibrating it, the procedure will fail and the calibration will not be changed. The Talon SR doesn't have limit switch inputs, so the simple option of permanently activating the "reverse" limit is not available either.

The obvious answer is just to only send it "forward" commands, using pulse widths between 1.5 and 2.0 milliseconds. Never give it anything less than 1.5 milliseconds, and it will never go in reverse.
  #18   Spotlight this post!  
Unread 08-06-2015, 16:26
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,385
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Arduino Micro with Talon SR

Quote:
Originally Posted by AdamHeard View Post
I'd skip the servo function and instead use servo.writeMicroseconds.

Cleaner control numerically.

1000 is rev, 1500 neutral, 2000 forward.
Quote:
Originally Posted by AdamHeard View Post
You're missing what I'm saying. servo.write() takes 0 to 180 degrees as an input and controls a "Servo". servo.writeMicroseconds() explicitly takes the pulse you would like to generate, which for a talon is 1000-2000 w/ 1500 at center. This leaves you a nice +/- 500 integer swing for clean math.
This is my experience as well. I do it this way because I get higher resolution of the command signal. It allows more precise control of the motor or servo.
Now, if you only need +/- 90 steps instead of +/- 500, then using servo.writeMicroseconds has no advantage.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
  #19   Spotlight this post!  
Unread 08-06-2015, 16:59
Andrew Schreiber Andrew Schreiber is offline
Joining the 900 Meme Team
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,080
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: Arduino Micro with Talon SR

Quote:
Originally Posted by billbo911 View Post
This is my experience as well. I do it this way because I get higher resolution of the command signal. It allows more precise control of the motor or servo.
Now, if you only need +/- 90 steps instead of +/- 500, then using servo.writeMicroseconds has no advantage.
Does the Talon actually respond with that granularity? I recall seeing a post years back about the old Vic 884s that basically said they only had 90-odd actual values and the rest were just duplicates.
__________________




.
  #20   Spotlight this post!  
Unread 08-06-2015, 17:38
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,526
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: Arduino Micro with Talon SR

Quote:
Originally Posted by Andrew Schreiber View Post
Does the Talon actually respond with that granularity? I recall seeing a post years back about the old Vic 884s that basically said they only had 90-odd actual values and the rest were just duplicates.
I'm looking now and not finding where I read this (so it may be false), but I believe the talons interpret the pwm input as a 10 bit number, so roughly 1:1 mapping over that 1000-2000 range.
  #21   Spotlight this post!  
Unread 08-06-2015, 18:22
josesantos's Avatar
josesantos josesantos is offline
Mentor; Former Design Chairman
FRC #0687 (Nerd Herd) (VRC #687z) & FRC #5499 (BHS Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Carson, CA/Berkeley, CA
Posts: 43
josesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond repute
Re: Arduino Micro with Talon SR

Quote:
Originally Posted by AdamHeard View Post
I'm looking now and not finding where I read this (so it may be false), but I believe the talons interpret the pwm input as a 10 bit number, so roughly 1:1 mapping over that 1000-2000 range.
Yeah, user manual says 10-bit (1024 steps)
__________________
CAMS Robotics, FIRST Team 687 The Nerd Herd 2010-Present
College Mentor 2013-Present // Design Chairman 2012-2013
Berkeley High Robotics, FIRST Team 5499 2014-Present
College Mentor 2014-Present
  #22   Spotlight this post!  
Unread 09-06-2015, 17:19
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 358
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: Arduino Micro with Talon SR

You can also specify the servo min and max pulse widths in the attach call:

Servo driveServo;
driveServo.attach(3, 1000, 2000); // TALON // widths are in micro-seconds

Then use servo.Write() 0 is reverse, 90 is stop, and 180 is full forward.

I would still calibrate the Talon (or other motor controller) to ensure it goes full speed. Write an arduino sketch that starts at neutral and waits for a character to arrive from the serial port. Then have it switch to servo to full speed forward, wait for another character and then go full reverse. After waiting for another character, go to neutral. Use Serial.Print to tell the user whats going on and prompt for a character. If you use the serial port monitor in the arduino IDE, you will have to click the "Send" button after each key.

One other thing: I put a 330 ohm resistor in series with the white wire driving the PWM input on the Talon so it doesn't try to drive too much current through its input opto-isolator.
__________________
Brian K
Team 1225 Robotics Mentor
  #23   Spotlight this post!  
Unread 09-06-2015, 17:34
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,526
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: Arduino Micro with Talon SR

Quote:
Originally Posted by SuperBK View Post
You can also specify the servo min and max pulse widths in the attach call:

Servo driveServo;
driveServo.attach(3, 1000, 2000); // TALON // widths are in micro-seconds

Then use servo.Write() 0 is reverse, 90 is stop, and 180 is full forward.
Why do this versus explicitly writing the 1000 to 2000 range?
  #24   Spotlight this post!  
Unread 09-06-2015, 18:00
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,725
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Arduino Micro with Talon SR

Quote:
Originally Posted by AdamHeard View Post
Why do this versus explicitly writing the 1000 to 2000 range?
If you were using something other than a Talon, you would only have to change the initial attach call; the rest of the code wouldn't need to be modified. For example, a jaguar would be attached with:
Code:
driveServo.attach(3, 670, 2330); // Jaguar
Of course, for a motor controller, you'd ideally like the input limits to be a float ranging from -1 to +1.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
  #25   Spotlight this post!  
Unread 09-06-2015, 18:00
Rman1923's Avatar
Rman1923 Rman1923 is offline
Registered User
AKA: Rohan Chatterjee
FRC #1923 (The MidKnight Inventors)
Team Role: Leadership
 
Join Date: May 2013
Rookie Year: 2013
Location: Plainsboro, NJ
Posts: 48
Rman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond repute
Re: Arduino Micro with Talon SR

Quote:
Originally Posted by SuperBK View Post
You can also specify the servo min and max pulse widths in the attach call:

Servo driveServo;
driveServo.attach(3, 1000, 2000); // TALON // widths are in micro-seconds

Then use servo.Write() 0 is reverse, 90 is stop, and 180 is full forward.

I would still calibrate the Talon (or other motor controller) to ensure it goes full speed. Write an arduino sketch that starts at neutral and waits for a character to arrive from the serial port. Then have it switch to servo to full speed forward, wait for another character and then go full reverse. After waiting for another character, go to neutral. Use Serial.Print to tell the user whats going on and prompt for a character. If you use the serial port monitor in the arduino IDE, you will have to click the "Send" button after each key.

One other thing: I put a 330 ohm resistor in series with the white wire driving the PWM input on the Talon so it doesn't try to drive too much current through its input opto-isolator.
This is pretty cool, I'm going to try this. Do you think if I mod the servo call to attach(1500,2000) it will only go forward? Also, I can just do the digitalwrite() function to control this right?
Thanks!
__________________

My posts do not reflect the values and opinions of my team
Build Co-Captain for The MidKnight Inventors
FLL Mentor for The Robot MasterMinds

FTC Student Mentor for MidKnight Magic

2015 Dean's List Finalist
  #26   Spotlight this post!  
Unread 09-06-2015, 19:23
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,526
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: Arduino Micro with Talon SR

Quote:
Originally Posted by GeeTwo View Post
If you were using something other than a Talon, you would only have to change the initial attach call; the rest of the code wouldn't need to be modified. For example, a jaguar would be attached with:
Code:
driveServo.attach(3, 670, 2330); // Jaguar
Of course, for a motor controller, you'd ideally like the input limits to be a float ranging from -1 to +1.
Depending on how fast all this is running (and what else is going on) using floats may be out of the question due to the slower math.
  #27   Spotlight this post!  
Unread 09-06-2015, 20:56
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,725
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Arduino Micro with Talon SR

Quote:
Originally Posted by AdamHeard View Post
Depending on how fast all this is running (and what else is going on) using floats may be out of the question due to the slower math.
I did say ideally!

I'm fully aware of the need to program for integers in some cases. I even wrote a fully integer semi-swerve drive inverse kinematics a few years ago. My semi-swerve platform was about 1/3 FRC scale, with a 0-180 degree maximum steering angle steered by servos, and 25mm 1000rpm gear motors for drive, and yes, it was controlled with an Arduino. Unfortunately, the only hard drive that the code was on has since died. The key was that I wrote a hypoti(x,y) subroutine that calculated an integer hypotenuse using max(x, y) and the ratio 256 * min(x,y) / max(x,y) (where x and y were preprocessed to be non-negative), and an atan2id(y,x) that returned atan2(y,x) in degrees based on the same ratio, whether abs(x) or abs(y) was larger, and the two input signs. IIRC, the atan2id() routine had two separate cubic fits to cover the span from 0 to 45 degrees, that broke based on whether 2*min(x,y)/max(x,y) was 0 or 1 (that is, at about 28.8 degrees).
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
  #28   Spotlight this post!  
Unread 13-06-2015, 01:37
teslalab2's Avatar
teslalab2 teslalab2 is offline
RogueBotix LLC
VRC #8091
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2014
Location: Austin MN
Posts: 109
teslalab2 will become famous soon enoughteslalab2 will become famous soon enough
Re: Arduino Micro with Talon SR

Quote:
Originally Posted by Rman1923 View Post
Thanks All, I figured it out, you have to connect the red to the VCC (5V or 3.3V depending on the board) black to ground and then the white one to a PWM pin. I used the Servo library and read the vals from a potentiameter and fed them to the talon during calibration. Now if i could get the underglow working...
you don't believe me when I say power is not connected to anything? just trying to save trouble, it really only needs signal and ground. red serves no purpose and is no internally hooked up to anything inside that talon
__________________
I need a jaguar development board for reprogramming a jaguars bootloader. if you have one that you want to sell, pm me. thanks

Run you CanJaguars on arduino with ArduRIO, you can also easily control Talons, Victors,Jaguars and Sparks on PWM. https://sourceforge.net/projects/ardurio/
  #29   Spotlight this post!  
Unread 13-06-2015, 23:30
Rman1923's Avatar
Rman1923 Rman1923 is offline
Registered User
AKA: Rohan Chatterjee
FRC #1923 (The MidKnight Inventors)
Team Role: Leadership
 
Join Date: May 2013
Rookie Year: 2013
Location: Plainsboro, NJ
Posts: 48
Rman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond reputeRman1923 has a reputation beyond repute
Re: Arduino Micro with Talon SR

Quote:
Originally Posted by teslalab2 View Post
you don't believe me when I say power is not connected to anything? just trying to save trouble, it really only needs signal and ground. red serves no purpose and is no internally hooked up to anything inside that talon
Actually, I had it set up without red, but then the talon didn't work. The PWM powers as well as controls the talon. The talon is not (and can't be) powered by the input voltage. It confused me at first as well lol.
__________________

My posts do not reflect the values and opinions of my team
Build Co-Captain for The MidKnight Inventors
FLL Mentor for The Robot MasterMinds

FTC Student Mentor for MidKnight Magic

2015 Dean's List Finalist
  #30   Spotlight this post!  
Unread 14-06-2015, 17:16
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Arduino Micro with Talon SR

Quote:
Originally Posted by Rman1923 View Post
Actually, I had it set up without red, but then the talon didn't work. The PWM powers as well as controls the talon. The talon is not (and can't be) powered by the input voltage. It confused me at first as well lol.
Unless your Talon differs from every one I have ever seen, you are mistaken. The center pin on the Talon's PWM connector is not connected to anything inside it. The Talons (and Victors, and Jaguars) are indeed powered by the same input voltage that is routed (and regulated) to the motor outputs.
Closed Thread


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 11:08.

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