Go to Post As long as the competition gets the attention of someone and drags them in, it doesn't matter how they get there. - Andy Grady [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 12-03-2016, 23:05
David Lame David Lame is offline
Registered User
FRC #0247
 
Join Date: Feb 2015
Location: Berkley, MI
Posts: 88
David Lame is a jewel in the roughDavid Lame is a jewel in the roughDavid Lame is a jewel in the roughDavid Lame is a jewel in the rough
Is there a maximum encoder pulse rate the system can handle?

We are trying to start getting a bit fancier with our drive system. We put encoders on the drive wheels, and are trying to make use of them as part of camera lineups and autonomous code. Unfortunately, we have a problem. During testing, I drive forward, and then drive back to where I started, and the encoder doesn't read 0. Not even close. It seems to count consistently faster, meaning almost twice as many raw ticks, when moving forward.

Obviously, this isn't good, but what might be the cause?

We are using the CUI 102V encoders. I really like them. However, we just put them on the shaft of the transmissions, verified that we were reading a value that went up when it ought to go up and down when it ought to go down. One thing we didn't do is set the DIP switches inside the housing. Those DIP switches control the pulse rate, with the default value being 4096 pulses per revolution.

Once I realized there was a problem, I wondered if that was just too fast for the rio/wpilib to count. Could it be that we need to reduce our resolution? We don't need that high of a resolution value. We just stuck with what was set on the switches. However, before we go fiddling with things, I figured I would find out if there is some maximum value of pulses/second that ought to be used with our systems.
  #2   Spotlight this post!  
Unread 12-03-2016, 23:29
The Lucas's Avatar
The Lucas The Lucas is offline
CaMOElot, it is a silly place
AKA: My First Name is really "The" (or Brian)
FRC #0365 (The Miracle Workerz); FRC#1495 (AGR); FRC#4342 (Demon)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Dela-Where?
Posts: 1,564
The Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond repute
Send a message via AIM to The Lucas
Re: Is there a maximum encoder pulse rate the system can handle?

Are you encoding in 1x 2x or 4x mode?
Max counts per rev for 102v is 2048 (I guess you are prob using 2x for 4096).
It is doubtful you are overloading the FPGA of the rRIO with your drive train moving slowly. Calculations I have seen on CD have the rRIO capable of about 5 million counts per sec.
http://www.chiefdelphi.com/forums/sh...5&postcount=12
Check your B channel to see if it is operating correctly (since it gives you direction only, unless you are in 4x mode). You can do this with a moderately advanced multi meter that has a Hz function. Or you can simply swap the A&B channels at the rRIO and see if the same behavior happens in the negative direction. There is an index (X) channel on these encoders, so that might be in the mix(A or B), causing interesting results.
__________________
Electrical & Programming Mentor ---Team #365 "The Miracle Workerz"
Programming Mentor ---Team #4342 "Demon Robotics"
Founding Mentor --- Team #1495 Avon Grove High School
2007 CMP Chairman's Award - Thanks to all MOE members (and others) past and present who made it a reality.
Robot Inspector
"I don't think I'm ever more ''aware'' than I am right after I burn my thumb with a soldering iron"

Last edited by The Lucas : 12-03-2016 at 23:42.
  #3   Spotlight this post!  
Unread 12-03-2016, 23:44
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
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: Is there a maximum encoder pulse rate the system can handle?


The 2016 roboRIO FPGA samples and timestamps at 40MHz. That's every 25 nanoseconds.

There may be a speed limit on the encoder itself. Check the datasheet.

Or the encoder may not be assembled or mounted correctly.


  #4   Spotlight this post!  
Unread 13-03-2016, 00:19
David Lame David Lame is offline
Registered User
FRC #0247
 
Join Date: Feb 2015
Location: Berkley, MI
Posts: 88
David Lame is a jewel in the roughDavid Lame is a jewel in the roughDavid Lame is a jewel in the roughDavid Lame is a jewel in the rough
Re: Is there a maximum encoder pulse rate the system can handle?

Thanks. I doubt we are getting up to 4 million pulses per second, so that shouldn't be the problem.
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 18:02.

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