View Full Version : Bizzare Quaderature Behavior
phrontist
21-01-2006, 12:20
We have spec-ed a 61K64 Grayhill (http://embrace.grayhill.com/embrace/Item/ASP/Item-Detail.asp?PartNo=61K64&CatalogGroupID=Series61K4Pin&GroupDisplayLabel=&RestSes=Yes) quaderature encoder in part of our design this year. We have given them supply current from both a voltage regulator (http://www.national.com/pf/LM/LM309.html) and from the +5/GND pins on the RC's digital in/out ports. Initially they functioned flawlessly, responding to rotation with the expected:
00
01
11
01
00
pattern, perfectly in phase and everything. Life was good. But after testing them individually with LEDs, I hooked them up to the RC and they weren't functioning at all. Assuming it was a programming error, I tried everything I could think of and exausted all reasonable possibilites. I went back to my LED test rig and found the encoders were behaving in a bizzare manner. Upon first being connected they would function as described above, but then one output (usually the B output) would start to blink slowly, even when the encoders weren't being rotated. It's blink rate would steadily increase until it was on fully! :ahh:
Disconnecting and reconnecting the power did nothing. If the whole setup was allowed to sit for a while without being on, the encoders would once again function briefly before "decaying". Am I right in assuming these have been fried internally? I can't imagine what else would cause this behavior...
KenWittlief
21-01-2006, 12:23
sounds like toast :c(
do you have a spec sheet for them? are you sure they are designed to run at 5VDC? LEDs normally need a series resistor to limit current, but also, when they are blown they dont work at all
blinking is weird. are you sure its not your power supply that is switching on and off? can you meter the power pins to the encoder? maybe you have a breaker cycling or something weird?
KenWittlief
21-01-2006, 12:32
I looked at the data sheet from your postd link
they are 5VDC parts, so you dont need a series resistor - if you connected them to 5V (check your supply with a meter) and did not wire them backwards they should be ok.
how are you testing the output? meter or a scope would be best.
You do know that there are blinking leds (your testing LEDs maybe?) that look just like normal LEDs, right?
phrontist
21-01-2006, 12:34
sounds like toast :c(
do you have a spec sheet for them? are you sure they are designed to run at 5VDC? LEDs normally need a series resistor to limit current, but also, when they are blown they dont work at all
blinking is weird. are you sure its not your power supply that is switching on and off? can you meter the power pins to the encoder? maybe you have a breaker cycling or something weird?
I had an ammeter in parrallel with both power supply for both configurations... it was running between 4.85 and 5, which was inside the tolerance stated in the white paper.
I just wanted to make sure they were fried, get a second opinion as it were.
KenWittlief
21-01-2006, 12:41
test them with a known good 5VDC supply, and with a voltmeter on the output. Make sure the voltmeter is on DC (some default to DC or AC when your turn them on).
the output should be on or off when the shaft is not rotating, and you should be able to slowly rotate it and see the outputs change. If your meter has a frequency function you should be able to see the freq change as you rotate the shaft.
A scope would be excellent for this.
phrontist
21-01-2006, 13:10
Did I say ammemeter? I meant voltmeter...
We checked them initially with an O-scope, and since then have been using the LEDs as ghetto logic probes.
Kevin Watson
21-01-2006, 14:05
We have spec-ed a 61K64 Grayhill (http://embrace.grayhill.com/embrace/Item/ASP/Item-Detail.asp?PartNo=61K64&CatalogGroupID=Series61K4Pin&GroupDisplayLabel=&RestSes=Yes) quaderature encoder in part of our design this year. We have given them supply current from both a voltage regulator (http://www.national.com/pf/LM/LM309.html) and from the +5/GND pins on the RC's digital in/out ports. Initially they functioned flawlessly, responding to rotation with the expected:
00
01
11
01
00
pattern, perfectly in phase and everything. Life was good. But after testing them individually with LEDs, I hooked them up to the RC and they weren't functioning at all. Assuming it was a programming error, I tried everything I could think of and exausted all reasonable possibilites. I went back to my LED test rig and found the encoders were behaving in a bizzare manner. Upon first being connected they would function as described above, but then one output (usually the B output) would start to blink slowly, even when the encoders weren't being rotated. It's blink rate would steadily increase until it was on fully! :ahh:
Disconnecting and reconnecting the power did nothing. If the whole setup was allowed to sit for a while without being on, the encoders would once again function briefly before "decaying". Am I right in assuming these have been fried internally? I can't imagine what else would cause this behavior...Are you trying to drive the LEDs directly from the encoder's output? If so, the Grayhill's don't have much drive capability. This is why I suggest most teams use a 74ACT244 line driver for higher count rates.
-Kevin
KenWittlief
21-01-2006, 14:10
something else: when the encoder has one LED right on the edge (between being full on and full off) it can twitch back and forth. Thats why there are two outputs, when one changes state you ignore it until the other one changes state.
If one LED is blinking its possible the encoder is turned so that sensor is on the edge of a mark?
Al Skierkiewicz
22-01-2006, 09:04
Bjorn,
Were you using LEDs without current limiting resistors? The stated output drive on the endcoder is only 16ma. If you hung a normal LED on that output, without series resistors to limit current, you have likely fried the output(s).
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.