# Encoder Identification and Replacement

#### Sam Parry

Joined Jan 8, 2017
3
Hi all.

We have a machine that's broken and I think I've whittled the problem down to the encoder because its not correctly getting position feedback.

I just wondered if there's any Gurus that can confirm/deny my findings.

I think from the research I've done that this is an optical incremental linear encoder as the pins on the electronics board are +12v, 0V, A, B.
It looks like a single scale with no Z feedback. I'm not sure if its quadrature output, is there an easy way to tell? Also is there an easy well to tell the resolution of the encoder?

I've included a few pictures. Sorry the picture of the encoder is poor. I had to leave site. I could get a better one if required. I cant find any reference to the codes on the encoder on the internet.

Any light shed on this situation would be a great help. Thanks.

#### Attachments

• 1.5 MB Views: 19
• 102.5 KB Views: 19
Last edited:

Joined Jul 18, 2013
20,898
That appears to be a linear scale, you may be able to replace it with one of optical versions, what make/type of machine is it off? and is there any part No.?
Most are 5v now.
Max.

#### Sam Parry

Joined Jan 8, 2017
3
Thanks for your reply. I've included a screenshot from the user manual showing a connection to an 'optical line'. A, B, +12V, 0V.

Its a Double Mitre saw. STB SD25 made in Italy. Its had a few mods e.g. HMI added to it. Its not been treated particualrly well in the past as you can see in another photo I've attached (board) - This is where the encoder wires connect to the board. Actually just having a closer look at that picture and zooming in it looks like it has an led for A, B, Z and also connections for differential input e.g. Not A, Not B

#### Attachments

• 4.2 MB Views: 13
• 182.4 KB Views: 13

#### mcardoso

Joined May 19, 2020
116
I agree with it being a linear scale. You can buy them cheaply from China, but the usual quality manufacturers make excellent replacements (Heidenhein, Renishaw, etc). Calling a distributor or sales rep could help you match a product of theirs to what you have.

You’d need to know voltage, output wiring, output format (TTL, serial, analog, etc), and resolution.

These run about $80-100 on AliExpress or$500-1000 for a quality unit.

#### mcardoso

Joined May 19, 2020
116
Also can we take a moment to applaud the super sketchy soldering of the wires to a connector SOCKET!!!

#### LesJones

Joined Jan 8, 2017
2,665
I don't know what a double mitre saw looks like and I don't know what HMI stands for. If you can do a manual traverse of the axis with the encoder at a reasonably constant speed then looking at the A and B channels with a dual channel oscilloscope should let you confirm it is quadrature output. If it is then the output of each channel should be a square wave with a 50% duty cycle and the two waveforms should have a 90 degree phase shift between them. (It is possible that the output is a sine wave and it is squared up in the interface circuit.) To measure the resolution you will need to measure how much you need to move the axis for one cycle of one of the outputs. Probably moving the axis with a fine screw thread and using a dial gauge to measure the movement is the simplest way. The resolution will be one quarter if the distanced moved for a full cycle of one of the waveforms. Looking at the picture there does not look enough wires for it to use differential signals. The scale will need a common negative, a positive power supply (12 volts from what you have said.) and one wire for each channel (A, B, Z) for single ended ot two wires for each channel differential.

Les.

Joined Jul 18, 2013
20,898
MMI/HMI Man Machine Interface - Human Machine Interface.
The OP mentioned there is no Z axis, which are very rare on a linear scale, some do have what is known as a fiducial marker as equivalent, however.
The 24v rotary version's are generally open collector output,
In this case only 4 leads are needed mnimum if no marker.
Max.

#### cmartinez

Joined Jan 17, 2007
7,010
Yup, it's quite likely that that thing is a linear scale. If it's an old machine, it's most likely an optical one. Or it could be of the magnetic type if more recent. What's almost certain is that it's of a digital, differential output one. In either case, those things tend to fail for three main reasons:
1. Misalignment of the head, which can be fixed by a simple readjustment using shims and a few tools.
2. Broken wires due to fatigue, the simple solution being changing said wires. Just make sure you use shielded twisted pairs.
3. Broken head or broken scale. The head can break due to impact, and the scale also due to impact or scratching. In this case a complete replacement is recommended.

Joined Jul 18, 2013
20,898
You missed contamination, if it were the glass version with photo-etched glass!.
But I see a retro-reflective track in the scale body.
If so it indicates a fairly coarse resolution!
Max.

#### mcardoso

Joined May 19, 2020
116
You missed contamination, if it were the glass version with photo-etched glass!.
But I see a retro-reflective track in the scale body.
If so it indicates a fairly coarse resolution!
Max.
Could also be an older style that has a "gear" that runs on the rack. Not really a gear but rather a serrated wheel. Not common anymore and not nearly as repeatable as the optical kind.

I don't think it is really necessary to find an exact replacement. These are so commonly used, you only need to match the physical dimensions and electrical output.

Joined Jul 18, 2013
20,898
Also depending on the system used on, it may be necessary to use the same resolution.
Max.

#### Sam Parry

Joined Jan 8, 2017
3
Oh man thank you all so much for your replies! Just got in from work so I'm trying to digest the information.

I'm going back to the workshop to do a few more tests soon. Having a look at all this information and some more reading, my ideas/concerns are:

I'm fairly certain that its the encoder is to blame as the botchery you can see at the connections in the circuit board is similar at the encoder end.

Thank you for the idea of the broken cable. I think I will throw in a new cable to test that its not at fault.

My idea is to still use the scale that's already in place as I think trying to find the resolution is going to be difficult (especially if the encoder is faulty which I suspect). When talking to the operators it sounds that the machine is by no means massively accurate, I think this gets them in the ball park. If I do get another optical encoder, is it sufficient to buy one that matches a range of resolutions so that it is compatible with my scale?

If I do have to replace both scale and encoder I imagine my main problem is going to be the resolution. Am I right in thinking that the math for this is coded in the software for the machine? e.g. a pulse edge = x amount of distance. If i mismatch this then the machine will likely misread? I might try and get in touch with the manufacturers for this and see if they have any information they can share.

I've read about TTL or HTL output which I'm unsure which this encoder is using. My idea was to take a 5V supply with me and go straight in on the input for A and see if the A LED lights up on the board. Would this indicate that its a TTL signal as I'm aware this works at 5V. I might also get the schematic up for the chip that this feeds to see if that gives me any indication if input voltage/signal type.

Thanks again for all your feedback.