Go to Post Sleep is for the weak - TEntwistle [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 23-01-2013, 09:33
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: Optical sensor for use with retroflective tape

Quote:
Originally Posted by apalrd View Post
We had a 4-line disc with very uneven dark/light spacing and not terribly accurate angular spacing, but if we setup the counter to average 12 samples then any phase error between the lines would cancel out and we got a really nice clean signal.
If you had only 4 pulses per rev, why would you need 12 samples to average out the spacing error? Or am I misinterpreting your intended meaning?



Last edited by Ether : 23-01-2013 at 11:07.
  #17   Spotlight this post!  
Unread 29-01-2013, 08:45
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
Re: Optical sensor for use with retroflective tape

Lightfoot26: recommendation for a part number?
  #18   Spotlight this post!  
Unread 29-01-2013, 09:01
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
Re: Optical sensor for use with retroflective tape

Quote:
In the past on our crab modules, we have used standard LED/photo transistor devices from Digikey. We manufactured a stamped plate that mounted to the side of the wheel.
...and Al, do you recall the part number?
  #19   Spotlight this post!  
Unread 29-01-2013, 09: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: Optical sensor for use with retroflective tape

Quote:
Originally Posted by apalrd View Post
We had a 4-line disc with very uneven dark/light spacing and not terribly accurate angular spacing, but if we setup the counter to average 12 samples then any phase error between the lines would cancel out and we got a really nice clean signal.
With 4 pulses per rev, you need only 4-sample averaging to completely cancel out the jitter due to the inaccuracy of the pulse spacing.

Increasing it to 12 helps to further cancel out the jitter due to the 6.5us resolution due to the rate at which the FPGA looks for pulses.


  #20   Spotlight this post!  
Unread 29-01-2013, 10:06
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,519
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Re: Optical sensor for use with retroflective tape

Can the cRio process fast enough to read something like a standard 250 count encoder at 7200 RPM? I'm just curious.
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004
  #21   Spotlight this post!  
Unread 29-01-2013, 10:43
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: Optical sensor for use with retroflective tape

Quote:
Originally Posted by sanddrag View Post
Can the cRio process fast enough to read something like a standard 250 count encoder at 7200 RPM? I'm just curious.
AIUI, the 250 CPR encoder has 500 edge transitions (rising+falling) per channel per rev. At 7200 RPM, that would be 7200/60*500 = 60,000 edges/sec which is acceptable because the FPGA polls each channel for edges at 153KHz.

If you do decide to use a 250 CPR encoder at 7200 RPM to measure shooter wheel speed, you don't need both channels since you'll always be going in the same direction.

You can use the Counter class with only one channel of the encoder.

If you use the GetPeriod() method of the Counter class, you will get up to 1400 RPM peak-to-peak jitter due to the 153KHz FPGA polling rate if you don't use the FPGA's built-in averaging capability.

In C++ or Java WPILib, you can make a small modification to counter.cpp (or counter.java) to tell the FPGA to return the elapsed time between the most recent N+1 rising edges (N<127), and WPILib will divide that by N, effectively averaging. If you set N to 125 for example, you'll be averaging over half a revolution and should get a nice clean signal with jitter approx 11 RPM p-p.



Last edited by Ether : 29-01-2013 at 11:22. Reason: typo
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 20:07.

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