Go to Post We call ourselves community/family. We are. Our kitchen table where we gather is the size of Chief Delphi. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Control System > Sensors
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 06-02-2012, 23:25
Dan Oelke Dan Oelke is offline
FTC #5926 (The Things)
FRC #3023 (Stark Industries)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Otsego, MN
Posts: 19
Dan Oelke is an unknown quantity at this point
Rockwell sensor as a encoder/counter

Our design for the motors driving the shooter wheels didn't take into account and encoder - and I think we really should have one to get consistent speeds.

So - I was thinking that the Rockwell sensors from 2011 with a white/black disc (1/4 of a disc white / black) would work as an encoder. We are talking 5k RPMs so this would be about 10k pulses / sec.

Does this sound like a reasonable solution to anyone else? Has anyone else tried something like this?

I am having problems finding a good datasheet to see what the response time is for these sensors to see if they can do this high of a count rate.
Reply With Quote
  #2   Spotlight this post!  
Unread 06-02-2012, 23:37
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: Rockwell sensor as a encoder/counter

Quote:
Originally Posted by Dan Oelke View Post
a white/black disc (1/4 of a disc white / black)
I'm not familiar with those. Does the disk look like this?

If so, how did you come up with 10,000 pulses/sec at 5,000 rpm?

Quote:
We are talking 5k RPMs so this would be about 10k pulses / sec
Attached Thumbnails
Click image for larger version

Name:	quarter.png
Views:	45
Size:	2.6 KB
ID:	11782  
Reply With Quote
  #3   Spotlight this post!  
Unread 06-02-2012, 23:44
Dan Oelke Dan Oelke is offline
FTC #5926 (The Things)
FRC #3023 (Stark Industries)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Otsego, MN
Posts: 19
Dan Oelke is an unknown quantity at this point
Re: Rockwell sensor as a encoder/counter

Ugh - must be getting late for me. Yes - I was thinking a disc exactly like that. BUT I didn't carry my units thru as I did the math.

So - 5000RPM * (2 pulses/revolution) * (1 min/60sec) = 167 pulses / sec
Reply With Quote
  #4   Spotlight this post!  
Unread 07-02-2012, 09:23
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Re: Rockwell sensor as a encoder/counter

I believe you are referring to the line sensors from last year - great idea. I dont think you need to add a wheel, just count the spokes of the flywheel as they scream by. If they work, you should make a new post so others could use this "free" technique.
Reply With Quote
  #5   Spotlight this post!  
Unread 08-02-2012, 10:48
Dan Oelke Dan Oelke is offline
FTC #5926 (The Things)
FRC #3023 (Stark Industries)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Otsego, MN
Posts: 19
Dan Oelke is an unknown quantity at this point
Re: Rockwell sensor as a encoder/counter

Yes - the line following sensors from last year.

I thought about counting the spokes but was afraid that might not work consistently depending on if there is back-lighting shining thru or not.

We will be trying it hopefully in the next day or two and report back on how well it does (or doesn't) work.
Reply With Quote
  #6   Spotlight this post!  
Unread 16-02-2012, 11:24
loafdog loafdog is offline
Registered User
AKA: Maciej
FRC #2876 (DevilBotz)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2009
Location: Burlington, MA
Posts: 35
loafdog is an unknown quantity at this point
Re: Rockwell sensor as a encoder/counter

We are in the same boat, design of shooter didn't take mounting an encoder into account. Last night we mounted the rockwell sensor so it could see the shooter wheel spinning. The wheel is one of previous years wheels with dark spokes. As I spin the wheel by hand I can see the status leds on the sensor change state. When we run the shooter motor(a CIM) at full speed I can't tell if the sensor can see the spokes. The status led may be changing state but if so it is too fast to see with naked eye. We haven't connected the signal wire to digital sidecar or written any code to count spokes yet. Before we go further I'd like to know if anyone has gotten this working.

And thank you Dan for the great idea to use this sensor to measure rpm of shooter.
Reply With Quote
  #7   Spotlight this post!  
Unread 16-02-2012, 11:40
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: Rockwell sensor as a encoder/counter

We are using the Allen Bradley sensor that was used for line tracking in 2011. We put two small pieces of retroreflective tape on our shooter wheel, and use the sensor as a Counter (in Java). We spin the wheel at ~5500RPM, which gives us about 180 pulses per second (~90 revs per second * 2 rising edges per rev). We use the "getRate()" function (which measures the time between consecutive edges) to get our speed value. We are *very* satisfied with the fidelity we are seeing. The only downfall of this method so far is that when we have a low battery and are running a lot of motors, we can brownout the sensor (since its voltage is unregulated). I think in a 2 minute match with a properly charged battery this won't be an issue, however.

The key is to find a "sweet spot" between instantaneous speed readings and getting something that is smooth. There are two ways to do this: (a) using the FPGA timer and a "getRate()" function to measure time between pulses, (b) counting the pulses and dividing by a unit time. Both ways can work.

If you go with method (a) like we are, it is crucial that you LIMIT the number of pulses per second. We run a 200Hz control loop on our shooter; we don't need 20,000 speed measurements per second! We will settle for ~200 *GOOD* speed readings. If the rate is too high, you will see more noise (a nonsmooth output) because the rise/fall time of the sensor and timer inaccuracies will have a bigger effect. By triggering your timer less often but over greater periods of time, you are basically applying a low pass averaging filter to your speed measurement.

Method (b) also works. In this case, you have the opposite problem - get as many counts as you can! If you only have 2 pulses per revolution on a 90 RPS wheel, and you calculate the speed 200 times per second, you will always see a speed of either "0", "1", or "2" ticks per time interval. This is horrible resolution. If you have 250 counts per revolution and sample at 200 Hz with the same 90RPS wheel, you will see answers that fall into the 112/113 ticks per unit time range. That's a lot more "bins" for finer measurement and control.

We went with method (a) for the following reasons:
1. Easier (for us) than mounting an encoder to a very high speed transmission with no COTS encoder mounts.
2. Theoretically our speed measurement accuracy is limited by the timer, which is likely to be much better than the resolution you can obtain by sampling and dividing by unit time.
3. The FPGA has a limit on the number of counts per second it can handle. I believe it is in the range of 39,000. We don't want to test that limit.
4. We already have a ton of 2011 sensors, and encoders that can spin at >5k rpm often require ball bearings and can be expensive.

Last edited by Jared Russell : 16-02-2012 at 11:42.
Reply With Quote
  #8   Spotlight this post!  
Unread 16-02-2012, 12:19
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: Rockwell sensor as a encoder/counter

Quote:
Originally Posted by Jared341 View Post
The only downfall of this method so far is that when we have a low battery and are running a lot of motors, we can brownout the sensor (since its voltage is unregulated).
Are you allowed to use 24V like last year?

Bottom of Page2 here.


Last edited by Ether : 16-02-2012 at 12:23. Reason: added link
Reply With Quote
  #9   Spotlight this post!  
Unread 16-02-2012, 12:50
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: Rockwell sensor as a encoder/counter

Good call - I hadn't even thought of that. I can't find anything that explicitly disallows it in the rules. In fact I can't find a comprehensive description of what is allowed to be connected to the Solenoid Breakout, period. I think I will pose a question in Q&A just to be sure.
Reply With Quote
  #10   Spotlight this post!  
Unread 16-02-2012, 17:11
anthonyttu anthonyttu is offline
Texas Instruments Engineer
AKA: Master Chief
FRC #5417 (Eagle Robotics)
Team Role: Mentor
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Dallas
Posts: 61
anthonyttu has a spectacular aura aboutanthonyttu has a spectacular aura about
Re: Rockwell sensor as a encoder/counter

I would be careful to avoid ambient light. The stage lights used to light the field are much brighter a output a different spectrum then the lights in your build areas.
If the sensor is mounted up on the robot and not protected from the light properly it wont work correctly.
Reply With Quote
  #11   Spotlight this post!  
Unread 16-02-2012, 20:45
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: Rockwell sensor as a encoder/counter

Quote:
Originally Posted by Jared341 View Post
I think I will pose a question in Q&A just to be sure.
Make sure you remind them that they allowed it last year specifically to address the issue you are currently facing.

Reply With Quote
  #12   Spotlight this post!  
Unread 26-03-2012, 11:45
ebarker's Avatar
ebarker ebarker is offline
Registered User
AKA: Ed Barker
FRC #1311 (Kell Robotics)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Kennesaw GA
Posts: 1,437
ebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond repute
Re: Rockwell sensor as a encoder/counter

Quote:
Originally Posted by Jared341 View Post
(a) using the FPGA timer and a "getRate()" function to measure time between pulses
What does the code look like for doing this ?

Is this part of the counter class or something else?

I don't see it in the counter class.
__________________
Ed Barker
Reply With Quote
  #13   Spotlight this post!  
Unread 26-03-2012, 12:04
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: Rockwell sensor as a encoder/counter

We use the "getPeriod()" method in the Counter class. Something (in Java) like:

Code:
public final static double kTicksPerRevolution = 2.0;
private Counter counter;

double getRPM()
{
   return 60.0/(counter.getPeriod()*kTicksPerRevolution);
}
The factor of 60 converts between revolutions per second and RPM.
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 21:58.

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