Go to Post My advice is anytime your intuition tells you something, double check it with physics. - tennispro9911 [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 24-03-2011, 19:09
JoeyPass JoeyPass is offline
Registered User
FRC #2169 (KING TeC)
Team Role: Coach
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Prior Lake
Posts: 13
JoeyPass will become famous soon enoughJoeyPass will become famous soon enough
Walking Encoder Values

We have two active Encoders on our robot that read the positions of our arm and wrist. After a couple of movements and bringing the arm and wrist back to starting position we are getting increasing values. It should be reading near zero each time we return to the initial positions but on the arm we get increasing or "walking values" in increments of about 4 - 6 per iteration. Has any one encountered this and do you have any suggestions.

Thanks,
  #2   Spotlight this post!  
Unread 24-03-2011, 19:10
MagiChau's Avatar
MagiChau MagiChau is offline
Registered User
AKA: Michael Chau
FRC #0085 (B.O.B. (Built on Brains))
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Zeeland, Michigan
Posts: 875
MagiChau is just really niceMagiChau is just really niceMagiChau is just really niceMagiChau is just really nice
Re: Walking Encoder Values

I would have limit switches that when hit, reset the encoder.
  #3   Spotlight this post!  
Unread 24-03-2011, 19:21
Chris27's Avatar
Chris27 Chris27 is offline
Registered User
AKA: Chris Freeman
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Mountain View
Posts: 196
Chris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant future
Re: Walking Encoder Values

A properly working encoder shouldn't drift very much. Are you sure that the encoder isn't slipping?
  #4   Spotlight this post!  
Unread 24-03-2011, 19:27
JoeyPass JoeyPass is offline
Registered User
FRC #2169 (KING TeC)
Team Role: Coach
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Prior Lake
Posts: 13
JoeyPass will become famous soon enoughJoeyPass will become famous soon enough
Re: Walking Encoder Values

Absolutely positive that it is not slipping. This encoder (the hat) is set on very tightly.
  #5   Spotlight this post!  
Unread 24-03-2011, 19:52
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,019
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Walking Encoder Values

What kind of encoder?
__________________

I am N2IRZ - What's your callsign?
  #6   Spotlight this post!  
Unread 24-03-2011, 19:54
JoeyPass JoeyPass is offline
Registered User
FRC #2169 (KING TeC)
Team Role: Coach
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Prior Lake
Posts: 13
JoeyPass will become famous soon enoughJoeyPass will become famous soon enough
Re: Walking Encoder Values

Optical encoder.
  #7   Spotlight this post!  
Unread 24-03-2011, 20:03
Teched3 Teched3 is offline
Hodge1
FRC #0175 (BuzzRobotics)
Team Role: Mentor
 
Join Date: Apr 2006
Rookie Year: 1996
Location: Connecticut
Posts: 319
Teched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud of
Smile Re: Walking Encoder Values

Is the encoder connected directly to an axle? If that is the case, then possibly the axle is slipping. We use reinforced rubber fuel line between our encoders and axles, and then tighten safety wire around each shaft, us well as file a flat on the axle to ensure no radial creep occurs between them. Enlighten us further on how it is set up and maybe we can help you solve the problem.
__________________
Sweat the details
Why is there never enough time to do it right, but always enough time to do it again!
Even if you're on the right track, if you sit still, you'll get run over!!!
  #8   Spotlight this post!  
Unread 24-03-2011, 21:00
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,114
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: Walking Encoder Values

Is there the possibility of any EMI with the encoder. We had a bad motor interfering with an encoder, causing the values to be dramatically different than what they should be
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
  #9   Spotlight this post!  
Unread 24-03-2011, 21:04
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,019
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Walking Encoder Values

Two common reasons for an optical encoder to slip are:

Mechanical: There is mechanical slippage. Check this carefully, don't assume anything.

Computational: Your input circuit is missing some of the encoder's output pulses. If you are using a hardware interrupt, then your encoder resolution (pulses per revolution) may be higher than the hardware can manage. If you are not using a hardware interrupt, that could be your problem.
__________________

I am N2IRZ - What's your callsign?
  #10   Spotlight this post!  
Unread 24-03-2011, 21:15
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Walking Encoder Values

Quote:
Originally Posted by DonRotolo View Post
Computational: Your input circuit is missing some of the encoder's output pulses. If you are using a hardware interrupt, then your encoder resolution (pulses per revolution) may be higher than the hardware can manage. If you are not using a hardware interrupt, that could be your problem.

If you are using the cRio's Encoder or Counter modules, they are handled with dedicated hardware in the FPGA, and should never drop counts in any reasonable encoder.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #11   Spotlight this post!  
Unread 24-03-2011, 21:34
Teched3 Teched3 is offline
Hodge1
FRC #0175 (BuzzRobotics)
Team Role: Mentor
 
Join Date: Apr 2006
Rookie Year: 1996
Location: Connecticut
Posts: 319
Teched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud of
Smile Re: Walking Encoder Values

what is your encoder pulse rate/ rev? When we First starting using them years ago, the pulse rate was too high for the software/computer to keep up. As Don noted earlier, eliminate mechanical slip, and then triple check software code. Have you marked the connector, encoder, and axle to visually see if it creeps?
__________________
Sweat the details
Why is there never enough time to do it right, but always enough time to do it again!
Even if you're on the right track, if you sit still, you'll get run over!!!
  #12   Spotlight this post!  
Unread 24-03-2011, 21:46
pfreivald's Avatar
pfreivald pfreivald is offline
Registered User
AKA: Patrick Freivald
FRC #1551 (The Grapes of Wrath)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2001
Location: Naples, NY
Posts: 2,304
pfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond repute
Re: Walking Encoder Values

We had exactly this problem, and found that the encoder was getting scratched because someone had seated the disc too tightly. It took us a while to figure out that this was the problem.

I suggest popping the encoder open and looking at the disc!
__________________
Patrick Freivald -- Mentor
Team 1551
"The Grapes of Wrath"
Bausch & Lomb, PTC Corporation, and Naples High School

I write books, too!
  #13   Spotlight this post!  
Unread 24-03-2011, 22:09
Teched3 Teched3 is offline
Hodge1
FRC #0175 (BuzzRobotics)
Team Role: Mentor
 
Join Date: Apr 2006
Rookie Year: 1996
Location: Connecticut
Posts: 319
Teched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud ofTeched3 has much to be proud of
Smile Re: Walking Encoder Values

I wouldn't advise using that encoder after doing that. Just replace it with another to see if that corrects the problem (substitution). Then consider that one, (if you open it up) for destructive analysis. Good encoders aren't inexpensive.
__________________
Sweat the details
Why is there never enough time to do it right, but always enough time to do it again!
Even if you're on the right track, if you sit still, you'll get run over!!!
  #14   Spotlight this post!  
Unread 24-03-2011, 22:33
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,370
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: Walking Encoder Values

To measure the arm position, I prefer an absolute angular position sensor. Such as a potentiometer. There are some problems with pots since they are a mechanical device. We prefer to use magnetic absolute encoders. Last year we used a Cherry AN8 series 360 non-contact absolute encoder. This year we are using Vishay 981HE encoders for our pivot modules and arm. They give an analog voltage output from .5 to 4.5 volts 0-360 degrees. Both of these devices are rugged and automotive qualified.
  #15   Spotlight this post!  
Unread 24-03-2011, 22:39
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,624
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: Walking Encoder Values

This may not help you at a competition...

However, I found the most definitive way we have to check our U.S. Digital optical encoders was to connect them to a motor moving at a relatively fixed RPM (you don't really need to know the RPM...just as long as it's relatively fixed) and observe the output channels with an oscilloscope. This assumes you can rotate the encoder completely around...over and over...so doing this with an arm probably won't work out.

If you're seriously missing pulses from the encoder itself you'll see it rapidly as you'll get a very unstable waveform from the 2 channels on the oscilloscope display.

You should see a nice stable waveform from both sides of the encoder.
It should be roughly 50% duty cycle for the U.S. Digital optical encoders, keeping in mind that the frequency of the waveform will depend on the RPM.

We had a lovely pile of bad encoder wheels...and bad encoders...and this was how a student and myself finally sorted them.

Our encoders were put on the drive train, with just one motor in the gear box and we ran the drive train with %VBUS. I then checked each encoder on there. Some had one bad channel. Some had no output. Some just produced a mess...and if carefully adjusting the height of the disk over the sensor assembly didn't fix it...we put it in a big bag marked *BAD*.

The only difficulty you'll find with the U.S. Digital optical encoders is that you'll need to find a way to hook up the oscilloscope to the encoder. The simplest way is probably to use a tail with the Molex PicoBlade for the encoder on one side, soldered to the wire to whatever it normally goes to and simply expose the junction of the wires to grab the ones you need with the oscilloscope probes (you need ground, and the 2 channels).

As others have pointed out, your software can cause you issues, and if you doubt the hardware's ability to 'decode' the encoder you might spend quite some time chasing ghosts. With the oscilloscope you might still have some random missing pulses occasionally...but for the most part you'll actually see any often missing pulses. If you can manage to hook up the oscilloscope while using the encoder as a sensor on a device as well, you can also get a good feel for how responsive that device is to the input from the encoder because you'll be able to see what the encoder is doing...and if you do it right...what the thing looking at the encoder thinks is going on.

A step up from using the oscilloscope might be to use a logic analyzer which would let you record the output of the encoder channels over a greater stretch of time.

Last edited by techhelpbb : 24-03-2011 at 23:14.
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:57.

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