Go to Post Desperation is the mother of accomplishment. - Koko Ed [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 04-03-2013, 00:52
DampRobot's Avatar
DampRobot DampRobot is offline
Physics Major
AKA: Roger Romani
FRC #0100 (The Wildhats) and FRC#971 (Spartan Robotics)
Team Role: College Student
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Stanford University
Posts: 1,277
DampRobot has a reputation beyond reputeDampRobot has a reputation beyond reputeDampRobot has a reputation beyond reputeDampRobot has a reputation beyond reputeDampRobot has a reputation beyond reputeDampRobot has a reputation beyond reputeDampRobot has a reputation beyond reputeDampRobot has a reputation beyond reputeDampRobot has a reputation beyond reputeDampRobot has a reputation beyond reputeDampRobot has a reputation beyond repute
Re: Shooter consistency

Be fair warned, our software folk had a ton of trouble with the battery voltage dropping too low when we used the KOP photogates, to then point where they gave bad data. We were running 2 CIMs on our shooter, and the voltage the sensors were seeing dropped from 13v to 10v when we spun them up to full speed.
__________________
The mind is not a vessel to be filled, but a fire to be lighted.

-Plutarch
Reply With Quote
  #17   Spotlight this post!  
Unread 04-03-2013, 00:58
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,098
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: Shooter consistency

Quote:
Originally Posted by Kevin Sevcik View Post
Yes, though it's a little slow. You typically need a pretty wide stripe to get it to work. Too narrow a stripe and it won't register. Practically speaking, you can make the stripe take up half of whatever surface you're sensing and it'll work fine.
FWIW, the Rockwell catalog for the 42EF model sensor lists the "Response Time" as "1 to 16 ms".

It's not clear whether those numbers mean
a) the pulse width must be 1 to 16ms in order to be reliably detected, or

b) it takes the sensor 1 to 16ms to respond to a pulse (and the required pulse width is left unspecified, or

c) something else.

You need the stripe width to be 1/12 of a revolution at the point of sensing in order for it to be under the sensor for 1ms when the wheel is spinning at 5000 rpm.


Reply With Quote
  #18   Spotlight this post!  
Unread 04-03-2013, 01:04
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,098
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: Shooter consistency

Quote:
Originally Posted by DampRobot View Post
our software folk had a ton of trouble with the battery voltage dropping too low when we used the KOP photogates,
Read the last two paragraphs on page 2

Not sure if this rule exception is valid in 2013.



Last edited by Ether : 04-03-2013 at 01:08.
Reply With Quote
  #19   Spotlight this post!  
Unread 04-03-2013, 08:24
thefro526's Avatar
thefro526 thefro526 is offline
Mentor for Hire.
AKA: Dustin Benedict
no team (EWCP, MAR, FRC 708)
Team Role: Mentor
 
Join Date: Aug 2006
Rookie Year: 2005
Location: New Jersey
Posts: 2,599
thefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond repute
Send a message via AIM to thefro526 Send a message via MSN to thefro526
Re: Shooter consistency

Quote:
Originally Posted by F22Rapture View Post
Would the line tracking photoswitch from 2011 work, or is there another sensor that would be a better choice?
We use two of these on our shooter this year, one on each wheel, and used one last year. Thus far, they work really, really well. 'Jared341' can go into more specifics on the exact implementation if you PM him.
Reply With Quote
  #20   Spotlight this post!  
Unread 04-03-2013, 10:32
jordansch's Avatar
jordansch jordansch is offline
arramos
FRC #0935 (RaileRobotics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Newton, KS
Posts: 8
jordansch is an unknown quantity at this point
Re: Shooter consistency

Quote:
Originally Posted by Ether View Post

Would you mind answering a few questions to make this useful for other teams?

1) What optical sensor are you using?

2) What angle of arc is subtended by the tape at the radius where the sensing is taking place? In other words, what is the width of the tape (in the circumferencial direction) where it passes under the sensor, and how from the center of rotation is the sensing element located?

3) What wheel speeds were you measuring?

4) Were you indeed "having the sensor count rotations" or were you using the FPGA to measure the period? (That's an important distinction).

5) What speed control algorithm did you use?


Sorry it took so long for me to respond.

1. The photo switch we are using is a Banner M12 series metal barrel sensor(i can post a .pdf with the specs if you want me to).

2. The piece of reflective tape we are using is roughly three-quarters of an inch wide. Our photo sensor is mounted about three inches above the wheel, looking down on the tape at a ninety degree angle.

3. At full power to the motors, our sensor was measuring roughly 12,500 RPM, and at 75% power, which we use more often for our shooting positions, it measures at about 8,000. Our numbers are not completely accurate, as the sensor is always reading about 100 RPM on each side of the actual value.

4. We had the photosensor programmed into the code as a counter. We then took the time between when the sensor picks up the tape, ran some math on it, and got the RPM of the wheels.

5. We had to create our own homemade velocity pid loop. The motor will increase power by .005 each iteration of the code until we get to within, say, 1000 RPM. Then it will slowly move closer to the point, increasing or decreasing by .001 each iteration, and it will hold the same power once it gets within 100 RPM.

Hope this helps anyone having difficulties with measuring RPM. Remember, just because something works doesn't mean it's the simplest or most effective solution.
Reply With Quote
  #21   Spotlight this post!  
Unread 04-03-2013, 11:21
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Shooter consistency

Our 2011 KOP Allen-Bradley sensors are being used for speed measurement, as Dustin noted. Here is our exact arrangement:

4.875" BaneBot wheels (black plastic), with the sensor looking at the side (e.g. visual axis of the sensor is parallel to the axle) of the wheel about 2/3 of the way between the axle and the outer diameter. We used a ~1.5" x 1.5" patch of retroreflective tape from an optical tachometer kit (very similar to the tape on the goals) at one point on each wheel. The sensor is about .5" from the plane of the wheel/tape. We used the trim knob on the sensors to ensure we got a strong, unambiguous 0/1 signal from the tape and the background. The sensors are powered by 24VDC from a solenoid breakout, and are designated as WPIlib 1x Counters (count rising edges only) in the code. We use getPeriod() on the Counters to measure the time between consecutive measurements.

We nominally spin our first wheel at 3000RPM, and the second at 4700RPM. But I have measured speeds up to about 6000RPM without issue (haven't tried faster than that). We do no filtering of the speed signal whatsoever.

We do speed control with a Feedforward + P controller, using Victor 888s in coast mode (RS550 motors with 3:1 reduction). We run the following algorithm at 100Hz:

Output = Max(0, [Kv * desired_rpm + Kp * (desired_rpm - actual_rpm)])

We are using a Kv that maps to the free speed spec of the motor (e.g. to spin an RS550 with free speed ~19000RPM at 3:1 reduction at 3000RPM, you want about 50% power).

We use a Kp of 0.01. This means if we are below our setpoint by >=100RPMs, we apply full power to the motor (regardless of Kv, so we actually go full tilt on the motor even closer to our setpoint using a nonzero Kv).

It is worth noting that our control scheme is exactly equal to bang-bang control if you set Kv = 0 and Kp = (infinity). We did not have time to do a lot of experimentation on the various control regimes; we simply found one that worked (similar to what we used in 2012) and ran with it.

Our software only lets the autonomous program or driver fire discs if both wheel speeds are within 120RPM of the specified value.

Last edited by Jared Russell : 04-03-2013 at 11:27.
Reply With Quote
  #22   Spotlight this post!  
Unread 04-03-2013, 11:29
Woolly's Avatar
Woolly Woolly is offline
Programming Mentor
AKA: Dillon Woollums
FRC #1806 (S.W.A.T.)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Springfield, MO
Posts: 512
Woolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond repute
Re: Shooter consistency

We've actually been able to see speeds of ~6750 RPM this year with our 250 CPR US Digital Encoder.
All last year we were running ours at up to the rated 10,000 RPM before it would stop reading at least somewhat correctly.

In both cases we were normally running the wheel at roughly half the max speed.
__________________


Team 1806 Student: 2012-2013 | Mentor: 2013-Present
Reply With Quote
  #23   Spotlight this post!  
Unread 05-03-2013, 23:18
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,098
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: Shooter consistency

Quote:
Originally Posted by jordansch View Post
.
Quote:
1. The photo switch we are using is a Banner M12 series metal barrel sensor(i can post a .pdf with the specs if you want me to).
Please do, if you have it handy

Quote:
2. The piece of reflective tape we are using is roughly three-quarters of an inch wide. Our photo sensor is mounted about three inches above the wheel, looking down on the tape at a ninety degree angle
How far away, radially, is the sensing element from the center of rotation?


Quote:
3. At full power to the motors, our sensor was measuring roughly 12,500 RPM, and at 75% power, which we use more often for our shooting positions, it measures at about 8,000. Our numbers are not completely accurate, as the sensor is always reading about 100 RPM on each side of the actual value.
If you use the getPeriod() method in the Counter class, you can do much better than that. More below.

Quote:
4. We had the photosensor programmed into the code as a counter. We then took the time between when the sensor picks up the tape, ran some math on it, and got the RPM of the wheels.
From the above description, it sounds like what you are doing is this:
a) get the counts from the sensor
b) subtract the previous count value to get the change in counts
c) divide that by the corresponding elapsed time
That's a good method to use for high speeds with a high-CPR counter, but it's not the best method to use for a one-count-per-rev sensor like what you have.

What you should do instead for a one-count-per-rev sensor is this:
a) instantiate your sensor as an up/down counter from the counter class and configure it to count up only
b) use the getPeriod() method in the counter class to get the period.
c) compute rpm = 60/period
Using that method, you should do much better than +/- 100 rpm.

Quote:
5. We had to create our own homemade velocity pid loop. The motor will increase power by .005 each iteration of the code until we get to within, say, 1000 RPM. Then it will slowly move closer to the point, increasing or decreasing by .001 each iteration, and it will hold the same power once it gets within 100 RPM.
What you are describing is not a PID controller. It is a voltage-ramped on/off controller with a deadband.
Attached Thumbnails
Click image for larger version

Name:	8000rpm 1CPR 1N.png
Views:	51
Size:	5.5 KB
ID:	14271  
Reply With Quote
  #24   Spotlight this post!  
Unread 06-03-2013, 13:35
jordansch's Avatar
jordansch jordansch is offline
arramos
FRC #0935 (RaileRobotics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Newton, KS
Posts: 8
jordansch is an unknown quantity at this point
Re: Shooter consistency

Here is a link to the .pdf: http://info.bannerengineering.com/xp...ure/129721.pdf

The reflective tape is roughly an inch away from the center to the wheel, and the radius of the wheel is roughly two inches.

Our team uses LabView to program our robot, and we are using the Counter Get vi to get the period. We then divide one by the period, then multiply the value by 60 to get our RPM. Attached is a screenshot of the code. The Boolean input is the "run shooter motors" button. The only real output is the Output indicator. The others, including the waveform chart, are there so we can monitor the value in the program during testing.

Apologies for the misuse of terminology. That was just the best way I could think of to describe the way that we coded the system.
Attached Thumbnails
Click image for larger version

Name:	Tach code.png
Views:	39
Size:	52.7 KB
ID:	14277  

Last edited by jordansch : 06-03-2013 at 13:38.
Reply With Quote
  #25   Spotlight this post!  
Unread 06-03-2013, 13:41
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is online now
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,705
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Shooter consistency

Exactly which sensor are you using? There's about 10, heh.

At any rate, rough calculations indicate that you probably want a wider strip of retro tape. At 12,500 RPM, your 3/4" strip is in view for something like 500-600 microseconds. Which is right at the response time of your sensor. Doubling or tripling the width of the strip will at least keep you from risking a runaway condition where your wheel spins fast enough that pulses no longer register and you end up permanently driving the motor at full power until you disable your PID.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter

Last edited by Kevin Sevcik : 06-03-2013 at 13:46.
Reply With Quote
  #26   Spotlight this post!  
Unread 06-03-2013, 13:49
Brandon_L Brandon_L is offline
Someone told me there was food here
AKA: Brandon Liatys
FRC #2180 (Zero Gravity)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Newark, NJ
Posts: 1,206
Brandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond repute
Re: Shooter consistency

Quote:
Originally Posted by Andrew Lawrence View Post
We've had near perfect accuracy with our shooter, and it's essentially a 2-wheel linear shooter using the AM 8-inch pneumatics without the pneumatic inner tubes inside the wheels on AM Spinboxes powered by a CIM and a MiniCIM. No feedback whatsoever, constant 100% power on the wheels when shooting.
Were running almost the same, our theory is that were basically shooting in a straight line and power would only effect how far our disc goes before it drops, unlike last year where different speeds would give different arcs. Have you found this to be about true? I haven't had the chance to play with shooting with near-dead batteries yet.
__________________
FRC 2495 - Hamilton West Robotics [2007-2014] - whats a..."hive mind"?
FRC 3929 - Atomic Dragons [2012-2013]
FRC 2180 - Zero Gravity [2017-]

Just trying to collect all the possible team colors
Reply With Quote
  #27   Spotlight this post!  
Unread 06-03-2013, 13:50
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,533
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: Shooter consistency

Our shooter currently runs up to 7500 RPM. We're using a Us Digital S5 optical encoder with 512 counts per revolution (good to 10k rpm). Originally we were using an optical encoder from digikey but at speeds above 5k it would begin showing noise (we were missing counts).

We attach it to the shooter shaft using surgical tubing to remove any alignment issues our hand-machining (aka dewalt drill) creates. You could attach the encoder to any protruding shaft (you almost always have at least one....)
Reply With Quote
  #28   Spotlight this post!  
Unread 06-03-2013, 13:59
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,718
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: Shooter consistency

We have absolutely no speed control on our direct driven Banebots wheels. My theory is that the two-wheel combination as well as the slip in our system results in a consistent shot. I guess we're not exactly sure WHY it works, but it works.
__________________
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
  #29   Spotlight this post!  
Unread 06-03-2013, 16:52
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,098
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: Shooter consistency

Quote:
Originally Posted by Kevin Sevcik View Post
Exactly which sensor are you using? There's about 10, heh.

At any rate, rough calculations indicate that you probably want a wider strip of retro tape. At 12,500 RPM, your 3/4" strip is in view for something like 500-600 microseconds.
For students wanting to know how to do this calculation:

tapeWidthInches = 3/4
0.75
radius = 1
1
theta = asin(tapeWidthInches/2/radius)
0.384
tapeWidthRevs = (2*theta)/(2*pi)
0.122
rpm = 12500
1.25e+004
minutes = tapeWidthRevs/rpm
9.79e-006
seconds = minutes*60
0.000587
microseconds=seconds*1e6
587


Quote:
Which is right at the response time of your sensor.
I don't see where they define what they mean by "response time". Is there a generally understood meaning of that phrase in this context? It seems it could have different meanings:
a) the pulse width must be at least that long in order to reliably be detected, or

b) the sensor takes that amount of time to respond to a pulse (and the minimum required pulse width is not specified)


Also, the "repeatability" is listed at 95 us. If that means random +/- peak noise, at 12500 rpm your sensed speed could range from 12,300 to 12,800.


Quote:
...until you disable your PID.
He's not using a PID. But I suppose the same thing could happen.



Last edited by Ether : 06-03-2013 at 17:26.
Reply With Quote
  #30   Spotlight this post!  
Unread 06-03-2013, 17:23
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,098
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: Shooter consistency

Quote:
Originally Posted by jordansch View Post
Our team uses LabView to program our robot, and we are using the Counter Get vi to get the period. We then divide one by the period, then multiply the value by 60 to get our RPM.
That's the right way to do it. But see Kevin's post about the sensor's response time.


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

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