Go to Post By the way why do all american's spell Colour wrong?!?!?!?!?!?!?!? - akoscielski3 [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 03-11-2011, 01:00
joecapps1127 joecapps1127 is offline
Registered User
FTC #5283
 
Join Date: Nov 2011
Location: New York
Posts: 1
joecapps1127 is an unknown quantity at this point
Encoder: Can't Find Consistent Values for One Rotation

Hello,
So my team has been working on our autonomous code. We would like to create timing based on the rotations of the wheels. However, we cannot figure out exactly what number is equal to one full rotation. I read many places that it should be 1440, but it is not for ours. It fluctuates from 1210 to 1240 each time we run the code. We need this to be more accurate. We are using standard Tetrix DC motors with Tetrix Motor Encoders. We are using RobotC and are a first year team.

We also tried doing the same thing with time. I.e. running the motor at 100% power for 500 ms is about one turn, but again, it fluctuates.

Our autonomous code kind of hinges on us getting this to work, so any help would be greatly appreciated.

Thanks!
  #2   Spotlight this post!  
Unread 03-11-2011, 01:55
Eric Caldwell Eric Caldwell is offline
Registered User
FRC #0254
 
Join Date: Apr 2011
Location: United States
Posts: 4
Eric Caldwell will become famous soon enough
Re: Encoder: Can't Find Consistent Values for One Rotation

I don't know much about Tetrix motors or DC motors in general, but from experience, physics, and a little bit of research it seems like these fluctuations would be caused by the voltage of the battery. Applying max current for a set time will cause a different amount of rotations based upon the voltage of the battery.

You can see this by just driving the robot around for a while, if you let the battery voltage drop enough you'll notice that the robot feels more "sluggish." A little bit of research on wikipedia and other sites will also provide you with quotations like "Generally, the rotational speed of a DC motor is proportional to the voltage applied to it."

Since the fluctuations appear to be affecting your autonomous I would suggest trying something like PID to control your drive. You already have an encoder so if you have a little bit of time you should be able to get this going. If you need help getting a PID or any other system going feel free to PM me.
  #3   Spotlight this post!  
Unread 03-11-2011, 07:49
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: Encoder: Can't Find Consistent Values for One Rotation

I agree, the documentation says a Tetrix motor encoder provides 1440 counts per revolution. How are you measuring it?

Perhaps more importantly, how are you using it? It's possible that your motor code is letting the wheel spin a teeny bit longer after the encoder reaches the desired value, instead of bringing it to an immediate halt.
  #4   Spotlight this post!  
Unread 03-11-2011, 19:46
PAR_WIG1350's Avatar
PAR_WIG1350 PAR_WIG1350 is offline
Registered User
AKA: Alan Wells
FRC #1350 (Rambots)
Team Role: Alumni
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Rhode Island
Posts: 1,189
PAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond repute
Re: Encoder: Can't Find Consistent Values for One Rotation

Base on anecdotal evidence, the tetrix encoders are (expensive) junk that are nearly impossible to use for anything other than determining if the motor is moving, an if so, the direction in which it is moving. They are often used for detecting motor stall and preventing motor damage.
__________________
  #5   Spotlight this post!  
Unread 03-11-2011, 20:36
Andrew Lawrence
 
Posts: n/a
Re: Encoder: Can't Find Consistent Values for One Rotation

Welcome to Chief Delphi! I have no actual answer to your question, but since this is your first post, I'm going to assume you're at least somewhat new. Therefore, the Chief Delphi community gives a huge WELCOME to you!
  #6   Spotlight this post!  
Unread 03-11-2011, 23:41
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: Encoder: Can't Find Consistent Values for One Rotation

Quote:
Originally Posted by PAR_WIG1350 View Post
Base on anecdotal evidence,...
Based on more extensive documentation, the Tetrix Motor Encoders appear to be essentially the same thing as the encoders supplied in the FRC Kit of Parts for the past few years. When installed correctly, using the proper spacing of the plastic encoder disk from the circuit board, they work consistently well.
  #7   Spotlight this post!  
Unread 04-11-2011, 09:41
rudun's Avatar
rudun rudun is offline
Registered User
FRC #0496 (Royals)
Team Role: Coach
 
Join Date: Jan 2009
Rookie Year: 2005
Location: Babylon
Posts: 43
rudun is an unknown quantity at this point
Re: Encoder: Can't Find Consistent Values for One Rotation

Is it possible to turn the shaft by hand and read the ticks output for one revolution. That is how we do it with the encoders provided with the FRC kit. Then based on wheel size you can figure out the distance per 1 revolution. The formula is floating around CD.
  #8   Spotlight this post!  
Unread 04-11-2011, 12:24
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Encoder: Can't Find Consistent Values for One Rotation

Quote:
Originally Posted by rudun View Post
Then based on wheel size you can figure out the distance per 1 revolution. The formula is floating around CD.
The distance the wheel travels per revolution is equal to the circumference of the wheel. One circumference is equal to pi times the wheel diameter.

So you can turn the wheel one revolution and count the encoder ticks... or you can count the encoder ticks for one encoder rev, then reduce that by the gearbox (and chain, if present) ratio to get the fractional wheel revs.


Last edited by Ether : 04-11-2011 at 12:28.
  #9   Spotlight this post!  
Unread 04-11-2011, 13:57
feverittm's Avatar
feverittm feverittm is offline
Registered User
FRC #0997 (Spartans)
Team Role: Mentor
 
Join Date: Apr 2010
Rookie Year: 2010
Location: Corvallis, OR
Posts: 122
feverittm will become famous soon enoughfeverittm will become famous soon enough
Re: Encoder: Can't Find Consistent Values for One Rotation

There are also a couple of other possibilities (at least):

1 - The wheel shaft could be slipping in the encoder causing an changing number of ticks per revolution.

2 - The encoder wheel could be damaged (scratched). This can cause ticks to be missed or miscounted. Not at all deterministic.

We had these issues last year with our arm and needed to switch to a pot to measure arm angle. Not that a pot is that much more reliable.
__________________
Floyd Moore
Mentor Electrical and Pneumatics
Team 997 - Spartan Robotics
Corvallis High School, Corvallis Oregon
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 05:22.

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