Go to Post If it looks like an appendage, quacks like an appendage and moves like an appendage...it is an appendage... - Bob Steele [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-02-2007, 18:25
bjimster1's Avatar
bjimster1 bjimster1 is offline
Registered User
AKA: Jimmy Bourne
FRC #1029 (Wolvcats)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Miami, FL
Posts: 117
bjimster1 is just really nicebjimster1 is just really nicebjimster1 is just really nicebjimster1 is just really nice
Send a message via AIM to bjimster1
Problems with Encoder Counting

We have a 56mm banebots encoder and it count the revolutions fine.But sometimes it misreads the direction.Its not mounted on a drive motor so it won't spin too fast.Any ideas or suggestions?the problem seems to be at its worst at low speeds
__________________
-2006 UCF Quarterfinalists w/ 1345 & 21
-2005 Peachtree Quarterfinalists w/ 1180 & 462
-2005 UCF Quarterfinalists w/ 1694 & 348

CMU '11
  #2   Spotlight this post!  
Unread 12-02-2007, 18:48
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: Problems with Encoder Counting

Did you calibrate the encoder?
  #3   Spotlight this post!  
Unread 12-02-2007, 20:17
bjimster1's Avatar
bjimster1 bjimster1 is offline
Registered User
AKA: Jimmy Bourne
FRC #1029 (Wolvcats)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Miami, FL
Posts: 117
bjimster1 is just really nicebjimster1 is just really nicebjimster1 is just really nicebjimster1 is just really nice
Send a message via AIM to bjimster1
Re: Problems with Encoder Counting

how do we go about doing that?
__________________
-2006 UCF Quarterfinalists w/ 1345 & 21
-2005 Peachtree Quarterfinalists w/ 1180 & 462
-2005 UCF Quarterfinalists w/ 1694 & 348

CMU '11
  #4   Spotlight this post!  
Unread 12-02-2007, 20:24
Keo-san's Avatar
Keo-san Keo-san is offline
Registered User
AKA: Victor Marmol
FRC #1029 (WolvCats)
Team Role: Driver
 
Join Date: Feb 2006
Rookie Year: 2003
Location: Miami, FL
Posts: 25
Keo-san is an unknown quantity at this point
Re: Problems with Encoder Counting

How would you go about calibrating the encoder??
__________________
Team 1029

www.wolvcatrobotics.com
CMU '11
  #5   Spotlight this post!  
Unread 12-02-2007, 20:24
Michael DiRamio Michael DiRamio is offline
Registered User
FRC #1114 (Simbotics)
Team Role: Teacher
 
Join Date: Jan 2006
Rookie Year: 2006
Location: St. Catharines, Ontario, Canada
Posts: 39
Michael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond repute
Re: Problems with Encoder Counting

Quote:
Originally Posted by bjimster1 View Post
But sometimes it misreads the direction.
The direction is determined by the B signal. If your wire is loose/not plugged in it would only count in one direction... try making sure the wire connections are good and plugged all the way into the RC.
  #6   Spotlight this post!  
Unread 12-02-2007, 20:30
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Problems with Encoder Counting

If you could get your hands on an oscilloscope you'd be able to rule out the encoder.
__________________
http://www.mikesorrenti.com/
  #7   Spotlight this post!  
Unread 12-02-2007, 20:53
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Problems with Encoder Counting

Calibration instructions are in this document:
http://www.banebots.com/docs/EN-G0361-KT-Assembly.pdf
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #8   Spotlight this post!  
Unread 12-02-2007, 20:55
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: Problems with Encoder Counting

We use the banebot encoders and had concerns with the mounting method and getting knocked out of calibration if the robot gets bumped. So we simply use only the pulsecount and ignore the direction signal. (meaning that you don't have to use the encoder board and can wire either encoder output directly to an FRC interrupt input)

Your code can assume the direction is the way you expected from the pwm setting to the motor. Use the Optical Encoder block in easyc rather than the Optical Quad Encoder block.

Code:
 if(pwm<127) encoder_count = -encoder_count;
This isn't quite as accurate as using the direction signal in circumstances where the wheel changes direction between successive passes through your timer loop. But it works well in practice.
  #9   Spotlight this post!  
Unread 13-02-2007, 16:47
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Problems with Encoder Counting

It is not a given that your motor is always traveling in the direction commanded by the Victor. The Victor can instantaneously change its output. But unless someone changes the laws of physics the motor cannot. And remember the relationship of Victor output to velocity (of the wheel) is dependent on the torque curve of the motor, friction, traction, mass distrbution over the wheel, dynamic losses in the linkage etc. (thus the beauty of a servo that can determine direction and speed)
  #10   Spotlight this post!  
Unread 13-02-2007, 16:59
ChrisSanborn's Avatar
ChrisSanborn ChrisSanborn is offline
Registered User
FRC #2936 (The Robonauts)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2001
Location: Houston
Posts: 19
ChrisSanborn is a glorious beacon of lightChrisSanborn is a glorious beacon of lightChrisSanborn is a glorious beacon of lightChrisSanborn is a glorious beacon of lightChrisSanborn is a glorious beacon of lightChrisSanborn is a glorious beacon of light
Re: Problems with Encoder Counting

Also be cautious to interrupt only on one side, A or B, do not trigger interrupt on both.

I suggest interrupt on A, and read the state of B, this will be your direction.
  #11   Spotlight this post!  
Unread 25-02-2007, 18:13
Hydra's Avatar
Hydra Hydra is offline
Registered User
FRC #0909 (Junkyard Crew)
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Lawrence, Kansas
Posts: 4
Hydra is an unknown quantity at this point
Re: Problems with Encoder Counting

So, in the end is it worth it to buy encoders? Or is it better to program a counter?
  #12   Spotlight this post!  
Unread 25-02-2007, 18:53
Hydra's Avatar
Hydra Hydra is offline
Registered User
FRC #0909 (Junkyard Crew)
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Lawrence, Kansas
Posts: 4
Hydra is an unknown quantity at this point
Re: Problems with Encoder Counting

Another question: How sensitive are the encoders to movement? Such as bumping or shaking the robot.
  #13   Spotlight this post!  
Unread 25-02-2007, 18:55
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: Problems with Encoder Counting

Quote:
Originally Posted by Hydra
So, in the end is it worth it to buy encoders? Or is it better to program a counter?
It depends on how precisely you need to control something. For driving a preprogrammed route, polling and counting a relatively coarse sensor works. For keeping drive motor speeds precisely synchronized on an omnidirectional drivebase, I think encoders and interrupts are more appropriate.
  #14   Spotlight this post!  
Unread 25-02-2007, 19:11
Hydra's Avatar
Hydra Hydra is offline
Registered User
FRC #0909 (Junkyard Crew)
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Lawrence, Kansas
Posts: 4
Hydra is an unknown quantity at this point
Re: Problems with Encoder Counting

I just saw your post. Thank you for the advice and suggestions !
  #15   Spotlight this post!  
Unread 25-02-2007, 21:39
whytheheckme's Avatar
whytheheckme whytheheckme is offline
Registered User
AKA: Jacob Komar
no team
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Providence, RI
Posts: 1,320
whytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond repute
Send a message via ICQ to whytheheckme Send a message via AIM to whytheheckme Send a message via MSN to whytheheckme Send a message via Yahoo to whytheheckme
Re: Problems with Encoder Counting

We use these encoders.

Initially, we used the direction portion of it with the Encoder card. The problem with this is that the encoder needs to calibrated VERY WELL. 2 of our wheels we couldnt get the signals at 90 degrees or even 80 degrees because there was not enough play on the mount. We decided just to wire one of the encoders on each wheel directly to the computer and not use the encoder cards. Our program figures out the direction.
Ironically, this procedure wound up frying our encoders (not through fault of the encoders themselves)... A 12V signal was *accidentally* applied to the 5V Digital I/O bus by a *non-electrical* member of the team. This fried the encoders. What's ironic about this, is that had we been using the encoder cards, this would not have broken the encoders.

Anyway, thats my opinion.
Jacob

--Remember, good rep is always nice for a useful post!
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Encoder Problems bjimster1 Programming 2 10-02-2007 08:04
Encoder counting randomly off by x4 factor jgeorge Programming 5 02-02-2006 21:17
Encoder Output Problems Mike Electrical 5 25-11-2005 21:43
Problems counting encoder pulses bludstayne Programming 7 02-02-2004 23:07


All times are GMT -5. The time now is 17:34.

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