View Single Post
  #1   Spotlight this post!  
Unread 16-10-2011, 13:17
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,011
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: How do Encoders work?

I can only offer a short answer, since I think the question you really wanted to ask was "How do we use encoders?"

There are many kinds of encoders, the ones in the KoP use a tiny precision disk that has black and shiny lines on it, that are spun past an optical sensor. Every time a sensor sees a line go past, it generates an electrical pulse. These pulses are sent to the software, and by counting the pulses in a period of time, you know how fast the encoder (and thus whatever it's attached to) is moving.

By using two sensors (in the encoder) on the same disk, mounted "in quadrature", you can tell which direction it's going too. The KoP encoders do this, using "Channel A" and "Channel B". (BTW, they connect to digital inputs in a cRio)

As for how you should use them, they are made to know (rather than guess) how far your robot has moved, or how far your robot arm (for example) has moved. Lots of ways that information can be valuable, for example during Autonomous mode.

As for how you use them in software, you might find that 238 pulses means you have moved one foot. So, to move 10 feet, just turn on the motors until the count reaches 2380. (Of course, you'll want to slow them down as you approach that number and stop exactly when you hit it, otherwise you'll coast past it)

Does that help?
__________________

I am N2IRZ - What's your callsign?
Reply With Quote