Go to Post I think that everyone should just take a step back and look at the whole picture, FIRST is a family, not an organization full of regions, we all try to help each other, not 'cause it benefits us, but because it's graciously proffesional. - Mike Schroeder [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
  #1   Spotlight this post!  
Unread 17-01-2016, 17:44
dradel's Avatar
dradel dradel is offline
Registered User
FRC #4557 (Full Metal Falcons)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: CT
Posts: 405
dradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to behold
Measuring RPM

Was wondering if it would be possible to measure and set shooter wheel rpm with a vex versa encoder?
  #2   Spotlight this post!  
Unread 17-01-2016, 17:51
nandeeka's Avatar
nandeeka nandeeka is offline
Registered User
FRC #1868
Team Role: Programmer
 
Join Date: May 2014
Rookie Year: 2013
Location: United States
Posts: 53
nandeeka is on a distinguished road
Re: Measuring RPM

Yes, it is possible. For measuring, you can divide encoder ticks/distance by time. For setting the speed, you can use a PID control loop to PID your motor speed based on feedback from your encoders.
  #3   Spotlight this post!  
Unread 17-01-2016, 17:53
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Measuring RPM

From the specs on their website: (http://www.vexrobotics.com/276-2156.html)

Quote:
The optical shaft encoder can detect up to 1,700 pulses per second, which corresponds to 18.9 revolutions per second and 1,133 rpm (revolutions per minute). Faster revolutions will therefore not be interpreted exactly, potentially resulting in erroneous positional data being passed to the microcontroller.
So the maximum speed of the shaft being measured is 1133 RPM. Assuming you are spinning something faster, you will have to change the rotation speed of the shaft you are measuring.
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
  #4   Spotlight this post!  
Unread 17-01-2016, 17:57
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,517
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Measuring RPM

He may have been talking about the integrated vex versaplanetary stage with encoder from CTRE. I believe that can measure up to 15,000 rpm depending on the method you use (pwm or dio).
  #5   Spotlight this post!  
Unread 17-01-2016, 17:58
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Measuring RPM

Quote:
Originally Posted by Tom Line View Post
He may have been talking about the integrated vex versaplanetary stage with encoder from CTRE. I believe that can measure up to 15,000 rpm depending on the method you use (pwm or dio).
Ah, my mistake. If that's the case, disregard my post.
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
  #6   Spotlight this post!  
Unread 17-01-2016, 18:01
dradel's Avatar
dradel dradel is offline
Registered User
FRC #4557 (Full Metal Falcons)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: CT
Posts: 405
dradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to behold
We are using a wheeled shooter this year, and I am thinking to have a repeatable shot the wheels need to spin at same rate every time so was thinking using the versa planetary encoder to read and set rpm on the wheels
  #7   Spotlight this post!  
Unread 17-01-2016, 18:06
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Measuring RPM

Quote:
Originally Posted by dradel View Post
We are using a wheeled shooter this year, and I am thinking to have a repeatable shot the wheels need to spin at same rate every time so was thinking using the versa planetary encoder to read and set rpm on the wheels
Yes, you do need a feedback mechanism to control the speed of the shooter wheel. Just always setting the motor value to ".75" or what have you, won't work, as the actual speed will fluctuate.

To control the RPM, you can use a variety of methods. One method is Bang-Bang (what we used in 2012) and a whitepaper can be found here.

Another option is to create a PID loop that runs on the roboRIO.

Another option, at least in years past, was to feed the encoder values directly to a Jaguar, and the Jaguar would run the PID loop for you after you give it a set point. I am not sure what the equivalent motor controller of today is that can do that, however.
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
  #8   Spotlight this post!  
Unread 17-01-2016, 18:17
nandeeka's Avatar
nandeeka nandeeka is offline
Registered User
FRC #1868
Team Role: Programmer
 
Join Date: May 2014
Rookie Year: 2013
Location: United States
Posts: 53
nandeeka is on a distinguished road
Re: Measuring RPM

Another option would be for the speed to be controlled by a dial on the driver's station. You could play with the dial as needed, even during the match, if you are having issues.

Even if you do not decide to use this method in competition, it might be a good way to figure out what speed you want in the first place and then use a Bang-Bang controller or PID loop to control on-field.
  #9   Spotlight this post!  
Unread 17-01-2016, 18:21
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Measuring RPM

Quote:
Originally Posted by nandeeka View Post
Another option would be for the speed to be controlled by a dial on the driver's station. You could play with the dial as needed, even during the match, if you are having issues.

Even if you do not decide to use this method in competition, it might be a good way to figure out what speed you want in the first place and then use a Bang-Bang controller or PID loop to control on-field.
You still need a way to control and verify that what your dial is setting, is actually being run on the robot.

We did do something similar in 2012 though. After our camera tracked the target, and fed the shooter a setpoint value, we had 2 buttons on our joystick that would increase the RPM setpoint by 50, or decrease it by 50.
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
  #10   Spotlight this post!  
Unread 17-01-2016, 18:27
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,517
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Measuring RPM

In the case that you are unable to create a speed control routine in code, you actually can do a reasonably good job just by accounting for the battery voltage.

The major contributor to speed fluctuations of your wheel will be battery voltage, assuming that your motor and mechanical system don't change. By simply multiplying the amount your drive your shooter wheels by the % of battery voltage you can actually do a reasonably good job of keeping the motor at the same speed.

That said, if you use the "I" value in PiD, you can do a pretty good simple speed controller.
  #11   Spotlight this post!  
Unread 17-01-2016, 18:36
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,067
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: Measuring RPM

Quote:
Originally Posted by nighterfighter View Post
Another option is to create a PID loop that runs on the roboRIO.
Yet another option would be TBH.

Quote:
Another option, at least in years past, was to feed the encoder values directly to a Jaguar, and the Jaguar would run the PID loop for you after you give it a set point. I am not sure what the equivalent motor controller of today is that can do that, however.
Talon SRX has built-in PIDF (Proportional/Integral/Derivative/Feedforward) if used in CAN mode.


  #12   Spotlight this post!  
Unread 17-01-2016, 19:04
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: 522
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Measuring RPM

In case you do decide to use the velocity Closed-loop in Talon SRX, checkout section 12.4 for a Java walk-through of Velocity-closed-loop.

http://www.ctr-electronics.com/talon...ical_resources

Also source here...
https://github.com/ozrien/FRC-Exampl...bot/Robot.java
  #13   Spotlight this post!  
Unread 17-01-2016, 20:19
dradel's Avatar
dradel dradel is offline
Registered User
FRC #4557 (Full Metal Falcons)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: CT
Posts: 405
dradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to behold
We are using srx speed controllers.
  #14   Spotlight this post!  
Unread 17-01-2016, 20:21
dradel's Avatar
dradel dradel is offline
Registered User
FRC #4557 (Full Metal Falcons)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: CT
Posts: 405
dradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to behold
I should also include that we are using lab view
  #15   Spotlight this post!  
Unread 17-01-2016, 20:23
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Measuring RPM

Quote:
Originally Posted by dradel View Post
We are using srx speed controllers.
Then it might be worth trying out the SRX closed loop control; Should be simpler than implementing it yourself.

I am not versed with LabView, but I'm sure someone can help you with that.
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
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 16:00.

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