View Single Post
  #15   Spotlight this post!  
Unread 24-03-2011, 22:39
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,624
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: Walking Encoder Values

This may not help you at a competition...

However, I found the most definitive way we have to check our U.S. Digital optical encoders was to connect them to a motor moving at a relatively fixed RPM (you don't really need to know the RPM...just as long as it's relatively fixed) and observe the output channels with an oscilloscope. This assumes you can rotate the encoder completely around...over and over...so doing this with an arm probably won't work out.

If you're seriously missing pulses from the encoder itself you'll see it rapidly as you'll get a very unstable waveform from the 2 channels on the oscilloscope display.

You should see a nice stable waveform from both sides of the encoder.
It should be roughly 50% duty cycle for the U.S. Digital optical encoders, keeping in mind that the frequency of the waveform will depend on the RPM.

We had a lovely pile of bad encoder wheels...and bad encoders...and this was how a student and myself finally sorted them.

Our encoders were put on the drive train, with just one motor in the gear box and we ran the drive train with %VBUS. I then checked each encoder on there. Some had one bad channel. Some had no output. Some just produced a mess...and if carefully adjusting the height of the disk over the sensor assembly didn't fix it...we put it in a big bag marked *BAD*.

The only difficulty you'll find with the U.S. Digital optical encoders is that you'll need to find a way to hook up the oscilloscope to the encoder. The simplest way is probably to use a tail with the Molex PicoBlade for the encoder on one side, soldered to the wire to whatever it normally goes to and simply expose the junction of the wires to grab the ones you need with the oscilloscope probes (you need ground, and the 2 channels).

As others have pointed out, your software can cause you issues, and if you doubt the hardware's ability to 'decode' the encoder you might spend quite some time chasing ghosts. With the oscilloscope you might still have some random missing pulses occasionally...but for the most part you'll actually see any often missing pulses. If you can manage to hook up the oscilloscope while using the encoder as a sensor on a device as well, you can also get a good feel for how responsive that device is to the input from the encoder because you'll be able to see what the encoder is doing...and if you do it right...what the thing looking at the encoder thinks is going on.

A step up from using the oscilloscope might be to use a logic analyzer which would let you record the output of the encoder channels over a greater stretch of time.

Last edited by techhelpbb : 24-03-2011 at 23:14.