Go to Post You guys can send [Wisconsin] some warm Florida weather, its getting cold up here again. - Ricky Q. [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
  #1   Spotlight this post!  
Unread 19-02-2012, 11:20
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,554
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
Encoders counting..... sometimes

We purchased high speed encoders to measure rotational rate. However, we are seeing something I wouldn't expect.

The encoder is here:
ENA1J-B28-L00128
http://www.mouser.com/ProductDetail/...Ha2t9hjO c%3D

The encounter counts up and down correctly. We have power wired to +, ground wired to -, one signal on DIO 3 wired to A, and one signal on DIO 13 wired to B.

However, there appear to be 'dead spots' on the encoder. If we rotate the encoder slowly, we find locations where it starts counting up just as if it were unplugged.

What might be causing this behavior? We have 6 of them, and they all seem to act the same way. We have removed all the wiring and plugged them into the digital sidecar with short pigtails, so I'm fairly sure there isn't any wiring problem. Unfortunately the counting is in the FPGA, so I can't really see the code to debug what is causing it to count up.
  #2   Spotlight this post!  
Unread 19-02-2012, 13:22
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,599
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Encoders counting..... sometimes

Quote:
Originally Posted by Tom Line View Post
However, there appear to be 'dead spots' on the encoder. If we rotate the encoder slowly, we find locations where it starts counting up just as if it were unplugged.
I'm not sure I understand this statement. An unplugged quadrature encoder should provide no output to the FPGA, and the FPGA should not count when an encoder is unplugged.

Can you scope the signals when it's working and when it's not?
  #3   Spotlight this post!  
Unread 19-02-2012, 13:35
Xenozero Xenozero is offline
Xenozero
AKA: The inovator
FRC #1230 (Lehman Lionics)
Team Role: College Student
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Bronx, New York
Posts: 44
Xenozero will become famous soon enough
Send a message via AIM to Xenozero
Re: Encoders counting..... sometimes

The encoders disk may be scratched or damaged creating "dead spots" where the encoder wont read
  #4   Spotlight this post!  
Unread 19-02-2012, 14: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: Encoders counting..... sometimes

Quote:
Originally Posted by Xenozero View Post
The encoders disk may be scratched or damaged creating "dead spots" where the encoder wont read
All six of them? What are the chances of that?


  #5   Spotlight this post!  
Unread 19-02-2012, 14:44
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,554
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: Encoders counting..... sometimes

Quote:
Originally Posted by Joe Ross View Post
I'm not sure I understand this statement. An unplugged quadrature encoder should provide no output to the FPGA, and the FPGA should not count when an encoder is unplugged.

Can you scope the signals when it's working and when it's not?
I'm sorry Joe, I was incorrect. It stops counting when unplugged. In the areas I'm calling 'dead spots', it will sit and count upwards as if the encoder is being turned, when it is not. It counts at a constant rate.
  #6   Spotlight this post!  
Unread 19-02-2012, 19:47
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,554
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: Encoders counting..... sometimes

Thank you Joe. Your comment that they should not be counting up took us back to our own code (no real surprise....).

It turns out the encoder "start" was put at the start of teleop, and that was causing the upwards counting we were seeing as it restarted every loop. That does however raise another question in my mind: why would the start command cause it to count up?
  #7   Spotlight this post!  
Unread 19-02-2012, 22:25
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: Encoders counting..... sometimes

I have no real insight into the FPGA code, so this is just a guess based on the reported behavior. It could be completely wrong.

When you Start an encoder, it presets some internal registers. The FPGA is doing quick sampling of the encoder signals, going through something like a state machine to do the up/down counting. If one of the channels is high while the other is low, the first sample will end up making the FPGA think it just counted up one tick. If you Start on a regular basis, it will end up counting that fast.

The answer is, of course, not to do that.

(The true solution might be to search for, find, and fix a possible bug in the FPGA code. Or it might be for someone at NI to slap me for presuming to have anything useful to say on the subject.)
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 19:48.

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