Author Topic: Rotary Encoder Replacement  (Read 1879 times)

0 Members and 1 Guest are viewing this topic.

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2084
  • Country: us
Re: Rotary Encoder Replacement
« Reply #25 on: June 27, 2024, 01:12:22 am »
The scope test would work fine with the C pin connected to ground.  Then  you just want the same sequence to be produced in both encoders as you turn the knob clockwise.
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: Rotary Encoder Replacement
« Reply #26 on: June 27, 2024, 01:26:20 am »
Oh okay.

Do I need to worry about "click 2" where pins 1,2, and 3, are all connected or just click 1 and 3?

 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1667
  • Country: au
Re: Rotary Encoder Replacement
« Reply #27 on: June 27, 2024, 02:44:48 am »
Do I need to worry about "click 2" where pins 1,2, and 3, are all connected or just click 1 and 3?

You want to check all 4 clicks/detents, but usually start at some 'zero' eg with both ON or both OFF, then set the scope to one shot trigger and spin the knob CW.
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2084
  • Country: us
Re: Rotary Encoder Replacement
« Reply #28 on: June 27, 2024, 02:54:35 pm »
Oh okay.

Do I need to worry about "click 2" where pins 1,2, and 3, are all connected or just click 1 and 3?

Well, click 2 would show the same whether A and B were correct or reversed.  So the important ones are those where only one is low.  And since you have a detent after each transition of either switch, you just have to measure the voltage at each successive detent.  Starting with A and B high, first A will go low, then B will go low, then A will go high, then B will go high.  A "leads" B, so to speak, as you turn clockwise.

In fact, the datasheet for the 25LB22-Q suggests that the pins are labeled as A, B and C on the encoder.

« Last Edit: June 27, 2024, 03:03:23 pm by Peabody »
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: Rotary Encoder Replacement
« Reply #29 on: June 27, 2024, 06:35:28 pm »
The datasheet was helpful as far as the logic table, but I assumed one has to lead the other (so I did read it :) ).

Hopefully this weekend I’ll have time to rig a quick resistor pull up and measure things.
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: Rotary Encoder Replacement
« Reply #30 on: June 30, 2024, 02:50:17 pm »
Yesterday I set up the old encoder and new one side-by-side with a pull-up resistor connected to the two pins, 5v to the resistors, and ground on the ground pin.

I expected to see pulses, but, what I realized: when one pin is high, turning the encoder keeps it high, and the other pin goes low. So I didn't have a way of determining whether A and B were reversed.

What I thought happened was the connections "break" and when clicked into the next position, A touches first and then B (or vice versa). This seemed like it was nothing more than a binary output.

In any case, I've wired it onto the board and checked the resistance at all four turns comparing them to the adjacent one.

The only part I'm holding my breath on is whether the back side of the encoder sticks out too far and may cause clearance issues. It's a few mm longer, but hopefully today I'll reassemble the front panel and will know.
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1667
  • Country: au
Re: Rotary Encoder Replacement
« Reply #31 on: June 30, 2024, 07:53:13 pm »
I expected to see pulses, but, what I realized: when one pin is high, turning the encoder keeps it high, and the other pin goes low. So I didn't have a way of determining whether A and B were reversed.
That's why I suggested testing with LED's  (or a 2 channel storage scope, if you have one)
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: Rotary Encoder Replacement
« Reply #32 on: July 01, 2024, 01:07:40 am »
Quote
That's why I suggested testing with LED's  (or a 2 channel storage scope, if you have one)

I used a four channel digital scope, but one channel stayed high and the other would drop, so I couldn't compare pulses.

In any case, the whole scope was back together, the encoder fit well, but something happened because now it doesn't power, so I had to start disassembling it again.

Since it worked before I disassembled it and doesn't now, a wire or connector must not be seated well. Long story short, I managed to get it powered by removing some connectors, so I'm in the process of trying to figure out what's going on.

I was all happy to test the encoder and now I'll need to wait.
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1667
  • Country: au
Re: Rotary Encoder Replacement
« Reply #33 on: July 01, 2024, 02:15:54 am »
I used a four channel digital scope, but one channel stayed high and the other would drop, so I
?
In both cases, properly connected with pullups, should give two pins that pulse.

In this type of test, I would not try to test both on one capture, but capture one pair CW,  and then compare the screen grab of that, with the second test.
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: Rotary Encoder Replacement
« Reply #34 on: July 01, 2024, 02:37:31 am »
Weird.

As an example, if A and B were high, and the next click brought (let's say B) to a low, I only saw B drop. Maybe I didn't trigger the scope properly and missed it.

I'll try it again once I get my scope back up and running (I have two of these encoders).
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2084
  • Country: us
Re: Rotary Encoder Replacement
« Reply #35 on: July 01, 2024, 03:30:52 am »
As an example, if A and B were high, and the next click brought (let's say B) to a low, I only saw B drop. Maybe I didn't trigger the scope properly and missed it.

You didn't miss anything.  Your encoders just have one transition for each detent.  Other encoders have two, or even four, transitions between detents, and you would see pulses on your scope between detents.  But yours just has one.

If A and B are high, the one that goes low on the first detent, turning clockwise, is the
A pin. Just make sure the A pin of the new encoder is soldered where the A pin of old encoder originally went.
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: Rotary Encoder Replacement
« Reply #36 on: July 05, 2024, 01:23:29 am »
Quote
Since it worked before I disassembled it and doesn't now, a wire or connector must not be seated well. Long story short, I managed to get it powered by removing some connectors, so I'm in the process of trying to figure out what's going on.

From what I can tell, I figured out the problem. I removed the front panel and noticed a small ribbon cable dangling. It must have somehow came out due to not seating it well. After re-seating it and haphazardly reassembling it for testing purposes, the unit powers normal.

The odd thing: at a random point when it wasn't working, it somehow began working normal (minus the power button wasn't doing anything). Immediately upon plugging in AC, the scope would boot. Eventually it stopped working again, so that threw me for a loop because I was looking for a looks connector on the Acquisition Board since I had removed it.

Since I finally got it to boot, I decided to let it go all the way to test the encoder. I turned it several times CW and CCW, and the waveform span and shrunk as expected. It physically fits well, the shaft is a mm or two shorter (hardly noticeable) but won't affect supporting a 3D printed knob, and possible a larger diameter shaft which isn't an issue since I'm 3D printing a knob.

Now I need to reassemble and tinker with a 3D print for the knob someone was kind enough to create for me.

The only other upgrades is adding another 256MB RAM, a SSD, and duplicate my other SSD that has XP on it (I have a backup SSD for my other scope, so I'll use that in a duplicator).

As always, I appreciate all the help, in this case, with the encoder. This will (hopefully) be my second fully working Agilent 54831M (which will be upgraded to the other 1GHz BW model once I remove a resistor) thanks to the help of everyone on here.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf