View Single Post
  #7   Spotlight this post!  
Unread 20-06-2008, 10:40
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,381
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Help Programming a Quadrature Encoder

Quote:
Originally Posted by Bomberofdoom View Post
You mean there's a difference between putting the encoder on the left side or the right side of the gear/wheel?
Part of why a robot seems to drift to the left or right when driving near full speed is that motors have a "bias". This means that they spin more efficiently in one direction than the other. Now I will point out, the CIM motors in the KOP are not a good example of this because they have very little bias, but they do have some. The reason you notice the effect of this bias is because usually one motor is turning CW while the other is turning CCW to drive a robot forward. So...... one encoder will be going CW while the other is going CCW for the same direction of drive.
Again, this is really simple to handle in the ISR. For the same direction of travel make sure both encoders are incrementing, and decrementing for the opposite direction.

Read through Kevin Watson's encoder code, this is all spelled out clearly.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist