View Single Post
  #3   Spotlight this post!  
Unread 21-08-2013, 08:42
MechEng83's Avatar
MechEng83 MechEng83 is offline
Lead Mentor/Engineer
AKA: Mr. Cool
FRC #1741 (Red Alert)
Team Role: Coach
 
Join Date: May 2011
Rookie Year: 2011
Location: Indiana
Posts: 616
MechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond reputeMechEng83 has a reputation beyond repute
Re: What is an encoder?

An encoder is a device that counts occurances in a certain way. The most common application is as light and dark segments on a rotating disc, though there are linear encoders.

The way they work is by sending a "high" or "low" signal indicating whenever the light and dark regions pass the detector. You can count them up to find what distance you've traveled or count the rate and determine a speed.

The problem with a simple encoder is that it can tell you number of signal switches and/or rate of change, but it cannot tell you direction. To get direction, a 2nd detector is offset (usually 90 degrees out of phase -- note: this is not 90 degrees on the wheel, but 1/4 of the way through a cycle of high and low) so you can determine the direction of motion. These are commonly known as the "A" and "B" channels.

An example of how this would work is
Code:
Forward                    Reverse
A - low ; B - low          A - low ; B - low
A - high; B - low          A - low ; B - high
A - high; B - high         A - high; B - high
A - low ; B - high         A - high; B - low
A - low ; B - low          A - low ; B - low
As you can see, the direction can be determined by looking at which signal is leading (changing first). This is what's know as a quadrature encoder.

As far as line counts, it's a balancing act. The more lines you have, the greater precision you can get, which is a good thing. But this can cause problems too. With very small divisions, your encoder is subject to "noise" in its measurement. Any small misalignments or vibrations can be enough to cause the signal to behave in erratic ways. Fewer line counts reduce the probability of this occuring. The other drawback to a high number of line counts is the signal processing rate of your controller. If you're spinning so fast, you send 100,000 line counts past your detectors, your system may not be able to count that fast, and then your signal will become garbled as the controllers struggles to keep up.

So, more lines = better precision. Less lines = cleaner signal. We typically use 100 line count encoders for direct motor output since we gear down the motors and 360 line count encoders for more precise measurements on devices that don't move as fast.
__________________

2016 INWLA GP| INWCH Entrepreneurship | INPMH DCA | INCMP Team Spirit | CAGE Match Winner (w/ 1747 &868), Finalist (1471 w/ 1529 & 1018), Best Fans
2015 ININD Judges Award, Proud "Phyxed Red Card" alliance partners of 1529 & 1720 | INWLA EI | INCMP GP
2014 Boilermaker Creativity | Chesapeake Finalist, Safety, GP, Entrepreneurship | IN State Championship Winner (w/ 868 & 1018) | CAGE Match Winner (w/ 1024, 5402 & 1646)
2013 Boilermaker RCA, Innovation in Controls, Finalist | Crossroads Entrepreneurship | Newton Semi-finalist
2012 Boilermaker Entrepreneurship | Queen City EI | Curie Semi-finalist
2011 Boilermaker RCA, Entrepreneurship
Red Alert Robotics
Reply With Quote